From de790fd2739bce7e9b7fc28d3e452bb561e3bdea Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Sat, 18 Apr 2026 14:49:27 -0700 Subject: [PATCH] chore: update Next.js build artifacts (2026-04-18 21:49 UTC, node v22.16.0) --- litellm/proxy/_experimental/out/404.html | 2 +- .../proxy/_experimental/out/404/index.html | 1 - .../_experimental/out/__next.__PAGE__.txt | 26 +- .../proxy/_experimental/out/__next._full.txt | 56 +- .../proxy/_experimental/out/__next._head.txt | 2 +- .../proxy/_experimental/out/__next._index.txt | 4 +- .../proxy/_experimental/out/__next._tree.txt | 4 +- .../_next/static/chunks/01c70caec6e8a2fb.js | 1 + ...82a01ae76d64ee1.js => 02ef31577423355e.js} | 4 +- .../_next/static/chunks/03b2134dbe52a4e9.js | 1 - ...0539b80ac15aad2.js => 0549bc9afa7d4888.js} | 8 +- .../_next/static/chunks/05d900c88781d712.js | 1 + .../_next/static/chunks/072e4deb696e573b.js | 1 - .../_next/static/chunks/086f1dd580fe748e.js | 1 - .../_next/static/chunks/0966511e4807d70c.js | 1 + .../_next/static/chunks/0aa69cb206160fd2.js | 3 - .../_next/static/chunks/0f59b35ee0664fe0.js | 7 + .../_next/static/chunks/1067d2c077cd73d6.js | 4 - .../_next/static/chunks/142704439974f6b3.js | 7 - .../_next/static/chunks/1488f40c80200d6a.js | 38 -- .../_next/static/chunks/154af7547e4197e2.js | 1 + .../_next/static/chunks/179f4b987bc9083f.js | 9 - .../_next/static/chunks/1973a4cee645cb66.js | 1 - ...0d828f9a0668699.js => 1bc2898be56acd1b.js} | 10 +- ...ff09429cca56f00.js => 1c4d372849d019d5.js} | 2 +- .../_next/static/chunks/1d37f4159623f97f.js | 8 + .../_next/static/chunks/1e1da84ff36bc348.js | 1 + .../_next/static/chunks/1efbd5b35545b10a.js | 1 + .../_next/static/chunks/27289c624996260b.js | 8 - .../_next/static/chunks/293db6ec66827abf.js | 1 - .../_next/static/chunks/2bca6e6a96b0858a.js | 1 + .../_next/static/chunks/2d977f15b123350d.js | 1 - .../_next/static/chunks/2e2075aa68530439.js | 1 - .../_next/static/chunks/2f29909dc244a7c0.js | 10 + .../_next/static/chunks/2f5024e5325fd185.css | 1 - .../_next/static/chunks/30c33cea8541a2f1.js | 17 - .../_next/static/chunks/310235aee9719cda.js | 420 ------------ .../_next/static/chunks/321168be6521c38b.js | 7 - .../_next/static/chunks/341e7c75250f4f40.js | 598 ++++++++++++++++++ .../_next/static/chunks/34465d13a9152473.js | 1 + .../_next/static/chunks/35e76c89955c3dd4.js | 1 - .../_next/static/chunks/37821c5764fddf43.js | 231 +++++++ .../_next/static/chunks/37e77c06e99eb8ff.js | 1 + .../_next/static/chunks/37e7834517e667e4.js | 1 + .../_next/static/chunks/399a183eff6b9833.js | 72 +++ .../_next/static/chunks/3ac3a9a88413bb27.js | 1 + ...aa5ca37f441cf6f.js => 3bddc72a3ecc2253.js} | 4 +- .../_next/static/chunks/3d6c5ef3dfe50133.js | 8 - ...dd16a650b98a4c5.js => 3daef8922b68e600.js} | 14 +- .../_next/static/chunks/3ff11f4421ec2309.js | 1 + .../_next/static/chunks/4296324e252ad4cb.js | 8 - .../_next/static/chunks/43a9809839de4e6f.js | 179 ++++++ .../_next/static/chunks/443dce180e4b120d.js | 1 - .../_next/static/chunks/46d42331373d9805.js | 179 ++++++ .../_next/static/chunks/47be83d4515c6599.js | 1 + .../_next/static/chunks/481816c11a5cdf5d.js | 7 - .../_next/static/chunks/48ee00a104bc4050.js | 1 - .../_next/static/chunks/496544a8be968b8b.js | 10 + .../_next/static/chunks/4a97ab1044d56ea9.js | 8 + ...49fa90ad69e3ffa.js => 4b9bda626d5a281b.js} | 2 +- .../_next/static/chunks/4c20f537f674685b.js | 1 - .../_next/static/chunks/4cf854afc1dc27f9.js | 1 - .../_next/static/chunks/4d4e6b09272f4486.js | 1 + .../_next/static/chunks/4da28073ebe41531.js | 1 - .../_next/static/chunks/4dfbb7412144f148.js | 7 + .../_next/static/chunks/4e0ee3124dcdc85b.js | 8 - .../_next/static/chunks/4f4e0760e3622aa1.js | 1 - .../_next/static/chunks/51ffd29d204b6669.js | 420 ------------ .../_next/static/chunks/53272b3f5faf6952.js | 1 - .../_next/static/chunks/5359193917de7974.js | 1 - .../_next/static/chunks/5382aa73658e04db.js | 1 - .../_next/static/chunks/539e53c5005c282b.js | 1 - .../_next/static/chunks/54eac166fe0b18d7.js | 84 --- .../_next/static/chunks/55a9df5b4b98175e.js | 1 - .../_next/static/chunks/568d74e159313220.js | 1 + .../_next/static/chunks/56b846309e9e6bc3.js | 1 - .../_next/static/chunks/58170e1c551aede4.js | 8 + .../_next/static/chunks/5855ff7033bd4d2e.js | 1 - .../_next/static/chunks/59071d63647bc32d.js | 1 - .../_next/static/chunks/5963ae3163ecd9b6.js | 8 - .../_next/static/chunks/59e734a2ea81811b.js | 1 + .../_next/static/chunks/5af64513ec893347.js | 1 + .../_next/static/chunks/5b0f5371e7e706bb.js | 2 - .../_next/static/chunks/5b13448848cf272b.js | 1 - .../_next/static/chunks/5b23ca2957db2e3d.js | 8 + ...9cc4a2273bed4aa.js => 5b7fb0ad19ac5da0.js} | 4 +- .../_next/static/chunks/5c00db2ed7538165.js | 1 - .../_next/static/chunks/5c1181659d5589c4.js | 1 - .../_next/static/chunks/5c1b66689f15243e.js | 1 - ...ed63c0faf1e5a28.js => 5d1b90e5b929acc3.js} | 4 +- .../_next/static/chunks/5d27dfd7d809bd46.js | 420 ------------ .../_next/static/chunks/5df244dcfa153b33.js | 8 - .../_next/static/chunks/5e4cbfe76f1ba150.js | 1 - ...c0c3259bcae442b.js => 5e6fe0b0f346469c.js} | 4 +- .../_next/static/chunks/5f9c3b92a016f382.js | 14 - .../_next/static/chunks/5ff64383046b8aff.js | 20 - .../_next/static/chunks/61d8ae4ec4f309fe.js | 1 - .../_next/static/chunks/61ea050e46b6efa1.js | 8 - .../_next/static/chunks/623eaea02d123060.js | 7 + .../_next/static/chunks/62cdbc4cb0696a24.js | 1 + .../_next/static/chunks/663ebc46a4538643.js | 8 - ...3108ee6d0129019.js => 675b8243f98b6903.js} | 4 +- .../_next/static/chunks/67e23e391b925d91.js | 1 - .../_next/static/chunks/67faedd7c3f4c2e7.js | 1 - .../_next/static/chunks/691e7741f0c007c9.js | 8 - .../_next/static/chunks/69c5481a9fa93d88.js | 1 + .../_next/static/chunks/6a515a8d547c1dfc.js | 8 + .../_next/static/chunks/6b12544c93793ef8.js | 20 - .../_next/static/chunks/6b43cb063dd7650f.js | 1 - .../_next/static/chunks/6ca182f2e580ca9b.js | 1 + .../_next/static/chunks/6dac954f65d9af43.js | 1 + .../_next/static/chunks/6db99a45f4e42ee1.js | 1 + .../_next/static/chunks/6dc89cea942b737a.js | 8 + .../_next/static/chunks/6dcaf23dd53ad9b2.js | 1 - .../_next/static/chunks/6e42aecc62a828a4.js | 179 ------ .../_next/static/chunks/6ea6f7f1d15e966f.js | 1 - ...1adc386e97b4f56.js => 6ef5f1d1f944d232.js} | 4 +- .../_next/static/chunks/70448f37d17f36ae.js | 13 - .../_next/static/chunks/7149faf92f484aca.js | 50 ++ .../_next/static/chunks/73607810c5e7ca9a.js | 8 - ...1d665ffb8330704.js => 73b50c3314123d9d.js} | 4 +- .../_next/static/chunks/747ea6dd4e127c37.js | 1 - .../_next/static/chunks/74ce31aa0fb2adc9.js | 14 + .../_next/static/chunks/75cad56fe1cfe84c.js | 1 - .../_next/static/chunks/76b6374a992fbca0.js | 14 + .../_next/static/chunks/76d25012c7da52a0.js | 8 + .../_next/static/chunks/79080debc00288de.js | 8 + .../_next/static/chunks/7a2dc852f68481ea.js | 50 -- ...d6119b4214ab712.js => 7c36bfe1ba5e3ba8.js} | 12 +- .../_next/static/chunks/7e4551c11f7f1e8a.js | 1 + .../_next/static/chunks/7e521df9564ce99c.js | 8 - .../_next/static/chunks/7e830ceee904c386.js | 8 + .../_next/static/chunks/7ede3688da5c7a5f.js | 1 + .../_next/static/chunks/80619ce7df47600b.js | 84 +++ .../_next/static/chunks/8127cf0d5ad2772a.js | 1 + .../_next/static/chunks/819f26f1dd2ed7b5.js | 8 - .../_next/static/chunks/820b18f25fd37350.js | 8 - .../_next/static/chunks/8237c42a500410c9.js | 1 + .../_next/static/chunks/877101abed503ab2.js | 1 - .../_next/static/chunks/88a1abe702d62904.js | 14 - .../_next/static/chunks/89034a1473717ab9.js | 1 + .../_next/static/chunks/8908525d8a1d1a33.js | 38 ++ .../_next/static/chunks/89a9f6c83d5a09c6.js | 7 - .../_next/static/chunks/8ad88d515b60dca7.js | 72 --- .../_next/static/chunks/8b5a09fadda2d4f0.js | 1 - .../_next/static/chunks/8c4d9ca78c194144.js | 8 + .../_next/static/chunks/8c6f8ac32c75a373.js | 1 + .../_next/static/chunks/8d3e658336b25809.js | 1 + .../_next/static/chunks/900e393d6a9d7b12.js | 1 - .../_next/static/chunks/92cf5d832080641f.js | 13 + .../_next/static/chunks/930f721361599e41.js | 1 - .../_next/static/chunks/9492aee8924914ae.js | 8 + .../_next/static/chunks/951e5ff2dc4928c2.js | 1 + .../_next/static/chunks/95bd09d7d0345fe5.js | 1 + .../_next/static/chunks/96623f8ec328b35a.js | 8 - .../_next/static/chunks/977ff290dac56471.js | 1 - .../_next/static/chunks/980f4b2cf05dae8e.js | 1 + .../_next/static/chunks/98c440d12846fe99.js | 1 + .../_next/static/chunks/98ddd18b25554abd.js | 1 + .../_next/static/chunks/9969d80f8608d1dc.js | 8 + .../_next/static/chunks/99d715502d5069f4.js | 1 - .../_next/static/chunks/9b19f9f63c383201.js | 1 + .../_next/static/chunks/9b4c8a50e297b9ad.js | 1 + .../_next/static/chunks/9b8d229c6e7826fb.js | 17 + .../_next/static/chunks/9bfe1d85217d0efc.js | 8 + .../_next/static/chunks/9ce7fbf2fad5f6f4.js | 17 + .../_next/static/chunks/9edb3e10a3bcd754.js | 1 - .../_next/static/chunks/a0871b3a8352592c.js | 10 - .../_next/static/chunks/a09028cd611c08ef.js | 2 + .../_next/static/chunks/a11b071bfc04b234.js | 1 - .../_next/static/chunks/a1792200c87e0c97.js | 1 + .../_next/static/chunks/a1abfc2f35c701cc.js | 8 + .../_next/static/chunks/a5b10ff77096a982.js | 10 + .../_next/static/chunks/a5de56db893c490c.js | 8 + .../_next/static/chunks/a61a87ca92d576e9.js | 420 ++++++++++++ .../_next/static/chunks/a626c523253e144a.js | 1 + .../_next/static/chunks/a766b162f45f2229.js | 1 + .../_next/static/chunks/a76e219674b601e4.js | 420 ++++++++++++ .../_next/static/chunks/a929674ad23dc234.js | 1 - .../_next/static/chunks/aa7c40f46cb1b417.js | 420 ++++++++++++ .../_next/static/chunks/aac7c99aa647e49d.js | 9 + .../_next/static/chunks/acd6db33552053fb.js | 1 + .../_next/static/chunks/ad46beac3df3dba5.js | 17 - .../_next/static/chunks/ad532bdba5680b08.css | 1 + .../_next/static/chunks/adef4bf3cf492b28.js | 8 - .../_next/static/chunks/ae6509f18c00dc5b.js | 1 - .../_next/static/chunks/b01279f88358b7f5.js | 1 + .../_next/static/chunks/b12bdf0901df004a.js | 1 + .../_next/static/chunks/b29935c7828860b4.js | 17 - .../_next/static/chunks/b6cdb9a433f054f3.js | 2 - .../_next/static/chunks/b83ca9892d2d63cf.js | 420 ++++++++++++ .../_next/static/chunks/b88f74d6b19daf48.js | 1 - .../_next/static/chunks/ba0b0ec2cfedbf03.js | 17 - .../_next/static/chunks/bb71734679762761.js | 1 - .../_next/static/chunks/bbe974da1fd4f044.js | 1 + .../_next/static/chunks/bcab3998b1ef26d0.js | 1 - .../_next/static/chunks/bcbc49655bbecdc3.js | 1 - .../_next/static/chunks/bd29d39cc81d3dc6.js | 231 ------- .../_next/static/chunks/be5ddb5784b2b78a.js | 10 + .../_next/static/chunks/bf30ce92e35d0d54.js | 8 + ...285575743097e8a.js => bfbc736ab510b9aa.js} | 2 +- .../_next/static/chunks/c02afb17a70710d1.js | 433 ------------- .../_next/static/chunks/c0a1c5ed19f4bfe2.js | 7 + ...ad286894fa29834.js => c236812537117996.js} | 4 +- .../_next/static/chunks/c563dc5d6cf8678b.js | 1 - .../_next/static/chunks/c5b9f85e6738bf6f.js | 8 + .../_next/static/chunks/c6c46887fed1bff6.js | 1 - .../_next/static/chunks/c791b31d3a73a025.js | 1 - .../_next/static/chunks/ca5fbafaf3826374.js | 1 + .../_next/static/chunks/cbc0694e47b41fb3.js | 1 - ...5c0e2a9c99fbaf9.js => cbdff18b8d0102ff.js} | 2 +- .../_next/static/chunks/cd677ff381b90c30.js | 1 + .../_next/static/chunks/cecdaabafa264083.js | 1 - .../_next/static/chunks/cf6d63c0175d44db.js | 13 - .../_next/static/chunks/d0510af52e5b6373.js | 1 + .../_next/static/chunks/d077cc2c21a37474.js | 84 --- .../_next/static/chunks/d11611f992bddf33.js | 1 + .../_next/static/chunks/d29d6e2ed772cd40.js | 1 + .../_next/static/chunks/d439b54d089ced2b.js | 1 - .../_next/static/chunks/d6308809b80e3792.js | 84 +++ .../_next/static/chunks/d6be8091255a78cc.js | 1 + .../_next/static/chunks/d70135db4d86d83b.js | 1 + .../_next/static/chunks/da87cea37abf71ef.js | 8 + .../_next/static/chunks/daaa2e6529d97969.js | 7 + .../_next/static/chunks/dd857447096bbcaf.js | 8 - .../_next/static/chunks/ddcd1fd842a79e55.js | 21 + .../_next/static/chunks/de0c9305cb137e96.js | 8 + .../_next/static/chunks/e0371069bf08d367.js | 8 + .../_next/static/chunks/e16f3c0c54307cc7.js | 2 - .../_next/static/chunks/e1ddb2a5fb23f5a5.js | 1 + .../_next/static/chunks/e3d7e1cb037879b6.js | 8 - .../_next/static/chunks/e40bdf27db562169.js | 1 + .../_next/static/chunks/e55673f6717e443a.js | 7 + ...f6d752af33e3d33.js => e5af85ebd6f84f2f.js} | 2 +- .../_next/static/chunks/e69b66bd6ba4a820.js | 1 + .../_next/static/chunks/e77ff93ed9180690.js | 1 + .../_next/static/chunks/e780afa2d4afe985.js | 1 + .../_next/static/chunks/e871b803455fadee.js | 1 + .../_next/static/chunks/e87fad8e1b2f35cb.js | 1 + .../_next/static/chunks/e8b12a8b1fe94fe9.js | 8 + .../_next/static/chunks/ea3bbe042047bd9c.js | 1 - .../_next/static/chunks/ea446ebc8d028964.js | 1 + .../_next/static/chunks/eabd1c9341cacb49.js | 8 + .../_next/static/chunks/eae62cc609f298d0.js | 1 - .../_next/static/chunks/ec6c2f1c9b8d05be.js | 1 - .../_next/static/chunks/ecce455f20a321a8.js | 1 + .../_next/static/chunks/ed901fab61dc16dc.js | 598 ------------------ .../_next/static/chunks/ee2ff956ecb0b135.js | 1 + .../_next/static/chunks/ef8798600e862605.js | 1 - .../_next/static/chunks/f04f887c803d9e60.js | 21 - .../_next/static/chunks/f1dbb03c29e83fe5.js | 420 ------------ .../_next/static/chunks/f27456ba72075ad9.js | 7 + .../_next/static/chunks/f2ef00f2974f51e5.js | 1 - .../_next/static/chunks/f312d33cddfa9c8e.js | 1 - .../_next/static/chunks/f3355f796e387216.js | 1 - .../_next/static/chunks/f38fd03e3ec9f55a.js | 20 - .../_next/static/chunks/f4d1949f60a5a018.js | 1 + .../_next/static/chunks/f5fc27663c2424f7.js | 1 + .../_next/static/chunks/f62432147248db5e.js | 1 + .../_next/static/chunks/f7c95eaa060d1f99.js | 3 + .../_next/static/chunks/f8032ad95f792692.js | 1 - .../_next/static/chunks/fa8dcdcf9803fe4f.js | 8 + .../_next/static/chunks/fb69bd9200e113df.js | 1 + .../_next/static/chunks/fba08c8563db73c3.js | 1 + .../_next/static/chunks/fba48608afe1d559.js | 1 + .../_next/static/chunks/fc7722581dc8bd2f.js | 420 ++++++++++++ ...9790bf57b52ac6e.js => fcad393dcc862a21.js} | 2 +- .../_next/static/chunks/ff560fa1c61d76c6.js | 1 - .../_buildManifest.js | 0 .../_clientMiddlewareManifest.json | 0 .../_ssgManifest.js | 0 .../proxy/_experimental/out/_not-found.html | 2 +- .../proxy/_experimental/out/_not-found.txt | 4 +- .../out/_not-found/__next._full.txt | 4 +- .../out/_not-found/__next._head.txt | 2 +- .../out/_not-found/__next._index.txt | 4 +- .../_not-found/__next._not-found.__PAGE__.txt | 2 +- .../out/_not-found/__next._not-found.txt | 2 +- .../out/_not-found/__next._tree.txt | 4 +- .../_experimental/out/_not-found/index.html | 1 - .../_experimental/out/api-reference.html | 2 +- .../proxy/_experimental/out/api-reference.txt | 10 +- ...KGRhc2hib2FyZCk.api-reference.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.api-reference.txt | 2 +- .../api-reference/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/api-reference/__next._full.txt | 10 +- .../out/api-reference/__next._head.txt | 2 +- .../out/api-reference/__next._index.txt | 4 +- .../out/api-reference/__next._tree.txt | 4 +- .../out/api-reference/index.html | 1 - litellm/proxy/_experimental/out/chat.html | 2 +- litellm/proxy/_experimental/out/chat.txt | 6 +- .../_experimental/out/chat/__next._full.txt | 6 +- .../_experimental/out/chat/__next._head.txt | 2 +- .../_experimental/out/chat/__next._index.txt | 4 +- .../_experimental/out/chat/__next._tree.txt | 4 +- .../out/chat/__next.chat.__PAGE__.txt | 4 +- .../_experimental/out/chat/__next.chat.txt | 2 +- .../proxy/_experimental/out/chat/index.html | 1 - .../out/experimental/api-playground.html | 2 +- .../out/experimental/api-playground.txt | 10 +- ...k.experimental.api-playground.__PAGE__.txt | 4 +- ...2hib2FyZCk.experimental.api-playground.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../api-playground/__next._full.txt | 10 +- .../api-playground/__next._head.txt | 2 +- .../api-playground/__next._index.txt | 4 +- .../api-playground/__next._tree.txt | 4 +- .../experimental/api-playground/index.html | 1 - .../out/experimental/budgets.html | 2 +- .../out/experimental/budgets.txt | 12 +- ...ib2FyZCk.experimental.budgets.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.experimental.budgets.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../budgets/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/experimental/budgets/__next._full.txt | 12 +- .../out/experimental/budgets/__next._head.txt | 2 +- .../experimental/budgets/__next._index.txt | 4 +- .../out/experimental/budgets/__next._tree.txt | 4 +- .../out/experimental/budgets/index.html | 1 - .../out/experimental/caching.html | 2 +- .../out/experimental/caching.txt | 12 +- ...ib2FyZCk.experimental.caching.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.experimental.caching.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../caching/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/experimental/caching/__next._full.txt | 12 +- .../out/experimental/caching/__next._head.txt | 2 +- .../experimental/caching/__next._index.txt | 4 +- .../out/experimental/caching/__next._tree.txt | 4 +- .../out/experimental/caching/index.html | 1 - .../out/experimental/claude-code-plugins.html | 2 +- .../out/experimental/claude-code-plugins.txt | 12 +- ...erimental.claude-code-plugins.__PAGE__.txt | 4 +- ...FyZCk.experimental.claude-code-plugins.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../claude-code-plugins/__next._full.txt | 12 +- .../claude-code-plugins/__next._head.txt | 2 +- .../claude-code-plugins/__next._index.txt | 4 +- .../claude-code-plugins/__next._tree.txt | 4 +- .../claude-code-plugins/index.html | 1 - .../out/experimental/old-usage.html | 2 +- .../out/experimental/old-usage.txt | 12 +- ...2FyZCk.experimental.old-usage.__PAGE__.txt | 4 +- ...KGRhc2hib2FyZCk.experimental.old-usage.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../old-usage/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../experimental/old-usage/__next._full.txt | 12 +- .../experimental/old-usage/__next._head.txt | 2 +- .../experimental/old-usage/__next._index.txt | 4 +- .../experimental/old-usage/__next._tree.txt | 4 +- .../out/experimental/old-usage/index.html | 1 - .../out/experimental/prompts.html | 2 +- .../out/experimental/prompts.txt | 12 +- ...ib2FyZCk.experimental.prompts.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.experimental.prompts.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../prompts/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/experimental/prompts/__next._full.txt | 12 +- .../out/experimental/prompts/__next._head.txt | 2 +- .../experimental/prompts/__next._index.txt | 4 +- .../out/experimental/prompts/__next._tree.txt | 4 +- .../out/experimental/prompts/index.html | 1 - .../out/experimental/tag-management.html | 2 +- .../out/experimental/tag-management.txt | 12 +- ...k.experimental.tag-management.__PAGE__.txt | 4 +- ...2hib2FyZCk.experimental.tag-management.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../tag-management/__next._full.txt | 12 +- .../tag-management/__next._head.txt | 2 +- .../tag-management/__next._index.txt | 4 +- .../tag-management/__next._tree.txt | 4 +- .../experimental/tag-management/index.html | 1 - .../proxy/_experimental/out/guardrails.html | 2 +- .../proxy/_experimental/out/guardrails.txt | 37 +- ...t.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.guardrails.txt | 2 +- .../guardrails/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/guardrails/__next._full.txt | 37 +- .../out/guardrails/__next._head.txt | 2 +- .../out/guardrails/__next._index.txt | 4 +- .../out/guardrails/__next._tree.txt | 4 +- .../_experimental/out/guardrails/index.html | 1 - litellm/proxy/_experimental/out/index.html | 2 +- litellm/proxy/_experimental/out/index.txt | 56 +- litellm/proxy/_experimental/out/login.html | 2 +- litellm/proxy/_experimental/out/login.txt | 6 +- .../_experimental/out/login/__next._full.txt | 6 +- .../_experimental/out/login/__next._head.txt | 2 +- .../_experimental/out/login/__next._index.txt | 4 +- .../_experimental/out/login/__next._tree.txt | 4 +- .../out/login/__next.login.__PAGE__.txt | 4 +- .../_experimental/out/login/__next.login.txt | 2 +- .../proxy/_experimental/out/login/index.html | 1 - litellm/proxy/_experimental/out/logs.html | 2 +- litellm/proxy/_experimental/out/logs.txt | 37 +- .../__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt | 4 +- .../out/logs/__next.!KGRhc2hib2FyZCk.logs.txt | 2 +- .../out/logs/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../_experimental/out/logs/__next._full.txt | 37 +- .../_experimental/out/logs/__next._head.txt | 2 +- .../_experimental/out/logs/__next._index.txt | 4 +- .../_experimental/out/logs/__next._tree.txt | 4 +- .../proxy/_experimental/out/logs/index.html | 1 - .../_experimental/out/mcp/oauth/callback.html | 2 +- .../_experimental/out/mcp/oauth/callback.txt | 4 +- .../out/mcp/oauth/callback/__next._full.txt | 4 +- .../out/mcp/oauth/callback/__next._head.txt | 2 +- .../out/mcp/oauth/callback/__next._index.txt | 4 +- .../out/mcp/oauth/callback/__next._tree.txt | 4 +- .../__next.mcp.oauth.callback.__PAGE__.txt | 2 +- .../callback/__next.mcp.oauth.callback.txt | 2 +- .../mcp/oauth/callback/__next.mcp.oauth.txt | 2 +- .../out/mcp/oauth/callback/__next.mcp.txt | 2 +- .../out/mcp/oauth/callback/index.html | 1 - .../proxy/_experimental/out/model-hub.html | 2 +- litellm/proxy/_experimental/out/model-hub.txt | 37 +- ...xt.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.model-hub.txt | 2 +- .../out/model-hub/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/model-hub/__next._full.txt | 37 +- .../out/model-hub/__next._head.txt | 2 +- .../out/model-hub/__next._index.txt | 4 +- .../out/model-hub/__next._tree.txt | 4 +- .../_experimental/out/model-hub/index.html | 1 - .../proxy/_experimental/out/model_hub.html | 2 +- litellm/proxy/_experimental/out/model_hub.txt | 6 +- .../out/model_hub/__next._full.txt | 6 +- .../out/model_hub/__next._head.txt | 2 +- .../out/model_hub/__next._index.txt | 4 +- .../out/model_hub/__next._tree.txt | 4 +- .../model_hub/__next.model_hub.__PAGE__.txt | 4 +- .../out/model_hub/__next.model_hub.txt | 2 +- .../_experimental/out/model_hub/index.html | 1 - .../_experimental/out/model_hub_table.html | 2 +- .../_experimental/out/model_hub_table.txt | 12 +- .../out/model_hub_table/__next._full.txt | 12 +- .../out/model_hub_table/__next._head.txt | 2 +- .../out/model_hub_table/__next._index.txt | 4 +- .../out/model_hub_table/__next._tree.txt | 4 +- .../__next.model_hub_table.__PAGE__.txt | 4 +- .../__next.model_hub_table.txt | 2 +- .../out/model_hub_table/index.html | 1 - .../out/models-and-endpoints.html | 2 +- .../out/models-and-endpoints.txt | 12 +- ...ib2FyZCk.models-and-endpoints.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.models-and-endpoints.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/models-and-endpoints/__next._full.txt | 12 +- .../out/models-and-endpoints/__next._head.txt | 2 +- .../models-and-endpoints/__next._index.txt | 4 +- .../out/models-and-endpoints/__next._tree.txt | 4 +- .../out/models-and-endpoints/index.html | 1 - .../proxy/_experimental/out/onboarding.html | 2 +- .../proxy/_experimental/out/onboarding.txt | 6 +- .../out/onboarding/__next._full.txt | 6 +- .../out/onboarding/__next._head.txt | 2 +- .../out/onboarding/__next._index.txt | 4 +- .../out/onboarding/__next._tree.txt | 4 +- .../onboarding/__next.onboarding.__PAGE__.txt | 4 +- .../out/onboarding/__next.onboarding.txt | 2 +- .../_experimental/out/onboarding/index.html | 1 - .../_experimental/out/organizations.html | 2 +- .../proxy/_experimental/out/organizations.txt | 12 +- ...KGRhc2hib2FyZCk.organizations.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.organizations.txt | 2 +- .../organizations/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/organizations/__next._full.txt | 12 +- .../out/organizations/__next._head.txt | 2 +- .../out/organizations/__next._index.txt | 4 +- .../out/organizations/__next._tree.txt | 4 +- .../out/organizations/index.html | 1 - .../proxy/_experimental/out/playground.html | 2 +- .../proxy/_experimental/out/playground.txt | 37 +- ...t.!KGRhc2hib2FyZCk.playground.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.playground.txt | 2 +- .../playground/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/playground/__next._full.txt | 37 +- .../out/playground/__next._head.txt | 2 +- .../out/playground/__next._index.txt | 4 +- .../out/playground/__next._tree.txt | 4 +- .../_experimental/out/playground/index.html | 1 - litellm/proxy/_experimental/out/policies.html | 2 +- litellm/proxy/_experimental/out/policies.txt | 37 +- ...ext.!KGRhc2hib2FyZCk.policies.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.policies.txt | 2 +- .../out/policies/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/policies/__next._full.txt | 37 +- .../out/policies/__next._head.txt | 2 +- .../out/policies/__next._index.txt | 4 +- .../out/policies/__next._tree.txt | 4 +- .../_experimental/out/policies/index.html | 1 - .../out/settings/admin-settings.html | 2 +- .../out/settings/admin-settings.txt | 12 +- ...FyZCk.settings.admin-settings.__PAGE__.txt | 4 +- ...GRhc2hib2FyZCk.settings.admin-settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../settings/admin-settings/__next._full.txt | 12 +- .../settings/admin-settings/__next._head.txt | 2 +- .../settings/admin-settings/__next._index.txt | 4 +- .../settings/admin-settings/__next._tree.txt | 4 +- .../out/settings/admin-settings/index.html | 1 - .../out/settings/logging-and-alerts.html | 2 +- .../out/settings/logging-and-alerts.txt | 12 +- ...k.settings.logging-and-alerts.__PAGE__.txt | 4 +- ...2hib2FyZCk.settings.logging-and-alerts.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../logging-and-alerts/__next._full.txt | 12 +- .../logging-and-alerts/__next._head.txt | 2 +- .../logging-and-alerts/__next._index.txt | 4 +- .../logging-and-alerts/__next._tree.txt | 4 +- .../settings/logging-and-alerts/index.html | 1 - .../out/settings/router-settings.html | 2 +- .../out/settings/router-settings.txt | 12 +- ...yZCk.settings.router-settings.__PAGE__.txt | 4 +- ...Rhc2hib2FyZCk.settings.router-settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../settings/router-settings/__next._full.txt | 12 +- .../settings/router-settings/__next._head.txt | 2 +- .../router-settings/__next._index.txt | 4 +- .../settings/router-settings/__next._tree.txt | 4 +- .../out/settings/router-settings/index.html | 1 - .../_experimental/out/settings/ui-theme.html | 2 +- .../_experimental/out/settings/ui-theme.txt | 12 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- ...c2hib2FyZCk.settings.ui-theme.__PAGE__.txt | 4 +- ...ext.!KGRhc2hib2FyZCk.settings.ui-theme.txt | 2 +- .../ui-theme/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/settings/ui-theme/__next._full.txt | 12 +- .../out/settings/ui-theme/__next._head.txt | 2 +- .../out/settings/ui-theme/__next._index.txt | 4 +- .../out/settings/ui-theme/__next._tree.txt | 4 +- .../out/settings/ui-theme/index.html | 1 - litellm/proxy/_experimental/out/skills.html | 1 + litellm/proxy/_experimental/out/skills.txt | 28 + ..._next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt | 9 + .../skills/__next.!KGRhc2hib2FyZCk.skills.txt | 4 + .../out/skills/__next.!KGRhc2hib2FyZCk.txt | 7 + .../_experimental/out/skills/__next._full.txt | 28 + .../_experimental/out/skills/__next._head.txt | 6 + .../out/skills/__next._index.txt | 8 + .../_experimental/out/skills/__next._tree.txt | 4 + litellm/proxy/_experimental/out/teams.html | 2 +- litellm/proxy/_experimental/out/teams.txt | 37 +- ...__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt | 4 +- .../teams/__next.!KGRhc2hib2FyZCk.teams.txt | 2 +- .../out/teams/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../_experimental/out/teams/__next._full.txt | 37 +- .../_experimental/out/teams/__next._head.txt | 2 +- .../_experimental/out/teams/__next._index.txt | 4 +- .../_experimental/out/teams/__next._tree.txt | 4 +- .../proxy/_experimental/out/teams/index.html | 1 - litellm/proxy/_experimental/out/test-key.html | 2 +- litellm/proxy/_experimental/out/test-key.txt | 37 +- ...ext.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.test-key.txt | 2 +- .../out/test-key/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/test-key/__next._full.txt | 37 +- .../out/test-key/__next._head.txt | 2 +- .../out/test-key/__next._index.txt | 4 +- .../out/test-key/__next._tree.txt | 4 +- .../_experimental/out/test-key/index.html | 1 - .../_experimental/out/tools/mcp-servers.html | 2 +- .../_experimental/out/tools/mcp-servers.txt | 12 +- ...c2hib2FyZCk.tools.mcp-servers.__PAGE__.txt | 4 +- ...ext.!KGRhc2hib2FyZCk.tools.mcp-servers.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.tools.txt | 2 +- .../mcp-servers/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/tools/mcp-servers/__next._full.txt | 12 +- .../out/tools/mcp-servers/__next._head.txt | 2 +- .../out/tools/mcp-servers/__next._index.txt | 4 +- .../out/tools/mcp-servers/__next._tree.txt | 4 +- .../out/tools/mcp-servers/index.html | 1 - .../out/tools/vector-stores.html | 2 +- .../_experimental/out/tools/vector-stores.txt | 12 +- .../__next.!KGRhc2hib2FyZCk.tools.txt | 2 +- ...hib2FyZCk.tools.vector-stores.__PAGE__.txt | 4 +- ...t.!KGRhc2hib2FyZCk.tools.vector-stores.txt | 2 +- .../vector-stores/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/tools/vector-stores/__next._full.txt | 12 +- .../out/tools/vector-stores/__next._head.txt | 2 +- .../out/tools/vector-stores/__next._index.txt | 4 +- .../out/tools/vector-stores/__next._tree.txt | 4 +- .../out/tools/vector-stores/index.html | 1 - litellm/proxy/_experimental/out/usage.html | 2 +- litellm/proxy/_experimental/out/usage.txt | 37 +- .../out/usage/__next.!KGRhc2hib2FyZCk.txt | 4 +- ...__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt | 4 +- .../usage/__next.!KGRhc2hib2FyZCk.usage.txt | 2 +- .../_experimental/out/usage/__next._full.txt | 37 +- .../_experimental/out/usage/__next._head.txt | 2 +- .../_experimental/out/usage/__next._index.txt | 4 +- .../_experimental/out/usage/__next._tree.txt | 4 +- .../proxy/_experimental/out/usage/index.html | 1 - litellm/proxy/_experimental/out/users.html | 2 +- litellm/proxy/_experimental/out/users.txt | 37 +- .../out/users/__next.!KGRhc2hib2FyZCk.txt | 4 +- ...__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt | 4 +- .../users/__next.!KGRhc2hib2FyZCk.users.txt | 2 +- .../_experimental/out/users/__next._full.txt | 37 +- .../_experimental/out/users/__next._head.txt | 2 +- .../_experimental/out/users/__next._index.txt | 4 +- .../_experimental/out/users/__next._tree.txt | 4 +- .../proxy/_experimental/out/users/index.html | 1 - .../proxy/_experimental/out/virtual-keys.html | 2 +- .../proxy/_experimental/out/virtual-keys.txt | 37 +- .../virtual-keys/__next.!KGRhc2hib2FyZCk.txt | 4 +- ...!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.virtual-keys.txt | 2 +- .../out/virtual-keys/__next._full.txt | 37 +- .../out/virtual-keys/__next._head.txt | 2 +- .../out/virtual-keys/__next._index.txt | 4 +- .../out/virtual-keys/__next._tree.txt | 4 +- .../_experimental/out/virtual-keys/index.html | 1 - 620 files changed, 5256 insertions(+), 5023 deletions(-) delete mode 100644 litellm/proxy/_experimental/out/404/index.html create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01c70caec6e8a2fb.js rename litellm/proxy/_experimental/out/_next/static/chunks/{082a01ae76d64ee1.js => 02ef31577423355e.js} (76%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/03b2134dbe52a4e9.js rename litellm/proxy/_experimental/out/_next/static/chunks/{30539b80ac15aad2.js => 0549bc9afa7d4888.js} (60%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05d900c88781d712.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/072e4deb696e573b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/086f1dd580fe748e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0966511e4807d70c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0aa69cb206160fd2.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0f59b35ee0664fe0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1067d2c077cd73d6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/142704439974f6b3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1488f40c80200d6a.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/154af7547e4197e2.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/179f4b987bc9083f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1973a4cee645cb66.js rename litellm/proxy/_experimental/out/_next/static/chunks/{d0d828f9a0668699.js => 1bc2898be56acd1b.js} (63%) rename litellm/proxy/_experimental/out/_next/static/chunks/{0ff09429cca56f00.js => 1c4d372849d019d5.js} (64%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1d37f4159623f97f.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1e1da84ff36bc348.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1efbd5b35545b10a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/27289c624996260b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/293db6ec66827abf.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2bca6e6a96b0858a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2d977f15b123350d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2e2075aa68530439.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2f29909dc244a7c0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2f5024e5325fd185.css delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/30c33cea8541a2f1.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/310235aee9719cda.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/321168be6521c38b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/341e7c75250f4f40.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/34465d13a9152473.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/35e76c89955c3dd4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/37821c5764fddf43.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/37e77c06e99eb8ff.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/37e7834517e667e4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/399a183eff6b9833.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3ac3a9a88413bb27.js rename litellm/proxy/_experimental/out/_next/static/chunks/{2aa5ca37f441cf6f.js => 3bddc72a3ecc2253.js} (64%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3d6c5ef3dfe50133.js rename litellm/proxy/_experimental/out/_next/static/chunks/{7dd16a650b98a4c5.js => 3daef8922b68e600.js} (61%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3ff11f4421ec2309.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4296324e252ad4cb.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/43a9809839de4e6f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/443dce180e4b120d.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/46d42331373d9805.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/47be83d4515c6599.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/481816c11a5cdf5d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/48ee00a104bc4050.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/496544a8be968b8b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4a97ab1044d56ea9.js rename litellm/proxy/_experimental/out/_next/static/chunks/{949fa90ad69e3ffa.js => 4b9bda626d5a281b.js} (79%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4c20f537f674685b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4cf854afc1dc27f9.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4d4e6b09272f4486.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4da28073ebe41531.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4dfbb7412144f148.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4e0ee3124dcdc85b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4f4e0760e3622aa1.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/51ffd29d204b6669.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/53272b3f5faf6952.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5359193917de7974.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5382aa73658e04db.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/539e53c5005c282b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/54eac166fe0b18d7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/55a9df5b4b98175e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/568d74e159313220.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/56b846309e9e6bc3.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/58170e1c551aede4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5855ff7033bd4d2e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/59071d63647bc32d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5963ae3163ecd9b6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/59e734a2ea81811b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5af64513ec893347.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5b0f5371e7e706bb.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5b13448848cf272b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5b23ca2957db2e3d.js rename litellm/proxy/_experimental/out/_next/static/chunks/{09cc4a2273bed4aa.js => 5b7fb0ad19ac5da0.js} (76%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5c00db2ed7538165.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5c1181659d5589c4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5c1b66689f15243e.js rename litellm/proxy/_experimental/out/_next/static/chunks/{5ed63c0faf1e5a28.js => 5d1b90e5b929acc3.js} (74%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5d27dfd7d809bd46.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5df244dcfa153b33.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5e4cbfe76f1ba150.js rename litellm/proxy/_experimental/out/_next/static/chunks/{cc0c3259bcae442b.js => 5e6fe0b0f346469c.js} (76%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5f9c3b92a016f382.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5ff64383046b8aff.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/61d8ae4ec4f309fe.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/61ea050e46b6efa1.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/623eaea02d123060.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/62cdbc4cb0696a24.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/663ebc46a4538643.js rename litellm/proxy/_experimental/out/_next/static/chunks/{d3108ee6d0129019.js => 675b8243f98b6903.js} (79%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/67e23e391b925d91.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/67faedd7c3f4c2e7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/691e7741f0c007c9.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/69c5481a9fa93d88.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6a515a8d547c1dfc.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6b12544c93793ef8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6b43cb063dd7650f.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6ca182f2e580ca9b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6dac954f65d9af43.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6db99a45f4e42ee1.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6dc89cea942b737a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6dcaf23dd53ad9b2.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6e42aecc62a828a4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6ea6f7f1d15e966f.js rename litellm/proxy/_experimental/out/_next/static/chunks/{21adc386e97b4f56.js => 6ef5f1d1f944d232.js} (76%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/70448f37d17f36ae.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7149faf92f484aca.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/73607810c5e7ca9a.js rename litellm/proxy/_experimental/out/_next/static/chunks/{91d665ffb8330704.js => 73b50c3314123d9d.js} (54%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/747ea6dd4e127c37.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/74ce31aa0fb2adc9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/75cad56fe1cfe84c.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/76b6374a992fbca0.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/76d25012c7da52a0.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/79080debc00288de.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7a2dc852f68481ea.js rename litellm/proxy/_experimental/out/_next/static/chunks/{1d6119b4214ab712.js => 7c36bfe1ba5e3ba8.js} (60%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7e4551c11f7f1e8a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7e521df9564ce99c.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7e830ceee904c386.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7ede3688da5c7a5f.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/80619ce7df47600b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8127cf0d5ad2772a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/819f26f1dd2ed7b5.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/820b18f25fd37350.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8237c42a500410c9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/877101abed503ab2.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/88a1abe702d62904.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/89034a1473717ab9.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8908525d8a1d1a33.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/89a9f6c83d5a09c6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8ad88d515b60dca7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8b5a09fadda2d4f0.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8c4d9ca78c194144.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8c6f8ac32c75a373.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8d3e658336b25809.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/900e393d6a9d7b12.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/92cf5d832080641f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/930f721361599e41.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9492aee8924914ae.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/951e5ff2dc4928c2.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/95bd09d7d0345fe5.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/96623f8ec328b35a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/977ff290dac56471.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/980f4b2cf05dae8e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/98c440d12846fe99.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/98ddd18b25554abd.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9969d80f8608d1dc.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/99d715502d5069f4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9b19f9f63c383201.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9b4c8a50e297b9ad.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9b8d229c6e7826fb.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9bfe1d85217d0efc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9ce7fbf2fad5f6f4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9edb3e10a3bcd754.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a0871b3a8352592c.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a09028cd611c08ef.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a11b071bfc04b234.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a1792200c87e0c97.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a1abfc2f35c701cc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a5b10ff77096a982.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a5de56db893c490c.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a61a87ca92d576e9.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a626c523253e144a.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a766b162f45f2229.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a76e219674b601e4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a929674ad23dc234.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/aa7c40f46cb1b417.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/aac7c99aa647e49d.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/acd6db33552053fb.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ad46beac3df3dba5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ad532bdba5680b08.css delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/adef4bf3cf492b28.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ae6509f18c00dc5b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b01279f88358b7f5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b12bdf0901df004a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b29935c7828860b4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b6cdb9a433f054f3.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b83ca9892d2d63cf.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b88f74d6b19daf48.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ba0b0ec2cfedbf03.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bb71734679762761.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bbe974da1fd4f044.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bcab3998b1ef26d0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bcbc49655bbecdc3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bd29d39cc81d3dc6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/be5ddb5784b2b78a.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bf30ce92e35d0d54.js rename litellm/proxy/_experimental/out/_next/static/chunks/{6285575743097e8a.js => bfbc736ab510b9aa.js} (59%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c02afb17a70710d1.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c0a1c5ed19f4bfe2.js rename litellm/proxy/_experimental/out/_next/static/chunks/{8ad286894fa29834.js => c236812537117996.js} (76%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c563dc5d6cf8678b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c5b9f85e6738bf6f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c6c46887fed1bff6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c791b31d3a73a025.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ca5fbafaf3826374.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cbc0694e47b41fb3.js rename litellm/proxy/_experimental/out/_next/static/chunks/{75c0e2a9c99fbaf9.js => cbdff18b8d0102ff.js} (59%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cd677ff381b90c30.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cecdaabafa264083.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cf6d63c0175d44db.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d0510af52e5b6373.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d077cc2c21a37474.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d11611f992bddf33.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d29d6e2ed772cd40.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d439b54d089ced2b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d6308809b80e3792.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d6be8091255a78cc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d70135db4d86d83b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/da87cea37abf71ef.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/daaa2e6529d97969.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/dd857447096bbcaf.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ddcd1fd842a79e55.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/de0c9305cb137e96.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e0371069bf08d367.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e16f3c0c54307cc7.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e1ddb2a5fb23f5a5.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e3d7e1cb037879b6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e40bdf27db562169.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e55673f6717e443a.js rename litellm/proxy/_experimental/out/_next/static/chunks/{3f6d752af33e3d33.js => e5af85ebd6f84f2f.js} (95%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e69b66bd6ba4a820.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e77ff93ed9180690.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e780afa2d4afe985.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e871b803455fadee.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e87fad8e1b2f35cb.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e8b12a8b1fe94fe9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ea3bbe042047bd9c.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ea446ebc8d028964.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/eabd1c9341cacb49.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/eae62cc609f298d0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ec6c2f1c9b8d05be.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ecce455f20a321a8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ed901fab61dc16dc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ee2ff956ecb0b135.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ef8798600e862605.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f04f887c803d9e60.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f1dbb03c29e83fe5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f27456ba72075ad9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f2ef00f2974f51e5.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f312d33cddfa9c8e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f3355f796e387216.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f38fd03e3ec9f55a.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f4d1949f60a5a018.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f5fc27663c2424f7.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f62432147248db5e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f7c95eaa060d1f99.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f8032ad95f792692.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fa8dcdcf9803fe4f.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fb69bd9200e113df.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fba08c8563db73c3.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fba48608afe1d559.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fc7722581dc8bd2f.js rename litellm/proxy/_experimental/out/_next/static/chunks/{b9790bf57b52ac6e.js => fcad393dcc862a21.js} (90%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ff560fa1c61d76c6.js rename litellm/proxy/_experimental/out/_next/static/{ak_B7XGok3Ra_ZXFSQmNR => x1MiXvDJ6AiryJNvkycV4}/_buildManifest.js (100%) rename litellm/proxy/_experimental/out/_next/static/{ak_B7XGok3Ra_ZXFSQmNR => x1MiXvDJ6AiryJNvkycV4}/_clientMiddlewareManifest.json (100%) rename litellm/proxy/_experimental/out/_next/static/{ak_B7XGok3Ra_ZXFSQmNR => x1MiXvDJ6AiryJNvkycV4}/_ssgManifest.js (100%) delete mode 100644 litellm/proxy/_experimental/out/_not-found/index.html delete mode 100644 litellm/proxy/_experimental/out/api-reference/index.html delete mode 100644 litellm/proxy/_experimental/out/chat/index.html delete mode 100644 litellm/proxy/_experimental/out/experimental/api-playground/index.html delete mode 100644 litellm/proxy/_experimental/out/experimental/budgets/index.html delete mode 100644 litellm/proxy/_experimental/out/experimental/caching/index.html delete mode 100644 litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.html delete mode 100644 litellm/proxy/_experimental/out/experimental/old-usage/index.html delete mode 100644 litellm/proxy/_experimental/out/experimental/prompts/index.html delete mode 100644 litellm/proxy/_experimental/out/experimental/tag-management/index.html delete mode 100644 litellm/proxy/_experimental/out/guardrails/index.html delete mode 100644 litellm/proxy/_experimental/out/login/index.html delete mode 100644 litellm/proxy/_experimental/out/logs/index.html delete mode 100644 litellm/proxy/_experimental/out/mcp/oauth/callback/index.html delete mode 100644 litellm/proxy/_experimental/out/model-hub/index.html delete mode 100644 litellm/proxy/_experimental/out/model_hub/index.html delete mode 100644 litellm/proxy/_experimental/out/model_hub_table/index.html delete mode 100644 litellm/proxy/_experimental/out/models-and-endpoints/index.html delete mode 100644 litellm/proxy/_experimental/out/onboarding/index.html delete mode 100644 litellm/proxy/_experimental/out/organizations/index.html delete mode 100644 litellm/proxy/_experimental/out/playground/index.html delete mode 100644 litellm/proxy/_experimental/out/policies/index.html delete mode 100644 litellm/proxy/_experimental/out/settings/admin-settings/index.html delete mode 100644 litellm/proxy/_experimental/out/settings/logging-and-alerts/index.html delete mode 100644 litellm/proxy/_experimental/out/settings/router-settings/index.html delete mode 100644 litellm/proxy/_experimental/out/settings/ui-theme/index.html create mode 100644 litellm/proxy/_experimental/out/skills.html create mode 100644 litellm/proxy/_experimental/out/skills.txt create mode 100644 litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt create mode 100644 litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.txt create mode 100644 litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.txt create mode 100644 litellm/proxy/_experimental/out/skills/__next._full.txt create mode 100644 litellm/proxy/_experimental/out/skills/__next._head.txt create mode 100644 litellm/proxy/_experimental/out/skills/__next._index.txt create mode 100644 litellm/proxy/_experimental/out/skills/__next._tree.txt delete mode 100644 litellm/proxy/_experimental/out/teams/index.html delete mode 100644 litellm/proxy/_experimental/out/test-key/index.html delete mode 100644 litellm/proxy/_experimental/out/tools/mcp-servers/index.html delete mode 100644 litellm/proxy/_experimental/out/tools/vector-stores/index.html delete mode 100644 litellm/proxy/_experimental/out/usage/index.html delete mode 100644 litellm/proxy/_experimental/out/users/index.html delete mode 100644 litellm/proxy/_experimental/out/virtual-keys/index.html diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404.html index a828c4ddd3..93b430bad0 100644 --- a/litellm/proxy/_experimental/out/404.html +++ b/litellm/proxy/_experimental/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/litellm/proxy/_experimental/out/404/index.html b/litellm/proxy/_experimental/out/404/index.html deleted file mode 100644 index 344481d3ae..0000000000 --- a/litellm/proxy/_experimental/out/404/index.html +++ /dev/null @@ -1 +0,0 @@ -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/litellm/proxy/_experimental/out/__next.__PAGE__.txt b/litellm/proxy/_experimental/out/__next.__PAGE__.txt index 9dadcf5967..0f0cf5dd0d 100644 --- a/litellm/proxy/_experimental/out/__next.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/__next.__PAGE__.txt @@ -1,27 +1,27 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","/litellm-asset-prefix/_next/static/chunks/99d715502d5069f4.js","/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/d439b54d089ced2b.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/5855ff7033bd4d2e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/67faedd7c3f4c2e7.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/747ea6dd4e127c37.js","/litellm-asset-prefix/_next/static/chunks/bcbc49655bbecdc3.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","/litellm-asset-prefix/_next/static/chunks/d077cc2c21a37474.js","/litellm-asset-prefix/_next/static/chunks/2aa5ca37f441cf6f.js","/litellm-asset-prefix/_next/static/chunks/f04f887c803d9e60.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/bd29d39cc81d3dc6.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/9edb3e10a3bcd754.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/5e4cbfe76f1ba150.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/bb71734679762761.js","/litellm-asset-prefix/_next/static/chunks/ed901fab61dc16dc.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/443dce180e4b120d.js","/litellm-asset-prefix/_next/static/chunks/a5ab01e86df55e55.js","/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","/litellm-asset-prefix/_next/static/chunks/082a01ae76d64ee1.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/ac92164b24de092b.js","/litellm-asset-prefix/_next/static/chunks/7dd16a650b98a4c5.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/8ad88d515b60dca7.js"],"default"] +3:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/cd677ff381b90c30.js","/litellm-asset-prefix/_next/static/chunks/37e77c06e99eb8ff.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/ecce455f20a321a8.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/d29d6e2ed772cd40.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/ea446ebc8d028964.js","/litellm-asset-prefix/_next/static/chunks/89034a1473717ab9.js","/litellm-asset-prefix/_next/static/chunks/e40bdf27db562169.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","/litellm-asset-prefix/_next/static/chunks/399a183eff6b9833.js","/litellm-asset-prefix/_next/static/chunks/37821c5764fddf43.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/a5ab01e86df55e55.js","/litellm-asset-prefix/_next/static/chunks/5b7fb0ad19ac5da0.js","/litellm-asset-prefix/_next/static/chunks/f4d1949f60a5a018.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","/litellm-asset-prefix/_next/static/chunks/d6308809b80e3792.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/ac92164b24de092b.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/3bddc72a3ecc2253.js","/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js"],"default"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 18:"$Sreact.suspense" :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"ak_B7XGok3Ra_ZXFSQmNR","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/99d715502d5069f4.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/d439b54d089ced2b.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/5855ff7033bd4d2e.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/67faedd7c3f4c2e7.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/747ea6dd4e127c37.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/bcbc49655bbecdc3.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/d077cc2c21a37474.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/2aa5ca37f441cf6f.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/f04f887c803d9e60.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/bd29d39cc81d3dc6.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/9edb3e10a3bcd754.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15"],"$L16"]}],"loading":null,"isPartial":false} +0:{"buildId":"x1MiXvDJ6AiryJNvkycV4","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cd677ff381b90c30.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/37e77c06e99eb8ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ecce455f20a321a8.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d29d6e2ed772cd40.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/ea446ebc8d028964.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/89034a1473717ab9.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/e40bdf27db562169.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/399a183eff6b9833.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/37821c5764fddf43.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/a5ab01e86df55e55.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/5b7fb0ad19ac5da0.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/f4d1949f60a5a018.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15"],"$L16"]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" -6:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/5e4cbfe76f1ba150.js","async":true}] -7:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true}] +6:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","async":true}] +7:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/d6308809b80e3792.js","async":true}] 8:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}] -9:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/bb71734679762761.js","async":true}] -a:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/ed901fab61dc16dc.js","async":true}] +9:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}] +a:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","async":true}] b:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}] -c:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/443dce180e4b120d.js","async":true}] -d:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/a5ab01e86df55e55.js","async":true}] -e:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","async":true}] -f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/082a01ae76d64ee1.js","async":true}] +c:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}] +d:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true}] +e:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","async":true}] +f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true}] 10:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","async":true}] 11:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","async":true}] 12:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/ac92164b24de092b.js","async":true}] -13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/7dd16a650b98a4c5.js","async":true}] -14:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}] -15:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/8ad88d515b60dca7.js","async":true}] +13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}] +14:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/3bddc72a3ecc2253.js","async":true}] +15:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","async":true}] 16:["$","$L17",null,{"children":["$","$18",null,{"name":"Next.MetadataOutlet","children":"$@19"}]}] 19:null diff --git a/litellm/proxy/_experimental/out/__next._full.txt b/litellm/proxy/_experimental/out/__next._full.txt index ac44eb4acb..7089e69e83 100644 --- a/litellm/proxy/_experimental/out/__next._full.txt +++ b/litellm/proxy/_experimental/out/__next._full.txt @@ -4,51 +4,51 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","/litellm-asset-prefix/_next/static/chunks/99d715502d5069f4.js","/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/d439b54d089ced2b.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/5855ff7033bd4d2e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/67faedd7c3f4c2e7.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/747ea6dd4e127c37.js","/litellm-asset-prefix/_next/static/chunks/bcbc49655bbecdc3.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","/litellm-asset-prefix/_next/static/chunks/d077cc2c21a37474.js","/litellm-asset-prefix/_next/static/chunks/2aa5ca37f441cf6f.js","/litellm-asset-prefix/_next/static/chunks/f04f887c803d9e60.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/bd29d39cc81d3dc6.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/9edb3e10a3bcd754.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/5e4cbfe76f1ba150.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/bb71734679762761.js","/litellm-asset-prefix/_next/static/chunks/ed901fab61dc16dc.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/443dce180e4b120d.js","/litellm-asset-prefix/_next/static/chunks/a5ab01e86df55e55.js","/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","/litellm-asset-prefix/_next/static/chunks/082a01ae76d64ee1.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/ac92164b24de092b.js","/litellm-asset-prefix/_next/static/chunks/7dd16a650b98a4c5.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/8ad88d515b60dca7.js"],"default"] +7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/cd677ff381b90c30.js","/litellm-asset-prefix/_next/static/chunks/37e77c06e99eb8ff.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/ecce455f20a321a8.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/d29d6e2ed772cd40.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/ea446ebc8d028964.js","/litellm-asset-prefix/_next/static/chunks/89034a1473717ab9.js","/litellm-asset-prefix/_next/static/chunks/e40bdf27db562169.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","/litellm-asset-prefix/_next/static/chunks/399a183eff6b9833.js","/litellm-asset-prefix/_next/static/chunks/37821c5764fddf43.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/a5ab01e86df55e55.js","/litellm-asset-prefix/_next/static/chunks/5b7fb0ad19ac5da0.js","/litellm-asset-prefix/_next/static/chunks/f4d1949f60a5a018.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","/litellm-asset-prefix/_next/static/chunks/d6308809b80e3792.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/ac92164b24de092b.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/3bddc72a3ecc2253.js","/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js"],"default"] 2e:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/2f5024e5325fd185.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/ad532bdba5680b08.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"P":null,"b":"ak_B7XGok3Ra_ZXFSQmNR","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/2f5024e5325fd185.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/99d715502d5069f4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/d439b54d089ced2b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/5855ff7033bd4d2e.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/67faedd7c3f4c2e7.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b"],"$L2c"]}],{},null,false,false]},null,false,false],"$L2d",false]],"m":"$undefined","G":["$2e",[]],"S":true} +0:{"P":null,"b":"x1MiXvDJ6AiryJNvkycV4","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/ad532bdba5680b08.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cd677ff381b90c30.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/37e77c06e99eb8ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ecce455f20a321a8.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d29d6e2ed772cd40.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b"],"$L2c"]}],{},null,false,false]},null,false,false],"$L2d",false]],"m":"$undefined","G":["$2e",[]],"S":true} 2f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 30:"$Sreact.suspense" 32:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 34:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","async":true,"nonce":"$undefined"}] b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}] -c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/747ea6dd4e127c37.js","async":true,"nonce":"$undefined"}] -d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/bcbc49655bbecdc3.js","async":true,"nonce":"$undefined"}] -e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}] -f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","async":true,"nonce":"$undefined"}] -10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}] +c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/ea446ebc8d028964.js","async":true,"nonce":"$undefined"}] +d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/89034a1473717ab9.js","async":true,"nonce":"$undefined"}] +e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/e40bdf27db562169.js","async":true,"nonce":"$undefined"}] +f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] +10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] 11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","async":true,"nonce":"$undefined"}] -12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/d077cc2c21a37474.js","async":true,"nonce":"$undefined"}] -13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/2aa5ca37f441cf6f.js","async":true,"nonce":"$undefined"}] -14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/f04f887c803d9e60.js","async":true,"nonce":"$undefined"}] +12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/399a183eff6b9833.js","async":true,"nonce":"$undefined"}] +13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/37821c5764fddf43.js","async":true,"nonce":"$undefined"}] +14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","async":true,"nonce":"$undefined"}] 15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] -16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/bd29d39cc81d3dc6.js","async":true,"nonce":"$undefined"}] -17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] -18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","async":true,"nonce":"$undefined"}] -19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] -1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/9edb3e10a3bcd754.js","async":true,"nonce":"$undefined"}] -1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}] -1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/5e4cbfe76f1ba150.js","async":true,"nonce":"$undefined"}] -1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true,"nonce":"$undefined"}] +16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/a5ab01e86df55e55.js","async":true,"nonce":"$undefined"}] +17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/5b7fb0ad19ac5da0.js","async":true,"nonce":"$undefined"}] +18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/f4d1949f60a5a018.js","async":true,"nonce":"$undefined"}] +19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] +1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true,"nonce":"$undefined"}] +1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}] +1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","async":true,"nonce":"$undefined"}] +1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/d6308809b80e3792.js","async":true,"nonce":"$undefined"}] 1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] -1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/bb71734679762761.js","async":true,"nonce":"$undefined"}] -20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/ed901fab61dc16dc.js","async":true,"nonce":"$undefined"}] +1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}] +20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","async":true,"nonce":"$undefined"}] 21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] -22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/443dce180e4b120d.js","async":true,"nonce":"$undefined"}] -23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/a5ab01e86df55e55.js","async":true,"nonce":"$undefined"}] -24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","async":true,"nonce":"$undefined"}] -25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/082a01ae76d64ee1.js","async":true,"nonce":"$undefined"}] +22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}] +23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true,"nonce":"$undefined"}] +24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","async":true,"nonce":"$undefined"}] +25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}] 26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","async":true,"nonce":"$undefined"}] 27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","async":true,"nonce":"$undefined"}] 28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/ac92164b24de092b.js","async":true,"nonce":"$undefined"}] -29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/7dd16a650b98a4c5.js","async":true,"nonce":"$undefined"}] -2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}] -2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/8ad88d515b60dca7.js","async":true,"nonce":"$undefined"}] +29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] +2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/3bddc72a3ecc2253.js","async":true,"nonce":"$undefined"}] +2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","async":true,"nonce":"$undefined"}] 2c:["$","$L2f",null,{"children":["$","$30",null,{"name":"Next.MetadataOutlet","children":"$@31"}]}] 2d:["$","$1","h",{"children":[null,["$","$L32",null,{"children":"$L33"}],["$","div",null,{"hidden":true,"children":["$","$L34",null,{"children":["$","$30",null,{"name":"Next.Metadata","children":"$L35"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:{} diff --git a/litellm/proxy/_experimental/out/__next._head.txt b/litellm/proxy/_experimental/out/__next._head.txt index 621a4511e8..c85e363b4b 100644 --- a/litellm/proxy/_experimental/out/__next._head.txt +++ b/litellm/proxy/_experimental/out/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"ak_B7XGok3Ra_ZXFSQmNR","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"x1MiXvDJ6AiryJNvkycV4","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/__next._index.txt b/litellm/proxy/_experimental/out/__next._index.txt index 82c7baeb4f..ccf4f82412 100644 --- a/litellm/proxy/_experimental/out/__next._index.txt +++ b/litellm/proxy/_experimental/out/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/2f5024e5325fd185.css","style"] -0:{"buildId":"ak_B7XGok3Ra_ZXFSQmNR","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/2f5024e5325fd185.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/ad532bdba5680b08.css","style"] +0:{"buildId":"x1MiXvDJ6AiryJNvkycV4","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/ad532bdba5680b08.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/__next._tree.txt b/litellm/proxy/_experimental/out/__next._tree.txt index a4624017da..2ec50b6d92 100644 --- a/litellm/proxy/_experimental/out/__next._tree.txt +++ b/litellm/proxy/_experimental/out/__next._tree.txt @@ -1,5 +1,5 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/2f5024e5325fd185.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/ad532bdba5680b08.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"ak_B7XGok3Ra_ZXFSQmNR","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"x1MiXvDJ6AiryJNvkycV4","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/01c70caec6e8a2fb.js b/litellm/proxy/_experimental/out/_next/static/chunks/01c70caec6e8a2fb.js new file mode 100644 index 0000000000..e2e4370b22 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/01c70caec6e8a2fb.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,355619,e=>{"use strict";var s=e.i(764205);let t=async(e,t,l)=>{try{if(null===e||null===t)return;if(null!==l){let a=(await (0,s.modelAvailableCall)(l,e,t,!0,null,!0)).data.map(e=>e.id),r=[],i=[];return a.forEach(e=>{e.endsWith("/*")?r.push(e):i.push(e)}),[...r,...i]}}catch(e){console.error("Error fetching user models:",e)}};e.s(["fetchAvailableModelsForTeamOrKey",0,t,"getModelDisplayName",0,e=>{if("all-proxy-models"===e)return"All Proxy Models";if(e.endsWith("/*")){let s=e.replace("/*","");return`All ${s} models`}return e},"unfurlWildcardModelsInList",0,(e,s)=>{let t=[],l=[];return console.log("teamModels",e),console.log("allModels",s),e.forEach(e=>{if(e.endsWith("/*")){let a=e.replace("/*",""),r=s.filter(e=>e.startsWith(a+"/"));l.push(...r),t.push(e)}else l.push(e)}),[...t,...l].filter((e,s,t)=>t.indexOf(e)===s)}])},860585,e=>{"use strict";var s=e.i(843476),t=e.i(199133);let{Option:l}=t.Select;e.s(["default",0,({value:e,onChange:a,className:r="",style:i={}})=>(0,s.jsxs)(t.Select,{style:{width:"100%",...i},value:e||void 0,onChange:a,className:r,placeholder:"n/a",allowClear:!0,children:[(0,s.jsx)(l,{value:"1h",children:"hourly"}),(0,s.jsx)(l,{value:"24h",children:"daily"}),(0,s.jsx)(l,{value:"7d",children:"weekly"}),(0,s.jsx)(l,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"1h":"hourly","24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])},213205,e=>{"use strict";e.i(247167);var s=e.i(931067),t=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-add",theme:"outlined"};var a=e.i(9583),r=t.forwardRef(function(e,r){return t.createElement(a.default,(0,s.default)({},e,{ref:r,icon:l}))});e.s(["UserAddOutlined",0,r],213205)},285027,e=>{"use strict";e.i(247167);var s=e.i(931067),t=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"};var a=e.i(9583),r=t.forwardRef(function(e,r){return t.createElement(a.default,(0,s.default)({},e,{ref:r,icon:l}))});e.s(["WarningOutlined",0,r],285027)},447082,e=>{"use strict";var s=e.i(843476),t=e.i(271645),l=e.i(599724),a=e.i(464571),r=e.i(212931),i=e.i(291542),n=e.i(515831),d=e.i(898586),o=e.i(519756),c=e.i(737434),m=e.i(285027),u=e.i(993914),x=e.i(955135);e.i(247167);var h=e.i(931067);let p={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 42h216v494zM472 744a40 40 0 1080 0 40 40 0 10-80 0zm16-104h48c4.4 0 8-3.6 8-8V448c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8z"}}]},name:"file-exclamation",theme:"outlined"};var f=e.i(9583),g=t.forwardRef(function(e,s){return t.createElement(f.default,(0,h.default)({},e,{ref:s,icon:p}))}),j=e.i(764205),y=e.i(59935),v=e.i(220508),b=e.i(964306);let N=t.forwardRef(function(e,s){return t.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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))});var w=e.i(237016),_=e.i(727749);e.s(["default",0,({accessToken:e,teams:h,possibleUIRoles:p,onUsersCreated:f})=>{let[C,S]=(0,t.useState)(!1),[k,I]=(0,t.useState)([]),[T,U]=(0,t.useState)(!1),[V,B]=(0,t.useState)(null),[O,M]=(0,t.useState)(null),[L,F]=(0,t.useState)(null),[z,E]=(0,t.useState)(null),[P,A]=(0,t.useState)(null),[R,D]=(0,t.useState)("http://localhost:4000");(0,t.useEffect)(()=>{(async()=>{try{let s=await (0,j.getProxyUISettings)(e);A(s)}catch(e){console.error("Error fetching UI settings:",e)}})(),D(new URL("/",window.location.href).toString())},[e]);let $=async()=>{U(!0);let s=k.map(e=>({...e,status:"pending"}));I(s);let t=!1;for(let l=0;le.trim()).filter(Boolean),0===s.teams.length&&delete s.teams),a.models&&"string"==typeof a.models&&""!==a.models.trim()&&(s.models=a.models.split(",").map(e=>e.trim()).filter(Boolean),0===s.models.length&&delete s.models),a.max_budget&&""!==a.max_budget.toString().trim()){let e=parseFloat(a.max_budget.toString());!isNaN(e)&&e>0&&(s.max_budget=e)}a.budget_duration&&""!==a.budget_duration.trim()&&(s.budget_duration=a.budget_duration.trim()),a.metadata&&"string"==typeof a.metadata&&""!==a.metadata.trim()&&(s.metadata=a.metadata.trim()),console.log("Sending user data:",s);let r=await (0,j.userCreateCall)(e,null,s);if(console.log("Full response:",r),r&&(r.key||r.user_id)){t=!0,console.log("Success case triggered");let s=r.data?.user_id||r.user_id;try{if(P?.SSO_ENABLED){let e=new URL("/ui",R).toString();I(s=>s.map((s,t)=>t===l?{...s,status:"success",key:r.key||r.user_id,invitation_link:e}:s))}else{let t=await (0,j.invitationCreateCall)(e,s),a=new URL(`/ui?invitation_id=${t.id}`,R).toString();I(e=>e.map((e,s)=>s===l?{...e,status:"success",key:r.key||r.user_id,invitation_link:a}:e))}}catch(e){console.error("Error creating invitation:",e),I(e=>e.map((e,s)=>s===l?{...e,status:"success",key:r.key||r.user_id,error:"User created but failed to generate invitation link"}:e))}}else{console.log("Error case triggered");let e=r?.error||"Failed to create user";console.log("Error message:",e),I(s=>s.map((s,t)=>t===l?{...s,status:"failed",error:e}:s))}}catch(s){console.error("Caught error:",s);let e=s?.response?.data?.error||s?.message||String(s);I(s=>s.map((s,t)=>t===l?{...s,status:"failed",error:e}:s))}}U(!1),t&&f&&f()},W=[{title:"Row",dataIndex:"rowNumber",key:"rowNumber",width:80},{title:"Email",dataIndex:"user_email",key:"user_email"},{title:"Role",dataIndex:"user_role",key:"user_role"},{title:"Teams",dataIndex:"teams",key:"teams"},{title:"Budget",dataIndex:"max_budget",key:"max_budget"},{title:"Status",key:"status",render:(e,t)=>t.isValid?t.status&&"pending"!==t.status?"success"===t.status?(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(v.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}),(0,s.jsx)("span",{className:"text-green-500",children:"Success"})]}),t.invitation_link&&(0,s.jsx)("div",{className:"mt-1",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"text-xs text-gray-500 truncate max-w-[150px]",children:t.invitation_link}),(0,s.jsx)(w.CopyToClipboard,{text:t.invitation_link,onCopy:()=>_.default.success("Invitation link copied!"),children:(0,s.jsx)("button",{className:"ml-1 text-blue-500 text-xs hover:text-blue-700",children:"Copy"})})]})})]}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(b.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,s.jsx)("span",{className:"text-red-500",children:"Failed"})]}),t.error&&(0,s.jsx)("span",{className:"text-sm text-red-500 ml-7",children:JSON.stringify(t.error)})]}):(0,s.jsx)("span",{className:"text-gray-500",children:"Pending"}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(b.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,s.jsx)("span",{className:"text-red-500",children:"Invalid"})]}),t.error&&(0,s.jsx)("span",{className:"text-sm text-red-500 ml-7",children:t.error})]})}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.Button,{type:"primary",className:"mb-0",onClick:()=>S(!0),children:"+ Bulk Invite Users"}),(0,s.jsx)(r.Modal,{title:"Bulk Invite Users",open:C,width:800,onCancel:()=>S(!1),bodyStyle:{maxHeight:"70vh",overflow:"auto"},footer:null,children:(0,s.jsx)("div",{className:"flex flex-col",children:0===k.length?(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"1"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:"Download and fill the template"})]}),(0,s.jsxs)("div",{className:"ml-11 mb-6",children:[(0,s.jsx)("p",{className:"mb-4",children:"Add multiple users at once by following these steps:"}),(0,s.jsxs)("ol",{className:"list-decimal list-inside space-y-2 ml-2 mb-4",children:[(0,s.jsx)("li",{children:"Download our CSV template"}),(0,s.jsx)("li",{children:"Add your users' information to the spreadsheet"}),(0,s.jsx)("li",{children:"Save the file and upload it here"}),(0,s.jsx)("li",{children:"After creation, download the results file containing the Virtual Keys for each user"})]}),(0,s.jsxs)("div",{className:"bg-gray-50 p-4 rounded-md border border-gray-200 mb-4",children:[(0,s.jsx)("h4",{className:"font-medium mb-2",children:"Template Column Names"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"user_email"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"User's email address (required)"})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"user_role"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'User\'s role (one of: "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"teams"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated team IDs (e.g., "team-1,team-2")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"max_budget"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Maximum budget as a number (e.g., "100")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"budget_duration"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Budget reset period (e.g., "30d", "1mo")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"models"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated allowed models (e.g., "gpt-3.5-turbo,gpt-4")'})]})]})]})]}),(0,s.jsx)(a.Button,{type:"primary",size:"large",className:"w-full md:w-auto",icon:(0,s.jsx)(c.DownloadOutlined,{}),children:"Download CSV Template"})]}),(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"2"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:"Upload your completed CSV"})]}),(0,s.jsxs)("div",{className:"ml-11",children:[z?(0,s.jsxs)("div",{className:`mb-4 p-4 rounded-md border ${L?"bg-red-50 border-red-200":"bg-blue-50 border-blue-200"}`,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[L?(0,s.jsx)(g,{className:"text-red-500 text-xl mr-3"}):(0,s.jsx)(u.FileTextOutlined,{className:"text-blue-500 text-xl mr-3"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(d.Typography.Text,{strong:!0,className:L?"text-red-800":"text-blue-800",children:z.name}),(0,s.jsxs)(d.Typography.Text,{className:`block text-xs ${L?"text-red-600":"text-blue-600"}`,children:[(z.size/1024).toFixed(1)," KB • ",new Date().toLocaleDateString()]})]})]}),(0,s.jsx)(a.Button,{size:"small",onClick:()=>{E(null),I([]),B(null),M(null),F(null)},className:"flex items-center",icon:(0,s.jsx)(x.DeleteOutlined,{}),children:"Remove"})]}),L?(0,s.jsxs)("div",{className:"mt-3 text-red-600 text-sm flex items-start",children:[(0,s.jsx)(m.WarningOutlined,{className:"mr-2 mt-0.5"}),(0,s.jsx)("span",{children:L})]}):!O&&(0,s.jsxs)("div",{className:"mt-3 flex items-center",children:[(0,s.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:(0,s.jsx)("div",{className:"bg-blue-500 h-1.5 rounded-full w-full animate-pulse"})}),(0,s.jsx)("span",{className:"ml-2 text-xs text-blue-600",children:"Processing..."})]})]}):(0,s.jsx)(n.Upload,{beforeUpload:e=>((B(null),M(null),F(null),E(e),"text/csv"===e.type||e.name.endsWith(".csv"))?e.size>5242880?F(`File is too large (${(e.size/1048576).toFixed(1)} MB). Please upload a CSV file smaller than 5MB.`):y.default.parse(e,{complete:e=>{if(!e.data||0===e.data.length){M("The CSV file appears to be empty. Please upload a file with data."),I([]);return}if(1===e.data.length){M("The CSV file only contains headers but no user data. Please add user data to your CSV."),I([]);return}let s=e.data[0];if(0===s.length||1===s.length&&""===s[0]){M("The CSV file doesn't contain any column headers. Please make sure your CSV has headers."),I([]);return}let t=["user_email","user_role"].filter(e=>!s.includes(e));if(t.length>0){M(`Your CSV is missing these required columns: ${t.join(", ")}. Please add these columns to your CSV file.`),I([]);return}try{let t=e.data.slice(1).map((e,t)=>{if(0===e.length||1===e.length&&""===e[0])return null;if(e.length=parseFloat(l.max_budget.toString())&&a.push("Max budget must be greater than 0")),l.budget_duration&&!l.budget_duration.match(/^\d+[dhmwy]$|^\d+mo$/)&&a.push(`Invalid budget duration format "${l.budget_duration}". Use format like "30d", "1mo", "2w", "6h"`),l.teams&&"string"==typeof l.teams&&h&&h.length>0){let e=h.map(e=>e.team_id),s=l.teams.split(",").map(e=>e.trim()).filter(s=>!e.includes(s));s.length>0&&a.push(`Unknown team(s): ${s.join(", ")}`)}return a.length>0&&(l.isValid=!1,l.error=a.join(", ")),l}).filter(Boolean),l=t.filter(e=>e.isValid);I(t),0===t.length?M("No valid data rows found in the CSV file. Please check your file format."):0===l.length?B("No valid users found in the CSV. Please check the errors below and fix your CSV file."):l.length{B(`Failed to parse CSV file: ${e.message}`),I([])},header:!1}):(F(`Invalid file type: ${e.name}. Please upload a CSV file (.csv extension).`),_.default.fromBackend("Invalid file type. Please upload a CSV file.")),!1),accept:".csv",maxCount:1,showUploadList:!1,children:(0,s.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-blue-500 transition-colors cursor-pointer",children:[(0,s.jsx)(o.UploadOutlined,{className:"text-3xl text-gray-400 mb-2"}),(0,s.jsx)("p",{className:"mb-1",children:"Drag and drop your CSV file here"}),(0,s.jsx)("p",{className:"text-sm text-gray-500 mb-3",children:"or"}),(0,s.jsx)(a.Button,{size:"small",children:"Browse files"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-4",children:"Only CSV files (.csv) are supported"})]})}),O&&(0,s.jsx)("div",{className:"mb-4 p-4 bg-yellow-50 border border-yellow-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(N,{className:"h-5 w-5 text-yellow-500 mr-2 mt-0.5"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(d.Typography.Text,{strong:!0,className:"text-yellow-800",children:"CSV Structure Error"}),(0,s.jsx)(d.Typography.Paragraph,{className:"text-yellow-700 mt-1 mb-0",children:O}),(0,s.jsx)(d.Typography.Paragraph,{className:"text-yellow-700 mt-2 mb-0",children:"Please download our template and ensure your CSV follows the required format."})]})]})})]})]}):(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"3"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:k.some(e=>"success"===e.status||"failed"===e.status)?"User Creation Results":"Review and create users"})]}),V&&(0,s.jsx)("div",{className:"ml-11 mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(m.WarningOutlined,{className:"text-red-500 mr-2 mt-1"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(l.Text,{className:"text-red-600 font-medium",children:V}),k.some(e=>!e.isValid)&&(0,s.jsxs)("ul",{className:"mt-2 list-disc list-inside text-red-600 text-sm",children:[(0,s.jsx)("li",{children:"Check the table below for specific errors in each row"}),(0,s.jsx)("li",{children:"Common issues include invalid email formats, missing required fields, or incorrect role values"}),(0,s.jsx)("li",{children:"Fix these issues in your CSV file and upload again"})]})]})]})}),(0,s.jsxs)("div",{className:"ml-11",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,s.jsx)("div",{className:"flex items-center",children:k.some(e=>"success"===e.status||"failed"===e.status)?(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(l.Text,{className:"text-lg font-medium mr-3",children:"Creation Summary"}),(0,s.jsxs)(l.Text,{className:"text-sm bg-green-100 text-green-800 px-2 py-1 rounded mr-2",children:[k.filter(e=>"success"===e.status).length," Successful"]}),k.some(e=>"failed"===e.status)&&(0,s.jsxs)(l.Text,{className:"text-sm bg-red-100 text-red-800 px-2 py-1 rounded",children:[k.filter(e=>"failed"===e.status).length," Failed"]})]}):(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(l.Text,{className:"text-lg font-medium mr-3",children:"User Preview"}),(0,s.jsxs)(l.Text,{className:"text-sm bg-blue-100 text-blue-800 px-2 py-1 rounded",children:[k.filter(e=>e.isValid).length," of ",k.length," users valid"]})]})}),!k.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex space-x-3",children:[(0,s.jsx)(a.Button,{onClick:()=>{I([]),B(null)},children:"Back"}),(0,s.jsx)(a.Button,{type:"primary",onClick:$,disabled:0===k.filter(e=>e.isValid).length||T,children:T?"Creating...":`Create ${k.filter(e=>e.isValid).length} Users`})]})]}),k.some(e=>"success"===e.status)&&(0,s.jsx)("div",{className:"mb-4 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"mr-3 mt-1",children:(0,s.jsx)(v.CheckCircleIcon,{className:"h-5 w-5 text-blue-500"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(l.Text,{className:"font-medium text-blue-800",children:"User creation complete"}),(0,s.jsxs)(l.Text,{className:"block text-sm text-blue-700 mt-1",children:[(0,s.jsx)("span",{className:"font-medium",children:"Next step:"})," Download the credentials file containing Virtual Keys and invitation links. Users will need these Virtual Keys to make LLM requests through LiteLLM."]})]})]})}),(0,s.jsx)(i.Table,{dataSource:k,columns:W,size:"small",pagination:{pageSize:5},scroll:{y:300},rowClassName:e=>e.isValid?"":"bg-red-50"}),!k.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,s.jsx)(a.Button,{onClick:()=>{I([]),B(null)},className:"mr-3",children:"Back"}),(0,s.jsx)(a.Button,{type:"primary",onClick:$,disabled:0===k.filter(e=>e.isValid).length||T,children:T?"Creating...":`Create ${k.filter(e=>e.isValid).length} Users`})]}),k.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,s.jsx)(a.Button,{onClick:()=>{I([]),B(null)},className:"mr-3",children:"Start New Bulk Import"}),(0,s.jsx)(a.Button,{type:"primary",onClick:()=>{let e=k.map(e=>({user_email:e.user_email,user_role:e.user_role,status:e.status,key:e.key||"",invitation_link:e.invitation_link||"",error:e.error||""})),s=new Blob([y.default.unparse(e)],{type:"text/csv"}),t=window.URL.createObjectURL(s),l=document.createElement("a");l.href=t,l.download="bulk_users_results.csv",document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(t)},icon:(0,s.jsx)(c.DownloadOutlined,{}),children:"Download User Credentials"})]})]})]})})})]})}],447082)},371455,172372,e=>{"use strict";var s=e.i(843476),t=e.i(827252),l=e.i(213205),a=e.i(912598),r=e.i(109799),i=e.i(677667),n=e.i(130643),d=e.i(898667),o=e.i(35983),c=e.i(779241),m=e.i(560445),u=e.i(464571),x=e.i(808613),h=e.i(311451),p=e.i(212931),f=e.i(199133),g=e.i(770914),j=e.i(592968),y=e.i(898586),v=e.i(271645),b=e.i(447082),N=e.i(663435),w=e.i(355619),_=e.i(727749),C=e.i(764205),S=e.i(237016),k=e.i(599724);function I({isInvitationLinkModalVisible:e,setIsInvitationLinkModalVisible:t,baseUrl:l,invitationLinkData:a,modalType:r="invitation"}){let{Title:i,Paragraph:n}=y.Typography,d=()=>{if(!l)return"";let e=new URL(l).pathname,s=e&&"/"!==e?`${e}/ui`:"ui";if(a?.has_user_setup_sso)return new URL(s,l).toString();let t=`${s}?invitation_id=${a?.id}`;return"resetPassword"===r&&(t+="&action=reset_password"),new URL(t,l).toString()};return(0,s.jsxs)(p.Modal,{title:"invitation"===r?"Invitation Link":"Reset Password Link",open:e,width:800,footer:null,onOk:()=>{t(!1)},onCancel:()=>{t(!1)},children:[(0,s.jsx)(n,{children:"invitation"===r?"Copy and send the generated link to onboard this user to the proxy.":"Copy and send the generated link to the user to reset their password."}),(0,s.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,s.jsx)(k.Text,{className:"text-base",children:"User ID"}),(0,s.jsx)(k.Text,{children:a?.user_id})]}),(0,s.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,s.jsx)(k.Text,{children:"invitation"===r?"Invitation Link":"Reset Password Link"}),(0,s.jsx)(k.Text,{children:(0,s.jsx)(k.Text,{children:d()})})]}),(0,s.jsx)("div",{className:"flex justify-end mt-5",children:(0,s.jsx)(S.CopyToClipboard,{text:d(),onCopy:()=>_.default.success("Copied!"),children:(0,s.jsx)(u.Button,{type:"primary",children:"invitation"===r?"Copy invitation link":"Copy password reset link"})})})]})}e.s(["default",()=>I],172372);let{Option:T}=f.Select,{Text:U,Link:V,Title:B}=y.Typography;e.s(["CreateUserButton",0,({userID:e,accessToken:y,teams:S,possibleUIRoles:k,onUserCreated:B,isEmbedded:O=!1})=>{let M=(0,a.useQueryClient)(),[L,F]=(0,v.useState)(null),[z]=x.Form.useForm(),[E,P]=(0,v.useState)(!1),[A,R]=(0,v.useState)(!1),[D,$]=(0,v.useState)([]),[W,K]=(0,v.useState)(!1),[q,H]=(0,v.useState)(null),[G,J]=(0,v.useState)(null),{data:Q=[]}=(0,r.useOrganizations)();(0,v.useMemo)(()=>{let e=Q.flatMap(e=>e.teams||[]);return e.length>0?e:S||[]},[Q,S]),(0,v.useEffect)(()=>{let s=async()=>{try{let s=await (0,C.modelAvailableCall)(y,e,"any"),t=[];for(let e=0;e{try{_.default.info("Making API Call"),O||P(!0),s.models&&0!==s.models.length||"proxy_admin"===s.user_role||(s.models=["no-default-models"]),s.organization_ids&&(s.organizations=s.organization_ids,delete s.organization_ids);let t=await (0,C.userCreateCall)(y,null,s);await M.invalidateQueries({queryKey:["userList"]}),R(!0);let l=t.data?.user_id||t.user_id;if(B&&O){B(l),z.resetFields();return}if(L?.SSO_ENABLED){let s={id:"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let s=16*Math.random()|0;return("x"==e?s:3&s|8).toString(16)}),user_id:l,is_accepted:!1,accepted_at:null,expires_at:new Date(Date.now()+6048e5),created_at:new Date,created_by:e,updated_at:new Date,updated_by:e,has_user_setup_sso:!0};H(s),K(!0)}else(0,C.invitationCreateCall)(y,l).then(e=>{e.has_user_setup_sso=!1,H(e),K(!0)});_.default.success("API user Created"),z.resetFields(),localStorage.removeItem("userData"+e)}catch(s){let e=s.response?.data?.detail||s?.message||"Error creating the user";_.default.fromBackend(e),console.error("Error creating the user:",s)}};return O?(0,s.jsxs)(x.Form,{form:z,onFinish:X,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer"},children:[(0,s.jsx)(m.Alert,{message:"Email invitations",description:(0,s.jsxs)(s.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,s.jsx)(V,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,s.jsx)(x.Form.Item,{label:"User Email",name:"user_email",children:(0,s.jsx)(c.TextInput,{placeholder:""})}),(0,s.jsx)(x.Form.Item,{label:"User Role",name:"user_role",children:(0,s.jsx)(f.Select,{children:k&&Object.entries(k).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(o.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)(U,{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(x.Form.Item,{label:"Team",name:"team_id",children:(0,s.jsx)(N.default,{})}),(0,s.jsx)(x.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(h.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(u.Button,{htmlType:"submit",children:"Create User"})})]}):(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(u.Button,{type:"primary",className:"mb-0",onClick:()=>P(!0),children:"+ Invite User"}),(0,s.jsx)(b.default,{accessToken:y,teams:S,possibleUIRoles:k}),(0,s.jsxs)(p.Modal,{title:"Invite User",open:E,width:800,footer:null,onOk:()=>{P(!1),z.resetFields()},onCancel:()=>{P(!1),R(!1),z.resetFields()},children:[(0,s.jsxs)(g.Space,{direction:"vertical",size:"middle",children:[(0,s.jsx)(U,{className:"mb-1",children:"Create a User who can own keys"}),(0,s.jsx)(m.Alert,{message:"Email invitations",description:(0,s.jsxs)(s.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,s.jsx)(V,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"})]}),(0,s.jsxs)(x.Form,{form:z,onFinish:X,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer"},children:[(0,s.jsx)(x.Form.Item,{label:"User Email",name:"user_email",children:(0,s.jsx)(h.Input,{})}),(0,s.jsx)(x.Form.Item,{label:(0,s.jsxs)("span",{children:["Global Proxy Role"," ",(0,s.jsx)(j.Tooltip,{title:"This role is independent of any team/org specific roles. Configure Team / Organization Admins in the Settings",children:(0,s.jsx)(t.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,s.jsx)(f.Select,{children:k&&Object.entries(k).map(([e,{ui_label:t,description:l}])=>(0,s.jsxs)(o.SelectItem,{value:e,title:t,children:[(0,s.jsx)(U,{children:t}),(0,s.jsxs)(U,{type:"secondary",children:[" - ",l]})]},e))})}),(0,s.jsx)(x.Form.Item,{label:"Team",className:"gap-2",name:"team_id",help:"If selected, user will be added as a 'user' role to the team.",children:(0,s.jsx)(N.default,{})}),(0,s.jsx)(x.Form.Item,{label:"Organization",name:"organization_ids",help:"The user will be added to the selected organization(s).",children:(0,s.jsx)(f.Select,{mode:"multiple",placeholder:"Select Organization",style:{width:"100%"},children:Q.map(e=>(0,s.jsxs)(T,{value:e.organization_id,children:[e.organization_alias," (",e.organization_id,")"]},e.organization_id))})}),(0,s.jsx)(x.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(h.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsxs)(i.Accordion,{children:[(0,s.jsx)(d.AccordionHeader,{children:(0,s.jsx)(U,{strong:!0,children:"Personal Key Creation"})}),(0,s.jsx)(n.AccordionBody,{children:(0,s.jsx)(x.Form.Item,{className:"gap-2",label:(0,s.jsxs)("span",{children:["Models"," ",(0,s.jsx)(j.Tooltip,{title:"Models user has access to, outside of team scope.",children:(0,s.jsx)(t.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",help:"Models user has access to, outside of team scope.",children:(0,s.jsxs)(f.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,s.jsx)(f.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,s.jsx)(f.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),D.map(e=>(0,s.jsx)(f.Select.Option,{value:e,children:(0,w.getModelDisplayName)(e)},e))]})})})]}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(u.Button,{type:"primary",icon:(0,s.jsx)(l.UserAddOutlined,{}),htmlType:"submit",children:"Invite User"})})]})]}),A&&(0,s.jsx)(I,{isInvitationLinkModalVisible:W,setIsInvitationLinkModalVisible:K,baseUrl:G||"",invitationLinkData:q})]})}],371455)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/082a01ae76d64ee1.js b/litellm/proxy/_experimental/out/_next/static/chunks/02ef31577423355e.js similarity index 76% rename from litellm/proxy/_experimental/out/_next/static/chunks/082a01ae76d64ee1.js rename to litellm/proxy/_experimental/out/_next/static/chunks/02ef31577423355e.js index 6369e31253..4548149789 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/082a01ae76d64ee1.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/02ef31577423355e.js @@ -93,6 +93,6 @@ `]:{animationName:i.slideDownIn},[`${u}${d}bottomLeft`]:{animationName:i.slideUpOut},[` ${u}${d}topLeft, ${u}${d}topRight - `]:{animationName:i.slideDownOut},"&-hidden":{display:"none"},[n]:Object.assign(Object.assign({},l(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},t.textEllipsis),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},l(e)),{color:e.colorTextDisabled})}),[`${f}:has(+ ${f})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${f}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,i.initSlideMotion)(e,"slide-up"),(0,i.initSlideMotion)(e,"slide-down"),(0,a.initMoveMotion)(e,"move-up"),(0,a.initMoveMotion)(e,"move-down")]})(e),{[`${o}-rtl`]:{direction:"rtl"}},(0,r.genCompactItemStyle)(e,{borderElCls:`${o}-selector`,focusElCls:`${o}-focused`})]})(v),{[v.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},{"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},d(v,{borderColor:v.colorBorder,hoverBorderHover:v.hoverBorderColor,activeBorderColor:v.activeBorderColor,activeOutlineColor:v.activeOutlineColor,color:v.colorText})),f(v,{status:"error",borderColor:v.colorError,hoverBorderHover:v.colorErrorHover,activeBorderColor:v.colorError,activeOutlineColor:v.colorErrorOutline,color:v.colorError})),f(v,{status:"warning",borderColor:v.colorWarning,hoverBorderHover:v.colorWarningHover,activeBorderColor:v.colorWarning,activeOutlineColor:v.colorWarningOutline,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{background:v.colorBgContainerDisabled,color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`}})}),{"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},p(v,{bg:v.colorFillTertiary,hoverBg:v.colorFillSecondary,activeBorderColor:v.activeBorderColor,color:v.colorText})),h(v,{status:"error",bg:v.colorErrorBg,hoverBg:v.colorErrorBgHover,activeBorderColor:v.colorError,color:v.colorError})),h(v,{status:"warning",bg:v.colorWarningBg,hoverBg:v.colorWarningBgHover,activeBorderColor:v.colorWarning,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{borderColor:v.colorBorder,background:v.colorBgContainerDisabled,color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.colorBgContainer,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.colorSplit}`}})}),{"&-borderless":{[`${v.componentCls}-selector`]:{background:"transparent",border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} transparent`},[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`},[`&${v.componentCls}-status-error`]:{[`${v.componentCls}-prefix, ${v.componentCls}-selection-item`]:{color:v.colorError}},[`&${v.componentCls}-status-warning`]:{[`${v.componentCls}-prefix, ${v.componentCls}-selection-item`]:{color:v.colorWarning}}}}),{"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},m(v,{borderColor:v.colorBorder,hoverBorderHover:v.hoverBorderColor,activeBorderColor:v.activeBorderColor,activeOutlineColor:v.activeOutlineColor,color:v.colorText})),g(v,{status:"error",borderColor:v.colorError,hoverBorderHover:v.colorErrorHover,activeBorderColor:v.colorError,activeOutlineColor:v.colorErrorOutline,color:v.colorError})),g(v,{status:"warning",borderColor:v.colorWarning,hoverBorderHover:v.colorWarningHover,activeBorderColor:v.colorWarning,activeOutlineColor:v.colorWarningOutline,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`}})})}]},e=>{let{fontSize:t,lineHeight:r,lineWidth:o,controlHeight:n,controlHeightSM:a,controlHeightLG:i,paddingXXS:l,controlPaddingHorizontal:s,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:h,colorFillSecondary:m,colorBgContainerDisabled:g,colorTextDisabled:v,colorPrimaryHover:y,colorPrimary:b,controlOutline:w}=e,$=2*l,C=2*o,x=Math.min(n-$,n-C),E=Math.min(a-$,a-C),S=Math.min(i-$,i-C);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(n-t*r)/2}px ${s}px`,optionFontSize:t,optionLineHeight:r,optionHeight:n,selectorBg:h,clearBg:h,singleItemHeightLG:i,multipleItemBg:m,multipleItemBorderColor:"transparent",multipleItemHeight:x,multipleItemHeightSM:E,multipleItemHeightLG:S,multipleSelectorBgDisabled:g,multipleItemColorDisabled:v,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize),hoverBorderColor:y,activeBorderColor:b,activeOutlineColor:w,selectAffixPadding:l}},{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});e.s(["default",0,v],950302)},121229,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var n=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(n.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["default",0,a],121229)},729151,e=>{"use strict";var t=e.i(271645),r=e.i(121229),o=e.i(726289),n=e.i(864517),a=e.i(247153),i=e.i(739295),l=e.i(38953);function s({suffixIcon:e,clearIcon:s,menuItemSelectedIcon:c,removeIcon:u,loading:d,multiple:f,hasFeedback:p,prefixCls:h,showSuffixIcon:m,feedbackIcon:g,showArrow:v,componentName:y}){let b=null!=s?s:t.createElement(o.default,null),w=r=>null!==e||p||v?t.createElement(t.Fragment,null,!1!==m&&r,p&&g):null,$=null;if(void 0!==e)$=w(e);else if(d)$=w(t.createElement(i.default,{spin:!0}));else{let e=`${h}-suffix`;$=({open:r,showSearch:o})=>r&&o?w(t.createElement(l.default,{className:e})):w(t.createElement(a.default,{className:e}))}let C=null;C=void 0!==c?c:f?t.createElement(r.default,null):null;return{clearIcon:b,suffixIcon:$,itemIcon:C,removeIcon:void 0!==u?u:t.createElement(n.default,null)}}e.s(["default",()=>s])},327494,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(123829),n=e.i(955492),a=e.i(869301),i=e.i(529681),l=e.i(122767),s=e.i(613541),c=e.i(805484),u=e.i(52956),d=e.i(242064),f=e.i(721132),p=e.i(937328),h=e.i(321883),m=e.i(517455),g=e.i(62139),v=e.i(792812),y=e.i(249616),b=e.i(104458),w=e.i(85566),$=e.i(950302),C=e.i(729151),x=e.i(617206),E=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let S="SECRET_COMBOBOX_MODE_DO_NOT_USE",k=t.forwardRef((e,n)=>{var a,c,k,j,O,T,I,F;let _,{prefixCls:P,bordered:R,className:N,rootClassName:M,getPopupContainer:B,popupClassName:A,dropdownClassName:z,listHeight:L=256,placement:D,listItemHeight:H,size:V,disabled:W,notFoundContent:U,status:G,builtinPlacements:q,dropdownMatchSelectWidth:J,popupMatchSelectWidth:K,direction:X,style:Y,allowClear:Q,variant:Z,dropdownStyle:ee,transitionName:et,tagRender:er,maxCount:eo,prefix:en,dropdownRender:ea,popupRender:ei,onDropdownVisibleChange:el,onOpenChange:es,styles:ec,classNames:eu}=e,ed=E(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:ef,getPrefixCls:ep,renderEmpty:eh,direction:em,virtual:eg,popupMatchSelectWidth:ev,popupOverflow:ey}=t.useContext(d.ConfigContext),{showSearch:eb,style:ew,styles:e$,className:eC,classNames:ex}=(0,d.useComponentConfig)("select"),[,eE]=(0,b.useToken)(),eS=null!=H?H:null==eE?void 0:eE.controlHeight,ek=ep("select",P),ej=ep(),eO=null!=X?X:em,{compactSize:eT,compactItemClassnames:eI}=(0,y.useCompactItemContext)(ek,eO),[eF,e_]=(0,v.default)("select",Z,R),eP=(0,h.default)(ek),[eR,eN,eM]=(0,$.default)(ek,eP),eB=t.useMemo(()=>{let{mode:t}=e;if("combobox"!==t)return t===S?"combobox":t},[e.mode]),eA="multiple"===eB||"tags"===eB,ez=(T=e.suffixIcon,void 0!==(I=e.showArrow)?I:null!==T),eL=null!=(a=null!=K?K:J)?a:ev,eD=(null==(c=null==ec?void 0:ec.popup)?void 0:c.root)||(null==(k=e$.popup)?void 0:k.root)||ee,eH=(F=ei||ea,t.default.useMemo(()=>{if(F)return(...e)=>t.default.createElement(x.default,{space:!0},F.apply(void 0,e))},[F])),{status:eV,hasFeedback:eW,isFormItemInput:eU,feedbackIcon:eG}=t.useContext(g.FormItemInputContext),eq=(0,u.getMergedStatus)(eV,G);_=void 0!==U?U:"combobox"===eB?null:(null==eh?void 0:eh("Select"))||t.createElement(f.default,{componentName:"Select"});let{suffixIcon:eJ,itemIcon:eK,removeIcon:eX,clearIcon:eY}=(0,C.default)(Object.assign(Object.assign({},ed),{multiple:eA,hasFeedback:eW,feedbackIcon:eG,showSuffixIcon:ez,prefixCls:ek,componentName:"Select"})),eQ=(0,i.default)(ed,["suffixIcon","itemIcon"]),eZ=(0,r.default)((null==(j=null==eu?void 0:eu.popup)?void 0:j.root)||(null==(O=null==ex?void 0:ex.popup)?void 0:O.root)||A||z,{[`${ek}-dropdown-${eO}`]:"rtl"===eO},M,ex.root,null==eu?void 0:eu.root,eM,eP,eN),e0=(0,m.default)(e=>{var t;return null!=(t=null!=V?V:eT)?t:e}),e1=t.useContext(p.default),e2=(0,r.default)({[`${ek}-lg`]:"large"===e0,[`${ek}-sm`]:"small"===e0,[`${ek}-rtl`]:"rtl"===eO,[`${ek}-${eF}`]:e_,[`${ek}-in-form-item`]:eU},(0,u.getStatusClassNames)(ek,eq,eW),eI,eC,N,ex.root,null==eu?void 0:eu.root,M,eM,eP,eN),e4=t.useMemo(()=>void 0!==D?D:"rtl"===eO?"bottomRight":"bottomLeft",[D,eO]),[e6]=(0,l.useZIndex)("SelectLike",null==eD?void 0:eD.zIndex);return eR(t.createElement(o.default,Object.assign({ref:n,virtual:eg,showSearch:eb},eQ,{style:Object.assign(Object.assign(Object.assign(Object.assign({},e$.root),null==ec?void 0:ec.root),ew),Y),dropdownMatchSelectWidth:eL,transitionName:(0,s.getTransitionName)(ej,"slide-up",et),builtinPlacements:(0,w.default)(q,ey),listHeight:L,listItemHeight:eS,mode:eB,prefixCls:ek,placement:e4,direction:eO,prefix:en,suffixIcon:eJ,menuItemSelectedIcon:eK,removeIcon:eX,allowClear:!0===Q?{clearIcon:eY}:Q,notFoundContent:_,className:e2,getPopupContainer:B||ef,dropdownClassName:eZ,disabled:null!=W?W:e1,dropdownStyle:Object.assign(Object.assign({},eD),{zIndex:e6}),maxCount:eA?eo:void 0,tagRender:eA?er:void 0,dropdownRender:eH,onDropdownVisibleChange:es||el})))}),j=(0,c.default)(k,"dropdownAlign");k.SECRET_COMBOBOX_MODE_DO_NOT_USE=S,k.Option=a.Option,k.OptGroup=n.OptGroup,k._InternalPanelDoNotUseOrYouWillBeFired=j,e.s(["default",0,k],327494)},199133,e=>{"use strict";var t=e.i(327494);e.s(["Select",()=>t.default])},290571,e=>{"use strict";function t(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}"function"==typeof SuppressedError&&SuppressedError,e.s(["__rest",()=>t])},480731,e=>{"use strict";let t={Increase:"increase",ModerateIncrease:"moderateIncrease",Decrease:"decrease",ModerateDecrease:"moderateDecrease",Unchanged:"unchanged"},r={Slate:"slate",Gray:"gray",Zinc:"zinc",Neutral:"neutral",Stone:"stone",Red:"red",Orange:"orange",Amber:"amber",Yellow:"yellow",Lime:"lime",Green:"green",Emerald:"emerald",Teal:"teal",Cyan:"cyan",Sky:"sky",Blue:"blue",Indigo:"indigo",Violet:"violet",Purple:"purple",Fuchsia:"fuchsia",Pink:"pink",Rose:"rose"},o={XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl"},n={Left:"left",Right:"right"},a={Top:"top",Bottom:"bottom"};e.s(["BaseColors",()=>r,"DeltaTypes",()=>t,"HorizontalPositions",()=>n,"Sizes",()=>o,"VerticalPositions",()=>a])},673706,e=>{"use strict";e.i(480731);let t=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],r=e=>e.toString(),o=e=>e.reduce((e,t)=>e+t,0),n=(e,t)=>{for(let r=0;r{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function i(e){return t=>`tremor-${e}-${t}`}function l(e,r){let o=t.includes(e);if("white"===e||"black"===e||"transparent"===e||!r||!o){let t=e.includes("#")||e.includes("--")||e.includes("rgb")?`[${e}]`:e;return{bgColor:`bg-${t} dark:bg-${t}`,hoverBgColor:`hover:bg-${t} dark:hover:bg-${t}`,selectBgColor:`data-[selected]:bg-${t} dark:data-[selected]:bg-${t}`,textColor:`text-${t} dark:text-${t}`,selectTextColor:`data-[selected]:text-${t} dark:data-[selected]:text-${t}`,hoverTextColor:`hover:text-${t} dark:hover:text-${t}`,borderColor:`border-${t} dark:border-${t}`,selectBorderColor:`data-[selected]:border-${t} dark:data-[selected]:border-${t}`,hoverBorderColor:`hover:border-${t} dark:hover:border-${t}`,ringColor:`ring-${t} dark:ring-${t}`,strokeColor:`stroke-${t} dark:stroke-${t}`,fillColor:`fill-${t} dark:fill-${t}`}}return{bgColor:`bg-${e}-${r} dark:bg-${e}-${r}`,selectBgColor:`data-[selected]:bg-${e}-${r} dark:data-[selected]:bg-${e}-${r}`,hoverBgColor:`hover:bg-${e}-${r} dark:hover:bg-${e}-${r}`,textColor:`text-${e}-${r} dark:text-${e}-${r}`,selectTextColor:`data-[selected]:text-${e}-${r} dark:data-[selected]:text-${e}-${r}`,hoverTextColor:`hover:text-${e}-${r} dark:hover:text-${e}-${r}`,borderColor:`border-${e}-${r} dark:border-${e}-${r}`,selectBorderColor:`data-[selected]:border-${e}-${r} dark:data-[selected]:border-${e}-${r}`,hoverBorderColor:`hover:border-${e}-${r} dark:hover:border-${e}-${r}`,ringColor:`ring-${e}-${r} dark:ring-${e}-${r}`,strokeColor:`stroke-${e}-${r} dark:stroke-${e}-${r}`,fillColor:`fill-${e}-${r} dark:fill-${e}-${r}`}}e.s(["defaultValueFormatter",()=>r,"getColorClassNames",()=>l,"isValueInArray",()=>n,"makeClassName",()=>i,"mergeRefs",()=>a,"sumNumericArray",()=>o],673706)},689074,21243,98801,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let o=e=>{var o=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},o),r.default.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z"}))};e.s(["default",()=>o],689074);let n=e=>{var o=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},o),r.default.createElement("path",{d:"M1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12ZM12.0003 17C14.7617 17 17.0003 14.7614 17.0003 12C17.0003 9.23858 14.7617 7 12.0003 7C9.23884 7 7.00026 9.23858 7.00026 12C7.00026 14.7614 9.23884 17 12.0003 17ZM12.0003 15C10.3434 15 9.00026 13.6569 9.00026 12C9.00026 10.3431 10.3434 9 12.0003 9C13.6571 9 15.0003 10.3431 15.0003 12C15.0003 13.6569 13.6571 15 12.0003 15Z"}))};e.s(["default",()=>n],21243);let a=e=>{var o=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},o),r.default.createElement("path",{d:"M4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457ZM14.7577 16.1718L13.2937 14.7078C12.902 14.8952 12.4634 15.0002 12.0003 15.0002C10.3434 15.0002 9.00026 13.657 9.00026 12.0002C9.00026 11.537 9.10522 11.0984 9.29263 10.7067L7.82866 9.24277C7.30514 10.0332 7.00026 10.9811 7.00026 12.0002C7.00026 14.7616 9.23884 17.0002 12.0003 17.0002C13.0193 17.0002 13.9672 16.6953 14.7577 16.1718ZM7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925L16.947 12.7327C16.9821 12.4936 17.0003 12.249 17.0003 12.0002C17.0003 9.23873 14.7617 7.00016 12.0003 7.00016C11.7514 7.00016 11.5068 7.01833 11.2677 7.05343L7.97446 3.76015Z"}))};e.s(["default",()=>a],98801)},444755,e=>{"use strict";let t=(e,r)=>{if(0===e.length)return r.classGroupId;let o=e[0],n=r.nextPart.get(o),a=n?t(e.slice(1),n):void 0;if(a)return a;if(0===r.validators.length)return;let i=e.join("-");return r.validators.find(({validator:e})=>e(i))?.classGroupId},r=/^\[(.+)\]$/,o=(e,t,r,i)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:n(t,e)).classGroupId=r;return}"function"==typeof e?a(e)?o(e(i),t,r,i):t.validators.push({validator:e,classGroupId:r}):Object.entries(e).forEach(([e,a])=>{o(a,n(t,e),r,i)})})},n=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},a=e=>e.isThemeGetter,i=(e,t)=>t?e.map(([e,r])=>[e,r.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,r])=>[t+e,r])):e)]):e,l=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t},s=/\s+/;function c(){let e,t,r=0,o="";for(;r{let t;if("string"==typeof e)return e;let r="";for(let o=0;o{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,o=new Map,n=(n,a)=>{r.set(n,a),++t>e&&(t=0,o=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(n(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):n(e,t)}}})((s=n.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{separator:t,experimentalParseClassName:r}=e,o=1===t.length,n=t[0],a=t.length,i=e=>{let r,i=[],l=0,s=0;for(let c=0;cs?r-s:void 0}};return r?e=>r({className:e,parseClassName:i}):i})(s),...(e=>{let n=(e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return i(Object.entries(e.classGroups),r).forEach(([e,r])=>{o(r,n,e,t)}),n})(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:e=>{let o=e.split("-");return""===o[0]&&1!==o.length&&o.shift(),t(o,n)||(e=>{if(r.test(e)){let t=r.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}})(e)},getConflictingClassGroupIds:(e,t)=>{let r=a[e]||[];return t&&l[e]?[...r,...l[e]]:r}}})(s)}).cache.get,f=a.cache.set,p=h,h(l)};function h(e){let t=u(e);if(t)return t;let r=((e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(s),c="";for(let e=i.length-1;e>=0;e-=1){let t=i[e],{modifiers:s,hasImportantModifier:u,baseClassName:d,maybePostfixModifierPosition:f}=r(t),p=!!f,h=o(p?d.substring(0,f):d);if(!h){if(!p||!(h=o(d))){c=t+(c.length>0?" "+c:c);continue}p=!1}let m=l(s).join(":"),g=u?m+"!":m,v=g+h;if(a.includes(v))continue;a.push(v);let y=n(h,p);for(let e=0;e0?" "+c:c)}return c})(e,a);return f(e,r),r}return function(){return p(c.apply(null,arguments))}}let f=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},p=/^\[(?:([a-z-]+):)?(.+)\]$/i,h=/^\d+\/\d+$/,m=new Set(["px","full","screen"]),g=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,v=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,y=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,b=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,w=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$=e=>x(e)||m.has(e)||h.test(e),C=e=>M(e,"length",B),x=e=>!!e&&!Number.isNaN(Number(e)),E=e=>M(e,"number",x),S=e=>!!e&&Number.isInteger(Number(e)),k=e=>e.endsWith("%")&&x(e.slice(0,-1)),j=e=>p.test(e),O=e=>g.test(e),T=new Set(["length","size","percentage"]),I=e=>M(e,T,A),F=e=>M(e,"position",A),_=new Set(["image","url"]),P=e=>M(e,_,L),R=e=>M(e,"",z),N=()=>!0,M=(e,t,r)=>{let o=p.exec(e);return!!o&&(o[1]?"string"==typeof t?o[1]===t:t.has(o[1]):r(o[2]))},B=e=>v.test(e)&&!y.test(e),A=()=>!1,z=e=>b.test(e),L=e=>w.test(e),D=()=>{let e=f("colors"),t=f("spacing"),r=f("blur"),o=f("brightness"),n=f("borderColor"),a=f("borderRadius"),i=f("borderSpacing"),l=f("borderWidth"),s=f("contrast"),c=f("grayscale"),u=f("hueRotate"),d=f("invert"),p=f("gap"),h=f("gradientColorStops"),m=f("gradientColorStopPositions"),g=f("inset"),v=f("margin"),y=f("opacity"),b=f("padding"),w=f("saturate"),T=f("scale"),_=f("sepia"),M=f("skew"),B=f("space"),A=f("translate"),z=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",j,t],H=()=>[j,t],V=()=>["",$,C],W=()=>["auto",x,j],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",j],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[x,j];return{cacheSize:500,separator:":",theme:{colors:[N],spacing:[$,C],blur:["none","",O,j],brightness:Y(),borderColor:[e],borderRadius:["none","","full",O,j],borderSpacing:H(),borderWidth:V(),contrast:Y(),grayscale:K(),hueRotate:Y(),invert:K(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[k,C],inset:D(),margin:D(),opacity:Y(),padding:H(),saturate:Y(),scale:Y(),sepia:K(),skew:Y(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[O]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),j]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",S,j]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",S,j]}],"grid-cols":[{"grid-cols":[N]}],"col-start-end":[{col:["auto",{span:["full",S,j]},j]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[N]}],"row-start-end":[{row:["auto",{span:[S,j]},j]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...J()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...J(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...J(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,t]}],"min-w":[{"min-w":[j,t,"min","max","fit"]}],"max-w":[{"max-w":[j,t,"none","full","min","max","fit","prose",{screen:[O]},O]}],h:[{h:[j,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,t,"auto","min","max","fit"]}],"font-size":[{text:["base",O,C]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",E]}],"font-family":[{font:[N]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",j]}],"line-clamp":[{"line-clamp":["none",x,E]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$,C]}],"underline-offset":[{"underline-offset":["auto",$,j]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),F]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",I]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},P]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:G()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[$,j]}],"outline-w":[{outline:[$,C]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[$,C]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",O,R]}],"shadow-color":[{shadow:[N]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",O,j]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[S,j]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",j]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",j]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$,C,E]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},H=(e,t,r)=>{void 0!==r&&(e[t]=r)},V=(e,t)=>{if(t)for(let r in t)H(e,r,t[r])},W=(e,t)=>{if(t)for(let r in t){let o=t[r];void 0!==o&&(e[r]=(e[r]||[]).concat(o))}},U=((e,...t)=>"function"==typeof e?d(D,e,...t):d(()=>((e,{cacheSize:t,prefix:r,separator:o,experimentalParseClassName:n,extend:a={},override:i={}})=>{for(let a in H(e,"cacheSize",t),H(e,"prefix",r),H(e,"separator",o),H(e,"experimentalParseClassName",n),i)V(e[a],i[a]);for(let t in a)W(e[t],a[t]);return e})(D(),e),...t))({extend:{classGroups:{shadow:[{shadow:[{tremor:["input","card","dropdown"],"dark-tremor":["input","card","dropdown"]}]}],rounded:[{rounded:[{tremor:["small","default","full"],"dark-tremor":["small","default","full"]}]}],"font-size":[{text:[{tremor:["default","title","metric"],"dark-tremor":["default","title","metric"]}]}]}}});e.s(["tremorTwMerge",()=>U],444755)},103471,e=>{"use strict";var t=e.i(444755),r=e.i(271645);let o=e=>["string","number"].includes(typeof e)?e:e instanceof Array?e.map(o).join(""):"object"==typeof e&&e?o(e.props.children):void 0;function n(e){let t=new Map;return r.default.Children.map(e,e=>{var r;t.set(e.props.value,null!=(r=o(e))?r:e.props.value)}),t}function a(e,t){return r.default.Children.map(t,t=>{var r;if((null!=(r=o(t))?r:t.props.value).toLowerCase().includes(e.toLowerCase()))return t})}let i=(e,r,o=!1)=>(0,t.tremorTwMerge)(r?"bg-tremor-background-subtle dark:bg-dark-tremor-background-subtle":"bg-tremor-background dark:bg-dark-tremor-background",!r&&"hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted",e?"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis":"text-tremor-content dark:text-dark-tremor-content",r&&"text-tremor-content-subtle dark:text-dark-tremor-content-subtle",o&&"text-red-500 placeholder:text-red-500 dark:text-red-500 dark:placeholder:text-red-500",o?"border-red-500 dark:border-red-500":"border-tremor-border dark:border-dark-tremor-border");function l(e){return null!=e&&""!==e}e.s(["constructValueToNameMapping",()=>n,"getFilteredOptions",()=>a,"getNodeText",()=>o,"getSelectButtonColors",()=>i,"hasValue",()=>l])},779241,677955,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(673706),n=e.i(689074),a=e.i(21243),i=e.i(98801),l=e.i(103471),s=e.i(444755);let c=r.default.forwardRef((e,c)=>{let{value:u,defaultValue:d,type:f,placeholder:p="Type...",icon:h,error:m=!1,errorMessage:g,disabled:v=!1,stepper:y,makeInputClassName:b,className:w,onChange:$,onValueChange:C,autoFocus:x,pattern:E}=e,S=(0,t.__rest)(e,["value","defaultValue","type","placeholder","icon","error","errorMessage","disabled","stepper","makeInputClassName","className","onChange","onValueChange","autoFocus","pattern"]),[k,j]=(0,r.useState)(x||!1),[O,T]=(0,r.useState)(!1),I=(0,r.useCallback)(()=>T(!O),[O,T]),F=(0,r.useRef)(null),_=(0,l.hasValue)(u||d);return r.default.useEffect(()=>{let e=()=>j(!0),t=()=>j(!1),r=F.current;return r&&(r.addEventListener("focus",e),r.addEventListener("blur",t),x&&r.focus()),()=>{r&&(r.removeEventListener("focus",e),r.removeEventListener("blur",t))}},[x]),r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:(0,s.tremorTwMerge)(b("root"),"relative w-full flex items-center min-w-[10rem] outline-none rounded-tremor-default transition duration-100 border","shadow-tremor-input","dark:shadow-dark-tremor-input",(0,l.getSelectButtonColors)(_,v,m),k&&(0,s.tremorTwMerge)("ring-2","border-tremor-brand-subtle ring-tremor-brand-muted","dark:border-dark-tremor-brand-subtle dark:ring-dark-tremor-brand-muted"),w)},h?r.default.createElement(h,{className:(0,s.tremorTwMerge)(b("icon"),"shrink-0 h-5 w-5 mx-2.5 absolute left-0 flex items-center","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}):null,r.default.createElement("input",Object.assign({ref:(0,o.mergeRefs)([F,c]),defaultValue:d,value:u,type:O?"text":f,className:(0,s.tremorTwMerge)(b("input"),"w-full bg-transparent focus:outline-none focus:ring-0 border-none text-tremor-default rounded-tremor-default transition duration-100 py-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none","password"===f?m?"pr-16":"pr-12":m?"pr-8":"pr-3",h?"pl-10":"pl-3",v?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content"),placeholder:p,disabled:v,"data-testid":"base-input",onChange:e=>{null==$||$(e),null==C||C(e.target.value)},pattern:E},S)),"password"!==f||v?null:r.default.createElement("button",{className:(0,s.tremorTwMerge)(b("toggleButton"),"absolute inset-y-0 right-0 flex items-center px-2.5 rounded-lg"),type:"button",onClick:()=>I(),"aria-label":O?"Hide password":"Show Password"},O?r.default.createElement(i.default,{className:(0,s.tremorTwMerge)("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0}):r.default.createElement(a.default,{className:(0,s.tremorTwMerge)("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0})),m?r.default.createElement(n.default,{className:(0,s.tremorTwMerge)(b("errorIcon"),"text-red-500 shrink-0 h-5 w-5 absolute right-0 flex items-center","password"===f?"mr-10":"number"===f?y?"mr-20":"mr-3":"mx-2.5")}):null,null!=y?y:null),m&&g?r.default.createElement("p",{className:(0,s.tremorTwMerge)(b("errorMessage"),"text-sm text-red-500 mt-1")},g):null)});c.displayName="BaseInput",e.s(["default",()=>c],677955);let u=(0,o.makeClassName)("TextInput"),d=r.default.forwardRef((e,o)=>{let{type:n="text"}=e,a=(0,t.__rest)(e,["type"]);return r.default.createElement(c,Object.assign({ref:o,type:n,makeInputClassName:u},a))});d.displayName="TextInput",e.s(["TextInput",()=>d],779241)},827252,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};var n=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(n.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["InfoCircleOutlined",0,a],827252)},592968,e=>{"use strict";var t=e.i(491816);e.s(["Tooltip",()=>t.default])},764205,122550,82946,e=>{"use strict";e.s(["addAllowedIP",()=>eB,"adminGlobalActivity",()=>eY,"adminGlobalActivityPerModel",()=>eZ,"adminGlobalCacheActivity",()=>eQ,"adminSpendLogsCall",()=>eq,"adminTopEndUsersCall",()=>eK,"adminTopKeysCall",()=>eJ,"adminTopModelsCall",()=>e0,"adminspendByProvider",()=>eX,"agentDailyActivityCall",()=>eE,"agentHubPublicModelsCall",()=>eP,"alertingSettingsCall",()=>Q,"allEndUsersCall",()=>eW,"allTagNamesCall",()=>eV,"applyGuardrail",()=>ou,"approveGuardrailSubmission",()=>tD,"approveMCPServer",()=>r_,"availableTeamListCall",()=>ed,"budgetCreateCall",()=>K,"budgetDeleteCall",()=>J,"budgetUpdateCall",()=>X,"buildMcpOAuthAuthorizeUrl",()=>ox,"cacheTemporaryMcpServer",()=>o$,"cachingHealthCheckCall",()=>t_,"callMCPTool",()=>rD,"cancelModelCostMapReload",()=>V,"checkEuAiActCompliance",()=>oU,"checkGdprCompliance",()=>oG,"claimOnboardingToken",()=>ek,"convertPromptFileToJson",()=>rd,"createAgentCall",()=>rf,"createGuardrailCall",()=>rp,"createMCPServer",()=>rx,"createMCPToolset",()=>rj,"createPassThroughEndpoint",()=>tk,"createPolicyAttachmentCall",()=>t8,"createPolicyCall",()=>t1,"createPolicyVersion",()=>t6,"createPromptCall",()=>rs,"createSearchTool",()=>rN,"credentialCreateCall",()=>e8,"credentialDeleteCall",()=>tr,"credentialGetCall",()=>tt,"credentialListCall",()=>te,"credentialUpdateCall",()=>to,"customerDailyActivityCall",()=>ex,"deleteAgentCall",()=>r5,"deleteAllowedIP",()=>eA,"deleteCallback",()=>ob,"deleteClaudeCodePlugin",()=>oW,"deleteConfigFieldSetting",()=>tO,"deleteGuardrailCall",()=>oe,"deleteMCPOAuthUserCredential",()=>o0,"deleteMCPServer",()=>rS,"deleteMCPToolset",()=>rT,"deletePassThroughEndpointsCall",()=>tT,"deletePolicyAttachmentCall",()=>re,"deletePolicyCall",()=>t7,"deletePromptCall",()=>ru,"deleteSearchTool",()=>rB,"deleteToolPolicyOverride",()=>oQ,"deriveErrorMessage",()=>oP,"disableClaudeCodePlugin",()=>oV,"enableClaudeCodePlugin",()=>oH,"enrichPolicyTemplate",()=>tX,"enrichPolicyTemplateStream",()=>tZ,"estimateAttachmentImpactCall",()=>rn,"exchangeLoginCode",()=>oN,"exchangeMcpOAuthToken",()=>oE,"fetchAvailableSearchProviders",()=>rA,"fetchDiscoverableMCPServers",()=>ry,"fetchMCPAccessGroups",()=>r$,"fetchMCPClientIp",()=>rC,"fetchMCPServerHealth",()=>rw,"fetchMCPServers",()=>rb,"fetchMCPSubmissions",()=>rF,"fetchMCPToolsets",()=>rk,"fetchOpenAPIRegistry",()=>rv,"fetchSearchTools",()=>rR,"fetchToolDetail",()=>oX,"fetchToolPolicyOptions",()=>oq,"fetchToolsList",()=>oJ,"formatDate",()=>y,"getAgentCreateMetadata",()=>_,"getAgentInfo",()=>oi,"getAgentsList",()=>oa,"getAllowedIPs",()=>eM,"getBudgetList",()=>tv,"getCacheSettingsCall",()=>t$,"getCallbackConfigsCall",()=>b,"getCallbacksCall",()=>ty,"getCategoryYaml",()=>oo,"getClaudeCodeMarketplace",()=>oA,"getClaudeCodePluginDetails",()=>oL,"getClaudeCodePluginsList",()=>oz,"getConfigFieldSetting",()=>tS,"getDefaultTeamSettings",()=>rq,"getEmailEventSettings",()=>r6,"getGeneralSettingsCall",()=>tb,"getGlobalLitellmHeaderName",()=>N,"getGuardrailInfo",()=>ol,"getGuardrailProviderSpecificParams",()=>or,"getGuardrailUISettings",()=>ot,"getGuardrailsList",()=>tz,"getGuardrailsUsageDetail",()=>tW,"getGuardrailsUsageLogs",()=>tU,"getGuardrailsUsageOverview",()=>tV,"getInProductNudgesCall",()=>w,"getInternalUserSettings",()=>rm,"getLicenseInfo",()=>ov,"getMCPOAuthUserCredentialStatus",()=>o1,"getMCPSemanticFilterSettings",()=>tM,"getMajorAirlines",()=>on,"getModelCostMapReloadStatus",()=>U,"getModelCostMapSource",()=>W,"getOnboardingCredentials",()=>eS,"getOpenAPISchema",()=>z,"getPassThroughEndpointsCall",()=>tE,"getPoliciesList",()=>tG,"getPolicyAttachmentsList",()=>t9,"getPolicyInfo",()=>t5,"getPolicyInfoWithGuardrails",()=>tJ,"getPolicyTemplates",()=>tK,"getPossibleUserRoles",()=>e5,"getPromptInfo",()=>ri,"getPromptVersions",()=>rl,"getPromptsList",()=>ra,"getProviderCreateMetadata",()=>F,"getProxyBaseUrl",()=>S,"getProxyUISettings",()=>tR,"getPublicModelHubInfo",()=>A,"getRemainingUsers",()=>og,"getResolvedGuardrails",()=>rr,"getRouterSettingsCall",()=>tw,"getSSOSettings",()=>op,"getTeamPermissionsCall",()=>rK,"getToolUsageLogs",()=>oK,"getUISettings",()=>tN,"getUiConfig",()=>B,"getUiSettings",()=>oM,"handleError",()=>I,"individualModelHealthCheckCall",()=>tF,"invitationCreateCall",()=>Y,"keyAliasesCall",()=>e3,"keyCreateCall",()=>ee,"keyCreateForAgentCall",()=>et,"keyCreateServiceAccountCall",()=>Z,"keyDeleteCall",()=>eo,"keyInfoCall",()=>e1,"keyInfoV1Call",()=>e4,"keyListCall",()=>e6,"keyUpdateCall",()=>tn,"latestHealthChecksCall",()=>tP,"listGuardrailSubmissions",()=>tL,"listMCPTools",()=>rL,"listMCPUserCredentials",()=>o2,"listPolicyVersions",()=>t4,"loginCall",()=>oR,"makeAgentsPublicCall",()=>r9,"makeMCPPublicCall",()=>r8,"makeModelGroupPublic",()=>M,"mcpHubPublicServersCall",()=>eR,"modelAvailableCall",()=>eL,"modelCostMap",()=>L,"modelCreateCall",()=>G,"modelDeleteCall",()=>q,"modelHubCall",()=>eN,"modelHubPublicModelsCall",()=>e_,"modelInfoCall",()=>eI,"modelInfoV1Call",()=>eF,"modelPatchUpdateCall",()=>ti,"organizationCreateCall",()=>eh,"organizationDailyActivityCall",()=>eC,"organizationDeleteCall",()=>eg,"organizationInfoCall",()=>ep,"organizationListCall",()=>ef,"organizationMemberAddCall",()=>td,"organizationMemberDeleteCall",()=>tf,"organizationMemberUpdateCall",()=>tp,"organizationUpdateCall",()=>em,"patchAgentCall",()=>os,"perUserAnalyticsCall",()=>o_,"proxyBaseUrl",()=>E,"ragIngestCall",()=>r4,"regenerateKeyCall",()=>ej,"registerClaudeCodePlugin",()=>oD,"registerMCPServer",()=>rI,"registerMcpOAuthClient",()=>oC,"rejectGuardrailSubmission",()=>tH,"rejectMCPServer",()=>rP,"reloadModelCostMap",()=>D,"resetEmailEventSettings",()=>r7,"resolvePoliciesCall",()=>ro,"scheduleModelCostMapReload",()=>H,"searchToolQueryCall",()=>ok,"serverRootPath",()=>$,"serviceHealthCheck",()=>tg,"sessionSpendLogsCall",()=>rY,"setCallbacksCall",()=>tI,"setGlobalLitellmHeaderName",()=>R,"storeMCPOAuthUserCredential",()=>oZ,"suggestPolicyTemplates",()=>tY,"switchToWorkerUrl",()=>k,"tagCreateCall",()=>rH,"tagDailyActivityCall",()=>ew,"tagDauCall",()=>oj,"tagDeleteCall",()=>rG,"tagDistinctCall",()=>oI,"tagInfoCall",()=>rW,"tagListCall",()=>rU,"tagMauCall",()=>oT,"tagUpdateCall",()=>rV,"tagWauCall",()=>oO,"tagsSpendLogsCall",()=>eH,"teamBulkMemberAddCall",()=>ts,"teamCreateCall",()=>e9,"teamDailyActivityCall",()=>e$,"teamDeleteCall",()=>ea,"teamInfoCall",()=>es,"teamListCall",()=>eu,"teamMemberAddCall",()=>tl,"teamMemberDeleteCall",()=>tu,"teamMemberUpdateCall",()=>tc,"teamPermissionsUpdateCall",()=>rX,"teamSpendLogsCall",()=>eD,"teamUpdateCall",()=>ta,"testCacheConnectionCall",()=>tC,"testConnectionRequest",()=>e2,"testCustomCodeGuardrail",()=>od,"testMCPSemanticFilter",()=>tA,"testMCPToolsListRequest",()=>ow,"testPipelineCall",()=>rt,"testPoliciesAndGuardrails",()=>tq,"testPolicyTemplate",()=>tQ,"testSearchToolConnection",()=>rz,"transformRequestCall",()=>ev,"uiAuditLogsCall",()=>om,"uiSpendLogDetailsCall",()=>rh,"uiSpendLogsCall",()=>eG,"updateCacheSettingsCall",()=>tx,"updateConfigFieldSetting",()=>tj,"updateDefaultTeamSettings",()=>rJ,"updateEmailEventSettings",()=>r3,"updateGuardrailCall",()=>oc,"updateInternalUserSettings",()=>rg,"updateMCPSemanticFilterSettings",()=>tB,"updateMCPServer",()=>rE,"updateMCPToolset",()=>rO,"updatePassThroughEndpoint",()=>oy,"updatePolicyCall",()=>t2,"updatePolicyVersionStatus",()=>t3,"updatePromptCall",()=>rc,"updateSSOSettings",()=>oh,"updateSearchTool",()=>rM,"updateToolPolicy",()=>oY,"updateUiSettings",()=>oB,"updateUsefulLinksCall",()=>ez,"usageAiChatStream",()=>t0,"userAgentSummaryCall",()=>oF,"userBulkUpdateUserCall",()=>tm,"userCreateCall",()=>er,"userDailyActivityAggregatedCall",()=>e7,"userDailyActivityCall",()=>eb,"userDeleteCall",()=>en,"userFilterUICall",()=>eU,"userGetInfoV2",()=>el,"userListCall",()=>ei,"userUpdateUserCall",()=>th,"v2TeamListCall",()=>ec,"validateBlockedWordsFile",()=>of,"vectorStoreCreateCall",()=>rQ,"vectorStoreDeleteCall",()=>r0,"vectorStoreInfoCall",()=>r1,"vectorStoreListCall",()=>rZ,"vectorStoreSearchCall",()=>oS,"vectorStoreUpdateCall",()=>r2],764205),e.i(247167);var t=e.i(888259),r=e.i(268004);e.s(["default",()=>g,"jsonFields",()=>h],82946);var o=e.i(843476),n=e.i(271645),a=e.i(808613),i=e.i(311451),l=e.i(28651),s=e.i(199133),c=e.i(779241),u=e.i(827252),d=e.i(592968);let f=e=>e?e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()):e;function p(e,t){return e.length>t?e.substring(0,t)+"...":e}e.s(["formItemValidateJSON",0,(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject("Please enter valid JSON")}},"formatLabel",0,f,"truncateString",()=>p],122550);let h=["metadata","config","enforced_params","aliases"],m=(e,t)=>h.includes(e)||"json"===t.format,g=({schemaComponent:e,excludedFields:t=[],form:r,overrideLabels:p={},overrideTooltips:h={},customValidation:g={},defaultValues:v={}})=>{let[y,b]=(0,n.useState)(null),[w,$]=(0,n.useState)(null);return((0,n.useEffect)(()=>{(async()=>{try{let o=(await z()).components.schemas[e];if(!o)throw Error(`Schema component "${e}" not found`);b(o);let n={};Object.keys(o.properties).filter(e=>!t.includes(e)&&void 0!==v[e]).forEach(e=>{n[e]=v[e]}),r.setFieldsValue(n)}catch(e){console.error("Schema fetch error:",e),$(e instanceof Error?e.message:"Failed to fetch schema")}})()},[e,r,t]),w)?(0,o.jsxs)("div",{className:"text-red-500",children:["Error: ",w]}):y?.properties?(0,o.jsx)("div",{children:Object.entries(y.properties).filter(([e])=>!t.includes(e)).map(([e,t])=>{let r,n,b,w,$,C,x,E;return n=(e=>{if(e.type)return e.type;if(e.anyOf){let t=e.anyOf.map(e=>e.type);if(t.includes("number")||t.includes("integer"))return"number";t.includes("string")}return"string"})(t),b=y?.required?.includes(e),w=p[e]||t.title||f(e),$=h[e]||t.description,C=[],b&&C.push({required:!0,message:`${w} is required`}),g[e]&&C.push({validator:g[e]}),m(e,t)&&C.push({validator:async(e,t)=>{if(t&&!(e=>{if(!e)return!0;try{return JSON.parse(e),!0}catch{return!1}})(t))throw Error("Please enter valid JSON")}}),x=$?(0,o.jsxs)("span",{children:[w," ",(0,o.jsx)(d.Tooltip,{title:$,children:(0,o.jsx)(u.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}):w,r=m(e,t)?(0,o.jsx)(i.Input.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):t.enum?(0,o.jsx)(s.Select,{children:t.enum.map(e=>(0,o.jsx)(s.Select.Option,{value:e,children:e},e))}):"number"===n||"integer"===n?(0,o.jsx)(l.InputNumber,{style:{width:"100%"},precision:"integer"===n?0:void 0}):"duration"===e?(0,o.jsx)(c.TextInput,{placeholder:"eg: 30s, 30h, 30d"}):(0,o.jsx)(c.TextInput,{placeholder:$||""}),(0,o.jsx)(a.Form.Item,{label:x,name:e,className:"mt-8",rules:C,initialValue:v[e],help:(0,o.jsx)("div",{className:"text-xs text-gray-500",children:(E=({max_budget:"Enter maximum budget in USD (e.g., 100.50)",budget_duration:"Select a time period for budget reset",tpm_limit:"Enter maximum tokens per minute (whole number)",rpm_limit:"Enter maximum requests per minute (whole number)",duration:"Enter duration (e.g., 30s, 24h, 7d)",metadata:'Enter JSON object with key-value pairs\nExample: {"team": "research", "project": "nlp"}',config:'Enter configuration as JSON object\nExample: {"setting": "value"}',permissions:"Enter comma-separated permission strings",enforced_params:'Enter parameters as JSON object\nExample: {"param": "value"}',blocked:"Enter true/false or specific block conditions",aliases:'Enter aliases as JSON object\nExample: {"alias1": "value1", "alias2": "value2"}',models:"Select one or more model names",key_alias:"Enter a unique identifier for this key",tags:"Enter comma-separated tag strings"})[e]||({string:"Text input",number:"Numeric input",integer:"Whole number input",boolean:"True/False value"})[n]||"Text input",m(e,t)?`${E} + `]:{animationName:i.slideDownOut},"&-hidden":{display:"none"},[n]:Object.assign(Object.assign({},l(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},t.textEllipsis),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},l(e)),{color:e.colorTextDisabled})}),[`${f}:has(+ ${f})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${f}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,i.initSlideMotion)(e,"slide-up"),(0,i.initSlideMotion)(e,"slide-down"),(0,a.initMoveMotion)(e,"move-up"),(0,a.initMoveMotion)(e,"move-down")]})(e),{[`${o}-rtl`]:{direction:"rtl"}},(0,r.genCompactItemStyle)(e,{borderElCls:`${o}-selector`,focusElCls:`${o}-focused`})]})(v),{[v.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},{"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},d(v,{borderColor:v.colorBorder,hoverBorderHover:v.hoverBorderColor,activeBorderColor:v.activeBorderColor,activeOutlineColor:v.activeOutlineColor,color:v.colorText})),f(v,{status:"error",borderColor:v.colorError,hoverBorderHover:v.colorErrorHover,activeBorderColor:v.colorError,activeOutlineColor:v.colorErrorOutline,color:v.colorError})),f(v,{status:"warning",borderColor:v.colorWarning,hoverBorderHover:v.colorWarningHover,activeBorderColor:v.colorWarning,activeOutlineColor:v.colorWarningOutline,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{background:v.colorBgContainerDisabled,color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`}})}),{"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},p(v,{bg:v.colorFillTertiary,hoverBg:v.colorFillSecondary,activeBorderColor:v.activeBorderColor,color:v.colorText})),h(v,{status:"error",bg:v.colorErrorBg,hoverBg:v.colorErrorBgHover,activeBorderColor:v.colorError,color:v.colorError})),h(v,{status:"warning",bg:v.colorWarningBg,hoverBg:v.colorWarningBgHover,activeBorderColor:v.colorWarning,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{borderColor:v.colorBorder,background:v.colorBgContainerDisabled,color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.colorBgContainer,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.colorSplit}`}})}),{"&-borderless":{[`${v.componentCls}-selector`]:{background:"transparent",border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} transparent`},[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`},[`&${v.componentCls}-status-error`]:{[`${v.componentCls}-prefix, ${v.componentCls}-selection-item`]:{color:v.colorError}},[`&${v.componentCls}-status-warning`]:{[`${v.componentCls}-prefix, ${v.componentCls}-selection-item`]:{color:v.colorWarning}}}}),{"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},m(v,{borderColor:v.colorBorder,hoverBorderHover:v.hoverBorderColor,activeBorderColor:v.activeBorderColor,activeOutlineColor:v.activeOutlineColor,color:v.colorText})),g(v,{status:"error",borderColor:v.colorError,hoverBorderHover:v.colorErrorHover,activeBorderColor:v.colorError,activeOutlineColor:v.colorErrorOutline,color:v.colorError})),g(v,{status:"warning",borderColor:v.colorWarning,hoverBorderHover:v.colorWarningHover,activeBorderColor:v.colorWarning,activeOutlineColor:v.colorWarningOutline,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`}})})}]},e=>{let{fontSize:t,lineHeight:r,lineWidth:o,controlHeight:n,controlHeightSM:a,controlHeightLG:i,paddingXXS:l,controlPaddingHorizontal:s,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:h,colorFillSecondary:m,colorBgContainerDisabled:g,colorTextDisabled:v,colorPrimaryHover:y,colorPrimary:b,controlOutline:w}=e,$=2*l,C=2*o,x=Math.min(n-$,n-C),E=Math.min(a-$,a-C),S=Math.min(i-$,i-C);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(n-t*r)/2}px ${s}px`,optionFontSize:t,optionLineHeight:r,optionHeight:n,selectorBg:h,clearBg:h,singleItemHeightLG:i,multipleItemBg:m,multipleItemBorderColor:"transparent",multipleItemHeight:x,multipleItemHeightSM:E,multipleItemHeightLG:S,multipleSelectorBgDisabled:g,multipleItemColorDisabled:v,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize),hoverBorderColor:y,activeBorderColor:b,activeOutlineColor:w,selectAffixPadding:l}},{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});e.s(["default",0,v],950302)},121229,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var n=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(n.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["default",0,a],121229)},729151,e=>{"use strict";var t=e.i(271645),r=e.i(121229),o=e.i(726289),n=e.i(864517),a=e.i(247153),i=e.i(739295),l=e.i(38953);function s({suffixIcon:e,clearIcon:s,menuItemSelectedIcon:c,removeIcon:u,loading:d,multiple:f,hasFeedback:p,prefixCls:h,showSuffixIcon:m,feedbackIcon:g,showArrow:v,componentName:y}){let b=null!=s?s:t.createElement(o.default,null),w=r=>null!==e||p||v?t.createElement(t.Fragment,null,!1!==m&&r,p&&g):null,$=null;if(void 0!==e)$=w(e);else if(d)$=w(t.createElement(i.default,{spin:!0}));else{let e=`${h}-suffix`;$=({open:r,showSearch:o})=>r&&o?w(t.createElement(l.default,{className:e})):w(t.createElement(a.default,{className:e}))}let C=null;C=void 0!==c?c:f?t.createElement(r.default,null):null;return{clearIcon:b,suffixIcon:$,itemIcon:C,removeIcon:void 0!==u?u:t.createElement(n.default,null)}}e.s(["default",()=>s])},327494,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(123829),n=e.i(955492),a=e.i(869301),i=e.i(529681),l=e.i(122767),s=e.i(613541),c=e.i(805484),u=e.i(52956),d=e.i(242064),f=e.i(721132),p=e.i(937328),h=e.i(321883),m=e.i(517455),g=e.i(62139),v=e.i(792812),y=e.i(249616),b=e.i(104458),w=e.i(85566),$=e.i(950302),C=e.i(729151),x=e.i(617206),E=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let S="SECRET_COMBOBOX_MODE_DO_NOT_USE",k=t.forwardRef((e,n)=>{var a,c,k,j,O,T,I,F;let _,{prefixCls:P,bordered:R,className:N,rootClassName:M,getPopupContainer:B,popupClassName:A,dropdownClassName:z,listHeight:L=256,placement:D,listItemHeight:H,size:V,disabled:W,notFoundContent:U,status:G,builtinPlacements:q,dropdownMatchSelectWidth:J,popupMatchSelectWidth:K,direction:X,style:Y,allowClear:Q,variant:Z,dropdownStyle:ee,transitionName:et,tagRender:er,maxCount:eo,prefix:en,dropdownRender:ea,popupRender:ei,onDropdownVisibleChange:el,onOpenChange:es,styles:ec,classNames:eu}=e,ed=E(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:ef,getPrefixCls:ep,renderEmpty:eh,direction:em,virtual:eg,popupMatchSelectWidth:ev,popupOverflow:ey}=t.useContext(d.ConfigContext),{showSearch:eb,style:ew,styles:e$,className:eC,classNames:ex}=(0,d.useComponentConfig)("select"),[,eE]=(0,b.useToken)(),eS=null!=H?H:null==eE?void 0:eE.controlHeight,ek=ep("select",P),ej=ep(),eO=null!=X?X:em,{compactSize:eT,compactItemClassnames:eI}=(0,y.useCompactItemContext)(ek,eO),[eF,e_]=(0,v.default)("select",Z,R),eP=(0,h.default)(ek),[eR,eN,eM]=(0,$.default)(ek,eP),eB=t.useMemo(()=>{let{mode:t}=e;if("combobox"!==t)return t===S?"combobox":t},[e.mode]),eA="multiple"===eB||"tags"===eB,ez=(T=e.suffixIcon,void 0!==(I=e.showArrow)?I:null!==T),eL=null!=(a=null!=K?K:J)?a:ev,eD=(null==(c=null==ec?void 0:ec.popup)?void 0:c.root)||(null==(k=e$.popup)?void 0:k.root)||ee,eH=(F=ei||ea,t.default.useMemo(()=>{if(F)return(...e)=>t.default.createElement(x.default,{space:!0},F.apply(void 0,e))},[F])),{status:eV,hasFeedback:eW,isFormItemInput:eU,feedbackIcon:eG}=t.useContext(g.FormItemInputContext),eq=(0,u.getMergedStatus)(eV,G);_=void 0!==U?U:"combobox"===eB?null:(null==eh?void 0:eh("Select"))||t.createElement(f.default,{componentName:"Select"});let{suffixIcon:eJ,itemIcon:eK,removeIcon:eX,clearIcon:eY}=(0,C.default)(Object.assign(Object.assign({},ed),{multiple:eA,hasFeedback:eW,feedbackIcon:eG,showSuffixIcon:ez,prefixCls:ek,componentName:"Select"})),eQ=(0,i.default)(ed,["suffixIcon","itemIcon"]),eZ=(0,r.default)((null==(j=null==eu?void 0:eu.popup)?void 0:j.root)||(null==(O=null==ex?void 0:ex.popup)?void 0:O.root)||A||z,{[`${ek}-dropdown-${eO}`]:"rtl"===eO},M,ex.root,null==eu?void 0:eu.root,eM,eP,eN),e0=(0,m.default)(e=>{var t;return null!=(t=null!=V?V:eT)?t:e}),e1=t.useContext(p.default),e2=(0,r.default)({[`${ek}-lg`]:"large"===e0,[`${ek}-sm`]:"small"===e0,[`${ek}-rtl`]:"rtl"===eO,[`${ek}-${eF}`]:e_,[`${ek}-in-form-item`]:eU},(0,u.getStatusClassNames)(ek,eq,eW),eI,eC,N,ex.root,null==eu?void 0:eu.root,M,eM,eP,eN),e4=t.useMemo(()=>void 0!==D?D:"rtl"===eO?"bottomRight":"bottomLeft",[D,eO]),[e6]=(0,l.useZIndex)("SelectLike",null==eD?void 0:eD.zIndex);return eR(t.createElement(o.default,Object.assign({ref:n,virtual:eg,showSearch:eb},eQ,{style:Object.assign(Object.assign(Object.assign(Object.assign({},e$.root),null==ec?void 0:ec.root),ew),Y),dropdownMatchSelectWidth:eL,transitionName:(0,s.getTransitionName)(ej,"slide-up",et),builtinPlacements:(0,w.default)(q,ey),listHeight:L,listItemHeight:eS,mode:eB,prefixCls:ek,placement:e4,direction:eO,prefix:en,suffixIcon:eJ,menuItemSelectedIcon:eK,removeIcon:eX,allowClear:!0===Q?{clearIcon:eY}:Q,notFoundContent:_,className:e2,getPopupContainer:B||ef,dropdownClassName:eZ,disabled:null!=W?W:e1,dropdownStyle:Object.assign(Object.assign({},eD),{zIndex:e6}),maxCount:eA?eo:void 0,tagRender:eA?er:void 0,dropdownRender:eH,onDropdownVisibleChange:es||el})))}),j=(0,c.default)(k,"dropdownAlign");k.SECRET_COMBOBOX_MODE_DO_NOT_USE=S,k.Option=a.Option,k.OptGroup=n.OptGroup,k._InternalPanelDoNotUseOrYouWillBeFired=j,e.s(["default",0,k],327494)},199133,e=>{"use strict";var t=e.i(327494);e.s(["Select",()=>t.default])},290571,e=>{"use strict";function t(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}"function"==typeof SuppressedError&&SuppressedError,e.s(["__rest",()=>t])},480731,e=>{"use strict";let t={Increase:"increase",ModerateIncrease:"moderateIncrease",Decrease:"decrease",ModerateDecrease:"moderateDecrease",Unchanged:"unchanged"},r={Slate:"slate",Gray:"gray",Zinc:"zinc",Neutral:"neutral",Stone:"stone",Red:"red",Orange:"orange",Amber:"amber",Yellow:"yellow",Lime:"lime",Green:"green",Emerald:"emerald",Teal:"teal",Cyan:"cyan",Sky:"sky",Blue:"blue",Indigo:"indigo",Violet:"violet",Purple:"purple",Fuchsia:"fuchsia",Pink:"pink",Rose:"rose"},o={XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl"},n={Left:"left",Right:"right"},a={Top:"top",Bottom:"bottom"};e.s(["BaseColors",()=>r,"DeltaTypes",()=>t,"HorizontalPositions",()=>n,"Sizes",()=>o,"VerticalPositions",()=>a])},673706,e=>{"use strict";e.i(480731);let t=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],r=e=>e.toString(),o=e=>e.reduce((e,t)=>e+t,0),n=(e,t)=>{for(let r=0;r{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function i(e){return t=>`tremor-${e}-${t}`}function l(e,r){let o=t.includes(e);if("white"===e||"black"===e||"transparent"===e||!r||!o){let t=e.includes("#")||e.includes("--")||e.includes("rgb")?`[${e}]`:e;return{bgColor:`bg-${t} dark:bg-${t}`,hoverBgColor:`hover:bg-${t} dark:hover:bg-${t}`,selectBgColor:`data-[selected]:bg-${t} dark:data-[selected]:bg-${t}`,textColor:`text-${t} dark:text-${t}`,selectTextColor:`data-[selected]:text-${t} dark:data-[selected]:text-${t}`,hoverTextColor:`hover:text-${t} dark:hover:text-${t}`,borderColor:`border-${t} dark:border-${t}`,selectBorderColor:`data-[selected]:border-${t} dark:data-[selected]:border-${t}`,hoverBorderColor:`hover:border-${t} dark:hover:border-${t}`,ringColor:`ring-${t} dark:ring-${t}`,strokeColor:`stroke-${t} dark:stroke-${t}`,fillColor:`fill-${t} dark:fill-${t}`}}return{bgColor:`bg-${e}-${r} dark:bg-${e}-${r}`,selectBgColor:`data-[selected]:bg-${e}-${r} dark:data-[selected]:bg-${e}-${r}`,hoverBgColor:`hover:bg-${e}-${r} dark:hover:bg-${e}-${r}`,textColor:`text-${e}-${r} dark:text-${e}-${r}`,selectTextColor:`data-[selected]:text-${e}-${r} dark:data-[selected]:text-${e}-${r}`,hoverTextColor:`hover:text-${e}-${r} dark:hover:text-${e}-${r}`,borderColor:`border-${e}-${r} dark:border-${e}-${r}`,selectBorderColor:`data-[selected]:border-${e}-${r} dark:data-[selected]:border-${e}-${r}`,hoverBorderColor:`hover:border-${e}-${r} dark:hover:border-${e}-${r}`,ringColor:`ring-${e}-${r} dark:ring-${e}-${r}`,strokeColor:`stroke-${e}-${r} dark:stroke-${e}-${r}`,fillColor:`fill-${e}-${r} dark:fill-${e}-${r}`}}e.s(["defaultValueFormatter",()=>r,"getColorClassNames",()=>l,"isValueInArray",()=>n,"makeClassName",()=>i,"mergeRefs",()=>a,"sumNumericArray",()=>o],673706)},689074,21243,98801,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let o=e=>{var o=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},o),r.default.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z"}))};e.s(["default",()=>o],689074);let n=e=>{var o=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},o),r.default.createElement("path",{d:"M1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12ZM12.0003 17C14.7617 17 17.0003 14.7614 17.0003 12C17.0003 9.23858 14.7617 7 12.0003 7C9.23884 7 7.00026 9.23858 7.00026 12C7.00026 14.7614 9.23884 17 12.0003 17ZM12.0003 15C10.3434 15 9.00026 13.6569 9.00026 12C9.00026 10.3431 10.3434 9 12.0003 9C13.6571 9 15.0003 10.3431 15.0003 12C15.0003 13.6569 13.6571 15 12.0003 15Z"}))};e.s(["default",()=>n],21243);let a=e=>{var o=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},o),r.default.createElement("path",{d:"M4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457ZM14.7577 16.1718L13.2937 14.7078C12.902 14.8952 12.4634 15.0002 12.0003 15.0002C10.3434 15.0002 9.00026 13.657 9.00026 12.0002C9.00026 11.537 9.10522 11.0984 9.29263 10.7067L7.82866 9.24277C7.30514 10.0332 7.00026 10.9811 7.00026 12.0002C7.00026 14.7616 9.23884 17.0002 12.0003 17.0002C13.0193 17.0002 13.9672 16.6953 14.7577 16.1718ZM7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925L16.947 12.7327C16.9821 12.4936 17.0003 12.249 17.0003 12.0002C17.0003 9.23873 14.7617 7.00016 12.0003 7.00016C11.7514 7.00016 11.5068 7.01833 11.2677 7.05343L7.97446 3.76015Z"}))};e.s(["default",()=>a],98801)},444755,e=>{"use strict";let t=(e,r)=>{if(0===e.length)return r.classGroupId;let o=e[0],n=r.nextPart.get(o),a=n?t(e.slice(1),n):void 0;if(a)return a;if(0===r.validators.length)return;let i=e.join("-");return r.validators.find(({validator:e})=>e(i))?.classGroupId},r=/^\[(.+)\]$/,o=(e,t,r,i)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:n(t,e)).classGroupId=r;return}"function"==typeof e?a(e)?o(e(i),t,r,i):t.validators.push({validator:e,classGroupId:r}):Object.entries(e).forEach(([e,a])=>{o(a,n(t,e),r,i)})})},n=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},a=e=>e.isThemeGetter,i=(e,t)=>t?e.map(([e,r])=>[e,r.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,r])=>[t+e,r])):e)]):e,l=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t},s=/\s+/;function c(){let e,t,r=0,o="";for(;r{let t;if("string"==typeof e)return e;let r="";for(let o=0;o{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,o=new Map,n=(n,a)=>{r.set(n,a),++t>e&&(t=0,o=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(n(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):n(e,t)}}})((s=n.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{separator:t,experimentalParseClassName:r}=e,o=1===t.length,n=t[0],a=t.length,i=e=>{let r,i=[],l=0,s=0;for(let c=0;cs?r-s:void 0}};return r?e=>r({className:e,parseClassName:i}):i})(s),...(e=>{let n=(e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return i(Object.entries(e.classGroups),r).forEach(([e,r])=>{o(r,n,e,t)}),n})(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:e=>{let o=e.split("-");return""===o[0]&&1!==o.length&&o.shift(),t(o,n)||(e=>{if(r.test(e)){let t=r.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}})(e)},getConflictingClassGroupIds:(e,t)=>{let r=a[e]||[];return t&&l[e]?[...r,...l[e]]:r}}})(s)}).cache.get,f=a.cache.set,p=h,h(l)};function h(e){let t=u(e);if(t)return t;let r=((e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(s),c="";for(let e=i.length-1;e>=0;e-=1){let t=i[e],{modifiers:s,hasImportantModifier:u,baseClassName:d,maybePostfixModifierPosition:f}=r(t),p=!!f,h=o(p?d.substring(0,f):d);if(!h){if(!p||!(h=o(d))){c=t+(c.length>0?" "+c:c);continue}p=!1}let m=l(s).join(":"),g=u?m+"!":m,v=g+h;if(a.includes(v))continue;a.push(v);let y=n(h,p);for(let e=0;e0?" "+c:c)}return c})(e,a);return f(e,r),r}return function(){return p(c.apply(null,arguments))}}let f=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},p=/^\[(?:([a-z-]+):)?(.+)\]$/i,h=/^\d+\/\d+$/,m=new Set(["px","full","screen"]),g=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,v=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,y=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,b=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,w=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$=e=>x(e)||m.has(e)||h.test(e),C=e=>M(e,"length",B),x=e=>!!e&&!Number.isNaN(Number(e)),E=e=>M(e,"number",x),S=e=>!!e&&Number.isInteger(Number(e)),k=e=>e.endsWith("%")&&x(e.slice(0,-1)),j=e=>p.test(e),O=e=>g.test(e),T=new Set(["length","size","percentage"]),I=e=>M(e,T,A),F=e=>M(e,"position",A),_=new Set(["image","url"]),P=e=>M(e,_,L),R=e=>M(e,"",z),N=()=>!0,M=(e,t,r)=>{let o=p.exec(e);return!!o&&(o[1]?"string"==typeof t?o[1]===t:t.has(o[1]):r(o[2]))},B=e=>v.test(e)&&!y.test(e),A=()=>!1,z=e=>b.test(e),L=e=>w.test(e),D=()=>{let e=f("colors"),t=f("spacing"),r=f("blur"),o=f("brightness"),n=f("borderColor"),a=f("borderRadius"),i=f("borderSpacing"),l=f("borderWidth"),s=f("contrast"),c=f("grayscale"),u=f("hueRotate"),d=f("invert"),p=f("gap"),h=f("gradientColorStops"),m=f("gradientColorStopPositions"),g=f("inset"),v=f("margin"),y=f("opacity"),b=f("padding"),w=f("saturate"),T=f("scale"),_=f("sepia"),M=f("skew"),B=f("space"),A=f("translate"),z=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",j,t],H=()=>[j,t],V=()=>["",$,C],W=()=>["auto",x,j],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",j],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[x,j];return{cacheSize:500,separator:":",theme:{colors:[N],spacing:[$,C],blur:["none","",O,j],brightness:Y(),borderColor:[e],borderRadius:["none","","full",O,j],borderSpacing:H(),borderWidth:V(),contrast:Y(),grayscale:K(),hueRotate:Y(),invert:K(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[k,C],inset:D(),margin:D(),opacity:Y(),padding:H(),saturate:Y(),scale:Y(),sepia:K(),skew:Y(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[O]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),j]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",S,j]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",S,j]}],"grid-cols":[{"grid-cols":[N]}],"col-start-end":[{col:["auto",{span:["full",S,j]},j]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[N]}],"row-start-end":[{row:["auto",{span:[S,j]},j]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...J()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...J(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...J(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,t]}],"min-w":[{"min-w":[j,t,"min","max","fit"]}],"max-w":[{"max-w":[j,t,"none","full","min","max","fit","prose",{screen:[O]},O]}],h:[{h:[j,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,t,"auto","min","max","fit"]}],"font-size":[{text:["base",O,C]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",E]}],"font-family":[{font:[N]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",j]}],"line-clamp":[{"line-clamp":["none",x,E]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$,C]}],"underline-offset":[{"underline-offset":["auto",$,j]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),F]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",I]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},P]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:G()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[$,j]}],"outline-w":[{outline:[$,C]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[$,C]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",O,R]}],"shadow-color":[{shadow:[N]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",O,j]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[S,j]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",j]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",j]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$,C,E]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},H=(e,t,r)=>{void 0!==r&&(e[t]=r)},V=(e,t)=>{if(t)for(let r in t)H(e,r,t[r])},W=(e,t)=>{if(t)for(let r in t){let o=t[r];void 0!==o&&(e[r]=(e[r]||[]).concat(o))}},U=((e,...t)=>"function"==typeof e?d(D,e,...t):d(()=>((e,{cacheSize:t,prefix:r,separator:o,experimentalParseClassName:n,extend:a={},override:i={}})=>{for(let a in H(e,"cacheSize",t),H(e,"prefix",r),H(e,"separator",o),H(e,"experimentalParseClassName",n),i)V(e[a],i[a]);for(let t in a)W(e[t],a[t]);return e})(D(),e),...t))({extend:{classGroups:{shadow:[{shadow:[{tremor:["input","card","dropdown"],"dark-tremor":["input","card","dropdown"]}]}],rounded:[{rounded:[{tremor:["small","default","full"],"dark-tremor":["small","default","full"]}]}],"font-size":[{text:[{tremor:["default","title","metric"],"dark-tremor":["default","title","metric"]}]}]}}});e.s(["tremorTwMerge",()=>U],444755)},103471,e=>{"use strict";var t=e.i(444755),r=e.i(271645);let o=e=>["string","number"].includes(typeof e)?e:e instanceof Array?e.map(o).join(""):"object"==typeof e&&e?o(e.props.children):void 0;function n(e){let t=new Map;return r.default.Children.map(e,e=>{var r;t.set(e.props.value,null!=(r=o(e))?r:e.props.value)}),t}function a(e,t){return r.default.Children.map(t,t=>{var r;if((null!=(r=o(t))?r:t.props.value).toLowerCase().includes(e.toLowerCase()))return t})}let i=(e,r,o=!1)=>(0,t.tremorTwMerge)(r?"bg-tremor-background-subtle dark:bg-dark-tremor-background-subtle":"bg-tremor-background dark:bg-dark-tremor-background",!r&&"hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted",e?"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis":"text-tremor-content dark:text-dark-tremor-content",r&&"text-tremor-content-subtle dark:text-dark-tremor-content-subtle",o&&"text-red-500 placeholder:text-red-500 dark:text-red-500 dark:placeholder:text-red-500",o?"border-red-500 dark:border-red-500":"border-tremor-border dark:border-dark-tremor-border");function l(e){return null!=e&&""!==e}e.s(["constructValueToNameMapping",()=>n,"getFilteredOptions",()=>a,"getNodeText",()=>o,"getSelectButtonColors",()=>i,"hasValue",()=>l])},779241,677955,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(673706),n=e.i(689074),a=e.i(21243),i=e.i(98801),l=e.i(103471),s=e.i(444755);let c=r.default.forwardRef((e,c)=>{let{value:u,defaultValue:d,type:f,placeholder:p="Type...",icon:h,error:m=!1,errorMessage:g,disabled:v=!1,stepper:y,makeInputClassName:b,className:w,onChange:$,onValueChange:C,autoFocus:x,pattern:E}=e,S=(0,t.__rest)(e,["value","defaultValue","type","placeholder","icon","error","errorMessage","disabled","stepper","makeInputClassName","className","onChange","onValueChange","autoFocus","pattern"]),[k,j]=(0,r.useState)(x||!1),[O,T]=(0,r.useState)(!1),I=(0,r.useCallback)(()=>T(!O),[O,T]),F=(0,r.useRef)(null),_=(0,l.hasValue)(u||d);return r.default.useEffect(()=>{let e=()=>j(!0),t=()=>j(!1),r=F.current;return r&&(r.addEventListener("focus",e),r.addEventListener("blur",t),x&&r.focus()),()=>{r&&(r.removeEventListener("focus",e),r.removeEventListener("blur",t))}},[x]),r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:(0,s.tremorTwMerge)(b("root"),"relative w-full flex items-center min-w-[10rem] outline-none rounded-tremor-default transition duration-100 border","shadow-tremor-input","dark:shadow-dark-tremor-input",(0,l.getSelectButtonColors)(_,v,m),k&&(0,s.tremorTwMerge)("ring-2","border-tremor-brand-subtle ring-tremor-brand-muted","dark:border-dark-tremor-brand-subtle dark:ring-dark-tremor-brand-muted"),w)},h?r.default.createElement(h,{className:(0,s.tremorTwMerge)(b("icon"),"shrink-0 h-5 w-5 mx-2.5 absolute left-0 flex items-center","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}):null,r.default.createElement("input",Object.assign({ref:(0,o.mergeRefs)([F,c]),defaultValue:d,value:u,type:O?"text":f,className:(0,s.tremorTwMerge)(b("input"),"w-full bg-transparent focus:outline-none focus:ring-0 border-none text-tremor-default rounded-tremor-default transition duration-100 py-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none","password"===f?m?"pr-16":"pr-12":m?"pr-8":"pr-3",h?"pl-10":"pl-3",v?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content"),placeholder:p,disabled:v,"data-testid":"base-input",onChange:e=>{null==$||$(e),null==C||C(e.target.value)},pattern:E},S)),"password"!==f||v?null:r.default.createElement("button",{className:(0,s.tremorTwMerge)(b("toggleButton"),"absolute inset-y-0 right-0 flex items-center px-2.5 rounded-lg"),type:"button",onClick:()=>I(),"aria-label":O?"Hide password":"Show Password"},O?r.default.createElement(i.default,{className:(0,s.tremorTwMerge)("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0}):r.default.createElement(a.default,{className:(0,s.tremorTwMerge)("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0})),m?r.default.createElement(n.default,{className:(0,s.tremorTwMerge)(b("errorIcon"),"text-red-500 shrink-0 h-5 w-5 absolute right-0 flex items-center","password"===f?"mr-10":"number"===f?y?"mr-20":"mr-3":"mx-2.5")}):null,null!=y?y:null),m&&g?r.default.createElement("p",{className:(0,s.tremorTwMerge)(b("errorMessage"),"text-sm text-red-500 mt-1")},g):null)});c.displayName="BaseInput",e.s(["default",()=>c],677955);let u=(0,o.makeClassName)("TextInput"),d=r.default.forwardRef((e,o)=>{let{type:n="text"}=e,a=(0,t.__rest)(e,["type"]);return r.default.createElement(c,Object.assign({ref:o,type:n,makeInputClassName:u},a))});d.displayName="TextInput",e.s(["TextInput",()=>d],779241)},827252,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};var n=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(n.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["InfoCircleOutlined",0,a],827252)},592968,e=>{"use strict";var t=e.i(491816);e.s(["Tooltip",()=>t.default])},764205,122550,82946,e=>{"use strict";e.s(["addAllowedIP",()=>eA,"adminGlobalActivity",()=>eQ,"adminGlobalActivityPerModel",()=>e0,"adminGlobalCacheActivity",()=>eZ,"adminSpendLogsCall",()=>eJ,"adminTopEndUsersCall",()=>eX,"adminTopKeysCall",()=>eK,"adminTopModelsCall",()=>e1,"adminspendByProvider",()=>eY,"agentDailyActivityCall",()=>eE,"agentHubPublicModelsCall",()=>eP,"alertingSettingsCall",()=>Q,"allEndUsersCall",()=>eU,"allTagNamesCall",()=>eW,"applyGuardrail",()=>od,"approveGuardrailSubmission",()=>tH,"approveMCPServer",()=>rP,"availableTeamListCall",()=>ed,"budgetCreateCall",()=>K,"budgetDeleteCall",()=>J,"budgetUpdateCall",()=>X,"buildMcpOAuthAuthorizeUrl",()=>oE,"cacheTemporaryMcpServer",()=>oC,"cachingHealthCheckCall",()=>tP,"callMCPTool",()=>rH,"cancelModelCostMapReload",()=>V,"checkEuAiActCompliance",()=>oW,"checkGdprCompliance",()=>oU,"claimOnboardingToken",()=>ek,"convertPromptFileToJson",()=>rf,"createAgentCall",()=>rp,"createGuardrailCall",()=>rh,"createMCPServer",()=>rE,"createMCPToolset",()=>rO,"createPassThroughEndpoint",()=>tj,"createPolicyAttachmentCall",()=>re,"createPolicyCall",()=>t2,"createPolicyVersion",()=>t3,"createPromptCall",()=>rc,"createSearchTool",()=>rM,"credentialCreateCall",()=>te,"credentialDeleteCall",()=>to,"credentialGetCall",()=>tr,"credentialListCall",()=>tt,"credentialUpdateCall",()=>tn,"customerDailyActivityCall",()=>ex,"deleteAgentCall",()=>r9,"deleteAllowedIP",()=>ez,"deleteCallback",()=>ow,"deleteClaudeCodePlugin",()=>oV,"deleteConfigFieldSetting",()=>tT,"deleteGuardrailCall",()=>ot,"deleteMCPOAuthUserCredential",()=>oZ,"deleteMCPServer",()=>rk,"deleteMCPToolset",()=>rI,"deletePassThroughEndpointsCall",()=>tI,"deletePolicyAttachmentCall",()=>rt,"deletePolicyCall",()=>t5,"deletePromptCall",()=>rd,"deleteSearchTool",()=>rA,"deleteToolPolicyOverride",()=>oY,"deriveErrorMessage",()=>oR,"disableClaudeCodePlugin",()=>oH,"enableClaudeCodePlugin",()=>oD,"enrichPolicyTemplate",()=>tY,"enrichPolicyTemplateStream",()=>t0,"estimateAttachmentImpactCall",()=>ra,"exchangeLoginCode",()=>oM,"exchangeMcpOAuthToken",()=>oS,"fetchAvailableSearchProviders",()=>rz,"fetchDiscoverableMCPServers",()=>rb,"fetchMCPAccessGroups",()=>rC,"fetchMCPClientIp",()=>rx,"fetchMCPServerHealth",()=>r$,"fetchMCPServers",()=>rw,"fetchMCPSubmissions",()=>r_,"fetchMCPToolsets",()=>rj,"fetchOpenAPIRegistry",()=>ry,"fetchSearchTools",()=>rN,"fetchToolDetail",()=>oK,"fetchToolPolicyOptions",()=>oG,"fetchToolsList",()=>oq,"formatDate",()=>y,"getAgentCreateMetadata",()=>_,"getAgentInfo",()=>ol,"getAgentsList",()=>oi,"getAllowedIPs",()=>eB,"getBudgetList",()=>ty,"getCacheSettingsCall",()=>tC,"getCallbackConfigsCall",()=>b,"getCallbacksCall",()=>tb,"getCategoryYaml",()=>on,"getClaudeCodePluginsList",()=>oz,"getConfigFieldSetting",()=>tk,"getDefaultTeamSettings",()=>rJ,"getEmailEventSettings",()=>r3,"getGeneralSettingsCall",()=>tw,"getGlobalLitellmHeaderName",()=>N,"getGuardrailInfo",()=>os,"getGuardrailProviderSpecificParams",()=>oo,"getGuardrailUISettings",()=>or,"getGuardrailsList",()=>tL,"getGuardrailsUsageDetail",()=>tU,"getGuardrailsUsageLogs",()=>tG,"getGuardrailsUsageOverview",()=>tW,"getInProductNudgesCall",()=>w,"getInternalUserSettings",()=>rg,"getLicenseInfo",()=>oy,"getMCPOAuthUserCredentialStatus",()=>o0,"getMCPSemanticFilterSettings",()=>tB,"getMajorAirlines",()=>oa,"getModelCostMapReloadStatus",()=>U,"getModelCostMapSource",()=>W,"getOnboardingCredentials",()=>eS,"getOpenAPISchema",()=>z,"getPassThroughEndpointsCall",()=>tS,"getPoliciesList",()=>tq,"getPolicyAttachmentsList",()=>t8,"getPolicyInfo",()=>t9,"getPolicyInfoWithGuardrails",()=>tK,"getPolicyTemplates",()=>tX,"getPossibleUserRoles",()=>e9,"getPromptInfo",()=>rl,"getPromptVersions",()=>rs,"getPromptsList",()=>ri,"getProviderCreateMetadata",()=>F,"getProxyBaseUrl",()=>S,"getProxyUISettings",()=>tN,"getPublicModelHubInfo",()=>A,"getRemainingUsers",()=>ov,"getResolvedGuardrails",()=>ro,"getRouterSettingsCall",()=>t$,"getSSOSettings",()=>oh,"getTeamPermissionsCall",()=>rX,"getToolUsageLogs",()=>oJ,"getUISettings",()=>tM,"getUiConfig",()=>B,"getUiSettings",()=>oB,"handleError",()=>I,"individualModelHealthCheckCall",()=>t_,"invitationCreateCall",()=>Y,"keyAliasesCall",()=>e7,"keyCreateCall",()=>ee,"keyCreateForAgentCall",()=>et,"keyCreateServiceAccountCall",()=>Z,"keyDeleteCall",()=>eo,"keyInfoCall",()=>e2,"keyInfoV1Call",()=>e6,"keyListCall",()=>e3,"keyUpdateCall",()=>ta,"latestHealthChecksCall",()=>tR,"listGuardrailSubmissions",()=>tD,"listMCPTools",()=>rD,"listMCPUserCredentials",()=>o1,"listPolicyVersions",()=>t6,"loginCall",()=>oN,"makeAgentsPublicCall",()=>r8,"makeMCPPublicCall",()=>oe,"makeModelGroupPublic",()=>M,"mcpHubPublicServersCall",()=>eR,"modelAvailableCall",()=>eD,"modelCostMap",()=>L,"modelCreateCall",()=>G,"modelDeleteCall",()=>q,"modelHubCall",()=>eM,"modelHubPublicModelsCall",()=>e_,"modelInfoCall",()=>eI,"modelInfoV1Call",()=>eF,"modelPatchUpdateCall",()=>tl,"organizationCreateCall",()=>eh,"organizationDailyActivityCall",()=>eC,"organizationDeleteCall",()=>eg,"organizationInfoCall",()=>ep,"organizationListCall",()=>ef,"organizationMemberAddCall",()=>tf,"organizationMemberDeleteCall",()=>tp,"organizationMemberUpdateCall",()=>th,"organizationUpdateCall",()=>em,"patchAgentCall",()=>oc,"perUserAnalyticsCall",()=>oP,"proxyBaseUrl",()=>E,"ragIngestCall",()=>r6,"regenerateKeyCall",()=>ej,"registerClaudeCodePlugin",()=>oL,"registerMCPServer",()=>rF,"registerMcpOAuthClient",()=>ox,"rejectGuardrailSubmission",()=>tV,"rejectMCPServer",()=>rR,"reloadModelCostMap",()=>D,"resetEmailEventSettings",()=>r5,"resolvePoliciesCall",()=>rn,"scheduleModelCostMapReload",()=>H,"searchToolQueryCall",()=>oj,"serverRootPath",()=>$,"serviceHealthCheck",()=>tv,"sessionSpendLogsCall",()=>rQ,"setCallbacksCall",()=>tF,"setGlobalLitellmHeaderName",()=>R,"skillHubPublicCall",()=>eN,"storeMCPOAuthUserCredential",()=>oQ,"suggestPolicyTemplates",()=>tQ,"switchToWorkerUrl",()=>k,"tagCreateCall",()=>rV,"tagDailyActivityCall",()=>ew,"tagDauCall",()=>oO,"tagDeleteCall",()=>rq,"tagDistinctCall",()=>oF,"tagInfoCall",()=>rU,"tagListCall",()=>rG,"tagMauCall",()=>oI,"tagUpdateCall",()=>rW,"tagWauCall",()=>oT,"tagsSpendLogsCall",()=>eV,"teamBulkMemberAddCall",()=>tc,"teamCreateCall",()=>e8,"teamDailyActivityCall",()=>e$,"teamDeleteCall",()=>ea,"teamInfoCall",()=>es,"teamListCall",()=>eu,"teamMemberAddCall",()=>ts,"teamMemberDeleteCall",()=>td,"teamMemberUpdateCall",()=>tu,"teamPermissionsUpdateCall",()=>rY,"teamSpendLogsCall",()=>eH,"teamUpdateCall",()=>ti,"testCacheConnectionCall",()=>tx,"testConnectionRequest",()=>e4,"testCustomCodeGuardrail",()=>of,"testMCPSemanticFilter",()=>tz,"testMCPToolsListRequest",()=>o$,"testPipelineCall",()=>rr,"testPoliciesAndGuardrails",()=>tJ,"testPolicyTemplate",()=>tZ,"testSearchToolConnection",()=>rL,"transformRequestCall",()=>ev,"uiAuditLogsCall",()=>og,"uiSpendLogDetailsCall",()=>rm,"uiSpendLogsCall",()=>eq,"updateCacheSettingsCall",()=>tE,"updateConfigFieldSetting",()=>tO,"updateDefaultTeamSettings",()=>rK,"updateEmailEventSettings",()=>r7,"updateGuardrailCall",()=>ou,"updateInternalUserSettings",()=>rv,"updateMCPSemanticFilterSettings",()=>tA,"updateMCPServer",()=>rS,"updateMCPToolset",()=>rT,"updatePassThroughEndpoint",()=>ob,"updatePolicyCall",()=>t4,"updatePolicyVersionStatus",()=>t7,"updatePromptCall",()=>ru,"updateSSOSettings",()=>om,"updateSearchTool",()=>rB,"updateToolPolicy",()=>oX,"updateUiSettings",()=>oA,"updateUsefulLinksCall",()=>eL,"usageAiChatStream",()=>t1,"userAgentSummaryCall",()=>o_,"userBulkUpdateUserCall",()=>tg,"userCreateCall",()=>er,"userDailyActivityAggregatedCall",()=>e5,"userDailyActivityCall",()=>eb,"userDeleteCall",()=>en,"userFilterUICall",()=>eG,"userGetInfoV2",()=>el,"userListCall",()=>ei,"userUpdateUserCall",()=>tm,"v2TeamListCall",()=>ec,"validateBlockedWordsFile",()=>op,"vectorStoreCreateCall",()=>rZ,"vectorStoreDeleteCall",()=>r1,"vectorStoreInfoCall",()=>r2,"vectorStoreListCall",()=>r0,"vectorStoreSearchCall",()=>ok,"vectorStoreUpdateCall",()=>r4],764205),e.i(247167);var t=e.i(888259),r=e.i(268004);e.s(["default",()=>g,"jsonFields",()=>h],82946);var o=e.i(843476),n=e.i(271645),a=e.i(808613),i=e.i(311451),l=e.i(28651),s=e.i(199133),c=e.i(779241),u=e.i(827252),d=e.i(592968);let f=e=>e?e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()):e;function p(e,t){return e.length>t?e.substring(0,t)+"...":e}e.s(["formItemValidateJSON",0,(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject("Please enter valid JSON")}},"formatLabel",0,f,"truncateString",()=>p],122550);let h=["metadata","config","enforced_params","aliases"],m=(e,t)=>h.includes(e)||"json"===t.format,g=({schemaComponent:e,excludedFields:t=[],form:r,overrideLabels:p={},overrideTooltips:h={},customValidation:g={},defaultValues:v={}})=>{let[y,b]=(0,n.useState)(null),[w,$]=(0,n.useState)(null);return((0,n.useEffect)(()=>{(async()=>{try{let o=(await z()).components.schemas[e];if(!o)throw Error(`Schema component "${e}" not found`);b(o);let n={};Object.keys(o.properties).filter(e=>!t.includes(e)&&void 0!==v[e]).forEach(e=>{n[e]=v[e]}),r.setFieldsValue(n)}catch(e){console.error("Schema fetch error:",e),$(e instanceof Error?e.message:"Failed to fetch schema")}})()},[e,r,t]),w)?(0,o.jsxs)("div",{className:"text-red-500",children:["Error: ",w]}):y?.properties?(0,o.jsx)("div",{children:Object.entries(y.properties).filter(([e])=>!t.includes(e)).map(([e,t])=>{let r,n,b,w,$,C,x,E;return n=(e=>{if(e.type)return e.type;if(e.anyOf){let t=e.anyOf.map(e=>e.type);if(t.includes("number")||t.includes("integer"))return"number";t.includes("string")}return"string"})(t),b=y?.required?.includes(e),w=p[e]||t.title||f(e),$=h[e]||t.description,C=[],b&&C.push({required:!0,message:`${w} is required`}),g[e]&&C.push({validator:g[e]}),m(e,t)&&C.push({validator:async(e,t)=>{if(t&&!(e=>{if(!e)return!0;try{return JSON.parse(e),!0}catch{return!1}})(t))throw Error("Please enter valid JSON")}}),x=$?(0,o.jsxs)("span",{children:[w," ",(0,o.jsx)(d.Tooltip,{title:$,children:(0,o.jsx)(u.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}):w,r=m(e,t)?(0,o.jsx)(i.Input.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):t.enum?(0,o.jsx)(s.Select,{children:t.enum.map(e=>(0,o.jsx)(s.Select.Option,{value:e,children:e},e))}):"number"===n||"integer"===n?(0,o.jsx)(l.InputNumber,{style:{width:"100%"},precision:"integer"===n?0:void 0}):"duration"===e?(0,o.jsx)(c.TextInput,{placeholder:"eg: 30s, 30h, 30d"}):(0,o.jsx)(c.TextInput,{placeholder:$||""}),(0,o.jsx)(a.Form.Item,{label:x,name:e,className:"mt-8",rules:C,initialValue:v[e],help:(0,o.jsx)("div",{className:"text-xs text-gray-500",children:(E=({max_budget:"Enter maximum budget in USD (e.g., 100.50)",budget_duration:"Select a time period for budget reset",tpm_limit:"Enter maximum tokens per minute (whole number)",rpm_limit:"Enter maximum requests per minute (whole number)",duration:"Enter duration (e.g., 30s, 24h, 7d)",metadata:'Enter JSON object with key-value pairs\nExample: {"team": "research", "project": "nlp"}',config:'Enter configuration as JSON object\nExample: {"setting": "value"}',permissions:"Enter comma-separated permission strings",enforced_params:'Enter parameters as JSON object\nExample: {"param": "value"}',blocked:"Enter true/false or specific block conditions",aliases:'Enter aliases as JSON object\nExample: {"alias1": "value1", "alias2": "value2"}',models:"Select one or more model names",key_alias:"Enter a unique identifier for this key",tags:"Enter comma-separated tag strings"})[e]||({string:"Text input",number:"Numeric input",integer:"Whole number input",boolean:"True/False value"})[n]||"Text input",m(e,t)?`${E} Must be valid JSON format`:t.enum?`Select from available options -Allowed values: ${t.enum.join(", ")}`:E)}),children:r},e)})}):null};var v=e.i(727749);let y=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`},b=async e=>{try{let t=E?`${E}/callbacks/configs`:"/callbacks/configs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},w=async e=>{try{let t=E?`${E}/in_product_nudges`:"/in_product_nudges",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get in-product nudges:",e),e}},$="/",C="litellm_worker_url",x=window.localStorage.getItem(C),E=(()=>{if(!x)return null;try{let e=new URL(x);if("http:"===e.protocol||"https:"===e.protocol)return x}catch{}return window.localStorage.removeItem(C),null})()??null;console.log=function(){};let S=()=>{if(E)return E;let e=window.location;return e?.origin??""};function k(e){(!e||function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e))&&(e?window.localStorage.setItem(C,e):window.localStorage.removeItem(C),E=e??null)}let j="POST",O="DELETE",T=0,I=async e=>{let t=Date.now();if(t-T>6e4){if(("string"==typeof e?e:JSON.stringify(e)).includes("Authentication Error - Expired Key")){v.default.info("UI Session Expired. Logging out."),T=t,(0,r.clearTokenCookies)();let e=window.location;e&&(window.location.href=e.pathname)}T=t}else console.log("Error suppressed to prevent spam:",e)},F=async()=>{let e=E?`${E}/public/providers/fields`:"/public/providers/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch provider create metadata:",t.status,e),Error("Failed to load provider configuration")}return await t.json()},_=async()=>{let e=E?`${E}/public/agents/fields`:"/public/agents/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch agent create metadata:",t.status,e),Error("Failed to load agent configuration")}return await t.json()},P="Authorization";function R(e="Authorization"){console.log(`setGlobalLitellmHeaderName: ${e}`),P=e}function N(){return P}let M=async(e,t)=>{let r=E?`${E}/model_group/make_public`:"/model_group/make_public";return(await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},B=async()=>{console.log("Getting UI config");let e=await fetch("/litellm/.well-known/litellm-ui-config"),t=await e.json();return console.log("jsonData in getUiConfig:",t),((e,t=null)=>{if(window.localStorage.getItem(C))return;let r=window.location,o=r?.origin??null,n=t||o;if(console.log("proxyBaseUrl:",E),console.log("serverRootPath:",e),!n)return console.log("Updated proxyBaseUrl:",E=E??null);e.length>0&&!n.endsWith(e)&&"/"!=e&&(n+=e),console.log("Updated proxyBaseUrl:",E=n)})(t.server_root_path,t.proxy_base_url),t},A=async()=>{let e=E?`${E}/public/model_hub/info`:"/public/model_hub/info",t=await fetch(e);return await t.json()},z=async()=>{let e=E?`${E}/openapi.json`:"/openapi.json",t=await fetch(e);return await t.json()},L=async()=>{try{let e=E?`${E}/public/litellm_model_cost_map`:"/public/litellm_model_cost_map",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}}),r=await t.json();return console.log(`received litellm model cost data: ${r}`),r}catch(e){throw console.error("Failed to get model cost map:",e),e}},D=async e=>{try{let t=E?`${E}/reload/model_cost_map`:"/reload/model_cost_map",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to reload model cost map:",e),e}},H=async(e,t)=>{try{let r=E?`${E}/schedule/model_cost_map_reload?hours=${t}`:`/schedule/model_cost_map_reload?hours=${t}`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await o.json();return console.log(`Schedule model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},V=async e=>{try{let t=E?`${E}/schedule/model_cost_map_reload`:"/schedule/model_cost_map_reload",r=await fetch(t,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Cancel model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},W=async e=>{try{let t=E?`${E}/model/cost_map/source`:"/model/cost_map/source",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw Error(`HTTP ${r.status}: ${e}`)}let o=await r.json();return console.log("Model cost map source info:",o),o}catch(e){throw console.error("Failed to get model cost map source info:",e),e}},U=async e=>{try{let t=E?`${E}/schedule/model_cost_map_reload/status`:"/schedule/model_cost_map_reload/status";console.log("Fetching status from URL:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){console.error(`Status request failed with status: ${r.status}`);let e=await r.text();throw console.error("Error response:",e),Error(`HTTP ${r.status}: ${e}`)}let o=await r.json();return console.log("Model cost map reload status:",o),o}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},G=async(e,r)=>{try{let o=E?`${E}/model/new`:"/model/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return console.log("API Response:",a),t.default.destroy(),v.default.success(`Model ${r.model_name} created successfully`),a}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{console.log(`model_id in model delete call: ${t}`);try{let r=E?`${E}/model/delete`:"/model/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{if(console.log(`budget_id in budget delete call: ${t}`),null!=e)try{let r=E?`${E}/budget/delete`:"/budget/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/new`:"/budget/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},X=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/update`:"/budget/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Y=async(e,t)=>{try{let r=E?`${E}/invitation/new`:"/invitation/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Q=async e=>{try{let t=E?`${E}/alerting/settings`:"/alerting/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},Z=async(e,t)=>{try{for(let e of(console.log("Form Values in keyCreateServiceAccountCall:",t),t.description&&(t.metadata||(t.metadata={}),t.metadata.description=t.description,delete t.description,t.metadata=JSON.stringify(t.metadata)),h))if(t[e]){console.log(`formValues.${e}:`,t[e]);try{t[e]=JSON.parse(t[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",t);let r=E?`${E}/key/service-account/generate`:"/key/service-account/generate",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw I(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ee=async(e,t,r)=>{try{for(let e of(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),h))if(r[e]){console.log(`formValues.${e}:`,r[e]);try{r[e]=JSON.parse(r[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",r);let o=E?`${E}/key/generate`:"/key/generate",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw I(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t,r,o,n,a)=>{let i=E?`${E}/key/generate`:"/key/generate",l={agent_id:t,key_alias:r,models:o.length>0?o:[]};a&&(l.team_id=a),n&&Object.keys(n).length>0&&(l.metadata=n);let s=await fetch(i,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw I(await s.text()),Error("Failed to create key for agent");return s.json()},er=async(e,t,r)=>{try{if(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),r.auto_create_key=!1,r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",r);let o=E?`${E}/user/new`:"/user/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw I(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},eo=async(e,t)=>{try{let r=E?`${E}/key/delete`:"/key/delete";console.log("in keyDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},en=async(e,t)=>{try{let r=E?`${E}/user/delete`:"/user/delete";console.log("in userDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete user(s):",e),e}},ea=async(e,t)=>{try{let r=E?`${E}/team/delete`:"/team/delete";console.log("in teamDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},ei=async(e,t=null,r=null,o=null,n=null,a=null,i=null,l=null,s=null,c=null,u=null)=>{try{let d=E?`${E}/user/list`:"/user/list";console.log("in userListCall");let f=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");f.append("user_ids",e)}r&&f.append("page",r.toString()),o&&f.append("page_size",o.toString()),n&&f.append("user_email",n),a&&f.append("role",a),i&&f.append("team",i),l&&f.append("sso_user_ids",l),s&&f.append("sort_by",s),c&&f.append("sort_order",c),u&&u.length>0&&f.append("organization_ids",u.join(","));let p=f.toString();p&&(d+=`?${p}`);let h=await fetch(d,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!h.ok){let e=await h.json(),t=oP(e);throw I(t),Error(t)}let m=await h.json();return console.log("/user/list API Response:",m),m}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t)=>{try{let r=E?`${E}/v2/user/info`:"/v2/user/info";t&&(r+=`?user_id=${encodeURIComponent(t)}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch user info v2:",e),e}},es=async(e,t)=>{try{let r=E?`${E}/team/info`:"/team/info";t&&(r=`${r}?team_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ec=async(e,t,r=null,o=null,n=null,a=1,i=10,l=null,s=null)=>{try{let a=E?`${E}/v2/team/list`:"/v2/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oP(e);throw I(t),Error(t)}let c=await s.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},eu=async(e,t,r=null,o=null,n=null)=>{try{let a=E?`${E}/team/list`:"/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oP(e);throw I(t),Error(t)}let c=await s.json();return console.log("/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},ed=async e=>{try{let t=E?`${E}/team/available`:"/team/available";console.log("in availableTeamListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("/team/available_teams API Response:",o),o}catch(e){throw e}},ef=async(e,t=null,r=null)=>{try{let o=E?`${E}/organization/list`:"/organization/list",n=new URLSearchParams;t&&n.append("org_id",t.toString()),r&&n.append("org_alias",r.toString());let a=n.toString();a&&(o+=`?${a}`);let i=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oP(e);throw I(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},ep=async(e,t)=>{try{let r=E?`${E}/organization/info`:"/organization/info";t&&(r=`${r}?organization_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eh=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let r=E?`${E}/organization/new`:"/organization/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let r=E?`${E}/organization/update`:"/organization/update",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eg=async(e,t)=>{try{let r=E?`${E}/organization/delete`:"/organization/delete",o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!o.ok){let e=await o.text();throw I(e),Error(`Error deleting organization: ${e}`)}return await o.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},ev=async(e,t)=>{try{let r=E?`${E}/utils/transform_request`:"/utils/transform_request",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},ey=async({accessToken:e,endpoint:t,startTime:r,endTime:o,page:n=1,extraQueryParams:a})=>{try{let i,l,s,c,u=(i=t.startsWith("/")?t:`/${t}`,l=E?`${E}${i}`:i,(s=new URLSearchParams).append("start_date",y(r)),s.append("end_date",y(o)),s.append("page_size","1000"),s.append("page",n.toString()),s.append("timezone",new Date().getTimezoneOffset().toString()),a&&Object.entries(a).forEach(([e,t])=>{((e,t,r)=>{if(null!=r){if(Array.isArray(r)){r.length>0&&e.append(t,r.join(","));return}e.append(t,`${r}`)}})(s,e,t)}),(c=s.toString())?`${l}?${c}`:l),d=await fetch(u,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=oP(e);throw I(t),Error(t)}return await d.json()}catch(e){throw console.error(`Failed to fetch daily activity (${t}):`,e),e}},eb=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/user/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{user_id:n}}),ew=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/tag/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{tags:n}}),e$=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/team/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{team_ids:n,exclude_team_ids:"litellm-dashboard"}}),eC=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/organization/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{organization_ids:n}}),ex=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/customer/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{end_user_ids:n}}),eE=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/agent/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{agent_ids:n}}),eS=async e=>{try{let t=E?`${E}/onboarding/get_token`:"/onboarding/get_token";t+=`?invite_link=${e}`;let r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},ek=async(e,t,r,o)=>{let n=E?`${E}/onboarding/claim_token`:"/onboarding/claim_token";try{let a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:r,password:o})});if(!a.ok){let e=await a.json(),t=oP(e);throw I(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to delete key:",e),e}},ej=async(e,t,r)=>{try{let o=E?`${E}/key/${t}/regenerate`:`/key/${t}/regenerate`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return console.log("Regenerate key Response:",a),a}catch(e){throw console.error("Failed to regenerate key:",e),e}},eO=!1,eT=null,eI=async(e,t,r,o=1,n=50,a,i,l,s,c)=>{try{console.log("modelInfoCall:",e,t,r,o,n,a,i,l,s,c);let u=E?`${E}/v2/model/info`:"/v2/model/info",d=new URLSearchParams;d.append("include_team_models","true"),d.append("page",o.toString()),d.append("size",n.toString()),a&&a.trim()&&d.append("search",a.trim()),i&&i.trim()&&d.append("modelId",i.trim()),l&&l.trim()&&d.append("teamId",l.trim()),s&&s.trim()&&d.append("sortBy",s.trim()),c&&c.trim()&&d.append("sortOrder",c.trim()),d.toString()&&(u+=`?${d.toString()}`);let f=await fetch(u,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw e+=`error shown=${eO}`,eO||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),v.default.info(e),eO=!0,eT&&clearTimeout(eT),eT=setTimeout(()=>{eO=!1},1e4)),Error("Network response was not ok")}let p=await f.json();return console.log("modelInfoCall:",p),p}catch(e){throw console.error("Failed to create key:",e),e}},eF=async(e,t)=>{try{let r=E?`${E}/v1/model/info`:"/v1/model/info";r+=`?litellm_model_id=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("modelInfoV1Call:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e_=async()=>{let e=E?`${E}/public/model_hub`:"/public/model_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`modelHubPublicModelsCall failed with status ${t.status}`),[])},eP=async()=>{let e=E?`${E}/public/agent_hub`:"/public/agent_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`agentHubPublicModelsCall failed with status ${t.status}`),[])},eR=async()=>{let e=E?`${E}/public/mcp_hub`:"/public/mcp_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`mcpHubPublicServersCall failed with status ${t.status}`),[])},eN=async e=>{try{let t=E?`${E}/model_group/info`:"/model_group/info",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("modelHubCall:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},eM=async e=>{try{let t=E?`${E}/get/allowed_ips`:"/get/allowed_ips",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("getAllowedIPs:",o),o.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},eB=async(e,t)=>{try{let r=E?`${E}/add/allowed_ip`:"/add/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("addAllowedIP:",n),n}catch(e){throw console.error("Failed to add allowed IP:",e),e}},eA=async(e,t)=>{try{let r=E?`${E}/delete/allowed_ip`:"/delete/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("deleteAllowedIP:",n),n}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},ez=async(e,t)=>{try{let r=E?`${E}/model_hub/update_useful_links`:"/model_hub/update_useful_links",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eL=async(e,t,r,o=!1,n=null,a=!1,i=!1,l)=>{console.log("in /models calls, globalLitellmHeaderName",P);try{let t=E?`${E}/models`:"/models",r=new URLSearchParams;r.append("include_model_access_groups","True"),!0===o&&r.append("return_wildcard_routes","True"),!0===i&&r.append("only_model_access_groups","True"),n&&r.append("team_id",n.toString()),l&&r.append("scope",l),r.toString()&&(t+=`?${r.toString()}`);let a=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oP(e);throw I(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eD=async e=>{try{let t=E?`${E}/global/spend/teams`:"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eH=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/tags`:"/global/spend/tags";t&&r&&(n=`${n}?start_date=${t}&end_date=${r}`),o&&(n+=`&tags=${o.join(",")}`),console.log("in tagsSpendLogsCall:",n);let a=await fetch(`${n}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oP(e);throw I(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eV=async e=>{try{let t=E?`${E}/global/spend/all_tag_names`:"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eW=async e=>{try{let t=E?`${E}/customer/list`:"/customer/list";console.log("in customer/list",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to fetch end users:",e),e}},eU=async(e,t)=>{try{let r=E?`${E}/user/filter/ui`:"/user/filter/ui",o=new URLSearchParams;t.get("user_email")&&o.append("user_email",t.get("user_email")),t.get("user_id")&&o.append("user_id",t.get("user_id")),t.get("team_id")&&o.append("team_id",t.get("team_id"));let n=o.toString(),a=n?`${r}?${n}`:r,i=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oP(e);throw I(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},eG=async({accessToken:e,start_date:t,end_date:r,page:o=1,page_size:n=50,params:a={}})=>{try{let i=E?`${E}/spend/logs/ui`:"/spend/logs/ui",l=new URLSearchParams;for(let[e,i]of(l.append("start_date",t),l.append("end_date",r),l.append("page",o.toString()),l.append("page_size",n.toString()),Object.entries(a)))null!=i&&("min_spend"===e||"max_spend"===e?l.append(e,i.toString()):"string"==typeof i&&""!==i&&l.append(e,String(i)));let s=l.toString();s&&(i+=`?${s}`);let c=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=oP(e);throw I(t),Error(t)}let u=await c.json();return console.log("Spend Logs Response:",u),u}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},eq=async e=>{try{let t=E?`${E}/global/spend/logs`:"/global/spend/logs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eJ=async e=>{try{let t=E?`${E}/global/spend/keys?limit=5`:"/global/spend/keys?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eK=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/end_users`:"/global/spend/end_users",a="";a=t?JSON.stringify({api_key:t,startTime:r,endTime:o}):JSON.stringify({startTime:r,endTime:o});let i={method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:a},l=await fetch(n,i);if(!l.ok){let e=await l.json(),t=oP(e);throw I(t),Error(t)}let s=await l.json();return console.log(s),s}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/provider`:"/global/spend/provider";r&&o&&(n+=`?start_date=${r}&end_date=${o}`),t&&(n+=`&api_key=${t}`);let a={method:"GET",headers:{[P]:`Bearer ${e}`}},i=await fetch(n,a);if(!i.ok){let e=await i.json(),t=oP(e);throw I(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eY=async(e,t,r)=>{try{let o=E?`${E}/global/activity`:"/global/activity";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oP(e);throw I(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eQ=async(e,t,r)=>{try{let o=E?`${E}/global/activity/cache_hits`:"/global/activity/cache_hits";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oP(e);throw I(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eZ=async(e,t,r)=>{try{let o=E?`${E}/global/activity/model`:"/global/activity/model";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oP(e);throw I(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e0=async e=>{try{let t=E?`${E}/global/spend/models?limit=5`:"/global/spend/models?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},e1=async(e,t)=>{try{let r=E?`${E}/v2/key/info`:"/v2/key/info",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!o.ok){let e=await o.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw I(e),Error("Network response was not ok")}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},e2=async(e,t,r,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let n=E?`${E}/health/test_connection`:"/health/test_connection",a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({litellm_params:t,model_info:r,mode:o})}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||"error"===l.status)&&"error"!==l.status)return{status:"error",message:l.error?.message||`Connection test failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("Model connection test error:",e),e}},e4=async(e,t)=>{try{console.log("entering keyInfoV1Call");let r=E?`${E}/key/info`:"/key/info";r=`${r}?key=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(console.log("response",o),!o.ok){let e=await o.text();I(e),v.default.fromBackend("Failed to fetch key info - "+e)}let n=await o.json();return console.log("data",n),n}catch(e){throw console.error("Failed to fetch key info:",e),e}},e6=async(e,t,r,o,n,a,i,l,s=null,c=null,u=null,d=null)=>{try{let f=E?`${E}/key/list`:"/key/list";console.log("in keyListCall");let p=new URLSearchParams;r&&p.append("team_id",r.toString()),t&&p.append("organization_id",t.toString()),o&&p.append("key_alias",o),a&&p.append("key_hash",a),n&&p.append("user_id",n.toString()),i&&p.append("page",i.toString()),l&&p.append("size",l.toString()),s&&p.append("sort_by",s),c&&p.append("sort_order",c),u&&p.append("expand",u),d&&p.append("status",d),p.append("return_full_object","true"),p.append("include_team_keys","true"),p.append("include_created_by_keys","true");let h=p.toString();h&&(f+=`?${h}`);let m=await fetch(f,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!m.ok){let e=await m.json(),t=oP(e);throw I(t),Error(t)}let g=await m.json();return console.log("/team/list API Response:",g),g}catch(e){throw console.error("Failed to create key:",e),e}},e3=async(e,t=1,r=50,o,n)=>{try{let a=new URLSearchParams(Object.entries({page:String(t),size:String(r),...o?{search:o}:{},...n?{team_id:n}:{}})),i=E?`${E}/key/aliases`:"/key/aliases";i=`${i}?${a}`;let l=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=oP(e);throw I(t),Error(t)}let s=await l.json();return console.log("/key/aliases API Response:",s),s}catch(e){throw console.error("Failed to fetch key aliases:",e),e}},e7=async(e,t,r,o=null)=>{try{let n=E?`${E}/user/daily/activity/aggregated`:"/user/daily/activity/aggregated",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),a.append("timezone",new Date().getTimezoneOffset().toString()),o&&a.append("user_id",o);let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oP(e);throw I(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},e5=async e=>{try{let t=E?`${E}/user/available_roles`:"/user/available_roles",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("response from user/available_role",o),o}catch(e){throw e}},e9=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=E?`${E}/team/new`:"/team/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e8=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=E?`${E}/credentials`:"/credentials",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},te=async e=>{try{let t=E?`${E}/credentials`:"/credentials";console.log("in credentialListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("/credentials API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tt=async(e,t,r)=>{try{let o=E?`${E}/credentials`:"/credentials";t?o+=`/by_name/${t}`:r&&(o+=`/by_model/${r}`),console.log("in credentialListCall");let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tr=async(e,t)=>{try{let r=E?`${E}/credentials/${t}`:`/credentials/${t}`;console.log("in credentialDeleteCall:",t);let o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},to=async(e,t,r)=>{try{if(console.log("Form Values in credentialUpdateCall:",r),r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=E?`${E}/credentials/${t}`:`/credentials/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tn=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let r=E?`${E}/key/update`:"/key/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw I(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("Update key Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ta=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let r=E?`${E}/team/update`:"/team/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw I(e),console.error("Error response from the server:",e),v.default.fromBackend("Failed to update team settings: "+e),Error(e)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to update team:",e),e}},ti=async(e,t,r)=>{try{console.log("Form Values in modelUpateCall:",t);let o=E?`${E}/model/${r}/update`:`/model/${r}/update`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw I(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let a=await n.json();return console.log("Update model Response:",a),a}catch(e){throw console.error("Failed to update model:",e),e}},tl=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_add`:"/team/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:r})});if(!n.ok){let e=await n.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",o=Error(r);throw o.raw=t,o}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},ts=async(e,t,r,o,n)=>{try{console.log("Bulk add team members:",{teamId:t,members:r,maxBudgetInTeam:o});let a=E?`${E}/team/bulk_member_add`:"/team/bulk_member_add",i={team_id:t};n?i.all_users=!0:i.members=r,null!=o&&(i.max_budget_in_team=o);let l=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to bulk add team members",o=Error(r);throw o.raw=t,o}let s=await l.json();return console.log("Bulk team member add API Response:",s),s}catch(e){throw console.error("Failed to bulk add team members:",e),e}},tc=async(e,t,r)=>{try{console.log("Form Values in teamMemberUpdateCall:",r),console.log("Budget value:",r.max_budget_in_team),console.log("TPM limit:",r.tpm_limit),console.log("RPM limit:",r.rpm_limit);let o=E?`${E}/team/member_update`:"/team/member_update",n={team_id:t,role:r.role,user_id:r.user_id};void 0!==r.user_email&&(n.user_email=r.user_email),void 0!==r.max_budget_in_team&&null!==r.max_budget_in_team&&(n.max_budget_in_team=r.max_budget_in_team),void 0!==r.tpm_limit&&null!==r.tpm_limit&&(n.tpm_limit=r.tpm_limit),void 0!==r.rpm_limit&&null!==r.rpm_limit&&(n.rpm_limit=r.rpm_limit),console.log("Final request body:",n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){let e=await a.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",o=Error(r);throw o.raw=t,o}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to update team member:",e),e}},tu=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_delete`:"/team/member_delete",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==r.user_email&&{user_email:r.user_email},...void 0!==r.user_id&&{user_id:r.user_id}})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},td=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/organization/member_add`:"/organization/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:r})});if(!n.ok){let e=await n.text();throw I(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create organization member:",e),e}},tf=async(e,t,r)=>{try{console.log("Form Values in organizationMemberDeleteCall:",r);let o=E?`${E}/organization/member_delete`:"/organization/member_delete",n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:r})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to delete organization member:",e),e}},tp=async(e,t,r)=>{try{console.log("Form Values in organizationMemberUpdateCall:",r);let o=E?`${E}/organization/member_update`:"/organization/member_update",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...r})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to update organization member:",e),e}},th=async(e,t,r)=>{try{console.log("Form Values in userUpdateUserCall:",t);let o=E?`${E}/user/update`:"/user/update",n={...t};null!==r&&(n.user_role=r),n=JSON.stringify(n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!a.ok){let e=await a.json(),t=oP(e);throw I(t),Error(t)}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to create key:",e),e}},tm=async(e,t,r,o=!1)=>{try{let n;console.log("Form Values in userUpdateUserCall:",t);let a=E?`${E}/user/bulk_update`:"/user/bulk_update";if(o)n=JSON.stringify({all_users:!0,user_updates:t});else if(r&&r.length>0){let e=[];for(let o of r)e.push({user_id:o,...t});n=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let i=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!i.ok){let e=await i.json(),t=oP(e);throw I(t),Error(t)}let l=await i.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},tg=async(e,t)=>{try{let r=E?`${E}/health/services?service=${t}`:`/health/services?service=${t}`;console.log("Checking Slack Budget Alerts service health");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw I(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},tv=async e=>{try{let t=E?`${E}/budget/list`:"/budget/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},ty=async(e,t,r)=>{try{let t=E?`${E}/get/config/callbacks`:"/get/config/callbacks",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tb=async e=>{try{let t=E?`${E}/config/list?config_type=general_settings`:"/config/list?config_type=general_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tw=async e=>{try{let t=E?`${E}/router/settings`:"/router/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get router settings:",e),e}},t$=async e=>{try{let t=E?`${E}/cache/settings`:"/cache/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get cache settings:",e),e}},tC=async(e,t)=>{try{let r=E?`${E}/cache/settings/test`:"/cache/settings/test",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test cache connection:",e),e}},tx=async(e,t)=>{try{let r=E?`${E}/cache/settings`:"/cache/settings",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update cache settings:",e),e}},tE=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint";t&&(r+=`/team/${t}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tS=async(e,t)=>{try{let r=E?`${E}/config/field/info?field_name=${t}`:`/config/field/info?field_name=${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tk=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tj=async(e,t,r)=>{try{let o=E?`${E}/config/field/update`:"/config/field/update",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return v.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tO=async(e,t)=>{try{let r=E?`${E}/config/field/delete`:"/config/field/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return v.default.success("Field reset on proxy"),n}catch(e){throw console.error("Failed to get callbacks:",e),e}},tT=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint?endpoint_id=${t}`:`/config/pass_through_endpoint?endpoint_id=${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tI=async(e,t)=>{try{let r=E?`${E}/config/update`:"/config/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tF=async(e,t)=>{try{let r=E?`${E}/health?model_id=${encodeURIComponent(t)}`:`/health?model_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to call /health for model id ${t}:`,e),e}},t_=async e=>{try{let t=E?`${E}/cache/ping`:"/cache/ping",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tP=async e=>{try{let t=E?`${E}/health/latest`:"/health/latest",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tR=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",E);let t=E?`${E}/sso/get/ui_settings`:"/sso/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tN=async e=>{try{let t=E?`${E}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);return console.error("Failed to get UI settings:",t),null}return await r.json()}catch(e){return console.error("Failed to get UI settings:",e),null}},tM=async e=>{try{let t=E?`${E}/get/mcp_semantic_filter_settings`:"/get/mcp_semantic_filter_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get MCP semantic filter settings:",e),e}},tB=async(e,t)=>{try{let r=E?`${E}/update/mcp_semantic_filter_settings`:"/update/mcp_semantic_filter_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP semantic filter settings:",e),e}},tA=async(e,t,r)=>{try{let o=E?`${E}/v1/responses`:"/v1/responses",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model:t,input:[{role:"user",content:r,type:"message"}],tools:[{type:"mcp",server_url:"litellm_proxy",require_approval:"never"}],tool_choice:"required"})}),a=n.headers.get("x-litellm-semantic-filter"),i=n.headers.get("x-litellm-semantic-filter-tools");if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}return{data:await n.json(),headers:{filter:a,tools:i}}}catch(e){throw console.error("Failed to test MCP semantic filter:",e),e}},tz=async e=>{try{let t=E?`${E}/v2/guardrails/list`:"/v2/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(`v2 guardrails/list returned ${r.status}`);return await r.json()}catch(t){console.log("v2/guardrails/list failed, falling back to v1:",t);try{let t=E?`${E}/guardrails/list`:"/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}}},tL=async(e,t)=>{let r=E?`${E}/guardrails/submissions`:"/guardrails/submissions",o=new URLSearchParams;t?.status&&o.set("status",t.status),t?.team_id&&o.set("team_id",t.team_id),t?.team_guardrail!==void 0&&o.set("team_guardrail",String(t.team_guardrail)),t?.search&&o.set("search",t.search);let n=o.toString()?`${r}?${o.toString()}`:r,a=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=oP(await a.json().catch(()=>({})));throw I(e),Error(e)}return a.json()},tD=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/approve`:`/guardrails/submissions/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oP(await o.json().catch(()=>({})));throw I(e),Error(e)}return o.json()},tH=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/reject`:`/guardrails/submissions/${encodeURIComponent(t)}/reject`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oP(await o.json().catch(()=>({})));throw I(e),Error(e)}return o.json()},tV=async(e,t,r)=>{try{let o=E?`${E}/guardrails/usage/overview`:"/guardrails/usage/overview",n=new URLSearchParams;t&&n.append("start_date",t),r&&n.append("end_date",r),n.toString()&&(o+=`?${n.toString()}`);let a=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(oP(e))}return a.json()}catch(e){throw console.error("Failed to get guardrails usage overview:",e),e}},tW=async(e,t,r,o)=>{try{let n=E?`${E}/guardrails/usage/detail/${encodeURIComponent(t)}`:`/guardrails/usage/detail/${encodeURIComponent(t)}`,a=new URLSearchParams;r&&a.append("start_date",r),o&&a.append("end_date",o),a.toString()&&(n+=`?${a.toString()}`);let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json();throw Error(oP(e))}return i.json()}catch(e){throw console.error("Failed to get guardrails usage detail:",e),e}},tU=async(e,t)=>{try{let r=E?`${E}/guardrails/usage/logs`:"/guardrails/usage/logs",o=new URLSearchParams;t.guardrailId&&o.append("guardrail_id",t.guardrailId),t.policyId&&o.append("policy_id",t.policyId),null!=t.page&&o.append("page",String(t.page)),null!=t.pageSize&&o.append("page_size",String(t.pageSize)),t.action&&o.append("action",t.action),t.startDate&&o.append("start_date",t.startDate),t.endDate&&o.append("end_date",t.endDate),o.toString()&&(r+=`?${o.toString()}`);let n=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json();throw Error(oP(e))}return n.json()}catch(e){throw console.error("Failed to get guardrails usage logs:",e),e}},tG=async e=>{try{let t=E?`${E}/policies/list`:"/policies/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policies list:",e),e}},tq=async(e,t,r)=>{try{let o=E?`${E}/utils/test_policies_and_guardrails`:"/utils/test_policies_and_guardrails",n=await fetch(o,{method:"POST",signal:r,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({policy_names:t.policy_names??null,guardrail_names:t.guardrail_names??null,inputs:t.inputs??null,inputs_list:t.inputs_list??null,request_data:t.request_data??{},input_type:t.input_type??"request",agent_id:t.agent_id??null})});if(!n.ok){let e=await n.text(),t="Failed to test policies and guardrails";try{let r=JSON.parse(e);r.detail?t="string"==typeof r.detail?r.detail:JSON.stringify(r.detail):r.message&&(t=r.message)}catch{t=e||t}throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test policies and guardrails:",e),e}},tJ=async(e,t)=>{try{let r=E?`${E}/policy/info/${t}`:`/policy/info/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to get policy info for ${t}:`,e),e}},tK=async e=>{try{let t=E?`${E}/policy/templates`:"/policy/templates",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy templates:",e),e}},tX=async(e,t,r,o,n)=>{try{let a=E?`${E}/policy/templates/enrich`:"/policy/templates/enrich",i={template_id:t,parameters:r};o&&(i.model=o),n&&(i.competitors=n);let l=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.json(),t=oP(e);throw I(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to enrich policy template:",e),e}},tY=async(e,t,r,o)=>{try{let n=E?`${E}/policy/templates/suggest`:"/policy/templates/suggest",a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({attack_examples:t.filter(e=>e.trim()),description:r,model:o})});if(!a.ok){let e=await a.json(),t=oP(e);throw I(t),Error(t)}return a.json()}catch(e){throw console.error("Failed to suggest policy templates:",e),e}},tQ=async(e,t,r)=>{try{let o=E?`${E}/policy/templates/test`:"/policy/templates/test",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail_definitions:t,text:r})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to test policy template:",e),e}},tZ=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/policy/templates/enrich/stream`:"/policy/templates/enrich/stream",u={template_id:t,parameters:r,model:o};l?.instruction&&(u.instruction=l.instruction),l?.existingCompetitors&&(u.competitors=l.existingCompetitors);let d=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(u)});if(!d.ok){let e=oP(await d.json());throw I(e),Error(e)}let f=d.body?.getReader();if(!f)throw Error("No response body");let p=new TextDecoder,h="";for(;;){let{done:e,value:t}=await f.read();if(e)break;let r=(h+=p.decode(t,{stream:!0})).split("\n");for(let e of(h=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"competitor"===t.type?n(t.name):"status"===t.type?s?.(t.message):"done"===t.type?a(t):"error"===t.type&&i?.(t.message)}catch{}}},t0=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/usage/ai/chat`:"/usage/ai/chat",u=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({messages:t,model:r}),signal:s});if(!u.ok){let e=oP(await u.json());throw I(e),Error(e)}let d=u.body?.getReader();if(!d)throw Error("No response body");let f=new TextDecoder,p="";for(;;){let{done:e,value:t}=await d.read();if(e)break;let r=(p+=f.decode(t,{stream:!0})).split("\n");for(let e of(p=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"chunk"===t.type?o(t.content):"status"===t.type?i?.(t.message):"tool_call"===t.type?l?.(t):"done"===t.type?n():"error"===t.type&&a?.(t.message)}catch{}}},t1=async(e,t)=>{try{let r=E?`${E}/policies`:"/policies",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy:",e),e}},t2=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}`:`/policies/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy:",e),e}},t4=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/policies/name/${r}/versions`:`/policies/name/${r}/versions`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to list policy versions:",e),e}},t6=async(e,t,r)=>{try{let o=encodeURIComponent(t),n=E?`${E}/policies/name/${o}/versions`:`/policies/name/${o}/versions`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({source_policy_id:r??void 0})});if(!a.ok){let e=await a.json(),t=oP(e);throw I(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create policy version:",e),e}},t3=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}/status`:`/policies/${t}/status`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({version_status:r})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy version status:",e),e}},t7=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy:",e),e}},t5=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get policy info:",e),e}},t9=async e=>{try{let t=E?`${E}/policies/attachments/list`:"/policies/attachments/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy attachments list:",e),e}},t8=async(e,t)=>{try{let r=E?`${E}/policies/attachments`:"/policies/attachments",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy attachment:",e),e}},re=async(e,t)=>{try{let r=E?`${E}/policies/attachments/${t}`:`/policies/attachments/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy attachment:",e),e}},rt=async(e,t,r)=>{try{let o=E?`${E}/policies/test-pipeline`:"/policies/test-pipeline",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({pipeline:t,test_messages:r})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test pipeline:",e),e}},rr=async(e,t)=>{try{let r=E?`${E}/policies/${t}/resolved-guardrails`:`/policies/${t}/resolved-guardrails`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get resolved guardrails:",e),e}},ro=async(e,t)=>{try{let r=E?`${E}/policies/resolve`:"/policies/resolve",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to resolve policies:",e),e}},rn=async(e,t)=>{try{let r=E?`${E}/policies/attachments/estimate-impact`:"/policies/attachments/estimate-impact",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to estimate attachment impact:",e),e}},ra=async(e,t)=>{try{let r=E?`${E}/prompts/list`:"/prompts/list";t&&(r+=`?environment=${encodeURIComponent(t)}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},ri=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}/info`:`/prompts/${t}/info`;r&&(o+=`?environment=${encodeURIComponent(r)}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},rl=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}/versions`:`/prompts/${t}/versions`;r&&(o+=`?environment=${encodeURIComponent(r)}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oP(e);throw 404!==n.status&&I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt versions:",e),e}},rs=async(e,t)=>{try{let r=E?`${E}/prompts`:"/prompts",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},rc=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}`:`/prompts/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},ru=async(e,t)=>{try{let r=E?`${E}/prompts/${t}`:`/prompts/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},rd=async(e,t)=>{try{let r=new FormData;r.append("file",t);let o=E?`${E}/utils/dotprompt_json_converter`:"/utils/dotprompt_json_converter",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`},body:r});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},rf=async(e,t)=>{try{let r=E?`${E}/v1/agents`:"/v1/agents",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Create agent response:",n),n}catch(e){throw console.error("Failed to create agent:",e),e}},rp=async(e,t)=>{try{let r=E?`${E}/guardrails`:"/guardrails",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Create guardrail response:",n),n}catch(e){throw console.error("Failed to create guardrail:",e),e}},rh=async(e,t,r)=>{try{let o=E?`${E}/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`:`/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`;console.log("Fetching log details from:",o);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return console.log("Fetched log details:",a),a}catch(e){throw console.error("Failed to fetch log details:",e),e}},rm=async e=>{try{let t=E?`${E}/get/internal_user_settings`:"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched SSO settings:",o),o}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},rg=async(e,t)=>{try{let r=E?`${E}/update/internal_user_settings`:"/update/internal_user_settings";console.log("Updating internal user settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Updated internal user settings:",n),v.default.success("Internal user settings updated successfully"),n}catch(e){throw console.error("Failed to update internal user settings:",e),e}},rv=async e=>{try{let t=E?`${E}/v1/mcp/openapi-registry`:"/v1/mcp/openapi-registry",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json();throw Error(oP(e))}return await r.json()}catch(e){throw console.error("Failed to fetch OpenAPI registry:",e),e}},ry=async e=>{try{let t=E?`${E}/v1/mcp/discover`:"/v1/mcp/discover",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch discoverable MCP servers:",e),e}},rb=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server";if(t){let e=new URLSearchParams;e.append("team_id",t),r=`${r}?${e.toString()}`}console.log("Fetching MCP servers from:",r);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("Fetched MCP servers:",n),n}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},rw=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server/health`:"/v1/mcp/server/health";if(t&&t.length>0){let e=new URLSearchParams;t.forEach(t=>e.append("server_ids",t)),r=`${r}?${e.toString()}`}console.log("Fetching MCP server health from:",r);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("Fetched MCP server health:",n),n}catch(e){throw console.error("Failed to fetch MCP server health:",e),e}},r$=async e=>{try{let t=E?`${E}/v1/mcp/access_groups`:"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched MCP access groups:",o),o.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},rC=async e=>{try{let t=E?`${E}/v1/mcp/network/client-ip`:"/v1/mcp/network/client-ip",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok)return null;return(await r.json()).ip||null}catch{return null}},rx=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},rE=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},rS=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${t}`;console.log("in deleteMCPServer:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},rk=async e=>{try{let t=(E?`${E}`:"")+"/v1/mcp/toolset",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch MCP toolsets:",e),e}},rj=async(e,t)=>{try{let r=(E?`${E}`:"")+"/v1/mcp/toolset",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create MCP toolset:",e),e}},rO=async(e,t)=>{try{let r=(E?`${E}`:"")+"/v1/mcp/toolset",o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP toolset:",e),e}},rT=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/toolset/${t}`,o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}}catch(e){throw console.error("Failed to delete MCP toolset:",e),e}},rI=async(e,t)=>{try{let r=(E?`${E}`:"")+"/v1/mcp/server/register",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to register MCP server:",e),e}},rF=async e=>{try{let t=(E?`${E}`:"")+"/v1/mcp/server/submissions",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json().catch(()=>({})),t=oP(e);throw I(t),Error(t)}return r.json()}catch(e){throw console.error("Failed to fetch MCP submissions:",e),e}},r_=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=oP(e);throw I(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to approve MCP server:",e),e}},rP=async(e,t,r)=>{try{let o=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/reject`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({review_notes:r??null})});if(!n.ok){let e=await n.json().catch(()=>({})),t=oP(e);throw I(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to reject MCP server:",e),e}},rR=async e=>{try{let t=E?`${E}/search_tools/list`:"/search_tools/list";console.log("Fetching search tools from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched search tools:",o),o}catch(e){throw console.error("Failed to fetch search tools:",e),e}},rN=async(e,t)=>{try{console.log("Creating search tool with values:",t);let r=E?`${E}/search_tools`:"/search_tools",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("Created search tool:",n),n}catch(e){throw console.error("Failed to create search tool:",e),e}},rM=async(e,t,r)=>{try{console.log("Updating search tool with ID:",t,"values:",r);let o=E?`${E}/search_tools/${t}`:`/search_tools/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:r})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return console.log("Updated search tool:",a),a}catch(e){throw console.error("Failed to update search tool:",e),e}},rB=async(e,t)=>{try{let r=(E?`${E}`:"")+`/search_tools/${t}`;console.log("Deleting search tool:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("Deleted search tool:",n),n}catch(e){throw console.error("Failed to delete search tool:",e),e}},rA=async e=>{try{let t=E?`${E}/search_tools/ui/available_providers`:"/search_tools/ui/available_providers";console.log("Fetching available search providers from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched available search providers:",o),o}catch(e){throw console.error("Failed to fetch available search providers:",e),e}},rz=async(e,t)=>{try{let r=E?`${E}/search_tools/test_connection`:"/search_tools/test_connection";console.log("Testing search tool connection:",r);let o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({litellm_params:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("Test connection response:",n),n}catch(e){throw console.error("Failed to test search tool connection:",e),e}},rL=async(e,t,r)=>{try{let o=E?`${E}/mcp-rest/tools/list?server_id=${t}`:`/mcp-rest/tools/list?server_id=${t}`;console.log("Fetching MCP tools from:",o);let n={[P]:`Bearer ${e}`,"Content-Type":"application/json",...r},a=await fetch(o,{method:"GET",headers:n}),i=await a.json();if(console.log("Fetched MCP tools response:",i),!a.ok){if(i.error&&i.message)throw Error(i.message);throw Error("Failed to fetch MCP tools")}return i}catch(e){return console.error("Failed to fetch MCP tools:",e),{tools:[],error:"network_error",message:e instanceof Error?e.message:"Failed to fetch MCP tools",stack_trace:null}}},rD=async(e,t,r,o,n)=>{try{let a=E?`${E}/mcp-rest/tools/call`:"/mcp-rest/tools/call";console.log("Calling MCP tool:",r,"with arguments:",o,"for server:",t);let i={[P]:`Bearer ${e}`,"Content-Type":"application/json",...n?.customHeaders||{}},l={server_id:t,name:r,arguments:o};n?.guardrails&&n.guardrails.length>0&&(l.litellm_metadata={guardrails:n.guardrails});let s=await fetch(a,{method:"POST",headers:i,body:JSON.stringify(l)});if(!s.ok){let e="Network response was not ok",t=null,r=await s.text();try{let o=JSON.parse(r);o.detail?"string"==typeof o.detail?e=o.detail:"object"==typeof o.detail&&(e=o.detail.message||o.detail.error||"An error occurred",t=o.detail):e=o.message||o.error||e}catch(t){console.error("Failed to parse JSON error response:",t),r&&(e=r)}let o=Error(e);throw o.status=s.status,o.statusText=s.statusText,o.details=t,I(e),o}let c=await s.json();return console.log("MCP tool call response:",c),c}catch(e){throw console.error("Failed to call MCP tool:",e),console.error("Error type:",typeof e),e instanceof Error&&(console.error("Error message:",e.message),console.error("Error stack:",e.stack)),e}},rH=async(e,t)=>{try{let r=E?`${E}/tag/new`:"/tag/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await I(e);return}return await o.json()}catch(e){throw console.error("Error creating tag:",e),e}},rV=async(e,t)=>{try{let r=E?`${E}/tag/update`:"/tag/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await I(e);return}return await o.json()}catch(e){throw console.error("Error updating tag:",e),e}},rW=async(e,t)=>{try{let r=E?`${E}/tag/info`:"/tag/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({names:t})});if(!o.ok){let e=await o.text();return await I(e),{}}return await o.json()}catch(e){throw console.error("Error getting tag info:",e),e}},rU=async e=>{try{let t=E?`${E}/tag/list`:"/tag/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){let e=await r.text();return await I(e),{}}return await r.json()}catch(e){throw console.error("Error listing tags:",e),e}},rG=async(e,t)=>{try{let r=E?`${E}/tag/delete`:"/tag/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({name:t})});if(!o.ok){let e=await o.text();await I(e);return}return await o.json()}catch(e){throw console.error("Error deleting tag:",e),e}},rq=async e=>{try{let t=E?`${E}/get/default_team_settings`:"/get/default_team_settings";console.log("Fetching default team settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched default team settings:",o),o}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},rJ=async(e,t)=>{try{let r=E?`${E}/update/default_team_settings`:"/update/default_team_settings";console.log("Updating default team settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}let n=await o.json();return console.log("Updated default team settings:",n),n}catch(e){throw console.error("Failed to update default team settings:",e),e}},rK=async(e,t)=>{try{let r=E?`${E}/team/permissions_list?team_id=${t}`:`/team/permissions_list?team_id=${t}`,o=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json(),t=oP(e);return console.error("Available permissions fetch failed:",t),{all_available_permissions:[],team_member_permissions:[]}}return await o.json()}catch(e){throw console.error("Failed to get team permissions:",e),e}},rX=async(e,t,r)=>{try{let o=E?`${E}/team/permissions_update`:"/team/permissions_update",n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({team_id:t,team_member_permissions:r})});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return console.log("Team permissions response:",a),a}catch(e){throw console.error("Failed to update team permissions:",e),e}},rY=async(e,t)=>{try{let r=E?`${E}/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`:`/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},rQ=async(e,t)=>{try{let r=E?`${E}/vector_store/new`:"/vector_store/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to create vector store")}return await o.json()}catch(e){throw console.error("Error creating vector store:",e),e}},rZ=async(e,t=1,r=100)=>{try{let t=E?`${E}/vector_store/list`:"/vector_store/list",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to list vector stores")}return await r.json()}catch(e){throw console.error("Error listing vector stores:",e),e}},r0=async(e,t)=>{try{let r=E?`${E}/vector_store/delete`:"/vector_store/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to delete vector store")}return await o.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},r1=async(e,t)=>{try{let r=E?`${E}/vector_store/info`:"/vector_store/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to get vector store info")}return await o.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},r2=async(e,t)=>{try{let r=E?`${E}/vector_store/update`:"/vector_store/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to update vector store")}return await o.json()}catch(e){throw console.error("Error updating vector store:",e),e}},r4=async(e,t,r,o,n,a,i)=>{try{let l=E?`${E}/rag/ingest`:"/rag/ingest",s=new FormData;s.append("file",t);let c={ingest_options:{vector_store:{custom_llm_provider:r,...o&&{vector_store_id:o},...i&&i}}};(n||a)&&(c.ingest_options.litellm_vector_store_params={},n&&(c.ingest_options.litellm_vector_store_params.vector_store_name=n),a&&(c.ingest_options.litellm_vector_store_params.vector_store_description=a)),s.append("request",JSON.stringify(c));let u=await fetch(l,{method:"POST",headers:{[P]:`Bearer ${e}`},body:s});if(!u.ok){let e=await u.json();throw Error(e.error?.message||e.detail||"Failed to ingest document")}return await u.json()}catch(e){throw console.error("Error ingesting document:",e),e}},r6=async e=>{try{let t=E?`${E}/email/event_settings`:"/email/event_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error("Failed to get email event settings")}let o=await r.json();return console.log("Email event settings response:",o),o}catch(e){throw console.error("Failed to get email event settings:",e),e}},r3=async(e,t)=>{try{let r=E?`${E}/email/event_settings`:"/email/event_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw I(e),Error("Failed to update email event settings")}let n=await o.json();return console.log("Update email event settings response:",n),n}catch(e){throw console.error("Failed to update email event settings:",e),e}},r7=async e=>{try{let t=E?`${E}/email/event_settings/reset`:"/email/event_settings/reset",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error("Failed to reset email event settings")}let o=await r.json();return console.log("Reset email event settings response:",o),o}catch(e){throw console.error("Failed to reset email event settings:",e),e}},r5=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Delete agent response:",n),n}catch(e){throw console.error("Failed to delete agent:",e),e}},r9=async(e,t)=>{try{let r=E?`${E}/v1/agents/make_public`:"/v1/agents/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_ids:t})});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},r8=async(e,t)=>{try{let r=E?`${E}/v1/mcp/make_public`:"/v1/mcp/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({mcp_server_ids:t})});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},oe=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Delete guardrail response:",n),n}catch(e){throw console.error("Failed to delete guardrail:",e),e}},ot=async e=>{try{let t=E?`${E}/guardrails/ui/add_guardrail_settings`:"/guardrails/ui/add_guardrail_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error("Failed to get guardrail UI settings")}let o=await r.json();return console.log("Guardrail UI settings response:",o),o}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},or=async e=>{try{let t=E?`${E}/guardrails/ui/provider_specific_params`:"/guardrails/ui/provider_specific_params",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error("Failed to get guardrail provider specific parameters")}let o=await r.json();return console.log("Guardrail provider specific params response:",o),o}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},oo=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/guardrails/ui/category_yaml/${r}`:`/guardrails/ui/category_yaml/${r}`;console.log(`Fetching category YAML from: ${o}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw console.error(`Failed to get category YAML. Status: ${n.status}, Error:`,e),I(e),Error(`Failed to get category YAML: ${n.status} ${e}`)}let a=await n.json();return console.log("Category YAML response:",a),a}catch(e){throw console.error("Failed to get category YAML:",e),e}},on=async e=>{try{let t=E?`${E}/guardrails/ui/major_airlines`:"/guardrails/ui/major_airlines",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw console.error(`Failed to get major airlines. Status: ${r.status}, Error:`,e),I(e),Error(`Failed to get major airlines: ${r.status} ${e}`)}return await r.json()}catch(e){throw console.error("Failed to get major airlines:",e),e}},oa=async(e,t=!1)=>{try{let r=t?"?health_check=true":"",o=E?`${E}/v1/agents${r}`:`/v1/agents${r}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw I(e),Error("Failed to get agents list")}let a=await n.json();return console.log("Agents list response:",a),{agents:a}}catch(e){throw console.error("Failed to get agents list:",e),e}},oi=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw I(e),Error("Failed to get agent info")}let n=await o.json();return console.log("Agent info response:",n),n}catch(e){throw console.error("Failed to get agent info:",e),e}},ol=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}/info`:`/guardrails/${t}/info`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw I(e),Error("Failed to get guardrail info")}let n=await o.json();return console.log("Guardrail info response:",n),n}catch(e){throw console.error("Failed to get guardrail info:",e),e}},os=async(e,t,r)=>{try{let o=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw I(e),Error("Failed to patch agent")}let a=await n.json();return console.log("Patch agent response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},oc=async(e,t,r)=>{try{let o=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw I(e),Error("Failed to update guardrail")}let a=await n.json();return console.log("Update guardrail response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},ou=async(e,t,r,o,n)=>{try{let a=E?`${E}/guardrails/apply_guardrail`:"/guardrails/apply_guardrail",i={guardrail_name:t,text:r};o&&(i.language=o),n&&n.length>0&&(i.entities=n);let l=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t="Failed to apply guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw I(e),Error(t)}let s=await l.json();return console.log("Apply guardrail response:",s),s}catch(e){throw console.error("Failed to apply guardrail:",e),e}},od=async(e,t)=>{try{let r=E?`${E}/guardrails/test_custom_code`:"/guardrails/test_custom_code",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text(),t="Failed to test custom code guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw I(e),Error(t)}let n=await o.json();return console.log("Test custom code guardrail response:",n),n}catch(e){throw console.error("Failed to test custom code guardrail:",e),e}},of=async(e,t)=>{try{let r=E?`${E}/guardrails/validate_blocked_words_file`:"/guardrails/validate_blocked_words_file",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({file_content:t})});if(!o.ok){let e=await o.text();throw I(e),Error("Failed to validate blocked words file")}let n=await o.json();return console.log("Validate blocked words file response:",n),n}catch(e){throw console.error("Failed to validate blocked words file:",e),e}},op=async e=>{try{let t=E?`${E}/get/sso_settings`:"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched SSO configuration:",o),o}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},oh=async(e,t)=>{try{let r=E?`${E}/update/sso_settings`:"/update/sso_settings";console.log("Updating SSO configuration:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t="object"==typeof e?.detail?e.detail?.error||e.detail?.message:e?.detail,r="string"==typeof t&&t.length>0?t:oP(e);I(r);let n=Error(r);throw e?.detail!==void 0&&(n.detail=e.detail),n.rawError=e,n}let n=await o.json();return console.log("Updated SSO configuration:",n),n}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},om=async({accessToken:e,page:t=1,page_size:r=50,params:o={}})=>{try{let n=E?`${E}/audit`:"/audit",a=new URLSearchParams;for(let[e,n]of(a.append("page",t.toString()),a.append("page_size",r.toString()),Object.entries(o)))null!=n&&""!==n&&a.append(e,String(n));n+=`?${a.toString()}`;let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oP(e);throw I(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},og=async e=>{try{let t=E?`${E}/user/available_users`:"/user/available_users",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw I(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},ov=async e=>{try{let t=E?`${E}/health/license`:"/health/license",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw I(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch license info:",e),e}},oy=async(e,t,r)=>{try{let o=E?`${E}/config/pass_through_endpoint/${encodeURIComponent(t)}`:`/config/pass_through_endpoint/${encodeURIComponent(t)}`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oP(e);throw I(t),Error(t)}let a=await n.json();return v.default.success("Pass through endpoint updated successfully"),a}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},ob=async(e,t)=>{try{let r=E?`${E}/config/callback/delete`:"/config/callback/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!o.ok){let e=await o.json(),t=oP(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},ow=async(e,t,r)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let o=E?`${E}/mcp-rest/test/tools/list`:"/mcp-rest/test/tools/list",n={"Content-Type":"application/json"};e&&(n["x-litellm-api-key"]=e),r?n.Authorization=`Bearer ${r}`:e&&(n[P]=`Bearer ${e}`);let a=await fetch(o,{method:"POST",headers:n,body:JSON.stringify(t)}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||l.error)&&!l.error)return{tools:[],error:"request_failed",message:l.message||`MCP tools list failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("MCP tools list test error:",e),e}},o$=async(e,t)=>{let r=E?`${E}/v1/mcp/server/oauth/session`:"/v1/mcp/server/oauth/session",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await o.json();if(!o.ok)throw Error(oP(n)||n?.error||"Failed to cache MCP server");return n},oC=async(e,t,r)=>{let o=S(),n=encodeURIComponent(t.trim()),a=`${o}/v1/mcp/server/oauth/${n}/register`,i=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json, text/event-stream"},body:JSON.stringify(r)}),l=await i.json();if(!i.ok)throw Error(oP(l)||l?.detail||"Failed to register OAuth client");return l},ox=({serverId:e,clientId:t,redirectUri:r,state:o,codeChallenge:n,scope:a})=>{let i=S(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/authorize`,c=new URLSearchParams({redirect_uri:r,state:o,response_type:"code",code_challenge:n,code_challenge_method:"S256"});return t&&t.trim().length>0&&c.set("client_id",t),a&&a.trim().length>0&&c.set("scope",a),`${s}?${c.toString()}`},oE=async({serverId:e,code:t,clientId:r,clientSecret:o,codeVerifier:n,redirectUri:a})=>{let i=S(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/token`,c=new URLSearchParams;c.set("grant_type","authorization_code"),c.set("code",t),r&&r.trim().length>0&&c.set("client_id",r),o&&o.trim().length>0&&c.set("client_secret",o),c.set("code_verifier",n),c.set("redirect_uri",a);let u=await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c.toString()}),d=await u.json();if(!u.ok)throw Error(oP(d)||d?.detail||"OAuth token exchange failed");return d},oS=async(e,t,r)=>{try{let o=`${S()}/v1/vector_stores/${t}/search`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r})});if(!n.ok){let e=await n.text();return await I(e),null}return await n.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},ok=async(e,t,r,o)=>{try{let n=`${S()}/v1/search/${t}`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r,max_results:o||5})});if(!a.ok){let e=await a.text();return await I(e),null}return await a.json()}catch(e){throw console.error("Error querying search tool:",e),e}},oj=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/dau`:"/tag/dau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oP(e);throw I(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},oO=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/wau`:"/tag/wau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oP(e);throw I(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},oT=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/mau`:"/tag/mau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oP(e);throw I(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},oI=async e=>{try{let t=E?`${E}/tag/distinct`:"/tag/distinct",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oP(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},oF=async(e,t,r,o)=>{try{let n=E?`${E}/tag/summary`:"/tag/summary",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oP(e);throw I(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},o_=async(e,t=1,r=50,o)=>{try{let n=E?`${E}/tag/user-agent/per-user-analytics`:"/tag/user-agent/per-user-analytics",a=new URLSearchParams;a.append("page",t.toString()),a.append("page_size",r.toString()),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let i=a.toString();i&&(n+=`?${i}`);let l=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=oP(e);throw I(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},oP=e=>{let t=e?.detail,r=Array.isArray(t)?t.map(e=>e?.msg||JSON.stringify(e)).join("; "):"string"==typeof t?t:void 0;return e?.error&&(e.error.message||("string"==typeof e.error?e.error:void 0))||e?.message||r||JSON.stringify(e)},oR=async(e,t,o)=>{let n=S(),a=o?"/v3/login":"/v2/login",i=n?`${n}${a}`:a,l=JSON.stringify({username:e,password:t}),s=await fetch(i,{method:"POST",body:l,credentials:"include",headers:{"Content-Type":"application/json"}});if(!s.ok)throw Error(oP(await s.json()));let c=await s.json();if(o&&c.code){let e=n?`${n}/v3/login/exchange`:"/v3/login/exchange",t=await fetch(e,{method:"POST",body:JSON.stringify({code:c.code}),credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error(oP(await t.json()));let o=await t.json();return o.token&&(0,r.storeLoginToken)(o.token),o}return c.token&&(0,r.storeLoginToken)(c.token),c},oN=async(e,t)=>{let r=t||S(),o=await fetch(`${r}/v3/login/exchange`,{method:"POST",body:JSON.stringify({code:e}),headers:{"Content-Type":"application/json"}});if(!o.ok)throw Error(oP(await o.json()));let n=await o.json();return n.token&&(document.cookie=`token=${n.token}; path=/; SameSite=Lax`),n.token},oM=async()=>{let e=S(),t=e?`${e}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET"});if(!r.ok)throw Error(oP(await r.json()));return await r.json()},oB=async(e,t)=>{let r=S(),o=r?`${r}/update/ui_settings`:"/update/ui_settings",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(oP(await n.json()));return await n.json()},oA=async()=>{try{let e=S(),t=e?`${e}/claude-code/marketplace.json`:"/claude-code/marketplace.json",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.text(),t=oP(JSON.parse(e));throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch Claude Code marketplace:",e),e}},oz=async(e,t=!1)=>{try{let r=S(),o=r?`${r}/claude-code/plugins?enabled_only=${t}`:`/claude-code/plugins?enabled_only=${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oP(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to fetch Claude Code plugins list:",e),e}},oL=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oP(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to fetch plugin "${t}":`,e),e}},oD=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins`:"/claude-code/plugins",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text(),t=oP(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to register Claude Code plugin:",e),e}},oH=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/enable`:`/claude-code/plugins/${t}/enable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oP(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to enable plugin "${t}":`,e),e}},oV=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/disable`:`/claude-code/plugins/${t}/disable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oP(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to disable plugin "${t}":`,e),e}},oW=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oP(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to delete plugin "${t}":`,e),e}},oU=async(e,t)=>{let r=E?`${E}/compliance/eu-ai-act`:"/compliance/eu-ai-act",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oG=async(e,t)=>{let r=E?`${E}/compliance/gdpr`:"/compliance/gdpr",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oq=async e=>{let t=E?`${E}/v1/tool/policy/options`:"/v1/tool/policy/options",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return r.json()},oJ=async e=>{let t=E?`${E}/v1/tool/list`:"/v1/tool/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return(await r.json()).tools??[]},oK=async(e,t,r)=>{let o=encodeURIComponent(t),n=E?`${E}/v1/tool/${o}/logs`:`/v1/tool/${o}/logs`,a=new URLSearchParams;null!=r.page&&a.append("page",String(r.page)),null!=r.pageSize&&a.append("page_size",String(r.pageSize)),r.startDate&&a.append("start_date",r.startDate),r.endDate&&a.append("end_date",r.endDate);let i=a.toString()?`${n}?${a.toString()}`:n,l=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok)throw Error(oP(await l.json().catch(()=>({}))));return l.json()},oX=async(e,t)=>{let r=encodeURIComponent(t),o=E?`${E}/v1/tool/${r}/detail`:`/v1/tool/${r}/detail`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok)throw Error(await n.text());return n.json()},oY=async(e,t,r,o)=>{let n=E?`${E}/v1/tool/policy`:"/v1/tool/policy",a={tool_name:t};null!=r.input_policy&&(a.input_policy=r.input_policy),null!=r.output_policy&&(a.output_policy=r.output_policy),o?.team_id!=null&&(a.team_id=o.team_id||void 0),o?.key_hash!=null&&(a.key_hash=o.key_hash||void 0),o?.key_alias!=null&&(a.key_alias=o.key_alias||void 0);let i=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw Error(await i.text());return i.json()},oQ=async(e,t,r)=>{let o=encodeURIComponent(t),n=new URLSearchParams;null!=r.team_id&&""!==r.team_id&&n.set("team_id",r.team_id),null!=r.key_hash&&""!==r.key_hash&&n.set("key_hash",r.key_hash);let a=n.toString(),i=E?`${E}/v1/tool/${o}/overrides${a?`?${a}`:""}`:`/v1/tool/${o}/overrides${a?`?${a}`:""}`,l=await fetch(i,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!l.ok)throw Error(await l.text());return l.json()},oZ=async(e,t,r)=>{let o=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to store OAuth credential")}return n.json()},o0=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to revoke OAuth credential")}return o.json()},o1=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential/status`:`/v1/mcp/server/${t}/oauth-user-credential/status`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`}});return o.ok?o.json():{server_id:t,has_credential:!1,is_expired:!1}},o2=async e=>{let t=E?`${E}/v1/mcp/user-credentials`:"/v1/mcp/user-credentials",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});return r.ok?r.json():[]}},947293,e=>{"use strict";class t extends Error{}function r(e,r){let o;if("string"!=typeof e)throw new t("Invalid token specified: must be a string");r||(r={});let n=+(!0!==r.header),a=e.split(".")[n];if("string"!=typeof a)throw new t(`Invalid token specified: missing part #${n+1}`);try{o=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 t(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new t(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}t.prototype.name="InvalidTokenError",e.s(["jwtDecode",()=>r])},266027,869230,469637,e=>{"use strict";let t;var r=e.i(175555),o=e.i(540143),n=e.i(286491),a=e.i(915823),i=e.i(793803),l=e.i(619273),s=e.i(180166),c=class extends a.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,i.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#o=void 0;#n=void 0;#a=void 0;#i;#l;#r;#t;#s;#c;#u;#d;#f;#p;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#o.addObserver(this),u(this.#o,this.options)?this.#m():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#o,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#o,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#y(),this.#o.removeObserver(this)}setOptions(e){let t=this.options,r=this.#o;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,l.resolveEnabled)(this.options.enabled,this.#o))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#o.setOptions(this.options),t._defaulted&&!(0,l.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#o,observer:this});let o=this.hasListeners();o&&f(this.#o,r,this.options,t)&&this.#m(),this.updateResult(),o&&(this.#o!==r||(0,l.resolveEnabled)(this.options.enabled,this.#o)!==(0,l.resolveEnabled)(t.enabled,this.#o)||(0,l.resolveStaleTime)(this.options.staleTime,this.#o)!==(0,l.resolveStaleTime)(t.staleTime,this.#o))&&this.#w();let n=this.#$();o&&(this.#o!==r||(0,l.resolveEnabled)(this.options.enabled,this.#o)!==(0,l.resolveEnabled)(t.enabled,this.#o)||n!==this.#p)&&this.#C(n)}getOptimisticResult(e){var t,r;let o=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(o,e);return t=this,r=n,(0,l.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#a=n,this.#l=this.options,this.#i=this.#o.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#o}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#m(e){this.#b();let t=this.#o.fetch(this.options,e);return e?.throwOnError||(t=t.catch(l.noop)),t}#w(){this.#v();let e=(0,l.resolveStaleTime)(this.options.staleTime,this.#o);if(l.isServer||this.#a.isStale||!(0,l.isValidTimeout)(e))return;let t=(0,l.timeUntilStale)(this.#a.dataUpdatedAt,e);this.#d=s.timeoutManager.setTimeout(()=>{this.#a.isStale||this.updateResult()},t+1)}#$(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#o):this.options.refetchInterval)??!1}#C(e){this.#y(),this.#p=e,!l.isServer&&!1!==(0,l.resolveEnabled)(this.options.enabled,this.#o)&&(0,l.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#f=s.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#m()},this.#p))}#g(){this.#w(),this.#C(this.#$())}#v(){this.#d&&(s.timeoutManager.clearTimeout(this.#d),this.#d=void 0)}#y(){this.#f&&(s.timeoutManager.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let r,o=this.#o,a=this.options,s=this.#a,c=this.#i,d=this.#l,h=e!==o?e.state:this.#n,{state:m}=e,g={...m},v=!1;if(t._optimisticResults){let r=this.hasListeners(),i=!r&&u(e,t),l=r&&f(e,o,t,a);(i||l)&&(g={...g,...(0,n.fetchState)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(g.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:w}=g;r=g.data;let $=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===w){let e;s?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(e=s.data,$=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,void 0!==e&&(w="success",r=(0,l.replaceData)(s?.data,e,t),v=!0)}if(t.select&&void 0!==r&&!$)if(s&&r===c?.data&&t.select===this.#s)r=this.#c;else try{this.#s=t.select,r=t.select(r),r=(0,l.replaceData)(s?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}this.#t&&(y=this.#t,r=this.#c,b=Date.now(),w="error");let C="fetching"===g.fetchStatus,x="pending"===w,E="error"===w,S=x&&C,k=void 0!==r,j={status:w,fetchStatus:g.fetchStatus,isPending:x,isSuccess:"success"===w,isError:E,isInitialLoading:S,isLoading:S,data:r,dataUpdatedAt:g.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:C,isRefetching:C&&!x,isLoadingError:E&&!k,isPaused:"paused"===g.fetchStatus,isPlaceholderData:v,isRefetchError:E&&k,isStale:p(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,l.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==j.data,r="error"===j.status&&!t,n=e=>{r?e.reject(j.error):t&&e.resolve(j.data)},a=()=>{n(this.#r=j.promise=(0,i.pendingThenable)())},l=this.#r;switch(l.status){case"pending":e.queryHash===o.queryHash&&n(l);break;case"fulfilled":(r||j.data!==l.value)&&a();break;case"rejected":r&&j.error===l.reason||a()}}return j}updateResult(){let e=this.#a,t=this.createResult(this.#o,this.options);if(this.#i=this.#o.state,this.#l=this.options,void 0!==this.#i.data&&(this.#u=this.#o),(0,l.shallowEqualObjects)(t,e))return;this.#a=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#h.size)return!0;let o=new Set(r??this.#h);return this.options.throwOnError&&o.add("error"),Object.keys(this.#a).some(t=>this.#a[t]!==e[t]&&o.has(t))};this.#x({listeners:r()})}#b(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#o)return;let t=this.#o;this.#o=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#x(e){o.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#a)}),this.#e.getQueryCache().notify({query:this.#o,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,l.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,l.resolveEnabled)(t.enabled,e)&&"static"!==(0,l.resolveStaleTime)(t.staleTime,e)){let o="function"==typeof r?r(e):r;return"always"===o||!1!==o&&p(e,t)}return!1}function f(e,t,r,o){return(e!==t||!1===(0,l.resolveEnabled)(o.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&p(e,r)}function p(e,t){return!1!==(0,l.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,l.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",()=>c],869230),e.i(247167);var h=e.i(271645),m=e.i(912598);e.i(843476);var g=h.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),v=h.createContext(!1);v.Provider;var y=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function b(e,t,r){let n,a=h.useContext(v),i=h.useContext(g),s=(0,m.useQueryClient)(r),c=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let u=s.getQueryCache().get(c.queryHash);if(c._optimisticResults=a?"isRestoring":"optimistic",c.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=c.staleTime;c.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))}n=u?.state.error&&"function"==typeof c.throwOnError?(0,l.shouldThrowError)(c.throwOnError,[u.state.error,u]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||n)&&!i.isReset()&&(c.retryOnMount=!1),h.useEffect(()=>{i.clearReset()},[i]);let d=!s.getQueryCache().get(c.queryHash),[f]=h.useState(()=>new t(s,c)),p=f.getOptimisticResult(c),b=!a&&!1!==e.subscribed;if(h.useSyncExternalStore(h.useCallback(e=>{let t=b?f.subscribe(o.notifyManager.batchCalls(e)):l.noop;return f.updateResult(),t},[f,b]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),h.useEffect(()=>{f.setOptions(c)},[c,f]),c?.suspense&&p.isPending)throw y(c,f,i);if((({result:e,errorResetBoundary:t,throwOnError:r,query:o,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(n&&void 0===e.data||(0,l.shouldThrowError)(r,[e.error,o])))({result:p,errorResetBoundary:i,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw p.error;if(s.getDefaultOptions().queries?._experimental_afterQuery?.(c,p),c.experimental_prefetchInRender&&!l.isServer&&p.isLoading&&p.isFetching&&!a){let e=d?y(c,f,i):u?.promise;e?.catch(l.noop).finally(()=>{f.updateResult()})}return c.notifyOnChangeProps?p:f.trackResult(p)}function w(e,t){return b(e,c,t)}e.s(["useBaseQuery",()=>b],469637),e.s(["useQuery",()=>w],266027)},243652,e=>{"use strict";function t(e){let t=[e];return{all:t,lists:()=>[...t,"list"],list:e=>[...t,"list",{params:e}],details:()=>[...t,"detail"],detail:e=>[...t,"detail",e]}}e.s(["createQueryKeys",()=>t])},612256,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let o=(0,e.i(243652).createQueryKeys)("uiConfig");e.s(["useUIConfig",0,()=>(0,r.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,t.getUiConfig)(),staleTime:864e5,gcTime:864e5})])}]); \ No newline at end of file +Allowed values: ${t.enum.join(", ")}`:E)}),children:r},e)})}):null};var v=e.i(727749);let y=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`},b=async e=>{try{let t=E?`${E}/callbacks/configs`:"/callbacks/configs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},w=async e=>{try{let t=E?`${E}/in_product_nudges`:"/in_product_nudges",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get in-product nudges:",e),e}},$="/",C="litellm_worker_url",x=window.localStorage.getItem(C),E=(()=>{if(!x)return null;try{let e=new URL(x);if("http:"===e.protocol||"https:"===e.protocol)return x}catch{}return window.localStorage.removeItem(C),null})()??"ui/";console.log=function(){};let S=()=>{if(E)return E;let e=window.location;return e?.origin??""};function k(e){(!e||function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e))&&(e?window.localStorage.setItem(C,e):window.localStorage.removeItem(C),E=e??"ui/")}let j="POST",O="DELETE",T=0,I=async e=>{let t=Date.now();if(t-T>6e4){if(("string"==typeof e?e:JSON.stringify(e)).includes("Authentication Error - Expired Key")){v.default.info("UI Session Expired. Logging out."),T=t,(0,r.clearTokenCookies)();let e=window.location;e&&(window.location.href=e.pathname)}T=t}else console.log("Error suppressed to prevent spam:",e)},F=async()=>{let e=E?`${E}/public/providers/fields`:"/public/providers/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch provider create metadata:",t.status,e),Error("Failed to load provider configuration")}return await t.json()},_=async()=>{let e=E?`${E}/public/agents/fields`:"/public/agents/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch agent create metadata:",t.status,e),Error("Failed to load agent configuration")}return await t.json()},P="Authorization";function R(e="Authorization"){console.log(`setGlobalLitellmHeaderName: ${e}`),P=e}function N(){return P}let M=async(e,t)=>{let r=E?`${E}/model_group/make_public`:"/model_group/make_public";return(await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},B=async()=>{console.log("Getting UI config");let e=await fetch("ui//litellm/.well-known/litellm-ui-config"),t=await e.json();return console.log("jsonData in getUiConfig:",t),((e,t=null)=>{if(window.localStorage.getItem(C))return;window.location;let r=t||"ui/";if(console.log("proxyBaseUrl:",E),console.log("serverRootPath:",e),!r)return console.log("Updated proxyBaseUrl:",E=E??null);e.length>0&&!r.endsWith(e)&&"/"!=e&&(r+=e),console.log("Updated proxyBaseUrl:",E=r)})(t.server_root_path,t.proxy_base_url),t},A=async()=>{let e=E?`${E}/public/model_hub/info`:"/public/model_hub/info",t=await fetch(e);return await t.json()},z=async()=>{let e=E?`${E}/openapi.json`:"/openapi.json",t=await fetch(e);return await t.json()},L=async()=>{try{let e=E?`${E}/public/litellm_model_cost_map`:"/public/litellm_model_cost_map",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}}),r=await t.json();return console.log(`received litellm model cost data: ${r}`),r}catch(e){throw console.error("Failed to get model cost map:",e),e}},D=async e=>{try{let t=E?`${E}/reload/model_cost_map`:"/reload/model_cost_map",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to reload model cost map:",e),e}},H=async(e,t)=>{try{let r=E?`${E}/schedule/model_cost_map_reload?hours=${t}`:`/schedule/model_cost_map_reload?hours=${t}`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await o.json();return console.log(`Schedule model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},V=async e=>{try{let t=E?`${E}/schedule/model_cost_map_reload`:"/schedule/model_cost_map_reload",r=await fetch(t,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Cancel model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},W=async e=>{try{let t=E?`${E}/model/cost_map/source`:"/model/cost_map/source",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw Error(`HTTP ${r.status}: ${e}`)}let o=await r.json();return console.log("Model cost map source info:",o),o}catch(e){throw console.error("Failed to get model cost map source info:",e),e}},U=async e=>{try{let t=E?`${E}/schedule/model_cost_map_reload/status`:"/schedule/model_cost_map_reload/status";console.log("Fetching status from URL:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){console.error(`Status request failed with status: ${r.status}`);let e=await r.text();throw console.error("Error response:",e),Error(`HTTP ${r.status}: ${e}`)}let o=await r.json();return console.log("Model cost map reload status:",o),o}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},G=async(e,r)=>{try{let o=E?`${E}/model/new`:"/model/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return console.log("API Response:",a),t.default.destroy(),v.default.success(`Model ${r.model_name} created successfully`),a}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{console.log(`model_id in model delete call: ${t}`);try{let r=E?`${E}/model/delete`:"/model/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{if(console.log(`budget_id in budget delete call: ${t}`),null!=e)try{let r=E?`${E}/budget/delete`:"/budget/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/new`:"/budget/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},X=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/update`:"/budget/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Y=async(e,t)=>{try{let r=E?`${E}/invitation/new`:"/invitation/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Q=async e=>{try{let t=E?`${E}/alerting/settings`:"/alerting/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},Z=async(e,t)=>{try{for(let e of(console.log("Form Values in keyCreateServiceAccountCall:",t),t.description&&(t.metadata||(t.metadata={}),t.metadata.description=t.description,delete t.description,t.metadata=JSON.stringify(t.metadata)),h))if(t[e]){console.log(`formValues.${e}:`,t[e]);try{t[e]=JSON.parse(t[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",t);let r=E?`${E}/key/service-account/generate`:"/key/service-account/generate",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw I(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ee=async(e,t,r)=>{try{for(let e of(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),h))if(r[e]){console.log(`formValues.${e}:`,r[e]);try{r[e]=JSON.parse(r[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",r);let o=E?`${E}/key/generate`:"/key/generate",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw I(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t,r,o,n,a)=>{let i=E?`${E}/key/generate`:"/key/generate",l={agent_id:t,key_alias:r,models:o.length>0?o:[]};a&&(l.team_id=a),n&&Object.keys(n).length>0&&(l.metadata=n);let s=await fetch(i,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw I(await s.text()),Error("Failed to create key for agent");return s.json()},er=async(e,t,r)=>{try{if(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),r.auto_create_key=!1,r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",r);let o=E?`${E}/user/new`:"/user/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw I(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},eo=async(e,t)=>{try{let r=E?`${E}/key/delete`:"/key/delete";console.log("in keyDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},en=async(e,t)=>{try{let r=E?`${E}/user/delete`:"/user/delete";console.log("in userDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete user(s):",e),e}},ea=async(e,t)=>{try{let r=E?`${E}/team/delete`:"/team/delete";console.log("in teamDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},ei=async(e,t=null,r=null,o=null,n=null,a=null,i=null,l=null,s=null,c=null,u=null)=>{try{let d=E?`${E}/user/list`:"/user/list";console.log("in userListCall");let f=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");f.append("user_ids",e)}r&&f.append("page",r.toString()),o&&f.append("page_size",o.toString()),n&&f.append("user_email",n),a&&f.append("role",a),i&&f.append("team",i),l&&f.append("sso_user_ids",l),s&&f.append("sort_by",s),c&&f.append("sort_order",c),u&&u.length>0&&f.append("organization_ids",u.join(","));let p=f.toString();p&&(d+=`?${p}`);let h=await fetch(d,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!h.ok){let e=await h.json(),t=oR(e);throw I(t),Error(t)}let m=await h.json();return console.log("/user/list API Response:",m),m}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t)=>{try{let r=E?`${E}/v2/user/info`:"/v2/user/info";t&&(r+=`?user_id=${encodeURIComponent(t)}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch user info v2:",e),e}},es=async(e,t)=>{try{let r=E?`${E}/team/info`:"/team/info";t&&(r=`${r}?team_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ec=async(e,t,r=null,o=null,n=null,a=1,i=10,l=null,s=null)=>{try{let a=E?`${E}/v2/team/list`:"/v2/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oR(e);throw I(t),Error(t)}let c=await s.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},eu=async(e,t,r=null,o=null,n=null)=>{try{let a=E?`${E}/team/list`:"/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oR(e);throw I(t),Error(t)}let c=await s.json();return console.log("/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},ed=async e=>{try{let t=E?`${E}/team/available`:"/team/available";console.log("in availableTeamListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("/team/available_teams API Response:",o),o}catch(e){throw e}},ef=async(e,t=null,r=null)=>{try{let o=E?`${E}/organization/list`:"/organization/list",n=new URLSearchParams;t&&n.append("org_id",t.toString()),r&&n.append("org_alias",r.toString());let a=n.toString();a&&(o+=`?${a}`);let i=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oR(e);throw I(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},ep=async(e,t)=>{try{let r=E?`${E}/organization/info`:"/organization/info";t&&(r=`${r}?organization_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eh=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let r=E?`${E}/organization/new`:"/organization/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let r=E?`${E}/organization/update`:"/organization/update",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eg=async(e,t)=>{try{let r=E?`${E}/organization/delete`:"/organization/delete",o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!o.ok){let e=await o.text();throw I(e),Error(`Error deleting organization: ${e}`)}return await o.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},ev=async(e,t)=>{try{let r=E?`${E}/utils/transform_request`:"/utils/transform_request",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},ey=async({accessToken:e,endpoint:t,startTime:r,endTime:o,page:n=1,extraQueryParams:a})=>{try{let i,l,s,c,u=(i=t.startsWith("/")?t:`/${t}`,l=E?`${E}${i}`:i,(s=new URLSearchParams).append("start_date",y(r)),s.append("end_date",y(o)),s.append("page_size","1000"),s.append("page",n.toString()),s.append("timezone",new Date().getTimezoneOffset().toString()),a&&Object.entries(a).forEach(([e,t])=>{((e,t,r)=>{if(null!=r){if(Array.isArray(r)){r.length>0&&e.append(t,r.join(","));return}e.append(t,`${r}`)}})(s,e,t)}),(c=s.toString())?`${l}?${c}`:l),d=await fetch(u,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=oR(e);throw I(t),Error(t)}return await d.json()}catch(e){throw console.error(`Failed to fetch daily activity (${t}):`,e),e}},eb=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/user/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{user_id:n}}),ew=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/tag/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{tags:n}}),e$=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/team/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{team_ids:n,exclude_team_ids:"litellm-dashboard"}}),eC=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/organization/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{organization_ids:n}}),ex=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/customer/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{end_user_ids:n}}),eE=async(e,t,r,o=1,n=null)=>ey({accessToken:e,endpoint:"/agent/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{agent_ids:n}}),eS=async e=>{try{let t=E?`${E}/onboarding/get_token`:"/onboarding/get_token";t+=`?invite_link=${e}`;let r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},ek=async(e,t,r,o)=>{let n=E?`${E}/onboarding/claim_token`:"/onboarding/claim_token";try{let a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:r,password:o})});if(!a.ok){let e=await a.json(),t=oR(e);throw I(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to delete key:",e),e}},ej=async(e,t,r)=>{try{let o=E?`${E}/key/${t}/regenerate`:`/key/${t}/regenerate`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return console.log("Regenerate key Response:",a),a}catch(e){throw console.error("Failed to regenerate key:",e),e}},eO=!1,eT=null,eI=async(e,t,r,o=1,n=50,a,i,l,s,c)=>{try{console.log("modelInfoCall:",e,t,r,o,n,a,i,l,s,c);let u=E?`${E}/v2/model/info`:"/v2/model/info",d=new URLSearchParams;d.append("include_team_models","true"),d.append("page",o.toString()),d.append("size",n.toString()),a&&a.trim()&&d.append("search",a.trim()),i&&i.trim()&&d.append("modelId",i.trim()),l&&l.trim()&&d.append("teamId",l.trim()),s&&s.trim()&&d.append("sortBy",s.trim()),c&&c.trim()&&d.append("sortOrder",c.trim()),d.toString()&&(u+=`?${d.toString()}`);let f=await fetch(u,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw e+=`error shown=${eO}`,eO||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),v.default.info(e),eO=!0,eT&&clearTimeout(eT),eT=setTimeout(()=>{eO=!1},1e4)),Error("Network response was not ok")}let p=await f.json();return console.log("modelInfoCall:",p),p}catch(e){throw console.error("Failed to create key:",e),e}},eF=async(e,t)=>{try{let r=E?`${E}/v1/model/info`:"/v1/model/info";r+=`?litellm_model_id=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("modelInfoV1Call:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e_=async()=>{let e=E?`${E}/public/model_hub`:"/public/model_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`modelHubPublicModelsCall failed with status ${t.status}`),[])},eP=async()=>{let e=E?`${E}/public/agent_hub`:"/public/agent_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`agentHubPublicModelsCall failed with status ${t.status}`),[])},eR=async()=>{let e=E?`${E}/public/mcp_hub`:"/public/mcp_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`mcpHubPublicServersCall failed with status ${t.status}`),[])},eN=async()=>{let e=E?`${E}/public/skill_hub`:"/public/skill_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`skillHubPublicCall failed with status ${t.status}`),{plugins:[]})},eM=async e=>{try{let t=E?`${E}/model_group/info`:"/model_group/info",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("modelHubCall:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},eB=async e=>{try{let t=E?`${E}/get/allowed_ips`:"/get/allowed_ips",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("getAllowedIPs:",o),o.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},eA=async(e,t)=>{try{let r=E?`${E}/add/allowed_ip`:"/add/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("addAllowedIP:",n),n}catch(e){throw console.error("Failed to add allowed IP:",e),e}},ez=async(e,t)=>{try{let r=E?`${E}/delete/allowed_ip`:"/delete/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("deleteAllowedIP:",n),n}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},eL=async(e,t)=>{try{let r=E?`${E}/model_hub/update_useful_links`:"/model_hub/update_useful_links",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eD=async(e,t,r,o=!1,n=null,a=!1,i=!1,l)=>{console.log("in /models calls, globalLitellmHeaderName",P);try{let t=E?`${E}/models`:"/models",r=new URLSearchParams;r.append("include_model_access_groups","True"),!0===o&&r.append("return_wildcard_routes","True"),!0===i&&r.append("only_model_access_groups","True"),n&&r.append("team_id",n.toString()),l&&r.append("scope",l),r.toString()&&(t+=`?${r.toString()}`);let a=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oR(e);throw I(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eH=async e=>{try{let t=E?`${E}/global/spend/teams`:"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eV=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/tags`:"/global/spend/tags";t&&r&&(n=`${n}?start_date=${t}&end_date=${r}`),o&&(n+=`&tags=${o.join(",")}`),console.log("in tagsSpendLogsCall:",n);let a=await fetch(`${n}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oR(e);throw I(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eW=async e=>{try{let t=E?`${E}/global/spend/all_tag_names`:"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eU=async e=>{try{let t=E?`${E}/customer/list`:"/customer/list";console.log("in customer/list",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to fetch end users:",e),e}},eG=async(e,t)=>{try{let r=E?`${E}/user/filter/ui`:"/user/filter/ui",o=new URLSearchParams;t.get("user_email")&&o.append("user_email",t.get("user_email")),t.get("user_id")&&o.append("user_id",t.get("user_id")),t.get("team_id")&&o.append("team_id",t.get("team_id"));let n=o.toString(),a=n?`${r}?${n}`:r,i=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oR(e);throw I(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},eq=async({accessToken:e,start_date:t,end_date:r,page:o=1,page_size:n=50,params:a={}})=>{try{let i=E?`${E}/spend/logs/ui`:"/spend/logs/ui",l=new URLSearchParams;for(let[e,i]of(l.append("start_date",t),l.append("end_date",r),l.append("page",o.toString()),l.append("page_size",n.toString()),Object.entries(a)))null!=i&&("min_spend"===e||"max_spend"===e?l.append(e,i.toString()):"string"==typeof i&&""!==i&&l.append(e,String(i)));let s=l.toString();s&&(i+=`?${s}`);let c=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=oR(e);throw I(t),Error(t)}let u=await c.json();return console.log("Spend Logs Response:",u),u}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},eJ=async e=>{try{let t=E?`${E}/global/spend/logs`:"/global/spend/logs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eK=async e=>{try{let t=E?`${E}/global/spend/keys?limit=5`:"/global/spend/keys?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/end_users`:"/global/spend/end_users",a="";a=t?JSON.stringify({api_key:t,startTime:r,endTime:o}):JSON.stringify({startTime:r,endTime:o});let i={method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:a},l=await fetch(n,i);if(!l.ok){let e=await l.json(),t=oR(e);throw I(t),Error(t)}let s=await l.json();return console.log(s),s}catch(e){throw console.error("Failed to create key:",e),e}},eY=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/provider`:"/global/spend/provider";r&&o&&(n+=`?start_date=${r}&end_date=${o}`),t&&(n+=`&api_key=${t}`);let a={method:"GET",headers:{[P]:`Bearer ${e}`}},i=await fetch(n,a);if(!i.ok){let e=await i.json(),t=oR(e);throw I(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eQ=async(e,t,r)=>{try{let o=E?`${E}/global/activity`:"/global/activity";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oR(e);throw I(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eZ=async(e,t,r)=>{try{let o=E?`${E}/global/activity/cache_hits`:"/global/activity/cache_hits";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oR(e);throw I(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e0=async(e,t,r)=>{try{let o=E?`${E}/global/activity/model`:"/global/activity/model";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oR(e);throw I(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e1=async e=>{try{let t=E?`${E}/global/spend/models?limit=5`:"/global/spend/models?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},e2=async(e,t)=>{try{let r=E?`${E}/v2/key/info`:"/v2/key/info",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!o.ok){let e=await o.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw I(e),Error("Network response was not ok")}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},e4=async(e,t,r,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let n=E?`${E}/health/test_connection`:"/health/test_connection",a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({litellm_params:t,model_info:r,mode:o})}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||"error"===l.status)&&"error"!==l.status)return{status:"error",message:l.error?.message||`Connection test failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("Model connection test error:",e),e}},e6=async(e,t)=>{try{console.log("entering keyInfoV1Call");let r=E?`${E}/key/info`:"/key/info";r=`${r}?key=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(console.log("response",o),!o.ok){let e=await o.text();I(e),v.default.fromBackend("Failed to fetch key info - "+e)}let n=await o.json();return console.log("data",n),n}catch(e){throw console.error("Failed to fetch key info:",e),e}},e3=async(e,t,r,o,n,a,i,l,s=null,c=null,u=null,d=null)=>{try{let f=E?`${E}/key/list`:"/key/list";console.log("in keyListCall");let p=new URLSearchParams;r&&p.append("team_id",r.toString()),t&&p.append("organization_id",t.toString()),o&&p.append("key_alias",o),a&&p.append("key_hash",a),n&&p.append("user_id",n.toString()),i&&p.append("page",i.toString()),l&&p.append("size",l.toString()),s&&p.append("sort_by",s),c&&p.append("sort_order",c),u&&p.append("expand",u),d&&p.append("status",d),p.append("return_full_object","true"),p.append("include_team_keys","true"),p.append("include_created_by_keys","true");let h=p.toString();h&&(f+=`?${h}`);let m=await fetch(f,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!m.ok){let e=await m.json(),t=oR(e);throw I(t),Error(t)}let g=await m.json();return console.log("/team/list API Response:",g),g}catch(e){throw console.error("Failed to create key:",e),e}},e7=async(e,t=1,r=50,o,n)=>{try{let a=new URLSearchParams(Object.entries({page:String(t),size:String(r),...o?{search:o}:{},...n?{team_id:n}:{}})),i=E?`${E}/key/aliases`:"/key/aliases";i=`${i}?${a}`;let l=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=oR(e);throw I(t),Error(t)}let s=await l.json();return console.log("/key/aliases API Response:",s),s}catch(e){throw console.error("Failed to fetch key aliases:",e),e}},e5=async(e,t,r,o=null)=>{try{let n=E?`${E}/user/daily/activity/aggregated`:"/user/daily/activity/aggregated",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),a.append("timezone",new Date().getTimezoneOffset().toString()),o&&a.append("user_id",o);let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oR(e);throw I(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},e9=async e=>{try{let t=E?`${E}/user/available_roles`:"/user/available_roles",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("response from user/available_role",o),o}catch(e){throw e}},e8=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=E?`${E}/team/new`:"/team/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},te=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=E?`${E}/credentials`:"/credentials",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},tt=async e=>{try{let t=E?`${E}/credentials`:"/credentials";console.log("in credentialListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("/credentials API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tr=async(e,t,r)=>{try{let o=E?`${E}/credentials`:"/credentials";t?o+=`/by_name/${t}`:r&&(o+=`/by_model/${r}`),console.log("in credentialListCall");let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},to=async(e,t)=>{try{let r=E?`${E}/credentials/${t}`:`/credentials/${t}`;console.log("in credentialDeleteCall:",t);let o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},tn=async(e,t,r)=>{try{if(console.log("Form Values in credentialUpdateCall:",r),r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=E?`${E}/credentials/${t}`:`/credentials/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},ta=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let r=E?`${E}/key/update`:"/key/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw I(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("Update key Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ti=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let r=E?`${E}/team/update`:"/team/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw I(e),console.error("Error response from the server:",e),v.default.fromBackend("Failed to update team settings: "+e),Error(e)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to update team:",e),e}},tl=async(e,t,r)=>{try{console.log("Form Values in modelUpateCall:",t);let o=E?`${E}/model/${r}/update`:`/model/${r}/update`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw I(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let a=await n.json();return console.log("Update model Response:",a),a}catch(e){throw console.error("Failed to update model:",e),e}},ts=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_add`:"/team/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:r})});if(!n.ok){let e=await n.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",o=Error(r);throw o.raw=t,o}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tc=async(e,t,r,o,n)=>{try{console.log("Bulk add team members:",{teamId:t,members:r,maxBudgetInTeam:o});let a=E?`${E}/team/bulk_member_add`:"/team/bulk_member_add",i={team_id:t};n?i.all_users=!0:i.members=r,null!=o&&(i.max_budget_in_team=o);let l=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to bulk add team members",o=Error(r);throw o.raw=t,o}let s=await l.json();return console.log("Bulk team member add API Response:",s),s}catch(e){throw console.error("Failed to bulk add team members:",e),e}},tu=async(e,t,r)=>{try{console.log("Form Values in teamMemberUpdateCall:",r),console.log("Budget value:",r.max_budget_in_team),console.log("TPM limit:",r.tpm_limit),console.log("RPM limit:",r.rpm_limit);let o=E?`${E}/team/member_update`:"/team/member_update",n={team_id:t,role:r.role,user_id:r.user_id};void 0!==r.user_email&&(n.user_email=r.user_email),void 0!==r.max_budget_in_team&&null!==r.max_budget_in_team&&(n.max_budget_in_team=r.max_budget_in_team),void 0!==r.tpm_limit&&null!==r.tpm_limit&&(n.tpm_limit=r.tpm_limit),void 0!==r.rpm_limit&&null!==r.rpm_limit&&(n.rpm_limit=r.rpm_limit),void 0!==r.allowed_models&&(n.allowed_models=r.allowed_models),console.log("Final request body:",n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){let e=await a.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",o=Error(r);throw o.raw=t,o}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to update team member:",e),e}},td=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_delete`:"/team/member_delete",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==r.user_email&&{user_email:r.user_email},...void 0!==r.user_id&&{user_id:r.user_id}})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tf=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/organization/member_add`:"/organization/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:r})});if(!n.ok){let e=await n.text();throw I(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create organization member:",e),e}},tp=async(e,t,r)=>{try{console.log("Form Values in organizationMemberDeleteCall:",r);let o=E?`${E}/organization/member_delete`:"/organization/member_delete",n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:r})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to delete organization member:",e),e}},th=async(e,t,r)=>{try{console.log("Form Values in organizationMemberUpdateCall:",r);let o=E?`${E}/organization/member_update`:"/organization/member_update",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...r})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to update organization member:",e),e}},tm=async(e,t,r)=>{try{console.log("Form Values in userUpdateUserCall:",t);let o=E?`${E}/user/update`:"/user/update",n={...t};null!==r&&(n.user_role=r),n=JSON.stringify(n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!a.ok){let e=await a.json(),t=oR(e);throw I(t),Error(t)}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to create key:",e),e}},tg=async(e,t,r,o=!1)=>{try{let n;console.log("Form Values in userUpdateUserCall:",t);let a=E?`${E}/user/bulk_update`:"/user/bulk_update";if(o)n=JSON.stringify({all_users:!0,user_updates:t});else if(r&&r.length>0){let e=[];for(let o of r)e.push({user_id:o,...t});n=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let i=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!i.ok){let e=await i.json(),t=oR(e);throw I(t),Error(t)}let l=await i.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},tv=async(e,t)=>{try{let r=E?`${E}/health/services?service=${t}`:`/health/services?service=${t}`;console.log("Checking Slack Budget Alerts service health");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw I(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},ty=async e=>{try{let t=E?`${E}/budget/list`:"/budget/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tb=async(e,t,r)=>{try{let t=E?`${E}/get/config/callbacks`:"/get/config/callbacks",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tw=async e=>{try{let t=E?`${E}/config/list?config_type=general_settings`:"/config/list?config_type=general_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t$=async e=>{try{let t=E?`${E}/router/settings`:"/router/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get router settings:",e),e}},tC=async e=>{try{let t=E?`${E}/cache/settings`:"/cache/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get cache settings:",e),e}},tx=async(e,t)=>{try{let r=E?`${E}/cache/settings/test`:"/cache/settings/test",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test cache connection:",e),e}},tE=async(e,t)=>{try{let r=E?`${E}/cache/settings`:"/cache/settings",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update cache settings:",e),e}},tS=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint";t&&(r+=`/team/${t}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tk=async(e,t)=>{try{let r=E?`${E}/config/field/info?field_name=${t}`:`/config/field/info?field_name=${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tj=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tO=async(e,t,r)=>{try{let o=E?`${E}/config/field/update`:"/config/field/update",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return v.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tT=async(e,t)=>{try{let r=E?`${E}/config/field/delete`:"/config/field/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return v.default.success("Field reset on proxy"),n}catch(e){throw console.error("Failed to get callbacks:",e),e}},tI=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint?endpoint_id=${t}`:`/config/pass_through_endpoint?endpoint_id=${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tF=async(e,t)=>{try{let r=E?`${E}/config/update`:"/config/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},t_=async(e,t)=>{try{let r=E?`${E}/health?model_id=${encodeURIComponent(t)}`:`/health?model_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to call /health for model id ${t}:`,e),e}},tP=async e=>{try{let t=E?`${E}/cache/ping`:"/cache/ping",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tR=async e=>{try{let t=E?`${E}/health/latest`:"/health/latest",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tN=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",E);let t=E?`${E}/sso/get/ui_settings`:"/sso/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tM=async e=>{try{let t=E?`${E}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);return console.error("Failed to get UI settings:",t),null}return await r.json()}catch(e){return console.error("Failed to get UI settings:",e),null}},tB=async e=>{try{let t=E?`${E}/get/mcp_semantic_filter_settings`:"/get/mcp_semantic_filter_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get MCP semantic filter settings:",e),e}},tA=async(e,t)=>{try{let r=E?`${E}/update/mcp_semantic_filter_settings`:"/update/mcp_semantic_filter_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP semantic filter settings:",e),e}},tz=async(e,t,r)=>{try{let o=E?`${E}/v1/responses`:"/v1/responses",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model:t,input:[{role:"user",content:r,type:"message"}],tools:[{type:"mcp",server_url:"litellm_proxy",require_approval:"never"}],tool_choice:"required"})}),a=n.headers.get("x-litellm-semantic-filter"),i=n.headers.get("x-litellm-semantic-filter-tools");if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}return{data:await n.json(),headers:{filter:a,tools:i}}}catch(e){throw console.error("Failed to test MCP semantic filter:",e),e}},tL=async e=>{try{let t=E?`${E}/v2/guardrails/list`:"/v2/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(`v2 guardrails/list returned ${r.status}`);return await r.json()}catch(t){console.log("v2/guardrails/list failed, falling back to v1:",t);try{let t=E?`${E}/guardrails/list`:"/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}}},tD=async(e,t)=>{let r=E?`${E}/guardrails/submissions`:"/guardrails/submissions",o=new URLSearchParams;t?.status&&o.set("status",t.status),t?.team_id&&o.set("team_id",t.team_id),t?.team_guardrail!==void 0&&o.set("team_guardrail",String(t.team_guardrail)),t?.search&&o.set("search",t.search);let n=o.toString()?`${r}?${o.toString()}`:r,a=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=oR(await a.json().catch(()=>({})));throw I(e),Error(e)}return a.json()},tH=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/approve`:`/guardrails/submissions/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oR(await o.json().catch(()=>({})));throw I(e),Error(e)}return o.json()},tV=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/reject`:`/guardrails/submissions/${encodeURIComponent(t)}/reject`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oR(await o.json().catch(()=>({})));throw I(e),Error(e)}return o.json()},tW=async(e,t,r)=>{try{let o=E?`${E}/guardrails/usage/overview`:"/guardrails/usage/overview",n=new URLSearchParams;t&&n.append("start_date",t),r&&n.append("end_date",r),n.toString()&&(o+=`?${n.toString()}`);let a=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(oR(e))}return a.json()}catch(e){throw console.error("Failed to get guardrails usage overview:",e),e}},tU=async(e,t,r,o)=>{try{let n=E?`${E}/guardrails/usage/detail/${encodeURIComponent(t)}`:`/guardrails/usage/detail/${encodeURIComponent(t)}`,a=new URLSearchParams;r&&a.append("start_date",r),o&&a.append("end_date",o),a.toString()&&(n+=`?${a.toString()}`);let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json();throw Error(oR(e))}return i.json()}catch(e){throw console.error("Failed to get guardrails usage detail:",e),e}},tG=async(e,t)=>{try{let r=E?`${E}/guardrails/usage/logs`:"/guardrails/usage/logs",o=new URLSearchParams;t.guardrailId&&o.append("guardrail_id",t.guardrailId),t.policyId&&o.append("policy_id",t.policyId),null!=t.page&&o.append("page",String(t.page)),null!=t.pageSize&&o.append("page_size",String(t.pageSize)),t.action&&o.append("action",t.action),t.startDate&&o.append("start_date",t.startDate),t.endDate&&o.append("end_date",t.endDate),o.toString()&&(r+=`?${o.toString()}`);let n=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json();throw Error(oR(e))}return n.json()}catch(e){throw console.error("Failed to get guardrails usage logs:",e),e}},tq=async e=>{try{let t=E?`${E}/policies/list`:"/policies/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policies list:",e),e}},tJ=async(e,t,r)=>{try{let o=E?`${E}/utils/test_policies_and_guardrails`:"/utils/test_policies_and_guardrails",n=await fetch(o,{method:"POST",signal:r,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({policy_names:t.policy_names??null,guardrail_names:t.guardrail_names??null,inputs:t.inputs??null,inputs_list:t.inputs_list??null,request_data:t.request_data??{},input_type:t.input_type??"request",agent_id:t.agent_id??null})});if(!n.ok){let e=await n.text(),t="Failed to test policies and guardrails";try{let r=JSON.parse(e);r.detail?t="string"==typeof r.detail?r.detail:JSON.stringify(r.detail):r.message&&(t=r.message)}catch{t=e||t}throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test policies and guardrails:",e),e}},tK=async(e,t)=>{try{let r=E?`${E}/policy/info/${t}`:`/policy/info/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to get policy info for ${t}:`,e),e}},tX=async e=>{try{let t=E?`${E}/policy/templates`:"/policy/templates",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy templates:",e),e}},tY=async(e,t,r,o,n)=>{try{let a=E?`${E}/policy/templates/enrich`:"/policy/templates/enrich",i={template_id:t,parameters:r};o&&(i.model=o),n&&(i.competitors=n);let l=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.json(),t=oR(e);throw I(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to enrich policy template:",e),e}},tQ=async(e,t,r,o)=>{try{let n=E?`${E}/policy/templates/suggest`:"/policy/templates/suggest",a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({attack_examples:t.filter(e=>e.trim()),description:r,model:o})});if(!a.ok){let e=await a.json(),t=oR(e);throw I(t),Error(t)}return a.json()}catch(e){throw console.error("Failed to suggest policy templates:",e),e}},tZ=async(e,t,r)=>{try{let o=E?`${E}/policy/templates/test`:"/policy/templates/test",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail_definitions:t,text:r})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to test policy template:",e),e}},t0=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/policy/templates/enrich/stream`:"/policy/templates/enrich/stream",u={template_id:t,parameters:r,model:o};l?.instruction&&(u.instruction=l.instruction),l?.existingCompetitors&&(u.competitors=l.existingCompetitors);let d=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(u)});if(!d.ok){let e=oR(await d.json());throw I(e),Error(e)}let f=d.body?.getReader();if(!f)throw Error("No response body");let p=new TextDecoder,h="";for(;;){let{done:e,value:t}=await f.read();if(e)break;let r=(h+=p.decode(t,{stream:!0})).split("\n");for(let e of(h=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"competitor"===t.type?n(t.name):"status"===t.type?s?.(t.message):"done"===t.type?a(t):"error"===t.type&&i?.(t.message)}catch{}}},t1=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/usage/ai/chat`:"/usage/ai/chat",u=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({messages:t,model:r}),signal:s});if(!u.ok){let e=oR(await u.json());throw I(e),Error(e)}let d=u.body?.getReader();if(!d)throw Error("No response body");let f=new TextDecoder,p="";for(;;){let{done:e,value:t}=await d.read();if(e)break;let r=(p+=f.decode(t,{stream:!0})).split("\n");for(let e of(p=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"chunk"===t.type?o(t.content):"status"===t.type?i?.(t.message):"tool_call"===t.type?l?.(t):"done"===t.type?n():"error"===t.type&&a?.(t.message)}catch{}}},t2=async(e,t)=>{try{let r=E?`${E}/policies`:"/policies",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy:",e),e}},t4=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}`:`/policies/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy:",e),e}},t6=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/policies/name/${r}/versions`:`/policies/name/${r}/versions`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to list policy versions:",e),e}},t3=async(e,t,r)=>{try{let o=encodeURIComponent(t),n=E?`${E}/policies/name/${o}/versions`:`/policies/name/${o}/versions`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({source_policy_id:r??void 0})});if(!a.ok){let e=await a.json(),t=oR(e);throw I(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create policy version:",e),e}},t7=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}/status`:`/policies/${t}/status`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({version_status:r})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy version status:",e),e}},t5=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy:",e),e}},t9=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get policy info:",e),e}},t8=async e=>{try{let t=E?`${E}/policies/attachments/list`:"/policies/attachments/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy attachments list:",e),e}},re=async(e,t)=>{try{let r=E?`${E}/policies/attachments`:"/policies/attachments",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy attachment:",e),e}},rt=async(e,t)=>{try{let r=E?`${E}/policies/attachments/${t}`:`/policies/attachments/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy attachment:",e),e}},rr=async(e,t,r)=>{try{let o=E?`${E}/policies/test-pipeline`:"/policies/test-pipeline",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({pipeline:t,test_messages:r})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test pipeline:",e),e}},ro=async(e,t)=>{try{let r=E?`${E}/policies/${t}/resolved-guardrails`:`/policies/${t}/resolved-guardrails`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get resolved guardrails:",e),e}},rn=async(e,t)=>{try{let r=E?`${E}/policies/resolve`:"/policies/resolve",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to resolve policies:",e),e}},ra=async(e,t)=>{try{let r=E?`${E}/policies/attachments/estimate-impact`:"/policies/attachments/estimate-impact",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to estimate attachment impact:",e),e}},ri=async(e,t)=>{try{let r=E?`${E}/prompts/list`:"/prompts/list";t&&(r+=`?environment=${encodeURIComponent(t)}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},rl=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}/info`:`/prompts/${t}/info`;r&&(o+=`?environment=${encodeURIComponent(r)}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},rs=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}/versions`:`/prompts/${t}/versions`;r&&(o+=`?environment=${encodeURIComponent(r)}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oR(e);throw 404!==n.status&&I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt versions:",e),e}},rc=async(e,t)=>{try{let r=E?`${E}/prompts`:"/prompts",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},ru=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}`:`/prompts/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},rd=async(e,t)=>{try{let r=E?`${E}/prompts/${t}`:`/prompts/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},rf=async(e,t)=>{try{let r=new FormData;r.append("file",t);let o=E?`${E}/utils/dotprompt_json_converter`:"/utils/dotprompt_json_converter",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`},body:r});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},rp=async(e,t)=>{try{let r=E?`${E}/v1/agents`:"/v1/agents",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Create agent response:",n),n}catch(e){throw console.error("Failed to create agent:",e),e}},rh=async(e,t)=>{try{let r=E?`${E}/guardrails`:"/guardrails",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Create guardrail response:",n),n}catch(e){throw console.error("Failed to create guardrail:",e),e}},rm=async(e,t,r)=>{try{let o=E?`${E}/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`:`/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`;console.log("Fetching log details from:",o);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return console.log("Fetched log details:",a),a}catch(e){throw console.error("Failed to fetch log details:",e),e}},rg=async e=>{try{let t=E?`${E}/get/internal_user_settings`:"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched SSO settings:",o),o}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},rv=async(e,t)=>{try{let r=E?`${E}/update/internal_user_settings`:"/update/internal_user_settings";console.log("Updating internal user settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Updated internal user settings:",n),v.default.success("Internal user settings updated successfully"),n}catch(e){throw console.error("Failed to update internal user settings:",e),e}},ry=async e=>{try{let t=E?`${E}/v1/mcp/openapi-registry`:"/v1/mcp/openapi-registry",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json();throw Error(oR(e))}return await r.json()}catch(e){throw console.error("Failed to fetch OpenAPI registry:",e),e}},rb=async e=>{try{let t=E?`${E}/v1/mcp/discover`:"/v1/mcp/discover",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch discoverable MCP servers:",e),e}},rw=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server";if(t){let e=new URLSearchParams;e.append("team_id",t),r=`${r}?${e.toString()}`}console.log("Fetching MCP servers from:",r);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("Fetched MCP servers:",n),n}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},r$=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server/health`:"/v1/mcp/server/health";if(t&&t.length>0){let e=new URLSearchParams;t.forEach(t=>e.append("server_ids",t)),r=`${r}?${e.toString()}`}console.log("Fetching MCP server health from:",r);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("Fetched MCP server health:",n),n}catch(e){throw console.error("Failed to fetch MCP server health:",e),e}},rC=async e=>{try{let t=E?`${E}/v1/mcp/access_groups`:"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched MCP access groups:",o),o.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},rx=async e=>{try{let t=E?`${E}/v1/mcp/network/client-ip`:"/v1/mcp/network/client-ip",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok)return null;return(await r.json()).ip||null}catch{return null}},rE=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},rS=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},rk=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${t}`;console.log("in deleteMCPServer:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},rj=async e=>{try{let t=(E?`${E}`:"")+"/v1/mcp/toolset",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch MCP toolsets:",e),e}},rO=async(e,t)=>{try{let r=(E?`${E}`:"")+"/v1/mcp/toolset",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create MCP toolset:",e),e}},rT=async(e,t)=>{try{let r=(E?`${E}`:"")+"/v1/mcp/toolset",o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP toolset:",e),e}},rI=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/toolset/${t}`,o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}}catch(e){throw console.error("Failed to delete MCP toolset:",e),e}},rF=async(e,t)=>{try{let r=(E?`${E}`:"")+"/v1/mcp/server/register",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to register MCP server:",e),e}},r_=async e=>{try{let t=(E?`${E}`:"")+"/v1/mcp/server/submissions",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json().catch(()=>({})),t=oR(e);throw I(t),Error(t)}return r.json()}catch(e){throw console.error("Failed to fetch MCP submissions:",e),e}},rP=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=oR(e);throw I(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to approve MCP server:",e),e}},rR=async(e,t,r)=>{try{let o=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/reject`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({review_notes:r??null})});if(!n.ok){let e=await n.json().catch(()=>({})),t=oR(e);throw I(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to reject MCP server:",e),e}},rN=async e=>{try{let t=E?`${E}/search_tools/list`:"/search_tools/list";console.log("Fetching search tools from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched search tools:",o),o}catch(e){throw console.error("Failed to fetch search tools:",e),e}},rM=async(e,t)=>{try{console.log("Creating search tool with values:",t);let r=E?`${E}/search_tools`:"/search_tools",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("Created search tool:",n),n}catch(e){throw console.error("Failed to create search tool:",e),e}},rB=async(e,t,r)=>{try{console.log("Updating search tool with ID:",t,"values:",r);let o=E?`${E}/search_tools/${t}`:`/search_tools/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:r})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return console.log("Updated search tool:",a),a}catch(e){throw console.error("Failed to update search tool:",e),e}},rA=async(e,t)=>{try{let r=(E?`${E}`:"")+`/search_tools/${t}`;console.log("Deleting search tool:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("Deleted search tool:",n),n}catch(e){throw console.error("Failed to delete search tool:",e),e}},rz=async e=>{try{let t=E?`${E}/search_tools/ui/available_providers`:"/search_tools/ui/available_providers";console.log("Fetching available search providers from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched available search providers:",o),o}catch(e){throw console.error("Failed to fetch available search providers:",e),e}},rL=async(e,t)=>{try{let r=E?`${E}/search_tools/test_connection`:"/search_tools/test_connection";console.log("Testing search tool connection:",r);let o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({litellm_params:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("Test connection response:",n),n}catch(e){throw console.error("Failed to test search tool connection:",e),e}},rD=async(e,t,r)=>{try{let o=E?`${E}/mcp-rest/tools/list?server_id=${t}`:`/mcp-rest/tools/list?server_id=${t}`;console.log("Fetching MCP tools from:",o);let n={[P]:`Bearer ${e}`,"Content-Type":"application/json",...r},a=await fetch(o,{method:"GET",headers:n}),i=await a.json();if(console.log("Fetched MCP tools response:",i),!a.ok){if(i.error&&i.message)throw Error(i.message);throw Error("Failed to fetch MCP tools")}return i}catch(e){return console.error("Failed to fetch MCP tools:",e),{tools:[],error:"network_error",message:e instanceof Error?e.message:"Failed to fetch MCP tools",stack_trace:null}}},rH=async(e,t,r,o,n)=>{try{let a=E?`${E}/mcp-rest/tools/call`:"/mcp-rest/tools/call";console.log("Calling MCP tool:",r,"with arguments:",o,"for server:",t);let i={[P]:`Bearer ${e}`,"Content-Type":"application/json",...n?.customHeaders||{}},l={server_id:t,name:r,arguments:o};n?.guardrails&&n.guardrails.length>0&&(l.litellm_metadata={guardrails:n.guardrails});let s=await fetch(a,{method:"POST",headers:i,body:JSON.stringify(l)});if(!s.ok){let e="Network response was not ok",t=null,r=await s.text();try{let o=JSON.parse(r);o.detail?"string"==typeof o.detail?e=o.detail:"object"==typeof o.detail&&(e=o.detail.message||o.detail.error||"An error occurred",t=o.detail):e=o.message||o.error||e}catch(t){console.error("Failed to parse JSON error response:",t),r&&(e=r)}let o=Error(e);throw o.status=s.status,o.statusText=s.statusText,o.details=t,I(e),o}let c=await s.json();return console.log("MCP tool call response:",c),c}catch(e){throw console.error("Failed to call MCP tool:",e),console.error("Error type:",typeof e),e instanceof Error&&(console.error("Error message:",e.message),console.error("Error stack:",e.stack)),e}},rV=async(e,t)=>{try{let r=E?`${E}/tag/new`:"/tag/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await I(e);return}return await o.json()}catch(e){throw console.error("Error creating tag:",e),e}},rW=async(e,t)=>{try{let r=E?`${E}/tag/update`:"/tag/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await I(e);return}return await o.json()}catch(e){throw console.error("Error updating tag:",e),e}},rU=async(e,t)=>{try{let r=E?`${E}/tag/info`:"/tag/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({names:t})});if(!o.ok){let e=await o.text();return await I(e),{}}return await o.json()}catch(e){throw console.error("Error getting tag info:",e),e}},rG=async e=>{try{let t=E?`${E}/tag/list`:"/tag/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){let e=await r.text();return await I(e),{}}return await r.json()}catch(e){throw console.error("Error listing tags:",e),e}},rq=async(e,t)=>{try{let r=E?`${E}/tag/delete`:"/tag/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({name:t})});if(!o.ok){let e=await o.text();await I(e);return}return await o.json()}catch(e){throw console.error("Error deleting tag:",e),e}},rJ=async e=>{try{let t=E?`${E}/get/default_team_settings`:"/get/default_team_settings";console.log("Fetching default team settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched default team settings:",o),o}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},rK=async(e,t)=>{try{let r=E?`${E}/update/default_team_settings`:"/update/default_team_settings";console.log("Updating default team settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}let n=await o.json();return console.log("Updated default team settings:",n),n}catch(e){throw console.error("Failed to update default team settings:",e),e}},rX=async(e,t)=>{try{let r=E?`${E}/team/permissions_list?team_id=${t}`:`/team/permissions_list?team_id=${t}`,o=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json(),t=oR(e);return console.error("Available permissions fetch failed:",t),{all_available_permissions:[],team_member_permissions:[]}}return await o.json()}catch(e){throw console.error("Failed to get team permissions:",e),e}},rY=async(e,t,r)=>{try{let o=E?`${E}/team/permissions_update`:"/team/permissions_update",n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({team_id:t,team_member_permissions:r})});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return console.log("Team permissions response:",a),a}catch(e){throw console.error("Failed to update team permissions:",e),e}},rQ=async(e,t)=>{try{let r=E?`${E}/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`:`/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},rZ=async(e,t)=>{try{let r=E?`${E}/vector_store/new`:"/vector_store/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to create vector store")}return await o.json()}catch(e){throw console.error("Error creating vector store:",e),e}},r0=async(e,t=1,r=100)=>{try{let t=E?`${E}/vector_store/list`:"/vector_store/list",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to list vector stores")}return await r.json()}catch(e){throw console.error("Error listing vector stores:",e),e}},r1=async(e,t)=>{try{let r=E?`${E}/vector_store/delete`:"/vector_store/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to delete vector store")}return await o.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},r2=async(e,t)=>{try{let r=E?`${E}/vector_store/info`:"/vector_store/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to get vector store info")}return await o.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},r4=async(e,t)=>{try{let r=E?`${E}/vector_store/update`:"/vector_store/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to update vector store")}return await o.json()}catch(e){throw console.error("Error updating vector store:",e),e}},r6=async(e,t,r,o,n,a,i)=>{try{let l=E?`${E}/rag/ingest`:"/rag/ingest",s=new FormData;s.append("file",t);let c={ingest_options:{vector_store:{custom_llm_provider:r,...o&&{vector_store_id:o},...i&&i}}};(n||a)&&(c.ingest_options.litellm_vector_store_params={},n&&(c.ingest_options.litellm_vector_store_params.vector_store_name=n),a&&(c.ingest_options.litellm_vector_store_params.vector_store_description=a)),s.append("request",JSON.stringify(c));let u=await fetch(l,{method:"POST",headers:{[P]:`Bearer ${e}`},body:s});if(!u.ok){let e=await u.json();throw Error(e.error?.message||e.detail||"Failed to ingest document")}return await u.json()}catch(e){throw console.error("Error ingesting document:",e),e}},r3=async e=>{try{let t=E?`${E}/email/event_settings`:"/email/event_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error("Failed to get email event settings")}let o=await r.json();return console.log("Email event settings response:",o),o}catch(e){throw console.error("Failed to get email event settings:",e),e}},r7=async(e,t)=>{try{let r=E?`${E}/email/event_settings`:"/email/event_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw I(e),Error("Failed to update email event settings")}let n=await o.json();return console.log("Update email event settings response:",n),n}catch(e){throw console.error("Failed to update email event settings:",e),e}},r5=async e=>{try{let t=E?`${E}/email/event_settings/reset`:"/email/event_settings/reset",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error("Failed to reset email event settings")}let o=await r.json();return console.log("Reset email event settings response:",o),o}catch(e){throw console.error("Failed to reset email event settings:",e),e}},r9=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Delete agent response:",n),n}catch(e){throw console.error("Failed to delete agent:",e),e}},r8=async(e,t)=>{try{let r=E?`${E}/v1/agents/make_public`:"/v1/agents/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_ids:t})});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},oe=async(e,t)=>{try{let r=E?`${E}/v1/mcp/make_public`:"/v1/mcp/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({mcp_server_ids:t})});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},ot=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw I(e),Error(e)}let n=await o.json();return console.log("Delete guardrail response:",n),n}catch(e){throw console.error("Failed to delete guardrail:",e),e}},or=async e=>{try{let t=E?`${E}/guardrails/ui/add_guardrail_settings`:"/guardrails/ui/add_guardrail_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error("Failed to get guardrail UI settings")}let o=await r.json();return console.log("Guardrail UI settings response:",o),o}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},oo=async e=>{try{let t=E?`${E}/guardrails/ui/provider_specific_params`:"/guardrails/ui/provider_specific_params",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw I(e),Error("Failed to get guardrail provider specific parameters")}let o=await r.json();return console.log("Guardrail provider specific params response:",o),o}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},on=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/guardrails/ui/category_yaml/${r}`:`/guardrails/ui/category_yaml/${r}`;console.log(`Fetching category YAML from: ${o}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw console.error(`Failed to get category YAML. Status: ${n.status}, Error:`,e),I(e),Error(`Failed to get category YAML: ${n.status} ${e}`)}let a=await n.json();return console.log("Category YAML response:",a),a}catch(e){throw console.error("Failed to get category YAML:",e),e}},oa=async e=>{try{let t=E?`${E}/guardrails/ui/major_airlines`:"/guardrails/ui/major_airlines",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw console.error(`Failed to get major airlines. Status: ${r.status}, Error:`,e),I(e),Error(`Failed to get major airlines: ${r.status} ${e}`)}return await r.json()}catch(e){throw console.error("Failed to get major airlines:",e),e}},oi=async(e,t=!1)=>{try{let r=t?"?health_check=true":"",o=E?`${E}/v1/agents${r}`:`/v1/agents${r}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw I(e),Error("Failed to get agents list")}let a=await n.json();return console.log("Agents list response:",a),{agents:a}}catch(e){throw console.error("Failed to get agents list:",e),e}},ol=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw I(e),Error("Failed to get agent info")}let n=await o.json();return console.log("Agent info response:",n),n}catch(e){throw console.error("Failed to get agent info:",e),e}},os=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}/info`:`/guardrails/${t}/info`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw I(e),Error("Failed to get guardrail info")}let n=await o.json();return console.log("Guardrail info response:",n),n}catch(e){throw console.error("Failed to get guardrail info:",e),e}},oc=async(e,t,r)=>{try{let o=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw I(e),Error("Failed to patch agent")}let a=await n.json();return console.log("Patch agent response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},ou=async(e,t,r)=>{try{let o=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw I(e),Error("Failed to update guardrail")}let a=await n.json();return console.log("Update guardrail response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},od=async(e,t,r,o,n)=>{try{let a=E?`${E}/guardrails/apply_guardrail`:"/guardrails/apply_guardrail",i={guardrail_name:t,text:r};o&&(i.language=o),n&&n.length>0&&(i.entities=n);let l=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t="Failed to apply guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw I(e),Error(t)}let s=await l.json();return console.log("Apply guardrail response:",s),s}catch(e){throw console.error("Failed to apply guardrail:",e),e}},of=async(e,t)=>{try{let r=E?`${E}/guardrails/test_custom_code`:"/guardrails/test_custom_code",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text(),t="Failed to test custom code guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw I(e),Error(t)}let n=await o.json();return console.log("Test custom code guardrail response:",n),n}catch(e){throw console.error("Failed to test custom code guardrail:",e),e}},op=async(e,t)=>{try{let r=E?`${E}/guardrails/validate_blocked_words_file`:"/guardrails/validate_blocked_words_file",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({file_content:t})});if(!o.ok){let e=await o.text();throw I(e),Error("Failed to validate blocked words file")}let n=await o.json();return console.log("Validate blocked words file response:",n),n}catch(e){throw console.error("Failed to validate blocked words file:",e),e}},oh=async e=>{try{let t=E?`${E}/get/sso_settings`:"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}let o=await r.json();return console.log("Fetched SSO configuration:",o),o}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},om=async(e,t)=>{try{let r=E?`${E}/update/sso_settings`:"/update/sso_settings";console.log("Updating SSO configuration:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t="object"==typeof e?.detail?e.detail?.error||e.detail?.message:e?.detail,r="string"==typeof t&&t.length>0?t:oR(e);I(r);let n=Error(r);throw e?.detail!==void 0&&(n.detail=e.detail),n.rawError=e,n}let n=await o.json();return console.log("Updated SSO configuration:",n),n}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},og=async({accessToken:e,page:t=1,page_size:r=50,params:o={}})=>{try{let n=E?`${E}/audit`:"/audit",a=new URLSearchParams;for(let[e,n]of(a.append("page",t.toString()),a.append("page_size",r.toString()),Object.entries(o)))null!=n&&""!==n&&a.append(e,String(n));n+=`?${a.toString()}`;let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oR(e);throw I(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},ov=async e=>{try{let t=E?`${E}/user/available_users`:"/user/available_users",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw I(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},oy=async e=>{try{let t=E?`${E}/health/license`:"/health/license",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw I(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch license info:",e),e}},ob=async(e,t,r)=>{try{let o=E?`${E}/config/pass_through_endpoint/${encodeURIComponent(t)}`:`/config/pass_through_endpoint/${encodeURIComponent(t)}`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oR(e);throw I(t),Error(t)}let a=await n.json();return v.default.success("Pass through endpoint updated successfully"),a}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},ow=async(e,t)=>{try{let r=E?`${E}/config/callback/delete`:"/config/callback/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!o.ok){let e=await o.json(),t=oR(e);throw I(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},o$=async(e,t,r)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let o=E?`${E}/mcp-rest/test/tools/list`:"/mcp-rest/test/tools/list",n={"Content-Type":"application/json"};e&&(n["x-litellm-api-key"]=e),r?n.Authorization=`Bearer ${r}`:e&&(n[P]=`Bearer ${e}`);let a=await fetch(o,{method:"POST",headers:n,body:JSON.stringify(t)}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||l.error)&&!l.error)return{tools:[],error:"request_failed",message:l.message||`MCP tools list failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("MCP tools list test error:",e),e}},oC=async(e,t)=>{let r=E?`${E}/v1/mcp/server/oauth/session`:"/v1/mcp/server/oauth/session",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await o.json();if(!o.ok)throw Error(oR(n)||n?.error||"Failed to cache MCP server");return n},ox=async(e,t,r)=>{let o=S(),n=encodeURIComponent(t.trim()),a=`${o}/v1/mcp/server/oauth/${n}/register`,i=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json, text/event-stream"},body:JSON.stringify(r)}),l=await i.json();if(!i.ok)throw Error(oR(l)||l?.detail||"Failed to register OAuth client");return l},oE=({serverId:e,clientId:t,redirectUri:r,state:o,codeChallenge:n,scope:a})=>{let i=S(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/authorize`,c=new URLSearchParams({redirect_uri:r,state:o,response_type:"code",code_challenge:n,code_challenge_method:"S256"});return t&&t.trim().length>0&&c.set("client_id",t),a&&a.trim().length>0&&c.set("scope",a),`${s}?${c.toString()}`},oS=async({serverId:e,code:t,clientId:r,clientSecret:o,codeVerifier:n,redirectUri:a})=>{let i=S(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/token`,c=new URLSearchParams;c.set("grant_type","authorization_code"),c.set("code",t),r&&r.trim().length>0&&c.set("client_id",r),o&&o.trim().length>0&&c.set("client_secret",o),c.set("code_verifier",n),c.set("redirect_uri",a);let u=await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c.toString()}),d=await u.json();if(!u.ok)throw Error(oR(d)||d?.detail||"OAuth token exchange failed");return d},ok=async(e,t,r)=>{try{let o=`${S()}/v1/vector_stores/${t}/search`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r})});if(!n.ok){let e=await n.text();return await I(e),null}return await n.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},oj=async(e,t,r,o)=>{try{let n=`${S()}/v1/search/${t}`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r,max_results:o||5})});if(!a.ok){let e=await a.text();return await I(e),null}return await a.json()}catch(e){throw console.error("Error querying search tool:",e),e}},oO=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/dau`:"/tag/dau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oR(e);throw I(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},oT=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/wau`:"/tag/wau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oR(e);throw I(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},oI=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/mau`:"/tag/mau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oR(e);throw I(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},oF=async e=>{try{let t=E?`${E}/tag/distinct`:"/tag/distinct",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oR(e);throw I(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},o_=async(e,t,r,o)=>{try{let n=E?`${E}/tag/summary`:"/tag/summary",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oR(e);throw I(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},oP=async(e,t=1,r=50,o)=>{try{let n=E?`${E}/tag/user-agent/per-user-analytics`:"/tag/user-agent/per-user-analytics",a=new URLSearchParams;a.append("page",t.toString()),a.append("page_size",r.toString()),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let i=a.toString();i&&(n+=`?${i}`);let l=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=oR(e);throw I(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},oR=e=>{let t=e?.detail,r=Array.isArray(t)?t.map(e=>e?.msg||JSON.stringify(e)).join("; "):"string"==typeof t?t:void 0;return e?.error&&(e.error.message||("string"==typeof e.error?e.error:void 0))||e?.message||r||JSON.stringify(e)},oN=async(e,t,o)=>{let n=S(),a=o?"/v3/login":"/v2/login",i=n?`${n}${a}`:a,l=JSON.stringify({username:e,password:t}),s=await fetch(i,{method:"POST",body:l,credentials:"include",headers:{"Content-Type":"application/json"}});if(!s.ok)throw Error(oR(await s.json()));let c=await s.json();if(o&&c.code){let e=n?`${n}/v3/login/exchange`:"/v3/login/exchange",t=await fetch(e,{method:"POST",body:JSON.stringify({code:c.code}),credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error(oR(await t.json()));let o=await t.json();return o.token&&(0,r.storeLoginToken)(o.token),o}return c.token&&(0,r.storeLoginToken)(c.token),c},oM=async(e,t)=>{let r=t||S(),o=await fetch(`${r}/v3/login/exchange`,{method:"POST",body:JSON.stringify({code:e}),headers:{"Content-Type":"application/json"}});if(!o.ok)throw Error(oR(await o.json()));let n=await o.json();return n.token&&(document.cookie=`token=${n.token}; path=/; SameSite=Lax`),n.token},oB=async()=>{let e=S(),t=e?`${e}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET"});if(!r.ok)throw Error(oR(await r.json()));return await r.json()},oA=async(e,t)=>{let r=S(),o=r?`${r}/update/ui_settings`:"/update/ui_settings",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(oR(await n.json()));return await n.json()},oz=async(e,t=!1)=>{try{let r=S(),o=r?`${r}/claude-code/plugins?enabled_only=${t}`:`/claude-code/plugins?enabled_only=${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oR(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to fetch Claude Code plugins list:",e),e}},oL=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins`:"/claude-code/plugins",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text(),t=oR(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to register Claude Code plugin:",e),e}},oD=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/enable`:`/claude-code/plugins/${t}/enable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oR(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to enable plugin "${t}":`,e),e}},oH=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/disable`:`/claude-code/plugins/${t}/disable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oR(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to disable plugin "${t}":`,e),e}},oV=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oR(JSON.parse(e));throw I(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to delete plugin "${t}":`,e),e}},oW=async(e,t)=>{let r=E?`${E}/compliance/eu-ai-act`:"/compliance/eu-ai-act",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oU=async(e,t)=>{let r=E?`${E}/compliance/gdpr`:"/compliance/gdpr",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oG=async e=>{let t=E?`${E}/v1/tool/policy/options`:"/v1/tool/policy/options",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return r.json()},oq=async e=>{let t=E?`${E}/v1/tool/list`:"/v1/tool/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return(await r.json()).tools??[]},oJ=async(e,t,r)=>{let o=encodeURIComponent(t),n=E?`${E}/v1/tool/${o}/logs`:`/v1/tool/${o}/logs`,a=new URLSearchParams;null!=r.page&&a.append("page",String(r.page)),null!=r.pageSize&&a.append("page_size",String(r.pageSize)),r.startDate&&a.append("start_date",r.startDate),r.endDate&&a.append("end_date",r.endDate);let i=a.toString()?`${n}?${a.toString()}`:n,l=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok)throw Error(oR(await l.json().catch(()=>({}))));return l.json()},oK=async(e,t)=>{let r=encodeURIComponent(t),o=E?`${E}/v1/tool/${r}/detail`:`/v1/tool/${r}/detail`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok)throw Error(await n.text());return n.json()},oX=async(e,t,r,o)=>{let n=E?`${E}/v1/tool/policy`:"/v1/tool/policy",a={tool_name:t};null!=r.input_policy&&(a.input_policy=r.input_policy),null!=r.output_policy&&(a.output_policy=r.output_policy),o?.team_id!=null&&(a.team_id=o.team_id||void 0),o?.key_hash!=null&&(a.key_hash=o.key_hash||void 0),o?.key_alias!=null&&(a.key_alias=o.key_alias||void 0);let i=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw Error(await i.text());return i.json()},oY=async(e,t,r)=>{let o=encodeURIComponent(t),n=new URLSearchParams;null!=r.team_id&&""!==r.team_id&&n.set("team_id",r.team_id),null!=r.key_hash&&""!==r.key_hash&&n.set("key_hash",r.key_hash);let a=n.toString(),i=E?`${E}/v1/tool/${o}/overrides${a?`?${a}`:""}`:`/v1/tool/${o}/overrides${a?`?${a}`:""}`,l=await fetch(i,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!l.ok)throw Error(await l.text());return l.json()},oQ=async(e,t,r)=>{let o=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to store OAuth credential")}return n.json()},oZ=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to revoke OAuth credential")}return o.json()},o0=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential/status`:`/v1/mcp/server/${t}/oauth-user-credential/status`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`}});return o.ok?o.json():{server_id:t,has_credential:!1,is_expired:!1}},o1=async e=>{let t=E?`${E}/v1/mcp/user-credentials`:"/v1/mcp/user-credentials",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});return r.ok?r.json():[]}},266027,869230,469637,e=>{"use strict";let t;var r=e.i(175555),o=e.i(540143),n=e.i(286491),a=e.i(915823),i=e.i(793803),l=e.i(619273),s=e.i(180166),c=class extends a.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,i.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#o=void 0;#n=void 0;#a=void 0;#i;#l;#r;#t;#s;#c;#u;#d;#f;#p;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#o.addObserver(this),u(this.#o,this.options)?this.#m():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#o,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#o,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#y(),this.#o.removeObserver(this)}setOptions(e){let t=this.options,r=this.#o;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,l.resolveEnabled)(this.options.enabled,this.#o))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#o.setOptions(this.options),t._defaulted&&!(0,l.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#o,observer:this});let o=this.hasListeners();o&&f(this.#o,r,this.options,t)&&this.#m(),this.updateResult(),o&&(this.#o!==r||(0,l.resolveEnabled)(this.options.enabled,this.#o)!==(0,l.resolveEnabled)(t.enabled,this.#o)||(0,l.resolveStaleTime)(this.options.staleTime,this.#o)!==(0,l.resolveStaleTime)(t.staleTime,this.#o))&&this.#w();let n=this.#$();o&&(this.#o!==r||(0,l.resolveEnabled)(this.options.enabled,this.#o)!==(0,l.resolveEnabled)(t.enabled,this.#o)||n!==this.#p)&&this.#C(n)}getOptimisticResult(e){var t,r;let o=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(o,e);return t=this,r=n,(0,l.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#a=n,this.#l=this.options,this.#i=this.#o.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#o}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#m(e){this.#b();let t=this.#o.fetch(this.options,e);return e?.throwOnError||(t=t.catch(l.noop)),t}#w(){this.#v();let e=(0,l.resolveStaleTime)(this.options.staleTime,this.#o);if(l.isServer||this.#a.isStale||!(0,l.isValidTimeout)(e))return;let t=(0,l.timeUntilStale)(this.#a.dataUpdatedAt,e);this.#d=s.timeoutManager.setTimeout(()=>{this.#a.isStale||this.updateResult()},t+1)}#$(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#o):this.options.refetchInterval)??!1}#C(e){this.#y(),this.#p=e,!l.isServer&&!1!==(0,l.resolveEnabled)(this.options.enabled,this.#o)&&(0,l.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#f=s.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#m()},this.#p))}#g(){this.#w(),this.#C(this.#$())}#v(){this.#d&&(s.timeoutManager.clearTimeout(this.#d),this.#d=void 0)}#y(){this.#f&&(s.timeoutManager.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let r,o=this.#o,a=this.options,s=this.#a,c=this.#i,d=this.#l,h=e!==o?e.state:this.#n,{state:m}=e,g={...m},v=!1;if(t._optimisticResults){let r=this.hasListeners(),i=!r&&u(e,t),l=r&&f(e,o,t,a);(i||l)&&(g={...g,...(0,n.fetchState)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(g.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:w}=g;r=g.data;let $=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===w){let e;s?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(e=s.data,$=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,void 0!==e&&(w="success",r=(0,l.replaceData)(s?.data,e,t),v=!0)}if(t.select&&void 0!==r&&!$)if(s&&r===c?.data&&t.select===this.#s)r=this.#c;else try{this.#s=t.select,r=t.select(r),r=(0,l.replaceData)(s?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}this.#t&&(y=this.#t,r=this.#c,b=Date.now(),w="error");let C="fetching"===g.fetchStatus,x="pending"===w,E="error"===w,S=x&&C,k=void 0!==r,j={status:w,fetchStatus:g.fetchStatus,isPending:x,isSuccess:"success"===w,isError:E,isInitialLoading:S,isLoading:S,data:r,dataUpdatedAt:g.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:C,isRefetching:C&&!x,isLoadingError:E&&!k,isPaused:"paused"===g.fetchStatus,isPlaceholderData:v,isRefetchError:E&&k,isStale:p(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,l.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==j.data,r="error"===j.status&&!t,n=e=>{r?e.reject(j.error):t&&e.resolve(j.data)},a=()=>{n(this.#r=j.promise=(0,i.pendingThenable)())},l=this.#r;switch(l.status){case"pending":e.queryHash===o.queryHash&&n(l);break;case"fulfilled":(r||j.data!==l.value)&&a();break;case"rejected":r&&j.error===l.reason||a()}}return j}updateResult(){let e=this.#a,t=this.createResult(this.#o,this.options);if(this.#i=this.#o.state,this.#l=this.options,void 0!==this.#i.data&&(this.#u=this.#o),(0,l.shallowEqualObjects)(t,e))return;this.#a=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#h.size)return!0;let o=new Set(r??this.#h);return this.options.throwOnError&&o.add("error"),Object.keys(this.#a).some(t=>this.#a[t]!==e[t]&&o.has(t))};this.#x({listeners:r()})}#b(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#o)return;let t=this.#o;this.#o=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#x(e){o.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#a)}),this.#e.getQueryCache().notify({query:this.#o,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,l.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,l.resolveEnabled)(t.enabled,e)&&"static"!==(0,l.resolveStaleTime)(t.staleTime,e)){let o="function"==typeof r?r(e):r;return"always"===o||!1!==o&&p(e,t)}return!1}function f(e,t,r,o){return(e!==t||!1===(0,l.resolveEnabled)(o.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&p(e,r)}function p(e,t){return!1!==(0,l.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,l.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",()=>c],869230),e.i(247167);var h=e.i(271645),m=e.i(912598);e.i(843476);var g=h.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),v=h.createContext(!1);v.Provider;var y=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function b(e,t,r){let n,a=h.useContext(v),i=h.useContext(g),s=(0,m.useQueryClient)(r),c=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let u=s.getQueryCache().get(c.queryHash);if(c._optimisticResults=a?"isRestoring":"optimistic",c.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=c.staleTime;c.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))}n=u?.state.error&&"function"==typeof c.throwOnError?(0,l.shouldThrowError)(c.throwOnError,[u.state.error,u]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||n)&&!i.isReset()&&(c.retryOnMount=!1),h.useEffect(()=>{i.clearReset()},[i]);let d=!s.getQueryCache().get(c.queryHash),[f]=h.useState(()=>new t(s,c)),p=f.getOptimisticResult(c),b=!a&&!1!==e.subscribed;if(h.useSyncExternalStore(h.useCallback(e=>{let t=b?f.subscribe(o.notifyManager.batchCalls(e)):l.noop;return f.updateResult(),t},[f,b]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),h.useEffect(()=>{f.setOptions(c)},[c,f]),c?.suspense&&p.isPending)throw y(c,f,i);if((({result:e,errorResetBoundary:t,throwOnError:r,query:o,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(n&&void 0===e.data||(0,l.shouldThrowError)(r,[e.error,o])))({result:p,errorResetBoundary:i,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw p.error;if(s.getDefaultOptions().queries?._experimental_afterQuery?.(c,p),c.experimental_prefetchInRender&&!l.isServer&&p.isLoading&&p.isFetching&&!a){let e=d?y(c,f,i):u?.promise;e?.catch(l.noop).finally(()=>{f.updateResult()})}return c.notifyOnChangeProps?p:f.trackResult(p)}function w(e,t){return b(e,c,t)}e.s(["useBaseQuery",()=>b],469637),e.s(["useQuery",()=>w],266027)},243652,e=>{"use strict";function t(e){let t=[e];return{all:t,lists:()=>[...t,"list"],list:e=>[...t,"list",{params:e}],details:()=>[...t,"detail"],detail:e=>[...t,"detail",e]}}e.s(["createQueryKeys",()=>t])},947293,e=>{"use strict";class t extends Error{}function r(e,r){let o;if("string"!=typeof e)throw new t("Invalid token specified: must be a string");r||(r={});let n=+(!0!==r.header),a=e.split(".")[n];if("string"!=typeof a)throw new t(`Invalid token specified: missing part #${n+1}`);try{o=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 t(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new t(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}t.prototype.name="InvalidTokenError",e.s(["jwtDecode",()=>r])},612256,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let o=(0,e.i(243652).createQueryKeys)("uiConfig");e.s(["useUIConfig",0,()=>(0,r.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,t.getUiConfig)(),staleTime:864e5,gcTime:864e5})])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/03b2134dbe52a4e9.js b/litellm/proxy/_experimental/out/_next/static/chunks/03b2134dbe52a4e9.js deleted file mode 100644 index 229e6eac0a..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/03b2134dbe52a4e9.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},916925,e=>{"use strict";var t,o=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",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.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t);let n={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},a="../ui/assets/logos/",i={"A2A Agent":`${a}a2a_agent.png`,Ai21:`${a}ai21.svg`,"Ai21 Chat":`${a}ai21.svg`,"AI/ML API":`${a}aiml_api.svg`,"Aiohttp Openai":`${a}openai_small.svg`,Anthropic:`${a}anthropic.svg`,"Anthropic Text":`${a}anthropic.svg`,AssemblyAI:`${a}assemblyai_small.png`,Azure:`${a}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${a}microsoft_azure.svg`,"Azure Text":`${a}microsoft_azure.svg`,Baseten:`${a}baseten.svg`,"Amazon Bedrock":`${a}bedrock.svg`,"Amazon Bedrock Mantle":`${a}bedrock.svg`,"AWS SageMaker":`${a}bedrock.svg`,Cerebras:`${a}cerebras.svg`,Cloudflare:`${a}cloudflare.svg`,Codestral:`${a}mistral.svg`,Cohere:`${a}cohere.svg`,"Cohere Chat":`${a}cohere.svg`,Cometapi:`${a}cometapi.svg`,Cursor:`${a}cursor.svg`,"Databricks (Qwen API)":`${a}databricks.svg`,Dashscope:`${a}dashscope.svg`,Deepseek:`${a}deepseek.svg`,Deepgram:`${a}deepgram.png`,DeepInfra:`${a}deepinfra.png`,ElevenLabs:`${a}elevenlabs.png`,"Fal AI":`${a}fal_ai.jpg`,"Featherless Ai":`${a}featherless.svg`,"Fireworks AI":`${a}fireworks.svg`,Friendliai:`${a}friendli.svg`,"Github Copilot":`${a}github_copilot.svg`,"Google AI Studio":`${a}google.svg`,GradientAI:`${a}gradientai.svg`,Groq:`${a}groq.svg`,vllm:`${a}vllm.png`,Huggingface:`${a}huggingface.svg`,Hyperbolic:`${a}hyperbolic.svg`,Infinity:`${a}infinity.png`,"Jina AI":`${a}jina.png`,"Lambda Ai":`${a}lambda.svg`,"Lm Studio":`${a}lmstudio.svg`,"Meta Llama":`${a}meta_llama.svg`,MiniMax:`${a}minimax.svg`,"Mistral AI":`${a}mistral.svg`,Moonshot:`${a}moonshot.svg`,Morph:`${a}morph.svg`,Nebius:`${a}nebius.svg`,Novita:`${a}novita.svg`,"Nvidia Nim":`${a}nvidia_nim.svg`,Ollama:`${a}ollama.svg`,"Ollama Chat":`${a}ollama.svg`,Oobabooga:`${a}openai_small.svg`,OpenAI:`${a}openai_small.svg`,"Openai Like":`${a}openai_small.svg`,"OpenAI Text Completion":`${a}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${a}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${a}openai_small.svg`,Openrouter:`${a}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${a}oracle.svg`,Perplexity:`${a}perplexity-ai.svg`,Recraft:`${a}recraft.svg`,Replicate:`${a}replicate.svg`,RunwayML:`${a}runwayml.png`,Sagemaker:`${a}bedrock.svg`,Sambanova:`${a}sambanova.svg`,"SAP Generative AI Hub":`${a}sap.png`,Snowflake:`${a}snowflake.svg`,"Text-Completion-Codestral":`${a}mistral.svg`,TogetherAI:`${a}togetherai.svg`,Topaz:`${a}topaz.svg`,Triton:`${a}nvidia_triton.png`,V0:`${a}v0.svg`,"Vercel Ai Gateway":`${a}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${a}google.svg`,"Vertex Ai Beta":`${a}google.svg`,Vllm:`${a}vllm.png`,VolcEngine:`${a}volcengine.png`,"Voyage AI":`${a}voyage.webp`,Watsonx:`${a}watsonx.svg`,"Watsonx Text":`${a}watsonx.svg`,xAI:`${a}xai.svg`,Xinference:`${a}xinference.svg`};e.s(["Providers",()=>o,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"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 if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let t=Object.keys(n).find(t=>n[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=o[t];return{logo:i[a],displayName:a}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let o=n[e];console.log(`Provider mapped to: ${o}`);let a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let n=t.litellm_provider;(n===o||"string"==typeof n&&n.includes(o))&&a.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&a.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&a.push(e)}))),a},"providerLogoMap",0,i,"provider_map",0,n])},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>t.default])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["ArrowLeftOutlined",0,i],447566)},689020,e=>{"use strict";var t=e.i(764205);let o=async e=>{try{let o=await (0,t.modelHubCall)(e);if(console.log("model_info:",o),o?.data.length>0){let e=o.data.map(e=>({model_group:e.model_group,mode: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}};e.s(["fetchAvailableModels",0,o])},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["default",0,i],597440)},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),o=e.i(739295),n=e.i(343794),a=e.i(931067),i=e.i(211577),r=e.i(392221),l=e.i(703923),s=e.i(914949),c=e.i(404948),d=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,o){var u,p=e.prefixCls,m=void 0===p?"rc-switch":p,g=e.className,f=e.checked,h=e.defaultChecked,v=e.disabled,b=e.loadingIcon,_=e.checkedChildren,y=e.unCheckedChildren,A=e.onClick,x=e.onChange,S=e.onKeyDown,O=(0,l.default)(e,d),I=(0,s.default)(!1,{value:f,defaultValue:h}),C=(0,r.default)(I,2),w=C[0],E=C[1];function k(e,t){var o=w;return v||(E(o=e),null==x||x(o,t)),o}var $=(0,n.default)(m,g,(u={},(0,i.default)(u,"".concat(m,"-checked"),w),(0,i.default)(u,"".concat(m,"-disabled"),v),u));return t.createElement("button",(0,a.default)({},O,{type:"button",role:"switch","aria-checked":w,disabled:v,className:$,ref:o,onKeyDown:function(e){e.which===c.default.LEFT?k(!1,e):e.which===c.default.RIGHT&&k(!0,e),null==S||S(e)},onClick:function(e){var t=k(!w,e);null==A||A(t,e)}}),b,t.createElement("span",{className:"".concat(m,"-inner")},t.createElement("span",{className:"".concat(m,"-inner-checked")},_),t.createElement("span",{className:"".concat(m,"-inner-unchecked")},y)))});u.displayName="Switch";var p=e.i(121872),m=e.i(242064),g=e.i(937328),f=e.i(517455);e.i(296059);var h=e.i(915654);e.i(262370);var v=e.i(135551),b=e.i(183293),_=e.i(246422),y=e.i(838378);let A=(0,_.genStyleHooks)("Switch",e=>{let t=(0,y.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:o,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,b.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:o,lineHeight:(0,h.unit)(o),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,b.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:o,trackPadding:n,innerMinMargin:a,innerMaxMargin:i,handleSize:r,calc:l}=e,s=`${t}-inner`,c=(0,h.unit)(l(r).add(l(n).mul(2)).equal()),d=(0,h.unit)(l(i).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:o},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${d})`,marginInlineEnd:`calc(100% - ${c} + ${d})`},[`${s}-unchecked`]:{marginTop:l(o).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${d})`,marginInlineEnd:`calc(-100% + ${c} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:l(n).mul(2).equal(),marginInlineEnd:l(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:l(n).mul(-1).mul(2).equal(),marginInlineEnd:l(n).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:o,handleBg:n,handleShadow:a,handleSize:i,calc:r}=e,l=`${t}-handle`;return{[t]:{[l]:{position:"absolute",top:o,insetInlineStart:o,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:r(i).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${l}`]:{insetInlineStart:`calc(100% - ${(0,h.unit)(r(i).add(o).equal())})`},[`&:not(${t}-disabled):active`]:{[`${l}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${l}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:o,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(o).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:o,trackPadding:n,trackMinWidthSM:a,innerMinMarginSM:i,innerMaxMarginSM:r,handleSizeSM:l,calc:s}=e,c=`${t}-inner`,d=(0,h.unit)(s(l).add(s(n).mul(2)).equal()),u=(0,h.unit)(s(r).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:o,lineHeight:(0,h.unit)(o),[`${t}-inner`]:{paddingInlineStart:r,paddingInlineEnd:i,[`${c}-checked, ${c}-unchecked`]:{minHeight:o},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${c}-unchecked`]:{marginTop:s(o).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:l,height:l},[`${t}-loading-icon`]:{top:s(s(l).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:r,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,h.unit)(s(l).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:o,controlHeight:n,colorWhite:a}=e,i=t*o,r=n/2,l=i-4,s=r-4;return{trackHeight:i,trackHeightSM:r,trackMinWidth:2*l+8,trackMinWidthSM:2*s+4,trackPadding:2,handleBg:a,handleSize:l,handleSizeSM:s,handleShadow:`0 2px 4px 0 ${new v.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+2+4,innerMinMarginSM:s/2,innerMaxMarginSM:s+2+4}});var x=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};let S=t.forwardRef((e,a)=>{let{prefixCls:i,size:r,disabled:l,loading:c,className:d,rootClassName:h,style:v,checked:b,value:_,defaultChecked:y,defaultValue:S,onChange:O}=e,I=x(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[C,w]=(0,s.default)(!1,{value:null!=b?b:_,defaultValue:null!=y?y:S}),{getPrefixCls:E,direction:k,switch:$}=t.useContext(m.ConfigContext),T=t.useContext(g.default),j=(null!=l?l:T)||c,R=E("switch",i),M=t.createElement("div",{className:`${R}-handle`},c&&t.createElement(o.default,{className:`${R}-loading-icon`})),[z,N,L]=A(R),P=(0,f.default)(r),D=(0,n.default)(null==$?void 0:$.className,{[`${R}-small`]:"small"===P,[`${R}-loading`]:c,[`${R}-rtl`]:"rtl"===k},d,h,N,L),H=Object.assign(Object.assign({},null==$?void 0:$.style),v);return z(t.createElement(p.default,{component:"Switch",disabled:j},t.createElement(u,Object.assign({},I,{checked:C,onChange:(...e)=>{w(e[0]),null==O||O.apply(void 0,e)},prefixCls:R,className:D,style:H,disabled:j,ref:a,loadingIcon:M}))))});S.__ANT_SWITCH=!0,e.s(["Switch",0,S],790848)},771674,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={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"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["UserOutlined",0,i],771674)},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},44121,186515,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["MenuFoldOutlined",0,i],44121);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var l=o.forwardRef(function(e,n){return o.createElement(a.default,(0,t.default)({},e,{ref:n,icon:r}))});e.s(["MenuUnfoldOutlined",0,l],186515)},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),o=e.i(343794),n=e.i(914949),a=e.i(404948);let i=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,i],836938);var r=e.i(613541),l=e.i(763731),s=e.i(242064),c=e.i(491816);e.i(793154);var d=e.i(880476),u=e.i(183293),p=e.i(717356),m=e.i(320560),g=e.i(307358),f=e.i(246422),h=e.i(838378),v=e.i(617933);let b=(0,f.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:o}=e,n=(0,h.mergeToken)(e,{popoverBg:t,popoverColor:o});return[(e=>{let{componentCls:t,popoverColor:o,titleMinWidth:n,fontWeightStrong:a,innerPadding:i,boxShadowSecondary:r,colorTextHeading:l,borderRadiusLG:s,zIndexPopup:c,titleMarginBottom:d,colorBgElevated:p,popoverBg:g,titleBorderBottom:f,innerContentPadding:h,titlePadding:v}=e;return[{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":p,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:s,boxShadow:r,padding:i},[`${t}-title`]:{minWidth:n,marginBottom:d,color:l,fontWeight:a,borderBottom:f,padding:v},[`${t}-inner-content`]:{color:o,padding:h}})},(0,m.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(n),(e=>{let{componentCls:t}=e;return{[t]:v.PresetColors.map(o=>{let n=e[`${o}6`];return{[`&${t}-${o}`]:{"--antd-arrow-background-color":n,[`${t}-inner`]:{backgroundColor:n},[`${t}-arrow`]:{background:"transparent"}}}})}})(n),(0,p.initZoomMotion)(n,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:o,fontHeight:n,padding:a,wireframe:i,zIndexPopupBase:r,borderRadiusLG:l,marginXS:s,lineType:c,colorSplit:d,paddingSM:u}=e,p=o-n;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:r+30},(0,g.getArrowToken)(e)),(0,m.getArrowOffsetToken)({contentRadius:l,limitVerticalRadius:!0})),{innerPadding:12*!i,titleMarginBottom:i?0:s,titlePadding:i?`${p/2}px ${a}px ${p/2-t}px`:0,titleBorderBottom:i?`${t}px ${c} ${d}`:"none",innerContentPadding:i?`${u}px ${a}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var _=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};let y=({title:e,content:o,prefixCls:n})=>e||o?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${n}-title`},e),o&&t.createElement("div",{className:`${n}-inner-content`},o)):null,A=e=>{let{hashId:n,prefixCls:a,className:r,style:l,placement:s="top",title:c,content:u,children:p}=e,m=i(c),g=i(u),f=(0,o.default)(n,a,`${a}-pure`,`${a}-placement-${s}`,r);return t.createElement("div",{className:f,style:l},t.createElement("div",{className:`${a}-arrow`}),t.createElement(d.Popup,Object.assign({},e,{className:n,prefixCls:a}),p||t.createElement(y,{prefixCls:a,title:m,content:g})))},x=e=>{let{prefixCls:n,className:a}=e,i=_(e,["prefixCls","className"]),{getPrefixCls:r}=t.useContext(s.ConfigContext),l=r("popover",n),[c,d,u]=b(l);return c(t.createElement(A,Object.assign({},i,{prefixCls:l,hashId:d,className:(0,o.default)(a,u)})))};e.s(["Overlay",0,y,"default",0,x],310730);var S=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};let O=t.forwardRef((e,d)=>{var u,p;let{prefixCls:m,title:g,content:f,overlayClassName:h,placement:v="top",trigger:_="hover",children:A,mouseEnterDelay:x=.1,mouseLeaveDelay:O=.1,onOpenChange:I,overlayStyle:C={},styles:w,classNames:E}=e,k=S(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:$,className:T,style:j,classNames:R,styles:M}=(0,s.useComponentConfig)("popover"),z=$("popover",m),[N,L,P]=b(z),D=$(),H=(0,o.default)(h,L,P,T,R.root,null==E?void 0:E.root),B=(0,o.default)(R.body,null==E?void 0:E.body),[F,V]=(0,n.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(p=e.defaultOpen)?p:e.defaultVisible}),W=(e,t)=>{V(e,!0),null==I||I(e,t)},U=i(g),q=i(f);return N(t.createElement(c.default,Object.assign({placement:v,trigger:_,mouseEnterDelay:x,mouseLeaveDelay:O},k,{prefixCls:z,classNames:{root:H,body:B},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},M.root),j),C),null==w?void 0:w.root),body:Object.assign(Object.assign({},M.body),null==w?void 0:w.body)},ref:d,open:F,onOpenChange:e=>{W(e)},overlay:U||q?t.createElement(y,{prefixCls:z,title:U,content:q}):null,transitionName:(0,r.getTransitionName)(D,"zoom-big",k.transitionName),"data-popover-inject":!0}),(0,l.cloneElement)(A,{onKeyDown:e=>{var o,n;(0,t.isValidElement)(A)&&(null==(n=null==A?void 0:(o=A.props).onKeyDown)||n.call(o,e)),e.keyCode===a.default.ESC&&W(!1,e)}})))});O._InternalPanelDoNotUseOrYouWillBeFired=x,e.s(["default",0,O],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),o=e.i(562901),n=e.i(343794),a=e.i(914949),i=e.i(529681),r=e.i(242064),l=e.i(829672),s=e.i(285781),c=e.i(836938),d=e.i(920228),u=e.i(62405),p=e.i(408850),m=e.i(87414),g=e.i(310730);let f=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:o,antCls:n,zIndexPopup:a,colorText:i,colorWarning:r,marginXXS:l,marginXS:s,fontSize:c,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:a,[`&${n}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:s,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${o}`]:{color:r,fontSize:c,lineHeight:1,marginInlineEnd:s},[`${t}-title`]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:l,color:i}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:s}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var h=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};let v=e=>{let{prefixCls:n,okButtonProps:a,cancelButtonProps:i,title:l,description:g,cancelText:f,okText:h,okType:v="primary",icon:b=t.createElement(o.default,null),showCancel:_=!0,close:y,onConfirm:A,onCancel:x,onPopupClick:S}=e,{getPrefixCls:O}=t.useContext(r.ConfigContext),[I]=(0,p.useLocale)("Popconfirm",m.default.Popconfirm),C=(0,c.getRenderPropValue)(l),w=(0,c.getRenderPropValue)(g);return t.createElement("div",{className:`${n}-inner-content`,onClick:S},t.createElement("div",{className:`${n}-message`},b&&t.createElement("span",{className:`${n}-message-icon`},b),t.createElement("div",{className:`${n}-message-text`},C&&t.createElement("div",{className:`${n}-title`},C),w&&t.createElement("div",{className:`${n}-description`},w))),t.createElement("div",{className:`${n}-buttons`},_&&t.createElement(d.default,Object.assign({onClick:x,size:"small"},i),f||(null==I?void 0:I.cancelText)),t.createElement(s.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,u.convertLegacyProps)(v)),a),actionFn:A,close:y,prefixCls:O("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},h||(null==I?void 0:I.okText))))};var b=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]]);return o};let _=t.forwardRef((e,s)=>{var c,d;let{prefixCls:u,placement:p="top",trigger:m="click",okType:g="primary",icon:h=t.createElement(o.default,null),children:_,overlayClassName:y,onOpenChange:A,onVisibleChange:x,overlayStyle:S,styles:O,classNames:I}=e,C=b(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:w,className:E,style:k,classNames:$,styles:T}=(0,r.useComponentConfig)("popconfirm"),[j,R]=(0,a.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(d=e.defaultOpen)?d:e.defaultVisible}),M=(e,t)=>{R(e,!0),null==x||x(e),null==A||A(e,t)},z=w("popconfirm",u),N=(0,n.default)(z,E,y,$.root,null==I?void 0:I.root),L=(0,n.default)($.body,null==I?void 0:I.body),[P]=f(z);return P(t.createElement(l.default,Object.assign({},(0,i.default)(C,["title"]),{trigger:m,placement:p,onOpenChange:(t,o)=>{let{disabled:n=!1}=e;n||M(t,o)},open:j,ref:s,classNames:{root:N,body:L},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},T.root),k),S),null==O?void 0:O.root),body:Object.assign(Object.assign({},T.body),null==O?void 0:O.body)},content:t.createElement(v,Object.assign({okType:g,icon:h},e,{prefixCls:z,close:e=>{M(!1,e)},onConfirm:t=>{var o;return null==(o=e.onConfirm)?void 0:o.call(void 0,t)},onCancel:t=>{var o;M(!1,t),null==(o=e.onCancel)||o.call(void 0,t)}})),"data-popover-inject":!0}),_))});_._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:o,placement:a,className:i,style:l}=e,s=h(e,["prefixCls","placement","className","style"]),{getPrefixCls:c}=t.useContext(r.ConfigContext),d=c("popconfirm",o),[u]=f(d);return u(t.createElement(g.default,{placement:a,className:(0,n.default)(d,i),style:l,content:t.createElement(v,Object.assign({prefixCls:d},s))}))},e.s(["Popconfirm",0,_],883552)},438957,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z"}}]},name:"key",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["KeyOutlined",0,i],438957)},366308,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["ToolOutlined",0,i],366308)},313603,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["SettingOutlined",0,i],313603)},477189,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["AppstoreOutlined",0,i],477189)},966988,e=>{"use strict";var t=e.i(843476),o=e.i(271645),n=e.i(464571),a=e.i(918789),i=e.i(650056),r=e.i(219470),l=e.i(755151),s=e.i(240647),c=e.i(812618);e.s(["default",0,({reasoningContent:e})=>{let[d,u]=(0,o.useState)(!0);return e?(0,t.jsxs)("div",{className:"reasoning-content mt-1 mb-2",children:[(0,t.jsxs)(n.Button,{type:"text",className:"flex items-center text-xs text-gray-500 hover:text-gray-700",onClick:()=>u(!d),icon:(0,t.jsx)(c.BulbOutlined,{}),children:[d?"Hide reasoning":"Show reasoning",d?(0,t.jsx)(l.DownOutlined,{className:"ml-1"}):(0,t.jsx)(s.RightOutlined,{className:"ml-1"})]}),d&&(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-700",children:(0,t.jsx)(a.default,{components:{code({node:e,inline:o,className:n,children:a,...l}){let s=/language-(\w+)/.exec(n||"");return!o&&s?(0,t.jsx)(i.Prism,{style:r.coy,language:s[1],PreTag:"div",className:"rounded-md my-2",...l,children:String(a).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${n} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,...l,children:a})}},children:e})})]}):null}])},355343,e=>{"use strict";var t=e.i(843476),o=e.i(437902),n=e.i(898586),a=e.i(362024);let{Text:i}=n.Typography,{Panel:r}=a.Collapse;e.s(["default",0,({events:e,className:n})=>{if(console.log("MCPEventsDisplay: Received events:",e),!e||0===e.length)return console.log("MCPEventsDisplay: No events, returning null"),null;let i=e.find(e=>"response.output_item.done"===e.type&&e.item?.type==="mcp_list_tools"&&e.item.tools&&e.item.tools.length>0),l=e.filter(e=>"response.output_item.done"===e.type&&e.item?.type==="mcp_call");return(console.log("MCPEventsDisplay: toolsEvent:",i),console.log("MCPEventsDisplay: mcpCallEvents:",l),i||0!==l.length)?(0,t.jsxs)("div",{className:`jsx-32b14b04f420f3ac mcp-events-display ${n||""}`,children:[(0,t.jsx)(o.default,{id:"32b14b04f420f3ac",children:".openai-mcp-tools.jsx-32b14b04f420f3ac{margin:0;padding:0;position:relative}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse.jsx-32b14b04f420f3ac,.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-item.jsx-32b14b04f420f3ac{background:0 0!important;border:none!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-header.jsx-32b14b04f420f3ac{color:#9ca3af!important;background:0 0!important;border:none!important;min-height:20px!important;padding:0 0 0 20px!important;font-size:14px!important;font-weight:400!important;line-height:20px!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-header.jsx-32b14b04f420f3ac:hover{color:#6b7280!important;background:0 0!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-content.jsx-32b14b04f420f3ac{background:0 0!important;border:none!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-content-box.jsx-32b14b04f420f3ac{padding:4px 0 0 20px!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-expand-icon.jsx-32b14b04f420f3ac{color:#9ca3af!important;justify-content:center!important;align-items:center!important;width:16px!important;height:16px!important;font-size:10px!important;display:flex!important;position:absolute!important;top:2px!important;left:2px!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-expand-icon.jsx-32b14b04f420f3ac:hover{color:#6b7280!important}.openai-vertical-line.jsx-32b14b04f420f3ac{opacity:.8;background-color:#f3f4f6;width:.5px;position:absolute;top:18px;bottom:0;left:9px}.tool-item.jsx-32b14b04f420f3ac{color:#4b5563;z-index:1;background:#fff;margin:0;padding:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:13px;line-height:18px;position:relative}.mcp-section.jsx-32b14b04f420f3ac{z-index:1;background:#fff;margin-bottom:12px;position:relative}.mcp-section.jsx-32b14b04f420f3ac:last-child{margin-bottom:0}.mcp-section-header.jsx-32b14b04f420f3ac{color:#6b7280;margin-bottom:4px;font-size:13px;font-weight:500}.mcp-code-block.jsx-32b14b04f420f3ac{background:#f9fafb;border:1px solid #f3f4f6;border-radius:6px;padding:8px;font-size:12px}.mcp-json.jsx-32b14b04f420f3ac{color:#374151;white-space:pre-wrap;word-wrap:break-word;margin:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Monaco,Consolas,Liberation Mono,Courier New,monospace}.mcp-approved.jsx-32b14b04f420f3ac{color:#6b7280;align-items:center;font-size:13px;display:flex}.mcp-checkmark.jsx-32b14b04f420f3ac{color:#10b981;margin-right:6px;font-weight:700}.mcp-response-content.jsx-32b14b04f420f3ac{color:#374151;white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,SF Mono,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:13px;line-height:1.5}"}),(0,t.jsxs)("div",{className:"jsx-32b14b04f420f3ac openai-mcp-tools",children:[(0,t.jsx)("div",{className:"jsx-32b14b04f420f3ac openai-vertical-line"}),(0,t.jsxs)(a.Collapse,{ghost:!0,size:"small",expandIconPosition:"start",defaultActiveKey:i?["list-tools"]:l.map((e,t)=>`mcp-call-${t}`),children:[i&&(0,t.jsx)(r,{header:"List tools",children:(0,t.jsx)("div",{className:"jsx-32b14b04f420f3ac",children:i.item?.tools?.map((e,o)=>(0,t.jsx)("div",{className:"jsx-32b14b04f420f3ac tool-item",children:e.name},o))})},"list-tools"),l.map((e,o)=>(0,t.jsx)(r,{header:e.item?.name||"Tool call",children:(0,t.jsxs)("div",{className:"jsx-32b14b04f420f3ac",children:[(0,t.jsxs)("div",{className:"jsx-32b14b04f420f3ac mcp-section",children:[(0,t.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-section-header",children:"Request"}),(0,t.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-code-block",children:e.item?.arguments&&(0,t.jsx)("pre",{className:"jsx-32b14b04f420f3ac mcp-json",children:(()=>{try{return JSON.stringify(JSON.parse(e.item.arguments),null,2)}catch(t){return e.item.arguments}})()})})]}),(0,t.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-section",children:(0,t.jsxs)("div",{className:"jsx-32b14b04f420f3ac mcp-approved",children:[(0,t.jsx)("span",{className:"jsx-32b14b04f420f3ac mcp-checkmark",children:"✓"})," Approved"]})}),e.item?.output&&(0,t.jsxs)("div",{className:"jsx-32b14b04f420f3ac mcp-section",children:[(0,t.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-section-header",children:"Response"}),(0,t.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-response-content",children:e.item.output})]})]})},`mcp-call-${o}`))]})]})]}):(console.log("MCPEventsDisplay: No valid events found, returning null"),null)}])},254530,452598,e=>{"use strict";e.i(247167);var t=e.i(356449),o=e.i(764205);async function n(e,n,a,i,r,l,s,c,d,u,p,m,g,f,h,v,b,_,y,A,x,S,O,I,C){console.log=function(){},console.log("isLocal:",!1);let w=A||(0,o.getProxyBaseUrl)(),E={};r&&r.length>0&&(E["x-litellm-tags"]=r.join(","));let k=new t.default.OpenAI({apiKey:i,baseURL:w,dangerouslyAllowBrowser:!0,defaultHeaders:E});try{let t,o=Date.now(),i=!1,r={},A=!1,w=[];for await(let y of(f&&f.length>0&&(f.includes("__all__")?w.push({type:"mcp",server_label:"litellm",server_url:"litellm_proxy/mcp",require_approval:"never"}):f.forEach(e=>{if(e.startsWith("toolset:")){let t=e.slice(8),o=C?.find(e=>e.toolset_id===t),n=o?.toolset_name||t;w.push({type:"mcp",server_label:n,server_url:`litellm_proxy/mcp/${encodeURIComponent(n)}`,require_approval:"never"})}else{let t=x?.find(t=>t.server_id===e),o=t?.alias||t?.server_name||e,n=S?.[e]||[];w.push({type:"mcp",server_label:"litellm",server_url:`litellm_proxy/mcp/${o}`,require_approval:"never",...n.length>0?{allowed_tools:n}:{}})}})),await k.chat.completions.create({model:a,stream:!0,stream_options:{include_usage:!0},litellm_trace_id:u,messages:e,...p?{vector_store_ids:p}:{},...m?{guardrails:m}:{},...g?{policies:g}:{},...w.length>0?{tools:w,tool_choice:"auto"}:{},...void 0!==b?{temperature:b}:{},...void 0!==_?{max_tokens:_}:{},...I?{mock_testing_fallbacks:!0}:{}},{signal:l}))){console.log("Stream chunk:",y);let e=y.choices[0]?.delta;if(console.log("Delta content:",y.choices[0]?.delta?.content),console.log("Delta reasoning content:",e?.reasoning_content),!i&&(y.choices[0]?.delta?.content||e&&e.reasoning_content)&&(i=!0,t=Date.now()-o,console.log("First token received! Time:",t,"ms"),c?(console.log("Calling onTimingData with:",t),c(t)):console.log("onTimingData callback is not defined!")),y.choices[0]?.delta?.content){let e=y.choices[0].delta.content;n(e,y.model)}if(e&&e.image&&h&&(console.log("Image generated:",e.image),h(e.image.url,y.model)),e&&e.reasoning_content){let t=e.reasoning_content;s&&s(t)}if(e&&e.provider_specific_fields?.search_results&&v&&(console.log("Search results found:",e.provider_specific_fields.search_results),v(e.provider_specific_fields.search_results)),e&&e.provider_specific_fields){let t=e.provider_specific_fields;if(t.mcp_list_tools&&!r.mcp_list_tools&&(r.mcp_list_tools=t.mcp_list_tools,O&&!A)){A=!0;let e={type:"response.output_item.done",item_id:"mcp_list_tools",item:{type:"mcp_list_tools",tools:t.mcp_list_tools.map(e=>({name:e.function?.name||e.name||"",description:e.function?.description||e.description||"",input_schema:e.function?.parameters||e.input_schema||{}}))},timestamp:Date.now()};O(e),console.log("MCP list_tools event sent:",e)}t.mcp_tool_calls&&(r.mcp_tool_calls=t.mcp_tool_calls),t.mcp_call_results&&(r.mcp_call_results=t.mcp_call_results),(t.mcp_list_tools||t.mcp_tool_calls||t.mcp_call_results)&&console.log("MCP metadata found in chunk:",{mcp_list_tools:t.mcp_list_tools?"present":"absent",mcp_tool_calls:t.mcp_tool_calls?"present":"absent",mcp_call_results:t.mcp_call_results?"present":"absent"})}if(y.usage&&d){console.log("Usage data found:",y.usage);let e={completionTokens:y.usage.completion_tokens,promptTokens:y.usage.prompt_tokens,totalTokens:y.usage.total_tokens};y.usage.completion_tokens_details?.reasoning_tokens&&(e.reasoningTokens=y.usage.completion_tokens_details.reasoning_tokens),void 0!==y.usage.cost&&null!==y.usage.cost&&(e.cost=parseFloat(y.usage.cost)),d(e)}}O&&(r.mcp_tool_calls||r.mcp_call_results)&&r.mcp_tool_calls&&r.mcp_tool_calls.length>0&&r.mcp_tool_calls.forEach((e,t)=>{let o=e.function?.name||e.name||"",n=e.function?.arguments||e.arguments||"{}",a=r.mcp_call_results?.find(t=>t.tool_call_id===e.id||t.tool_call_id===e.call_id)||r.mcp_call_results?.[t],i={type:"response.output_item.done",item:{type:"mcp_call",name:o,arguments:"string"==typeof n?n:JSON.stringify(n),output:a?.result?"string"==typeof a.result?a.result:JSON.stringify(a.result):void 0},item_id:e.id||e.call_id,timestamp:Date.now()};O(i),console.log("MCP call event sent:",i)});let E=Date.now();y&&y(E-o)}catch(e){throw l?.aborted&&console.log("Chat completion request was cancelled"),e}}e.s(["makeOpenAIChatCompletionRequest",()=>n],254530);var a=e.i(727749);async function i(e,n,r,l,s=[],c,d,u,p,m,g,f,h,v,b,_,y,A,x,S,O,I,C){if(!l)throw Error("Virtual Key is required");if(!r||""===r.trim())throw Error("Model is required. Please select a model before sending a request.");console.log=function(){};let w=S||(0,o.getProxyBaseUrl)(),E={};s&&s.length>0&&(E["x-litellm-tags"]=s.join(","));let k=new t.default.OpenAI({apiKey:l,baseURL:w,dangerouslyAllowBrowser:!0,defaultHeaders:E});try{let t=Date.now(),o=!1,a=e.map(e=>(Array.isArray(e.content),{role:e.role,content:e.content,type:"message"})),i=[];v&&v.length>0&&(v.includes("__all__")?i.push({type:"mcp",server_label:"litellm",server_url:`${w}/mcp`,require_approval:"never"}):v.forEach(e=>{if(e.startsWith("toolset:")){let t=e.slice(8),o=C?.find(e=>e.toolset_id===t),n=o?.toolset_name||t;i.push({type:"mcp",server_label:n,server_url:`${w}/mcp/${encodeURIComponent(n)}`,require_approval:"never"})}else{let t=O?.find(t=>t.server_id===e),o=t?.server_name||e,n=I?.[e]||[];i.push({type:"mcp",server_label:o,server_url:`${w}/mcp/${encodeURIComponent(o)}`,require_approval:"never",...n.length>0?{allowed_tools:n}:{}})}})),A&&i.push({type:"code_interpreter",container:{type:"auto"}});let l=await k.responses.create({model:r,input:a,stream:!0,litellm_trace_id:m,...b?{previous_response_id:b}:{},...g?{vector_store_ids:g}:{},...f?{guardrails:f}:{},...h?{policies:h}:{},...i.length>0?{tools:i,tool_choice:"auto"}:{}},{signal:c}),s="",S={code:"",containerId:""};for await(let e of l)if(console.log("Response event:",e),"object"==typeof e&&null!==e){if((e.type?.startsWith("response.mcp_")||"response.output_item.done"===e.type&&(e.item?.type==="mcp_list_tools"||e.item?.type==="mcp_call"))&&(console.log("MCP event received:",e),y)){let t={type:e.type,sequence_number:e.sequence_number,output_index:e.output_index,item_id:e.item_id||e.item?.id,item:e.item,delta:e.delta,arguments:e.arguments,timestamp:Date.now()};y(t)}"response.output_item.done"===e.type&&e.item?.type==="mcp_call"&&e.item?.name&&(s=e.item.name,console.log("MCP tool used:",s)),$=S;var $,T=S="response.output_item.done"===e.type&&e.item?.type==="code_interpreter_call"?(console.log("Code interpreter call completed:",e.item),{code:e.item.code||"",containerId:e.item.container_id||""}):$;if("response.output_item.done"===e.type&&e.item?.type==="message"&&e.item?.content&&x){for(let t of e.item.content)if("output_text"===t.type&&t.annotations){let e=t.annotations.filter(e=>"container_file_citation"===e.type);(e.length>0||T.code)&&x({code:T.code,containerId:T.containerId,annotations:e})}}if("response.role.delta"===e.type)continue;if("response.output_text.delta"===e.type&&"string"==typeof e.delta){let a=e.delta;if(console.log("Text delta",a),a.length>0&&(n("assistant",a,r),!o)){o=!0;let e=Date.now()-t;console.log("First token received! Time:",e,"ms"),u&&u(e)}}if("response.reasoning.delta"===e.type&&"delta"in e){let t=e.delta;"string"==typeof t&&d&&d(t)}if("response.completed"===e.type&&"response"in e){let t=e.response,o=t.usage;if(console.log("Usage data:",o),console.log("Response completed event:",t),t.id&&_&&(console.log("Response ID for session management:",t.id),_(t.id)),o&&p){console.log("Usage data:",o);let e={completionTokens:o.output_tokens,promptTokens:o.input_tokens,totalTokens:o.total_tokens};o.completion_tokens_details?.reasoning_tokens&&(e.reasoningTokens=o.completion_tokens_details.reasoning_tokens),p(e,s)}}}return l}catch(e){throw c?.aborted?console.log("Responses API request was cancelled"):a.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`),e}}e.s(["makeOpenAIResponsesRequest",()=>i],452598)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},755151,e=>{"use strict";var t=e.i(247153);e.s(["DownOutlined",()=>t.default])},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["CheckCircleOutlined",0,i],245704)},434166,e=>{"use strict";function t(e,t){window.sessionStorage.setItem(e,btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))))}function o(e){try{let t=window.sessionStorage.getItem(e);if(null===t)return null;return decodeURIComponent(atob(t).split("").map(e=>"%"+e.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return null}}e.s(["getSecureItem",()=>o,"setSecureItem",()=>t])},596239,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["LinkOutlined",0,i],596239)},219470,812618,e=>{"use strict";e.s(["coy",0,{'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",maxHeight:"inherit",height:"inherit",padding:"0 1em",display:"block",overflow:"auto"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",margin:".5em 0",overflow:"visible",padding:"1px",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em"},'pre[class*="language-"] > code':{position:"relative",zIndex:"1",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em",position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal"},'pre[class*="language-"]:before':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"0.18em",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(-2deg)",MozTransform:"rotate(-2deg)",msTransform:"rotate(-2deg)",OTransform:"rotate(-2deg)",transform:"rotate(-2deg)"},'pre[class*="language-"]:after':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"auto",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(2deg)",MozTransform:"rotate(2deg)",msTransform:"rotate(2deg)",OTransform:"rotate(2deg)",transform:"rotate(2deg)",right:"0.75em"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"},'pre[class*="language-"].line-numbers.line-numbers':{paddingLeft:"0"},'pre[class*="language-"].line-numbers.line-numbers code':{paddingLeft:"3.8em"},'pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows':{left:"0"},'pre[class*="language-"][data-line]':{paddingTop:"0",paddingBottom:"0",paddingLeft:"0"},"pre[data-line] code":{position:"relative",paddingLeft:"4em"},"pre .line-highlight":{marginTop:"0"}}],219470),e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z"}}]},name:"bulb",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["BulbOutlined",0,i],812618)},516015,(e,t,o)=>{},898547,(e,t,o)=>{var n=e.i(247167);e.r(516015);var a=e.r(271645),i=a&&"object"==typeof a&&"default"in a?a:{default:a},r=void 0!==n.default&&n.default.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},s=function(){function e(e){var t=void 0===e?{}:e,o=t.name,n=void 0===o?"stylesheet":o,a=t.optimizeForSpeed,i=void 0===a?r:a;c(l(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var s="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=s?s.getAttribute("content"):null}var t,o=e.prototype;return o.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()},o.isOptimizeForSpeed=function(){return this._optimizeForSpeed},o.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(r||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,o){return"number"==typeof o?e._serverSheet.cssRules[o]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),o},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},o.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;ttypeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!o.cssRules[e])return e;o.deleteRule(e);try{o.insertRule(t,e)}catch(n){r||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),o.insertRule(this._deletedRulePlaceholder,e)}}else{var n=this._tags[e];c(n,"old rule at index `"+e+"` not found"),n.textContent=t}return e},o.deleteRule=function(e){if("u"typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},o.cssRules=function(){var e=this;return"u">>0},u={};function p(e,t){if(!t)return"jsx-"+e;var o=String(t),n=e+o;return u[n]||(u[n]="jsx-"+d(e+"-"+o)),u[n]}function m(e,t){"u"typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var o=this.getIdAndRules(e),n=o.styleId,a=o.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var i=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=i,this._instancesCounts[n]=1},t.remove=function(e){var t=this,o=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(o in this._instancesCounts,"styleId: `"+o+"` not found"),this._instancesCounts[o]-=1,this._instancesCounts[o]<1){var n=this._fromServer&&this._fromServer[o];n?(n.parentNode.removeChild(n),delete this._fromServer[o]):(this._indices[o].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[o]),delete this._instancesCounts[o]}},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]]}):[],o=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return o[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,o;return t=this.cssRules(),void 0===(o=e)&&(o={}),t.map(function(e){var t=e[0],n=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:o.nonce?o.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,o=e.dynamic,n=e.id;if(o){var a=p(n,o);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return m(a,e)}):[m(a,t)]}}return{styleId:p(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}(),f=a.createContext(null);function h(){return new g}function v(){return a.useContext(f)}f.displayName="StyleSheetContext";var b=i.default.useInsertionEffect||i.default.useLayoutEffect,_="u">typeof window?h():void 0;function y(e){var t=_||v();return t&&("u"{t.exports=e.r(898547).style},292335,122520,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",AWS_SIGV4:"aws_sigv4"},o={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};function n(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["AUTH_TYPE",0,t,"OAUTH_FLOW",0,{INTERACTIVE:"interactive",M2M:"m2m"},"TRANSPORT",0,o,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?o.SSE:t&&e!==o.STDIO?o.OPENAPI:e],292335),e.s(["extractErrorMessage",()=>n],122520)},264843,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"};var a=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["MessageOutlined",0,i],264843)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/30539b80ac15aad2.js b/litellm/proxy/_experimental/out/_next/static/chunks/0549bc9afa7d4888.js similarity index 60% rename from litellm/proxy/_experimental/out/_next/static/chunks/30539b80ac15aad2.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0549bc9afa7d4888.js index 7e2745e32f..feba90545f 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/30539b80ac15aad2.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0549bc9afa7d4888.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,735049,e=>{"use strict";var t=e.i(654310),n=function(e){if((0,t.default)()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],l=window.document.documentElement;return n.some(function(e){return e in l.style})}return!1},l=function(e,t){if(!n(e))return!1;var l=document.createElement("div"),r=l.style[e];return l.style[e]=t,l.style[e]!==r};function r(e,t){return Array.isArray(e)||void 0===t?n(e):l(e,t)}e.s(["isStyleSupport",()=>r])},190144,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let l={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"};var r=e.i(9583),o=n.forwardRef(function(e,o){return n.createElement(r.default,(0,t.default)({},e,{ref:o,icon:l}))});e.s(["default",0,o],190144)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},486794,(e,t,n)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],l=0;l{"use strict";var l=e.r(486794),r={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(e,t){var n,o,a,i,c,s,u,d,p=!1;t||(t={}),a=t.debug||!1;try{if(c=l(),s=document.createRange(),u=document.getSelection(),(d=document.createElement("span")).textContent=e,d.ariaHidden="true",d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),void 0===n.clipboardData){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var l=r[t.format]||r.default;window.clipboardData.setData(l,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),s.selectNodeContents(d),u.addRange(s),!document.execCommand("copy"))throw Error("copy command was unsuccessful");p=!0}catch(l){a&&console.error("unable to copy using execCommand: ",l),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),p=!0}catch(l){a&&console.error("unable to copy using clipboardData: ",l),a&&console.error("falling back to prompt"),n="message"in t?t.message:"Copy to clipboard: #{key}, Enter",o=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C",i=n.replace(/#{\s*key\s*}/g,o),window.prompt(i,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return p}},898586,401361,335771,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(8211),l=e.i(931067);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var o=e.i(9583),a=t.forwardRef(function(e,n){return t.createElement(o.default,(0,l.default)({},e,{ref:n,icon:r}))});e.s(["default",0,a],401361);var i=e.i(343794),c=e.i(430073),s=e.i(876556),u=e.i(174428),d=e.i(914949),p=e.i(529681),f=e.i(611935),m=e.i(735049),g=e.i(242064),b=e.i(929447),y=e.i(491816);let v={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};var h=t.forwardRef(function(e,n){return t.createElement(o.default,(0,l.default)({},e,{ref:n,icon:v}))}),x=e.i(404948),O=e.i(763731),E=e.i(635432),w=e.i(183293),S=e.i(246422);e.i(765846);var j=e.i(896091);let C=(0,S.genStyleHooks)("Typography",e=>{let t,{componentCls:n,titleMarginTop:l}=e;return{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${n}-secondary`]:{color:e.colorTextDescription},[`&${n}-success`]:{color:e.colorSuccessText},[`&${n}-warning`]:{color:e.colorWarningText},[`&${n}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${n}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},[` +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},486794,(e,t,n)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],l=0;l{"use strict";var l=e.r(486794),r={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(e,t){var n,o,a,i,c,s,u,d,p=!1;t||(t={}),a=t.debug||!1;try{if(c=l(),s=document.createRange(),u=document.getSelection(),(d=document.createElement("span")).textContent=e,d.ariaHidden="true",d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),void 0===n.clipboardData){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var l=r[t.format]||r.default;window.clipboardData.setData(l,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),s.selectNodeContents(d),u.addRange(s),!document.execCommand("copy"))throw Error("copy command was unsuccessful");p=!0}catch(l){a&&console.error("unable to copy using execCommand: ",l),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),p=!0}catch(l){a&&console.error("unable to copy using clipboardData: ",l),a&&console.error("falling back to prompt"),n="message"in t?t.message:"Copy to clipboard: #{key}, Enter",o=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C",i=n.replace(/#{\s*key\s*}/g,o),window.prompt(i,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return p}},898586,401361,335771,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(8211),l=e.i(931067);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var o=e.i(9583),a=t.forwardRef(function(e,n){return t.createElement(o.default,(0,l.default)({},e,{ref:n,icon:r}))});e.s(["default",0,a],401361);var i=e.i(343794),c=e.i(430073),s=e.i(876556),u=e.i(174428),d=e.i(914949),p=e.i(529681),f=e.i(611935),m=e.i(735049),g=e.i(242064),b=e.i(929447),y=e.i(491816);let v={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};var h=t.forwardRef(function(e,n){return t.createElement(o.default,(0,l.default)({},e,{ref:n,icon:v}))}),x=e.i(404948),O=e.i(763731),E=e.i(635432),S=e.i(183293),w=e.i(246422);e.i(765846);var j=e.i(896091);let C=(0,w.genStyleHooks)("Typography",e=>{let t,{componentCls:n,titleMarginTop:l}=e;return{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${n}-secondary`]:{color:e.colorTextDescription},[`&${n}-success`]:{color:e.colorSuccessText},[`&${n}-warning`]:{color:e.colorWarningText},[`&${n}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${n}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},[` div&, p `]:{marginBottom:"1em"}},(t={},[1,2,3,4,5].forEach(n=>{t[` @@ -27,15 +27,15 @@ + h3, + h4, + h5 - `]:{marginTop:l}}}),{code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:j.gold[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),(e=>{let{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},(0,w.operationUnit)(e)),{userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}})(e)),{[` + `]:{marginTop:l}}}),{code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:j.gold[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),(e=>{let{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},(0,S.operationUnit)(e)),{userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}})(e)),{[` ${n}-expand, ${n}-collapse, ${n}-edit, ${n}-copy - `]:Object.assign(Object.assign({},(0,w.operationUnit)(e)),{marginInlineStart:e.marginXXS})}),(e=>{let{componentCls:t,paddingSM:n}=e;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(n).div(-2).add(1).equal(),marginBottom:e.calc(n).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}})(e)),{[`${e.componentCls}-copy-success`]:{[` + `]:Object.assign(Object.assign({},(0,S.operationUnit)(e)),{marginInlineStart:e.marginXXS})}),(e=>{let{componentCls:t,paddingSM:n}=e;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(n).div(-2).add(1).equal(),marginBottom:e.calc(n).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}})(e)),{[`${e.componentCls}-copy-success`]:{[` &, &:hover, &:focus`]:{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),{[` a&-ellipsis, span&-ellipsis - `]:{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),{"&-rtl":{direction:"rtl"}})}},()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"})),k=e=>{let{prefixCls:n,"aria-label":l,className:r,style:o,direction:a,maxLength:c,autoSize:s=!0,value:u,onSave:d,onCancel:p,onEnd:f,component:m,enterIcon:g=t.createElement(h,null)}=e,b=t.useRef(null),y=t.useRef(!1),v=t.useRef(null),[w,S]=t.useState(u);t.useEffect(()=>{S(u)},[u]),t.useEffect(()=>{var e;if(null==(e=b.current)?void 0:e.resizableTextArea){let{textArea:e}=b.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let j=()=>{d(w.trim())},[k,R,$]=C(n),T=(0,i.default)(n,`${n}-edit-content`,{[`${n}-rtl`]:"rtl"===a,[`${n}-${m}`]:!!m},r,R,$);return k(t.createElement("div",{className:T,style:o},t.createElement(E.default,{ref:b,maxLength:c,value:w,onChange:({target:e})=>{S(e.value.replace(/[\n\r]/g,""))},onKeyDown:({keyCode:e})=>{y.current||(v.current=e)},onKeyUp:({keyCode:e,ctrlKey:t,altKey:n,metaKey:l,shiftKey:r})=>{v.current!==e||y.current||t||n||l||r||(e===x.default.ENTER?(j(),null==f||f()):e===x.default.ESC&&p())},onCompositionStart:()=>{y.current=!0},onCompositionEnd:()=>{y.current=!1},onBlur:()=>{j()},"aria-label":l,rows:1,autoSize:s}),null!==g?(0,O.cloneElement)(g,{className:`${n}-edit-content-confirm`}):null))};var R=e.i(844343),$=e.i(175066);function T(e,n){return t.useMemo(()=>{let t=!!e;return[t,Object.assign(Object.assign({},n),t&&"object"==typeof e?e:null)]},[e])}var I=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let D=t.forwardRef((e,n)=>{let{prefixCls:l,component:r="article",className:o,rootClassName:a,setContentRef:c,children:s,direction:u,style:d}=e,p=I(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:m,direction:b,className:y,style:v}=(0,g.useComponentConfig)("typography"),h=c?(0,f.composeRef)(n,c):n,x=m("typography",l),[O,E,w]=C(x),S=(0,i.default)(x,y,{[`${x}-rtl`]:"rtl"===(null!=u?u:b)},o,a,E,w),j=Object.assign(Object.assign({},v),d);return O(t.createElement(r,Object.assign({className:S,style:j,ref:h},p),s))});var P=e.i(121229),B=e.i(190144),H=e.i(739295);function M(e){return!1===e?[!1,!1]:Array.isArray(e)?e:[e]}function z(e,t,n){return!0===e||void 0===e?t:e||n&&t}let A=e=>["string","number"].includes(typeof e),L=({prefixCls:e,copied:n,locale:l,iconOnly:r,tooltips:o,icon:a,tabIndex:c,onCopy:s,loading:u})=>{let d=M(o),p=M(a),{copied:f,copy:m}=null!=l?l:{},g=n?f:m,b=z(d[+!!n],g),v="string"==typeof b?b:g;return t.createElement(y.default,{title:b},t.createElement("button",{type:"button",className:(0,i.default)(`${e}-copy`,{[`${e}-copy-success`]:n,[`${e}-copy-icon-only`]:r}),onClick:s,"aria-label":v,tabIndex:c},n?z(p[1],t.createElement(P.default,null),!0):z(p[0],u?t.createElement(H.default,null):t.createElement(B.default,null),!0)))},W=t.forwardRef(({style:e,children:n},l)=>{let r=t.useRef(null);return t.useImperativeHandle(l,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),t.createElement("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},n)});function N(e,t){let n=0,l=[];for(let r=0;rt){let e=t-n;return l.push(String(o).slice(0,e)),l}l.push(o),n=a}return e}let U={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function F(e){let{enableMeasure:l,width:r,text:o,children:a,rows:i,expanded:c,miscDeps:d,onEllipsis:p}=e,f=t.useMemo(()=>(0,s.default)(o),[o]),m=t.useMemo(()=>f.reduce((e,t)=>e+(A(t)?String(t).length:1),0),[o]),g=t.useMemo(()=>a(f,!1),[o]),[b,y]=t.useState(null),v=t.useRef(null),h=t.useRef(null),x=t.useRef(null),O=t.useRef(null),E=t.useRef(null),[w,S]=t.useState(!1),[j,C]=t.useState(0),[k,R]=t.useState(0),[$,T]=t.useState(null);(0,u.default)(()=>{l&&r&&m?C(1):C(0)},[r,o,i,l,f]),(0,u.default)(()=>{var e,t,n,l;if(1===j)C(2),T(h.current&&getComputedStyle(h.current).whiteSpace);else if(2===j){let r=!!(null==(e=x.current)?void 0:e.isExceed());C(r?3:4),y(r?[0,m]:null),S(r),R(Math.max((null==(t=x.current)?void 0:t.getHeight())||0,(1===i?0:(null==(n=O.current)?void 0:n.getHeight())||0)+((null==(l=E.current)?void 0:l.getHeight())||0))+1),p(r)}},[j]);let I=b?Math.ceil((b[0]+b[1])/2):0;(0,u.default)(()=>{var e;let[t,n]=b||[0,0];if(t!==n){let l=((null==(e=v.current)?void 0:e.getHeight())||0)>k,r=I;n-t==1&&(r=l?t:n),y(l?[t,r]:[r,n])}},[b,I]);let D=t.useMemo(()=>{if(!l)return a(f,!1);if(3!==j||!b||b[0]!==b[1]){let e=a(f,!1);return[4,0].includes(j)?e:t.createElement("span",{style:Object.assign(Object.assign({},U),{WebkitLineClamp:i})},e)}return a(c?f:N(f,b[0]),w)},[c,j,b,f].concat((0,n.default)(d))),P={width:r,margin:0,padding:0,whiteSpace:"nowrap"===$?"normal":"inherit"};return t.createElement(t.Fragment,null,D,2===j&&t.createElement(t.Fragment,null,t.createElement(W,{style:Object.assign(Object.assign(Object.assign({},P),U),{WebkitLineClamp:i}),ref:x},g),t.createElement(W,{style:Object.assign(Object.assign(Object.assign({},P),U),{WebkitLineClamp:i-1}),ref:O},g),t.createElement(W,{style:Object.assign(Object.assign(Object.assign({},P),U),{WebkitLineClamp:1}),ref:E},a([],!0))),3===j&&b&&b[0]!==b[1]&&t.createElement(W,{style:Object.assign(Object.assign({},P),{top:400}),ref:v},a(N(f,I),!0)),1===j&&t.createElement("span",{style:{whiteSpace:"inherit"},ref:h}))}let q=({enableEllipsis:e,isEllipsis:n,children:l,tooltipProps:r})=>(null==r?void 0:r.title)&&e?t.createElement(y.default,Object.assign({open:!!n&&void 0},r),l):l;var V=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let X=["delete","mark","code","underline","strong","keyboard","italic"],K=t.forwardRef((e,l)=>{var r;let o,v,h,{prefixCls:x,className:O,style:E,type:w,disabled:S,children:j,ellipsis:C,editable:I,copyable:P,component:B,title:H}=e,M=V(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:z,direction:W}=t.useContext(g.ConfigContext),[N]=(0,b.default)("Text"),U=t.useRef(null),K=t.useRef(null),_=z("typography",x),G=(0,p.default)(M,X),[J,Q]=T(I),[Y,Z]=(0,d.default)(!1,{value:Q.editing}),{triggerType:ee=["icon"]}=Q,et=e=>{var t;e&&(null==(t=Q.onStart)||t.call(Q)),Z(e)},en=(o=(0,t.useRef)(void 0),(0,t.useEffect)(()=>{o.current=Y}),o.current);(0,u.default)(()=>{var e;!Y&&en&&(null==(e=K.current)||e.focus())},[Y]);let el=e=>{null==e||e.preventDefault(),et(!0)},[er,eo]=T(P),{copied:ea,copyLoading:ei,onClick:ec}=(({copyConfig:e,children:n})=>{let[l,r]=t.useState(!1),[o,a]=t.useState(!1),i=t.useRef(null),c=()=>{i.current&&clearTimeout(i.current)},s={};e.format&&(s.format=e.format),t.useEffect(()=>c,[]);let u=(0,$.default)(t=>{var l,o,u,d;return l=void 0,o=void 0,u=void 0,d=function*(){var l;null==t||t.preventDefault(),null==t||t.stopPropagation(),a(!0);try{let o="function"==typeof e.text?yield e.text():e.text;(0,R.default)(o||((e,t=!1)=>t&&null==e?[]:Array.isArray(e)?e:[e])(n,!0).join("")||"",s),a(!1),r(!0),c(),i.current=setTimeout(()=>{r(!1)},3e3),null==(l=e.onCopy)||l.call(e,t)}catch(e){throw a(!1),e}},new(u||(u=Promise))(function(e,t){function n(e){try{a(d.next(e))}catch(e){t(e)}}function r(e){try{a(d.throw(e))}catch(e){t(e)}}function a(t){var l;t.done?e(t.value):((l=t.value)instanceof u?l:new u(function(e){e(l)})).then(n,r)}a((d=d.apply(l,o||[])).next())})});return{copied:l,copyLoading:o,onClick:u}})({copyConfig:eo,children:j}),[es,eu]=t.useState(!1),[ed,ep]=t.useState(!1),[ef,em]=t.useState(!1),[eg,eb]=t.useState(!1),[ey,ev]=t.useState(!0),[eh,ex]=T(C,{expandable:!1,symbol:e=>e?null==N?void 0:N.collapse:null==N?void 0:N.expand}),[eO,eE]=(0,d.default)(ex.defaultExpanded||!1,{value:ex.expanded}),ew=eh&&(!eO||"collapsible"===ex.expandable),{rows:eS=1}=ex,ej=t.useMemo(()=>ew&&(void 0!==ex.suffix||ex.onEllipsis||ex.expandable||J||er),[ew,ex,J,er]);(0,u.default)(()=>{eh&&!ej&&(eu((0,m.isStyleSupport)("webkitLineClamp")),ep((0,m.isStyleSupport)("textOverflow")))},[ej,eh]);let[eC,ek]=t.useState(ew),eR=t.useMemo(()=>!ej&&(1===eS?ed:es),[ej,ed,es]);(0,u.default)(()=>{ek(eR&&ew)},[eR,ew]);let e$=ew&&(eC?eg:ef),eT=ew&&1===eS&&eC,eI=ew&&eS>1&&eC,[eD,eP]=t.useState(0),eB=e=>{var t;em(e),ef!==e&&(null==(t=ex.onEllipsis)||t.call(ex,e))};t.useEffect(()=>{let e=U.current;if(eh&&eC&&e){let t,n,l,r=(t=document.createElement("em"),e.appendChild(t),n=e.getBoundingClientRect(),l=t.getBoundingClientRect(),e.removeChild(t),n.left>l.left||l.right>n.right||n.top>l.top||l.bottom>n.bottom);eg!==r&&eb(r)}},[eh,eC,j,eI,ey,eD]),t.useEffect(()=>{let e=U.current;if("u"{ev(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[eC,ew]);let eH=(v=ex.tooltip,h=Q.text,(0,t.useMemo)(()=>!0===v?{title:null!=h?h:j}:(0,t.isValidElement)(v)?{title:v}:"object"==typeof v?Object.assign({title:null!=h?h:j},v):{title:v},[v,h,j])),eM=t.useMemo(()=>{if(eh&&!eC)return[Q.text,j,H,eH.title].find(A)},[eh,eC,H,eH.title,e$]);return Y?t.createElement(k,{value:null!=(r=Q.text)?r:"string"==typeof j?j:"",onSave:e=>{var t;null==(t=Q.onChange)||t.call(Q,e),et(!1)},onCancel:()=>{var e;null==(e=Q.onCancel)||e.call(Q),et(!1)},onEnd:Q.onEnd,prefixCls:_,className:O,style:E,direction:W,component:B,maxLength:Q.maxLength,autoSize:Q.autoSize,enterIcon:Q.enterIcon}):t.createElement(c.default,{onResize:({offsetWidth:e})=>{eP(e)},disabled:!ew},r=>t.createElement(q,{tooltipProps:eH,enableEllipsis:ew,isEllipsis:e$},t.createElement(D,Object.assign({className:(0,i.default)({[`${_}-${w}`]:w,[`${_}-disabled`]:S,[`${_}-ellipsis`]:eh,[`${_}-ellipsis-single-line`]:eT,[`${_}-ellipsis-multiple-line`]:eI},O),prefixCls:x,style:Object.assign(Object.assign({},E),{WebkitLineClamp:eI?eS:void 0}),component:B,ref:(0,f.composeRef)(r,U,l),direction:W,onClick:ee.includes("text")?el:void 0,"aria-label":null==eM?void 0:eM.toString(),title:H},G),t.createElement(F,{enableMeasure:ew&&!eC,text:j,rows:eS,width:eD,onEllipsis:eB,expanded:eO,miscDeps:[ea,eO,ei,J,er,N].concat((0,n.default)(X.map(t=>e[t])))},(n,l)=>{let r;return function({mark:e,code:n,underline:l,delete:r,strong:o,keyboard:a,italic:i},c){let s=c;function u(e,n){n&&(s=t.createElement(e,{},s))}return u("strong",o),u("u",l),u("del",r),u("code",n),u("mark",e),u("kbd",a),u("i",i),s}(e,t.createElement(t.Fragment,null,n.length>0&&l&&!eO&&eM?t.createElement("span",{key:"show-content","aria-hidden":!0},n):n,[(r=l)&&!eO&&t.createElement("span",{"aria-hidden":!0,key:"ellipsis"},"..."),ex.suffix,[r&&(()=>{let{expandable:e,symbol:n}=ex;return e?t.createElement("button",{type:"button",key:"expand",className:`${_}-${eO?"collapse":"expand"}`,onClick:e=>{var t,n;eE((t={expanded:!eO}).expanded),null==(n=ex.onExpand)||n.call(ex,e,t)},"aria-label":eO?N.collapse:null==N?void 0:N.expand},"function"==typeof n?n(eO):n):null})(),(()=>{if(!J)return;let{icon:e,tooltip:n,tabIndex:l}=Q,r=(0,s.default)(n)[0]||(null==N?void 0:N.edit),o="string"==typeof r?r:"";return ee.includes("icon")?t.createElement(y.default,{key:"edit",title:!1===n?"":r},t.createElement("button",{type:"button",ref:K,className:`${_}-edit`,onClick:el,"aria-label":o,tabIndex:l},e||t.createElement(a,{role:"button"}))):null})(),er?t.createElement(L,Object.assign({key:"copy"},eo,{prefixCls:_,copied:ea,locale:N,onCopy:ec,loading:ei,iconOnly:null==j})):null]]))}))))});var _=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let G=t.forwardRef((e,n)=>{let{ellipsis:l,rel:r,children:o,navigate:a}=e,i=_(e,["ellipsis","rel","children","navigate"]),c=Object.assign(Object.assign({},i),{rel:void 0===r&&"_blank"===i.target?"noopener noreferrer":r});return t.createElement(K,Object.assign({},c,{ref:n,ellipsis:!!l,component:"a"}),o)});var J=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let Q=t.forwardRef((e,n)=>{let{children:l}=e,r=J(e,["children"]);return t.createElement(K,Object.assign({ref:n},r,{component:"div"}),l)});var Y=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let Z=t.forwardRef((e,n)=>{let{ellipsis:l,children:r}=e,o=Y(e,["ellipsis","children"]),a=t.useMemo(()=>l&&"object"==typeof l?(0,p.default)(l,["expandable","rows"]):l,[l]);return t.createElement(K,Object.assign({ref:n},o,{ellipsis:a,component:"span"}),r)});var ee=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let et=[1,2,3,4,5],en=t.forwardRef((e,n)=>{let{level:l=1,children:r}=e,o=ee(e,["level","children"]),a=et.includes(l)?`h${l}`:"h1";return t.createElement(K,Object.assign({ref:n},o,{component:a}),r)});e.s(["default",0,en],335771),D.Text=Z,D.Link=G,D.Title=en,D.Paragraph=Q,e.s(["Typography",0,D],898586)}]); \ No newline at end of file + `]:{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),{"&-rtl":{direction:"rtl"}})}},()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"})),k=e=>{let{prefixCls:n,"aria-label":l,className:r,style:o,direction:a,maxLength:c,autoSize:s=!0,value:u,onSave:d,onCancel:p,onEnd:f,component:m,enterIcon:g=t.createElement(h,null)}=e,b=t.useRef(null),y=t.useRef(!1),v=t.useRef(null),[S,w]=t.useState(u);t.useEffect(()=>{w(u)},[u]),t.useEffect(()=>{var e;if(null==(e=b.current)?void 0:e.resizableTextArea){let{textArea:e}=b.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let j=()=>{d(S.trim())},[k,R,$]=C(n),T=(0,i.default)(n,`${n}-edit-content`,{[`${n}-rtl`]:"rtl"===a,[`${n}-${m}`]:!!m},r,R,$);return k(t.createElement("div",{className:T,style:o},t.createElement(E.default,{ref:b,maxLength:c,value:S,onChange:({target:e})=>{w(e.value.replace(/[\n\r]/g,""))},onKeyDown:({keyCode:e})=>{y.current||(v.current=e)},onKeyUp:({keyCode:e,ctrlKey:t,altKey:n,metaKey:l,shiftKey:r})=>{v.current!==e||y.current||t||n||l||r||(e===x.default.ENTER?(j(),null==f||f()):e===x.default.ESC&&p())},onCompositionStart:()=>{y.current=!0},onCompositionEnd:()=>{y.current=!1},onBlur:()=>{j()},"aria-label":l,rows:1,autoSize:s}),null!==g?(0,O.cloneElement)(g,{className:`${n}-edit-content-confirm`}):null))};var R=e.i(844343),$=e.i(175066);function T(e,n){return t.useMemo(()=>{let t=!!e;return[t,Object.assign(Object.assign({},n),t&&"object"==typeof e?e:null)]},[e])}var I=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let D=t.forwardRef((e,n)=>{let{prefixCls:l,component:r="article",className:o,rootClassName:a,setContentRef:c,children:s,direction:u,style:d}=e,p=I(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:m,direction:b,className:y,style:v}=(0,g.useComponentConfig)("typography"),h=c?(0,f.composeRef)(n,c):n,x=m("typography",l),[O,E,S]=C(x),w=(0,i.default)(x,y,{[`${x}-rtl`]:"rtl"===(null!=u?u:b)},o,a,E,S),j=Object.assign(Object.assign({},v),d);return O(t.createElement(r,Object.assign({className:w,style:j,ref:h},p),s))});var P=e.i(121229),B=e.i(190144),M=e.i(739295);function H(e){return!1===e?[!1,!1]:Array.isArray(e)?e:[e]}function z(e,t,n){return!0===e||void 0===e?t:e||n&&t}let A=e=>["string","number"].includes(typeof e),W=({prefixCls:e,copied:n,locale:l,iconOnly:r,tooltips:o,icon:a,tabIndex:c,onCopy:s,loading:u})=>{let d=H(o),p=H(a),{copied:f,copy:m}=null!=l?l:{},g=n?f:m,b=z(d[+!!n],g),v="string"==typeof b?b:g;return t.createElement(y.default,{title:b},t.createElement("button",{type:"button",className:(0,i.default)(`${e}-copy`,{[`${e}-copy-success`]:n,[`${e}-copy-icon-only`]:r}),onClick:s,"aria-label":v,tabIndex:c},n?z(p[1],t.createElement(P.default,null),!0):z(p[0],u?t.createElement(M.default,null):t.createElement(B.default,null),!0)))},L=t.forwardRef(({style:e,children:n},l)=>{let r=t.useRef(null);return t.useImperativeHandle(l,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),t.createElement("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},n)});function N(e,t){let n=0,l=[];for(let r=0;rt){let e=t-n;return l.push(String(o).slice(0,e)),l}l.push(o),n=a}return e}let U={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function F(e){let{enableMeasure:l,width:r,text:o,children:a,rows:i,expanded:c,miscDeps:d,onEllipsis:p}=e,f=t.useMemo(()=>(0,s.default)(o),[o]),m=t.useMemo(()=>f.reduce((e,t)=>e+(A(t)?String(t).length:1),0),[o]),g=t.useMemo(()=>a(f,!1),[o]),[b,y]=t.useState(null),v=t.useRef(null),h=t.useRef(null),x=t.useRef(null),O=t.useRef(null),E=t.useRef(null),[S,w]=t.useState(!1),[j,C]=t.useState(0),[k,R]=t.useState(0),[$,T]=t.useState(null);(0,u.default)(()=>{l&&r&&m?C(1):C(0)},[r,o,i,l,f]),(0,u.default)(()=>{var e,t,n,l;if(1===j)C(2),T(h.current&&getComputedStyle(h.current).whiteSpace);else if(2===j){let r=!!(null==(e=x.current)?void 0:e.isExceed());C(r?3:4),y(r?[0,m]:null),w(r),R(Math.max((null==(t=x.current)?void 0:t.getHeight())||0,(1===i?0:(null==(n=O.current)?void 0:n.getHeight())||0)+((null==(l=E.current)?void 0:l.getHeight())||0))+1),p(r)}},[j]);let I=b?Math.ceil((b[0]+b[1])/2):0;(0,u.default)(()=>{var e;let[t,n]=b||[0,0];if(t!==n){let l=((null==(e=v.current)?void 0:e.getHeight())||0)>k,r=I;n-t==1&&(r=l?t:n),y(l?[t,r]:[r,n])}},[b,I]);let D=t.useMemo(()=>{if(!l)return a(f,!1);if(3!==j||!b||b[0]!==b[1]){let e=a(f,!1);return[4,0].includes(j)?e:t.createElement("span",{style:Object.assign(Object.assign({},U),{WebkitLineClamp:i})},e)}return a(c?f:N(f,b[0]),S)},[c,j,b,f].concat((0,n.default)(d))),P={width:r,margin:0,padding:0,whiteSpace:"nowrap"===$?"normal":"inherit"};return t.createElement(t.Fragment,null,D,2===j&&t.createElement(t.Fragment,null,t.createElement(L,{style:Object.assign(Object.assign(Object.assign({},P),U),{WebkitLineClamp:i}),ref:x},g),t.createElement(L,{style:Object.assign(Object.assign(Object.assign({},P),U),{WebkitLineClamp:i-1}),ref:O},g),t.createElement(L,{style:Object.assign(Object.assign(Object.assign({},P),U),{WebkitLineClamp:1}),ref:E},a([],!0))),3===j&&b&&b[0]!==b[1]&&t.createElement(L,{style:Object.assign(Object.assign({},P),{top:400}),ref:v},a(N(f,I),!0)),1===j&&t.createElement("span",{style:{whiteSpace:"inherit"},ref:h}))}let q=({enableEllipsis:e,isEllipsis:n,children:l,tooltipProps:r})=>(null==r?void 0:r.title)&&e?t.createElement(y.default,Object.assign({open:!!n&&void 0},r),l):l;var X=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let K=["delete","mark","code","underline","strong","keyboard","italic"],V=t.forwardRef((e,l)=>{var r;let o,v,h,{prefixCls:x,className:O,style:E,type:S,disabled:w,children:j,ellipsis:C,editable:I,copyable:P,component:B,title:M}=e,H=X(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:z,direction:L}=t.useContext(g.ConfigContext),[N]=(0,b.default)("Text"),U=t.useRef(null),V=t.useRef(null),_=z("typography",x),G=(0,p.default)(H,K),[J,Q]=T(I),[Y,Z]=(0,d.default)(!1,{value:Q.editing}),{triggerType:ee=["icon"]}=Q,et=e=>{var t;e&&(null==(t=Q.onStart)||t.call(Q)),Z(e)},en=(o=(0,t.useRef)(void 0),(0,t.useEffect)(()=>{o.current=Y}),o.current);(0,u.default)(()=>{var e;!Y&&en&&(null==(e=V.current)||e.focus())},[Y]);let el=e=>{null==e||e.preventDefault(),et(!0)},[er,eo]=T(P),{copied:ea,copyLoading:ei,onClick:ec}=(({copyConfig:e,children:n})=>{let[l,r]=t.useState(!1),[o,a]=t.useState(!1),i=t.useRef(null),c=()=>{i.current&&clearTimeout(i.current)},s={};e.format&&(s.format=e.format),t.useEffect(()=>c,[]);let u=(0,$.default)(t=>{var l,o,u,d;return l=void 0,o=void 0,u=void 0,d=function*(){var l;null==t||t.preventDefault(),null==t||t.stopPropagation(),a(!0);try{let o="function"==typeof e.text?yield e.text():e.text;(0,R.default)(o||((e,t=!1)=>t&&null==e?[]:Array.isArray(e)?e:[e])(n,!0).join("")||"",s),a(!1),r(!0),c(),i.current=setTimeout(()=>{r(!1)},3e3),null==(l=e.onCopy)||l.call(e,t)}catch(e){throw a(!1),e}},new(u||(u=Promise))(function(e,t){function n(e){try{a(d.next(e))}catch(e){t(e)}}function r(e){try{a(d.throw(e))}catch(e){t(e)}}function a(t){var l;t.done?e(t.value):((l=t.value)instanceof u?l:new u(function(e){e(l)})).then(n,r)}a((d=d.apply(l,o||[])).next())})});return{copied:l,copyLoading:o,onClick:u}})({copyConfig:eo,children:j}),[es,eu]=t.useState(!1),[ed,ep]=t.useState(!1),[ef,em]=t.useState(!1),[eg,eb]=t.useState(!1),[ey,ev]=t.useState(!0),[eh,ex]=T(C,{expandable:!1,symbol:e=>e?null==N?void 0:N.collapse:null==N?void 0:N.expand}),[eO,eE]=(0,d.default)(ex.defaultExpanded||!1,{value:ex.expanded}),eS=eh&&(!eO||"collapsible"===ex.expandable),{rows:ew=1}=ex,ej=t.useMemo(()=>eS&&(void 0!==ex.suffix||ex.onEllipsis||ex.expandable||J||er),[eS,ex,J,er]);(0,u.default)(()=>{eh&&!ej&&(eu((0,m.isStyleSupport)("webkitLineClamp")),ep((0,m.isStyleSupport)("textOverflow")))},[ej,eh]);let[eC,ek]=t.useState(eS),eR=t.useMemo(()=>!ej&&(1===ew?ed:es),[ej,ed,es]);(0,u.default)(()=>{ek(eR&&eS)},[eR,eS]);let e$=eS&&(eC?eg:ef),eT=eS&&1===ew&&eC,eI=eS&&ew>1&&eC,[eD,eP]=t.useState(0),eB=e=>{var t;em(e),ef!==e&&(null==(t=ex.onEllipsis)||t.call(ex,e))};t.useEffect(()=>{let e=U.current;if(eh&&eC&&e){let t,n,l,r=(t=document.createElement("em"),e.appendChild(t),n=e.getBoundingClientRect(),l=t.getBoundingClientRect(),e.removeChild(t),n.left>l.left||l.right>n.right||n.top>l.top||l.bottom>n.bottom);eg!==r&&eb(r)}},[eh,eC,j,eI,ey,eD]),t.useEffect(()=>{let e=U.current;if("u"{ev(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[eC,eS]);let eM=(v=ex.tooltip,h=Q.text,(0,t.useMemo)(()=>!0===v?{title:null!=h?h:j}:(0,t.isValidElement)(v)?{title:v}:"object"==typeof v?Object.assign({title:null!=h?h:j},v):{title:v},[v,h,j])),eH=t.useMemo(()=>{if(eh&&!eC)return[Q.text,j,M,eM.title].find(A)},[eh,eC,M,eM.title,e$]);return Y?t.createElement(k,{value:null!=(r=Q.text)?r:"string"==typeof j?j:"",onSave:e=>{var t;null==(t=Q.onChange)||t.call(Q,e),et(!1)},onCancel:()=>{var e;null==(e=Q.onCancel)||e.call(Q),et(!1)},onEnd:Q.onEnd,prefixCls:_,className:O,style:E,direction:L,component:B,maxLength:Q.maxLength,autoSize:Q.autoSize,enterIcon:Q.enterIcon}):t.createElement(c.default,{onResize:({offsetWidth:e})=>{eP(e)},disabled:!eS},r=>t.createElement(q,{tooltipProps:eM,enableEllipsis:eS,isEllipsis:e$},t.createElement(D,Object.assign({className:(0,i.default)({[`${_}-${S}`]:S,[`${_}-disabled`]:w,[`${_}-ellipsis`]:eh,[`${_}-ellipsis-single-line`]:eT,[`${_}-ellipsis-multiple-line`]:eI},O),prefixCls:x,style:Object.assign(Object.assign({},E),{WebkitLineClamp:eI?ew:void 0}),component:B,ref:(0,f.composeRef)(r,U,l),direction:L,onClick:ee.includes("text")?el:void 0,"aria-label":null==eH?void 0:eH.toString(),title:M},G),t.createElement(F,{enableMeasure:eS&&!eC,text:j,rows:ew,width:eD,onEllipsis:eB,expanded:eO,miscDeps:[ea,eO,ei,J,er,N].concat((0,n.default)(K.map(t=>e[t])))},(n,l)=>{let r;return function({mark:e,code:n,underline:l,delete:r,strong:o,keyboard:a,italic:i},c){let s=c;function u(e,n){n&&(s=t.createElement(e,{},s))}return u("strong",o),u("u",l),u("del",r),u("code",n),u("mark",e),u("kbd",a),u("i",i),s}(e,t.createElement(t.Fragment,null,n.length>0&&l&&!eO&&eH?t.createElement("span",{key:"show-content","aria-hidden":!0},n):n,[(r=l)&&!eO&&t.createElement("span",{"aria-hidden":!0,key:"ellipsis"},"..."),ex.suffix,[r&&(()=>{let{expandable:e,symbol:n}=ex;return e?t.createElement("button",{type:"button",key:"expand",className:`${_}-${eO?"collapse":"expand"}`,onClick:e=>{var t,n;eE((t={expanded:!eO}).expanded),null==(n=ex.onExpand)||n.call(ex,e,t)},"aria-label":eO?N.collapse:null==N?void 0:N.expand},"function"==typeof n?n(eO):n):null})(),(()=>{if(!J)return;let{icon:e,tooltip:n,tabIndex:l}=Q,r=(0,s.default)(n)[0]||(null==N?void 0:N.edit),o="string"==typeof r?r:"";return ee.includes("icon")?t.createElement(y.default,{key:"edit",title:!1===n?"":r},t.createElement("button",{type:"button",ref:V,className:`${_}-edit`,onClick:el,"aria-label":o,tabIndex:l},e||t.createElement(a,{role:"button"}))):null})(),er?t.createElement(W,Object.assign({key:"copy"},eo,{prefixCls:_,copied:ea,locale:N,onCopy:ec,loading:ei,iconOnly:null==j})):null]]))}))))});var _=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let G=t.forwardRef((e,n)=>{let{ellipsis:l,rel:r,children:o,navigate:a}=e,i=_(e,["ellipsis","rel","children","navigate"]),c=Object.assign(Object.assign({},i),{rel:void 0===r&&"_blank"===i.target?"noopener noreferrer":r});return t.createElement(V,Object.assign({},c,{ref:n,ellipsis:!!l,component:"a"}),o)});var J=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let Q=t.forwardRef((e,n)=>{let{children:l}=e,r=J(e,["children"]);return t.createElement(V,Object.assign({ref:n},r,{component:"div"}),l)});var Y=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let Z=t.forwardRef((e,n)=>{let{ellipsis:l,children:r}=e,o=Y(e,["ellipsis","children"]),a=t.useMemo(()=>l&&"object"==typeof l?(0,p.default)(l,["expandable","rows"]):l,[l]);return t.createElement(V,Object.assign({ref:n},o,{ellipsis:a,component:"span"}),r)});var ee=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let et=[1,2,3,4,5],en=t.forwardRef((e,n)=>{let{level:l=1,children:r}=e,o=ee(e,["level","children"]),a=et.includes(l)?`h${l}`:"h1";return t.createElement(V,Object.assign({ref:n},o,{component:a}),r)});e.s(["default",0,en],335771),D.Text=Z,D.Link=G,D.Title=en,D.Paragraph=Q,e.s(["Typography",0,D],898586)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/05d900c88781d712.js b/litellm/proxy/_experimental/out/_next/static/chunks/05d900c88781d712.js new file mode 100644 index 0000000000..cdf2168b93 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/05d900c88781d712.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(739295),n=e.i(343794),a=e.i(931067),i=e.i(211577),l=e.i(392221),o=e.i(703923),c=e.i(914949),d=e.i(404948),s=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,r){var u,g=e.prefixCls,m=void 0===g?"rc-switch":g,p=e.className,h=e.checked,f=e.defaultChecked,b=e.disabled,$=e.loadingIcon,v=e.checkedChildren,y=e.unCheckedChildren,C=e.onClick,S=e.onChange,k=e.onKeyDown,w=(0,o.default)(e,s),x=(0,c.default)(!1,{value:h,defaultValue:f}),I=(0,l.default)(x,2),O=I[0],E=I[1];function N(e,t){var r=O;return b||(E(r=e),null==S||S(r,t)),r}var z=(0,n.default)(m,p,(u={},(0,i.default)(u,"".concat(m,"-checked"),O),(0,i.default)(u,"".concat(m,"-disabled"),b),u));return t.createElement("button",(0,a.default)({},w,{type:"button",role:"switch","aria-checked":O,disabled:b,className:z,ref:r,onKeyDown:function(e){e.which===d.default.LEFT?N(!1,e):e.which===d.default.RIGHT&&N(!0,e),null==k||k(e)},onClick:function(e){var t=N(!O,e);null==C||C(t,e)}}),$,t.createElement("span",{className:"".concat(m,"-inner")},t.createElement("span",{className:"".concat(m,"-inner-checked")},v),t.createElement("span",{className:"".concat(m,"-inner-unchecked")},y)))});u.displayName="Switch";var g=e.i(121872),m=e.i(242064),p=e.i(937328),h=e.i(517455);e.i(296059);var f=e.i(915654);e.i(262370);var b=e.i(135551),$=e.i(183293),v=e.i(246422),y=e.i(838378);let C=(0,v.genStyleHooks)("Switch",e=>{let t=(0,y.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:(0,f.unit)(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:a,innerMaxMargin:i,handleSize:l,calc:o}=e,c=`${t}-inner`,d=(0,f.unit)(o(l).add(o(n).mul(2)).equal()),s=(0,f.unit)(o(i).mul(2).equal());return{[t]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${c}-checked, ${c}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${s})`,marginInlineEnd:`calc(100% - ${d} + ${s})`},[`${c}-unchecked`]:{marginTop:o(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${c}`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${s})`,marginInlineEnd:`calc(-100% + ${d} - ${s})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:o(n).mul(2).equal(),marginInlineEnd:o(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:o(n).mul(-1).mul(2).equal(),marginInlineEnd:o(n).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:r,handleBg:n,handleShadow:a,handleSize:i,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:r,insetInlineStart:r,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:l(i).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(l(i).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:a,innerMinMarginSM:i,innerMaxMarginSM:l,handleSizeSM:o,calc:c}=e,d=`${t}-inner`,s=(0,f.unit)(c(o).add(c(n).mul(2)).equal()),u=(0,f.unit)(c(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:r,lineHeight:(0,f.unit)(r),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:i,[`${d}-checked, ${d}-unchecked`]:{minHeight:r},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${u})`,marginInlineEnd:`calc(100% - ${s} + ${u})`},[`${d}-unchecked`]:{marginTop:c(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:c(c(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:l,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${u})`,marginInlineEnd:`calc(-100% + ${s} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(c(o).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:a}=e,i=t*r,l=n/2,o=i-4,c=l-4;return{trackHeight:i,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:a,handleSize:o,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}});var S=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let k=t.forwardRef((e,a)=>{let{prefixCls:i,size:l,disabled:o,loading:d,className:s,rootClassName:f,style:b,checked:$,value:v,defaultChecked:y,defaultValue:k,onChange:w}=e,x=S(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[I,O]=(0,c.default)(!1,{value:null!=$?$:v,defaultValue:null!=y?y:k}),{getPrefixCls:E,direction:N,switch:z}=t.useContext(m.ConfigContext),j=t.useContext(p.default),P=(null!=o?o:j)||d,T=E("switch",i),M=t.createElement("div",{className:`${T}-handle`},d&&t.createElement(r.default,{className:`${T}-loading-icon`})),[B,q,H]=C(T),R=(0,h.default)(l),L=(0,n.default)(null==z?void 0:z.className,{[`${T}-small`]:"small"===R,[`${T}-loading`]:d,[`${T}-rtl`]:"rtl"===N},s,f,q,H),G=Object.assign(Object.assign({},null==z?void 0:z.style),b);return B(t.createElement(g.default,{component:"Switch",disabled:P},t.createElement(u,Object.assign({},x,{checked:I,onChange:(...e)=>{O(e[0]),null==w||w.apply(void 0,e)},prefixCls:T,className:L,style:G,disabled:P,ref:a,loadingIcon:M}))))});k.__ANT_SWITCH=!0,e.s(["Switch",0,k],790848)},475254,e=>{"use strict";var t=e.i(271645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var a={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 i=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:c,iconNode:d,...s},u)=>(0,t.createElement)("svg",{ref:u,...a,width:r,height:r,stroke:e,strokeWidth:l?24*Number(i)/Number(r):i,className:n("lucide",o),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(s)&&{"aria-hidden":"true"},...s},[...d.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(c)?c:[c]])),l=(e,a)=>{let l=(0,t.forwardRef)(({className:l,...o},c)=>(0,t.createElement)(i,{ref:c,iconNode:a,className:n(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=r(e),l};e.s(["default",()=>l],475254)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={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"};var a=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["default",0,i],959013)},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),n=e.i(673706),a=e.i(271645);let i=a.default.forwardRef((e,i)=>{let{color:l,className:o,children:c}=e;return a.default.createElement("p",{ref:i,className:(0,r.tremorTwMerge)("text-tremor-default",l?(0,n.getColorClassNames)(l,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),o)},c)});i.displayName="Text",e.s(["default",()=>i],936325),e.s(["Text",()=>i],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(480731),a=e.i(95779),i=e.i(444755),l=e.i(673706);let o=(0,l.makeClassName)("Card"),c=r.default.forwardRef((e,c)=>{let{decoration:d="",decorationColor:s,children:u,className:g}=e,m=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:c,className:(0,i.tremorTwMerge)(o("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",s?(0,l.getColorClassNames)(s,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case n.HorizontalPositions.Left:return"border-l-4";case n.VerticalPositions.Top:return"border-t-4";case n.HorizontalPositions.Right:return"border-r-4";case n.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),g)},m),u)});c.displayName="Card",e.s(["Card",()=>c],304967)},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(529681),a=e.i(702779),i=e.i(563113),l=e.i(763731),o=e.i(121872),c=e.i(242064);e.i(296059);var d=e.i(915654);e.i(262370);var s=e.i(135551),u=e.i(183293),g=e.i(246422),m=e.i(838378);let p=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,a=e.fontSizeSM;return(0,m.mergeToken)(e,{tagFontSize:a,tagLineHeight:(0,d.unit)(n(e.lineHeightSM).mul(a).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},h=e=>({defaultBg:new s.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),f=(0,g.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:a,calc:i}=e,l=i(n).sub(r).equal(),o=i(t).sub(r).equal();return{[a]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-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"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:l}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(p(e)),h);var b=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let $=t.forwardRef((e,n)=>{let{prefixCls:a,style:i,className:l,checked:o,children:d,icon:s,onChange:u,onClick:g}=e,m=b(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:h}=t.useContext(c.ConfigContext),$=p("tag",a),[v,y,C]=f($),S=(0,r.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==h?void 0:h.className,l,y,C);return v(t.createElement("span",Object.assign({},m,{ref:n,style:Object.assign(Object.assign({},i),null==h?void 0:h.style),className:S,onClick:e=>{null==u||u(!o),null==g||g(e)}}),s,t.createElement("span",null,d)))});var v=e.i(403541);let y=(0,g.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=p(e),(0,v.genPresetColor)(t,(e,{textColor:r,lightBorderColor:n,lightColor:a,darkColor:i})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:r,background:a,borderColor:n,"&-inverse":{color:t.colorTextLightSolid,background:i,borderColor:i},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},h),C=(e,t,r)=>{let n="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},S=(0,g.genSubStyleComponent)(["Tag","status"],e=>{let t=p(e);return[C(t,"success","Success"),C(t,"processing","Info"),C(t,"error","Error"),C(t,"warning","Warning")]},h);var k=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let w=t.forwardRef((e,d)=>{let{prefixCls:s,className:u,rootClassName:g,style:m,children:p,icon:h,color:b,onClose:$,bordered:v=!0,visible:C}=e,w=k(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:x,direction:I,tag:O}=t.useContext(c.ConfigContext),[E,N]=t.useState(!0),z=(0,n.default)(w,["closeIcon","closable"]);t.useEffect(()=>{void 0!==C&&N(C)},[C]);let j=(0,a.isPresetColor)(b),P=(0,a.isPresetStatusColor)(b),T=j||P,M=Object.assign(Object.assign({backgroundColor:b&&!T?b:void 0},null==O?void 0:O.style),m),B=x("tag",s),[q,H,R]=f(B),L=(0,r.default)(B,null==O?void 0:O.className,{[`${B}-${b}`]:T,[`${B}-has-color`]:b&&!T,[`${B}-hidden`]:!E,[`${B}-rtl`]:"rtl"===I,[`${B}-borderless`]:!v},u,g,H,R),G=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||N(!1)},[,A]=(0,i.useClosable)((0,i.pickClosable)(e),(0,i.pickClosable)(O),{closable:!1,closeIconRender:e=>{let n=t.createElement("span",{className:`${B}-close-icon`,onClick:G},e);return(0,l.replaceElement)(e,n,e=>({onClick:t=>{var r;null==(r=null==e?void 0:e.onClick)||r.call(e,t),G(t)},className:(0,r.default)(null==e?void 0:e.className,`${B}-close-icon`)}))}}),W="function"==typeof w.onClick||p&&"a"===p.type,D=h||null,X=D?t.createElement(t.Fragment,null,D,p&&t.createElement("span",null,p)):p,F=t.createElement("span",Object.assign({},z,{ref:d,className:L,style:M}),X,A,j&&t.createElement(y,{key:"preset",prefixCls:B}),P&&t.createElement(S,{key:"status",prefixCls:B}));return q(W?t.createElement(o.default,{component:"Tag"},F):F)});w.CheckableTag=$,e.s(["Tag",0,w],262218)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(876556);function a(e){return["small","middle","large"].includes(e)}function i(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>a,"isValidGapNumber",()=>i],908286);var l=e.i(242064),o=e.i(249616),c=e.i(372409),d=e.i(246422);let s=(0,d.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:a,paddingXS:i,fontSizeLG:l,fontSizeSM:o,borderRadiusLG:d,borderRadiusSM:s,colorBgContainerDisabled:u,lineWidth:g}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:n,margin:0,background:u,borderWidth:g,borderStyle:"solid",borderColor:a,borderRadius:r,"&-large":{fontSize:l,borderRadius:d},"&-small":{paddingInline:i,borderRadius:s,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,c.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let g=t.default.forwardRef((e,n)=>{let{className:a,children:i,style:c,prefixCls:d}=e,g=u(e,["className","children","style","prefixCls"]),{getPrefixCls:m,direction:p}=t.default.useContext(l.ConfigContext),h=m("space-addon",d),[f,b,$]=s(h),{compactItemClassnames:v,compactSize:y}=(0,o.useCompactItemContext)(h,p),C=(0,r.default)(h,b,v,$,{[`${h}-${y}`]:y},a);return f(t.default.createElement("div",Object.assign({ref:n,className:C,style:c},g),i))}),m=t.default.createContext({latestIndex:0}),p=m.Provider,h=({className:e,index:r,children:n,split:a,style:i})=>{let{latestIndex:l}=t.useContext(m);return null==n?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:i},n),r{let t=(0,f.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var $=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let v=t.forwardRef((e,o)=>{var c;let{getPrefixCls:d,direction:s,size:u,className:g,style:m,classNames:f,styles:v}=(0,l.useComponentConfig)("space"),{size:y=null!=u?u:"small",align:C,className:S,rootClassName:k,children:w,direction:x="horizontal",prefixCls:I,split:O,style:E,wrap:N=!1,classNames:z,styles:j}=e,P=$(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[T,M]=Array.isArray(y)?y:[y,y],B=a(M),q=a(T),H=i(M),R=i(T),L=(0,n.default)(w,{keepEmpty:!0}),G=void 0===C&&"horizontal"===x?"center":C,A=d("space",I),[W,D,X]=b(A),F=(0,r.default)(A,g,D,`${A}-${x}`,{[`${A}-rtl`]:"rtl"===s,[`${A}-align-${G}`]:G,[`${A}-gap-row-${M}`]:B,[`${A}-gap-col-${T}`]:q},S,k,X),V=(0,r.default)(`${A}-item`,null!=(c=null==z?void 0:z.item)?c:f.item),_=Object.assign(Object.assign({},v.item),null==j?void 0:j.item),K=L.map((e,r)=>{let n=(null==e?void 0:e.key)||`${V}-${r}`;return t.createElement(h,{className:V,key:n,index:r,split:O,style:_},e)}),U=t.useMemo(()=>({latestIndex:L.reduce((e,t,r)=>null!=t?r:e,0)}),[L]);if(0===L.length)return null;let Q={};return N&&(Q.flexWrap="wrap"),!q&&R&&(Q.columnGap=T),!B&&H&&(Q.rowGap=M),W(t.createElement("div",Object.assign({ref:o,className:F,style:Object.assign(Object.assign(Object.assign({},Q),m),E)},P),t.createElement(p,{value:U},K)))});v.Compact=o.default,v.Addon=g,e.s(["default",0,v],38243)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(242064),a=e.i(517455);e.i(296059);var i=e.i(915654),l=e.i(183293),o=e.i(246422),c=e.i(838378);let d=(0,o.genStyleHooks)("Divider",e=>{let t=(0,c.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:a,textPaddingInline:o,orientationMargin:c,verticalMarginInline:d}=e;return{[t]:Object.assign(Object.assign({},(0,l.resetComponent)(e)),{borderBlockStart:`${(0,i.unit)(a)} solid ${n}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:d,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,i.unit)(a)} solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,i.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,i.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,i.unit)(a)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${c} * 100%)`},"&::after":{width:`calc(100% - ${c} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${c} * 100%)`},"&::after":{width:`calc(${c} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${(0,i.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:n,borderStyle:"dotted",borderWidth:`${(0,i.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var s=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:i,direction:l,className:o,style:c}=(0,n.useComponentConfig)("divider"),{prefixCls:g,type:m="horizontal",orientation:p="center",orientationMargin:h,className:f,rootClassName:b,children:$,dashed:v,variant:y="solid",plain:C,style:S,size:k}=e,w=s(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),x=i("divider",g),[I,O,E]=d(x),N=u[(0,a.default)(k)],z=!!$,j=t.useMemo(()=>"left"===p?"rtl"===l?"end":"start":"right"===p?"rtl"===l?"start":"end":p,[l,p]),P="start"===j&&null!=h,T="end"===j&&null!=h,M=(0,r.default)(x,o,O,E,`${x}-${m}`,{[`${x}-with-text`]:z,[`${x}-with-text-${j}`]:z,[`${x}-dashed`]:!!v,[`${x}-${y}`]:"solid"!==y,[`${x}-plain`]:!!C,[`${x}-rtl`]:"rtl"===l,[`${x}-no-default-orientation-margin-start`]:P,[`${x}-no-default-orientation-margin-end`]:T,[`${x}-${N}`]:!!N},f,b),B=t.useMemo(()=>"number"==typeof h?h:/^\d+$/.test(h)?Number(h):h,[h]);return I(t.createElement("div",Object.assign({className:M,style:Object.assign(Object.assign({},c),S)},w,{role:"separator"}),$&&"vertical"!==m&&t.createElement("span",{className:`${x}-inner-text`,style:{marginInlineStart:P?B:void 0,marginInlineEnd:T?B:void 0}},$)))}],312361)},801312,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={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"};var a=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["default",0,i],801312)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/072e4deb696e573b.js b/litellm/proxy/_experimental/out/_next/static/chunks/072e4deb696e573b.js deleted file mode 100644 index 70a15da9a0..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/072e4deb696e573b.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,728889,e=>{"use strict";var r=e.i(290571),t=e.i(271645),o=e.i(829087),a=e.i(480731),l=e.i(444755),n=e.i(673706),i=e.i(95779);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"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},c={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=(0,n.makeClassName)("Icon"),u=t.default.forwardRef((e,u)=>{let{icon:m,variant:p="simple",tooltip:b,size:f=a.Sizes.SM,color:C,className:y}=e,h=(0,r.__rest)(e,["icon","variant","tooltip","size","color","className"]),k=((e,r)=>{switch(e){case"simple":return{textColor:r?(0,n.getColorClassNames)(r,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:r?(0,n.getColorClassNames)(r,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,l.tremorTwMerge)((0,n.getColorClassNames)(r,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:r?(0,n.getColorClassNames)(r,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,l.tremorTwMerge)((0,n.getColorClassNames)(r,i.colorPalette.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,n.getColorClassNames)(r,i.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,l.tremorTwMerge)((0,n.getColorClassNames)(r,i.colorPalette.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,n.getColorClassNames)(r,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,l.tremorTwMerge)((0,n.getColorClassNames)(r,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:r?(0,n.getColorClassNames)(r,i.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:r?(0,l.tremorTwMerge)((0,n.getColorClassNames)(r,i.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(p,C),{tooltipProps:x,getReferenceProps:v}=(0,o.useTooltip)();return t.default.createElement("span",Object.assign({ref:(0,n.mergeRefs)([u,x.refs.setReference]),className:(0,l.tremorTwMerge)(g("root"),"inline-flex shrink-0 items-center justify-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,c[p].rounded,c[p].border,c[p].shadow,c[p].ring,s[f].paddingX,s[f].paddingY,y)},v,h),t.default.createElement(o.default,Object.assign({text:b},x)),t.default.createElement(m,{className:(0,l.tremorTwMerge)(g("icon"),"shrink-0",d[f].height,d[f].width)}))});u.displayName="Icon",e.s(["default",()=>u],728889)},752978,e=>{"use strict";var r=e.i(728889);e.s(["Icon",()=>r.default])},94629,e=>{"use strict";var r=e.i(271645);let t=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,t],94629)},829672,836938,310730,e=>{"use strict";e.i(247167);var r=e.i(271645),t=e.i(343794),o=e.i(914949),a=e.i(404948);let l=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,l],836938);var n=e.i(613541),i=e.i(763731),s=e.i(242064),d=e.i(491816);e.i(793154);var c=e.i(880476),g=e.i(183293),u=e.i(717356),m=e.i(320560),p=e.i(307358),b=e.i(246422),f=e.i(838378),C=e.i(617933);let y=(0,b.genStyleHooks)("Popover",e=>{let{colorBgElevated:r,colorText:t}=e,o=(0,f.mergeToken)(e,{popoverBg:r,popoverColor:t});return[(e=>{let{componentCls:r,popoverColor:t,titleMinWidth:o,fontWeightStrong:a,innerPadding:l,boxShadowSecondary:n,colorTextHeading:i,borderRadiusLG:s,zIndexPopup:d,titleMarginBottom:c,colorBgElevated:u,popoverBg:p,titleBorderBottom:b,innerContentPadding:f,titlePadding:C}=e;return[{[r]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":u,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${r}-content`]:{position:"relative"},[`${r}-inner`]:{backgroundColor:p,backgroundClip:"padding-box",borderRadius:s,boxShadow:n,padding:l},[`${r}-title`]:{minWidth:o,marginBottom:c,color:i,fontWeight:a,borderBottom:b,padding:C},[`${r}-inner-content`]:{color:t,padding:f}})},(0,m.default)(e,"var(--antd-arrow-background-color)"),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${r}-content`]:{display:"inline-block"}}}]})(o),(e=>{let{componentCls:r}=e;return{[r]:C.PresetColors.map(t=>{let o=e[`${t}6`];return{[`&${r}-${t}`]:{"--antd-arrow-background-color":o,[`${r}-inner`]:{backgroundColor:o},[`${r}-arrow`]:{background:"transparent"}}}})}})(o),(0,u.initZoomMotion)(o,"zoom-big")]},e=>{let{lineWidth:r,controlHeight:t,fontHeight:o,padding:a,wireframe:l,zIndexPopupBase:n,borderRadiusLG:i,marginXS:s,lineType:d,colorSplit:c,paddingSM:g}=e,u=t-o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:n+30},(0,p.getArrowToken)(e)),(0,m.getArrowOffsetToken)({contentRadius:i,limitVerticalRadius:!0})),{innerPadding:12*!l,titleMarginBottom:l?0:s,titlePadding:l?`${u/2}px ${a}px ${u/2-r}px`:0,titleBorderBottom:l?`${r}px ${d} ${c}`:"none",innerContentPadding:l?`${g}px ${a}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var h=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>r.indexOf(o)&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);ar.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]]);return t};let k=({title:e,content:t,prefixCls:o})=>e||t?r.createElement(r.Fragment,null,e&&r.createElement("div",{className:`${o}-title`},e),t&&r.createElement("div",{className:`${o}-inner-content`},t)):null,x=e=>{let{hashId:o,prefixCls:a,className:n,style:i,placement:s="top",title:d,content:g,children:u}=e,m=l(d),p=l(g),b=(0,t.default)(o,a,`${a}-pure`,`${a}-placement-${s}`,n);return r.createElement("div",{className:b,style:i},r.createElement("div",{className:`${a}-arrow`}),r.createElement(c.Popup,Object.assign({},e,{className:o,prefixCls:a}),u||r.createElement(k,{prefixCls:a,title:m,content:p})))},v=e=>{let{prefixCls:o,className:a}=e,l=h(e,["prefixCls","className"]),{getPrefixCls:n}=r.useContext(s.ConfigContext),i=n("popover",o),[d,c,g]=y(i);return d(r.createElement(x,Object.assign({},l,{prefixCls:i,hashId:c,className:(0,t.default)(a,g)})))};e.s(["Overlay",0,k,"default",0,v],310730);var w=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>r.indexOf(o)&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);ar.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]]);return t};let O=r.forwardRef((e,c)=>{var g,u;let{prefixCls:m,title:p,content:b,overlayClassName:f,placement:C="top",trigger:h="hover",children:x,mouseEnterDelay:v=.1,mouseLeaveDelay:O=.1,onOpenChange:N,overlayStyle:P={},styles:j,classNames:E}=e,$=w(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:S,className:T,style:M,classNames:R,styles:z}=(0,s.useComponentConfig)("popover"),_=S("popover",m),[I,W,B]=y(_),K=S(),A=(0,t.default)(f,W,B,T,R.root,null==E?void 0:E.root),D=(0,t.default)(R.body,null==E?void 0:E.body),[V,Y]=(0,o.default)(!1,{value:null!=(g=e.open)?g:e.visible,defaultValue:null!=(u=e.defaultOpen)?u:e.defaultVisible}),L=(e,r)=>{Y(e,!0),null==N||N(e,r)},U=l(p),X=l(b);return I(r.createElement(d.default,Object.assign({placement:C,trigger:h,mouseEnterDelay:v,mouseLeaveDelay:O},$,{prefixCls:_,classNames:{root:A,body:D},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},z.root),M),P),null==j?void 0:j.root),body:Object.assign(Object.assign({},z.body),null==j?void 0:j.body)},ref:c,open:V,onOpenChange:e=>{L(e)},overlay:U||X?r.createElement(k,{prefixCls:_,title:U,content:X}):null,transitionName:(0,n.getTransitionName)(K,"zoom-big",$.transitionName),"data-popover-inject":!0}),(0,i.cloneElement)(x,{onKeyDown:e=>{var t,o;(0,r.isValidElement)(x)&&(null==(o=null==x?void 0:(t=x.props).onKeyDown)||o.call(t,e)),e.keyCode===a.default.ESC&&L(!1,e)}})))});O._InternalPanelDoNotUseOrYouWillBeFired=v,e.s(["default",0,O],829672)},282786,e=>{"use strict";var r=e.i(829672);e.s(["Popover",()=>r.default])},995118,e=>{"use strict";var r=e.i(843476),t=e.i(271645),o=e.i(764205),a=e.i(135214),l=e.i(693569),n=e.i(214541);e.s(["default",0,()=>{let{accessToken:e,userRole:i,userId:s,premiumUser:d,userEmail:c}=(0,a.default)(),{teams:g,setTeams:u}=(0,n.default)(),[m,p]=(0,t.useState)(!1),[b,f]=(0,t.useState)([]),{keys:C,isLoading:y,error:h,pagination:k,refresh:x,setKeys:v}=(({selectedTeam:e,currentOrg:r,selectedKeyAlias:a,accessToken:l,createClicked:n,expand:i=[]})=>{let[s,d]=(0,t.useState)({keys:[],total_count:0,current_page:1,total_pages:0}),[c,g]=(0,t.useState)(!0),[u,m]=(0,t.useState)(null),p=async(e={})=>{try{if(console.log("calling fetchKeys"),!l)return void console.log("accessToken",l);g(!0);let r="number"==typeof e.page?e.page:1,t="number"==typeof e.pageSize?e.pageSize:100,a=await (0,o.keyListCall)(l,null,null,null,null,null,r,t,null,null,i.join(","));console.log("data",a),d(a),m(null)}catch(e){m(e instanceof Error?e:Error("An error occurred"))}finally{g(!1)}};return(0,t.useEffect)(()=>{p(),console.log("selectedTeam",e,"currentOrg",r,"accessToken",l,"selectedKeyAlias",a)},[e,r,l,a,n]),{keys:s.keys,isLoading:c,error:u,pagination:{currentPage:s.current_page,totalPages:s.total_pages,totalCount:s.total_count},refresh:p,setKeys:e=>{d(r=>{let t="function"==typeof e?e(r.keys):e;return{...r,keys:t}})}}})({selectedKeyAlias:null,currentOrg:null,accessToken:e||"",createClicked:m});return(0,r.jsx)(l.default,{userID:s,userRole:i,userEmail:c,teams:g,keys:C,setUserRole:()=>{},setUserEmail:()=>{},setTeams:u,setKeys:v,premiumUser:d,organizations:b,addKey:e=>{v(r=>r?[...r,e]:[e]),p(()=>!m)},createClicked:m})}],995118)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/086f1dd580fe748e.js b/litellm/proxy/_experimental/out/_next/static/chunks/086f1dd580fe748e.js deleted file mode 100644 index 619d0967e9..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/086f1dd580fe748e.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,596115,e=>{"use strict";var s=e.i(843476),l=e.i(271645),a=e.i(764205),t=e.i(584578),r=e.i(808613),i=e.i(56567),o=e.i(468133),n=e.i(708347),d=e.i(304967),c=e.i(994388),m=e.i(309426),u=e.i(599724),h=e.i(350967),x=e.i(404206),p=e.i(747871),g=e.i(500330),_=e.i(752978),j=e.i(197647),f=e.i(653824),b=e.i(881073),v=e.i(723731),y=e.i(278587);let w=({lastRefreshed:e,onRefresh:l,userRole:a,children:t})=>(0,s.jsxs)(f.TabGroup,{className:"gap-2 h-[75vh] w-full",children:[(0,s.jsxs)(b.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)(j.Tab,{children:"Your Teams"}),(0,s.jsx)(j.Tab,{children:"Available Teams"}),(0,n.isAdminRole)(a||"")&&(0,s.jsx)(j.Tab,{children:"Default Team Settings"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[e&&(0,s.jsxs)(u.Text,{children:["Last Refreshed: ",e]}),(0,s.jsx)(_.Icon,{icon:y.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:l})]})]}),(0,s.jsx)(v.TabPanels,{children:t})]});var T=e.i(206929),C=e.i(35983);let N=({filters:e,organizations:l,showFilters:a,onToggleFilters:t,onChange:r,onReset:i})=>(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 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:e.team_alias,onChange:e=>r("team_alias",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 ${a?"bg-gray-100":""}`,onClick:()=>t(!a),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",(e.team_id||e.team_alias||e.organization_id)&&(0,s.jsx)("span",{"data-testid":"active-filter-indicator",className:"w-2 h-2 rounded-full bg-blue-500"})]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:i,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"]})]}),a&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.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:e.team_id,onChange:e=>r("team_id",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:"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,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(T.Select,{value:e.organization_id||"",onValueChange:e=>r("organization_id",e),placeholder:"Select Organization",children:l?.map(e=>(0,s.jsx)(C.SelectItem,{value:e.organization_id||"",children:e.organization_alias||e.organization_id},e.organization_id))})})]})]});var S=e.i(135214),k=e.i(269200),I=e.i(942232),F=e.i(977572),A=e.i(427612),z=e.i(64848),M=e.i(496020),O=e.i(592968),P=e.i(591935),L=e.i(68155),D=e.i(389083),E=e.i(871943),B=e.i(502547),R=e.i(355619);let V=({team:e})=>{let[a,t]=(0,l.useState)(!1),r=!e.models||0===e.models.length||e.models.includes("all-proxy-models"),i=(0,l.useMemo)(()=>{if(r)return[];let s=e.models.map(e=>({name:e,source:"direct"}));for(let l of e.access_group_models||[])s.push({name:l,source:"access_group"});return s},[e.models,e.access_group_models,r]),o=(e,l)=>{if("all-proxy-models"===e.name)return(0,s.jsx)(D.Badge,{size:"xs",color:"red",children:(0,s.jsx)(u.Text,{children:"All Proxy Models"})},l);let a=(0,R.getModelDisplayName)(e.name),t=a.length>30?`${a.slice(0,30)}...`:a;return(0,s.jsx)(D.Badge,{size:"xs",color:"access_group"===e.source?"green":"blue",title:"access_group"===e.source?"From access group":"Direct assignment",children:(0,s.jsx)(u.Text,{children:t})},l)};return(0,s.jsx)(F.TableCell,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:i.length>3?"px-0":"",children:(0,s.jsx)("div",{className:"flex flex-col",children:0===i.length?(0,s.jsx)(D.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,s.jsx)(u.Text,{children:"All Proxy Models"})}):(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("div",{className:"flex items-start",children:[i.length>3&&(0,s.jsx)("div",{children:(0,s.jsx)(_.Icon,{icon:a?E.ChevronDownIcon:B.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{t(e=>!e)}})}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[i.slice(0,3).map((e,s)=>o(e,s)),i.length>3&&!a&&(0,s.jsx)(D.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,s.jsxs)(u.Text,{children:["+",i.length-3," ",i.length-3==1?"more model":"more models"]})}),a&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:i.slice(3).map((e,s)=>o(e,s+3))})]})]})})})})};var H=e.i(918549),H=H,W=e.i(846753),W=W;let U=({team:e,userId:l})=>{var a;let t,r=(a=((e,s)=>{if(!s)return null;let l=e.members_with_roles?.find(e=>e.user_id===s);return l?.role??null})(e,l),t="inline-flex items-center px-2.5 py-0.5 rounded-md text-xs font-medium border","admin"===a?(0,s.jsxs)("span",{className:t,style:{backgroundColor:"#EEF2FF",color:"#3730A3",borderColor:"#C7D2FE"},children:[(0,s.jsx)(H.default,{className:"h-3 w-3 mr-1"}),"Admin"]}):(0,s.jsxs)("span",{className:t,style:{backgroundColor:"#F3F4F6",color:"#4B5563",borderColor:"#E5E7EB"},children:[(0,s.jsx)(W.default,{className:"h-3 w-3 mr-1"}),"Member"]}));return(0,s.jsx)(F.TableCell,{children:r})},G=({teams:e,currentOrg:l,setSelectedTeamId:a,perTeamInfo:t,userRole:r,userId:i,setEditTeam:o,onDeleteTeam:n})=>(0,s.jsxs)(k.Table,{children:[(0,s.jsx)(A.TableHead,{children:(0,s.jsxs)(M.TableRow,{children:[(0,s.jsx)(z.TableHeaderCell,{children:"Team Name"}),(0,s.jsx)(z.TableHeaderCell,{children:"Team ID"}),(0,s.jsx)(z.TableHeaderCell,{children:"Created"}),(0,s.jsx)(z.TableHeaderCell,{children:"Spend (USD)"}),(0,s.jsx)(z.TableHeaderCell,{children:"Budget (USD)"}),(0,s.jsx)(z.TableHeaderCell,{children:"Models"}),(0,s.jsx)(z.TableHeaderCell,{children:"Organization"}),(0,s.jsx)(z.TableHeaderCell,{children:"Your Role"}),(0,s.jsx)(z.TableHeaderCell,{children:"Info"})]})}),(0,s.jsx)(I.TableBody,{children:e&&e.length>0?e.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,s.jsxs)(M.TableRow,{children:[(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.team_alias}),(0,s.jsx)(F.TableCell,{children:(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(O.Tooltip,{title:e.team_id,children:(0,s.jsxs)(c.Button,{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]","data-testid":"team-id-cell",onClick:()=>{a(e.team_id)},children:[e.team_id.slice(0,7),"..."]})})})}),(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:(0,g.formatNumberWithCommas)(e.spend,4)}),(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:null!==e.max_budget&&void 0!==e.max_budget?e.max_budget:"No limit"}),(0,s.jsx)(V,{team:e}),(0,s.jsx)(F.TableCell,{children:e.organization_id}),(0,s.jsx)(U,{team:e,userId:i}),(0,s.jsxs)(F.TableCell,{children:[(0,s.jsxs)(u.Text,{children:[t&&e.team_id&&t[e.team_id]&&t[e.team_id].keys&&t[e.team_id].keys.length," ","Keys"]}),(0,s.jsxs)(u.Text,{children:[t&&e.team_id&&t[e.team_id]&&t[e.team_id].team_info&&t[e.team_id].team_info.members_with_roles&&t[e.team_id].team_info.members_with_roles.length," ","Members"]})]}),(0,s.jsx)(F.TableCell,{children:"Admin"==r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_.Icon,{icon:P.PencilAltIcon,size:"sm",onClick:()=>{a(e.team_id),o(!0)}}),(0,s.jsx)(_.Icon,{onClick:()=>n(e.team_id),icon:L.TrashIcon,size:"sm"})]}):null})]},e.team_id)):null})]});var J=e.i(582458),J=J,$=e.i(995926);let K=({teams:e,teamToDelete:a,onCancel:t,onConfirm:r})=>{let[i,o]=(0,l.useState)(""),n=e?.find(e=>e.team_id===a),d=n?.team_alias||"",c=n?.keys?.length||0,m=i===d;return(0,s.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,s.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,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Delete Team"}),(0,s.jsx)("button",{"aria-label":"Close",onClick:()=>{t(),o("")},className:"text-gray-400 hover:text-gray-500 focus:outline-none",children:(0,s.jsx)($.XIcon,{size:20})})]}),(0,s.jsxs)("div",{className:"px-6 py-4",children:[c>0&&(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)(J.default,{size:20})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-base font-medium text-red-600",children:["Warning: This team has ",c," associated key",c>1?"s":"","."]}),(0,s.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,s.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,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.jsx)("span",{className:"underline",children:d})," to confirm deletion:"]}),(0,s.jsx)("input",{type:"text",value:i,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,s.jsxs)("div",{className:"px-6 py-4 bg-gray-50 flex justify-end gap-4",children:[(0,s.jsx)("button",{onClick:()=>{t(),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,s.jsx)("button",{onClick:r,disabled:!m,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 ${m?"bg-red-600 hover:bg-red-700":"bg-red-300 cursor-not-allowed"}`,children:"Force Delete"})]})]})})};var q=e.i(464571),Y=e.i(311451),X=e.i(212931),Q=e.i(199133),Z=e.i(790848),ee=e.i(677667),es=e.i(130643),el=e.i(898667),ea=e.i(779241),et=e.i(827252),er=e.i(435451),ei=e.i(916940),eo=e.i(75921),en=e.i(552130),ed=e.i(651904),ec=e.i(533882),em=e.i(727749),eu=e.i(390605);let eh=({isTeamModalVisible:e,handleOk:t,handleCancel:i,currentOrg:o,organizations:n,teams:d,setTeams:c,modelAliases:m,setModelAliases:h,loggingSettings:x,setLoggingSettings:p,setIsTeamModalVisible:g})=>{let{userId:_,userRole:j,accessToken:f,premiumUser:b}=(0,S.default)(),[v]=r.Form.useForm(),[y,w]=(0,l.useState)([]),[T,C]=(0,l.useState)(null),[N,k]=(0,l.useState)([]),[I,F]=(0,l.useState)([]),[A,z]=(0,l.useState)([]),[M,P]=(0,l.useState)([]),[L,D]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{try{if(null===_||null===j||null===f)return;let e=await (0,R.fetchAvailableModelsForTeamOrKey)(_,j,f);e&&w(e)}catch(e){console.error("Error fetching user models:",e)}})()},[f,_,j,d]),(0,l.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${T}`);let s=(e=[],T&&T.models.length>0?(console.log(`organization.models: ${T.models}`),e=T.models):e=y,(0,R.unfurlWildcardModelsInList)(e,y));console.log(`models: ${s}`),k(s),v.setFieldValue("models",[])},[T,y,v]);let E=async()=>{try{if(null==f)return;let e=await (0,a.fetchMCPAccessGroups)(f);P(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,l.useEffect)(()=>{E()},[f,E]),(0,l.useEffect)(()=>{let e=async()=>{try{if(null==f)return;let e=(await (0,a.getPoliciesList)(f)).policies.map(e=>e.policy_name);z(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==f)return;let e=(await (0,a.getGuardrailsList)(f)).guardrails.map(e=>e.guardrail_name);F(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[f]);let B=async e=>{try{if(console.log(`formValues: ${JSON.stringify(e)}`),null!=f){let s=e?.team_alias,l=d?.map(e=>e.team_alias)??[],t=e?.organization_id||o?.organization_id;if(""===t||"string"!=typeof t?e.organization_id=null:e.organization_id=t.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(em.default.info("Creating Team"),x.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:x.filter(e=>e.callback_name)},e.metadata=JSON.stringify(s)}if(e.secret_manager_settings&&"string"==typeof e.secret_manager_settings)if(""===e.secret_manager_settings.trim())delete e.secret_manager_settings;else try{e.secret_manager_settings=JSON.parse(e.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}if(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.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}if(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_agents_and_groups){let{agents:s,accessGroups:l}=e.allowed_agents_and_groups;e.object_permission||(e.object_permission={}),s&&s.length>0&&(e.object_permission.agents=s),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}}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(m).length>0&&(e.model_aliases=m);let r=await (0,a.teamCreateCall)(f,e);null!==d?c([...d,r]):c([r]),console.log(`response for team create call: ${r}`),em.default.success("Team created"),v.resetFields(),p([]),h({}),g(!1)}}catch(e){console.error("Error creating the team:",e),em.default.fromBackend("Error creating the team: "+e)}};return(0,s.jsx)(X.Modal,{title:"Create Team",open:e,width:1e3,footer:null,onOk:t,onCancel:i,children:(0,s.jsxs)(r.Form,{form:v,onFinish:B,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,s.jsx)(ea.TextInput,{placeholder:"","data-testid":"team-name-input"})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Organization"," ",(0,s.jsx)(O.Tooltip,{title:(0,s.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,s.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,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:o?o.organization_id:null,className:"mt-8",children:(0,s.jsx)(Q.Select,{showSearch:!0,allowClear:!0,placeholder:"Search or select an Organization",onChange:e=>{v.setFieldValue("organization_id",e),C(n?.find(s=>s.organization_id===e)||null)},filterOption:(e,s)=>!!s&&(s.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:n?.map(e=>(0,s.jsxs)(Q.Select.Option,{value:e.organization_id,children:[(0,s.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,s.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Models"," ",(0,s.jsx)(O.Tooltip,{title:"These are the models that your selected team has access to",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(Q.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},"data-testid":"team-models-select",children:[(0,s.jsx)(Q.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),N.map(e=>(0,s.jsx)(Q.Select.Option,{value:e,children:(0,R.getModelDisplayName)(e)},e))]})}),(0,s.jsx)(r.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,s.jsx)(er.default,{step:.01,precision:2,width:200})}),(0,s.jsx)(r.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,s.jsxs)(Q.Select,{defaultValue:null,placeholder:"n/a",children:[(0,s.jsx)(Q.Select.Option,{value:"24h",children:"daily"}),(0,s.jsx)(Q.Select.Option,{value:"7d",children:"weekly"}),(0,s.jsx)(Q.Select.Option,{value:"30d",children:"monthly"})]})}),(0,s.jsx)(r.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsx)(r.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsxs)(ee.Accordion,{className:"mt-20 mb-8",onClick:()=>{L||(E(),D(!0))},children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Additional Settings"})}),(0,s.jsxs)(es.AccordionBody,{children:[(0,s.jsx)(r.Form.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,s.jsx)(ea.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,s.jsx)(r.Form.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,s.jsx)(er.default,{step:.01,precision:2,width:200})}),(0,s.jsx)(r.Form.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)(ea.TextInput,{placeholder:"e.g., 30d"})}),(0,s.jsx)(r.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsx)(r.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsx)(r.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,s.jsx)(Y.Input.TextArea,{rows:4})}),(0,s.jsx)(r.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:b?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,s)=>{if(!s)return Promise.resolve();try{return JSON.parse(s),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,s.jsx)(Y.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!b})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(O.Tooltip,{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)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,s.jsx)(Q.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:I.map(e=>({value:e,label:e}))})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,s.jsx)(O.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,s.jsx)(Z.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Policies"," ",(0,s.jsx)(O.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,s.jsx)(Q.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:A.map(e=>({value:e,label:e}))})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,s.jsx)(O.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,s.jsx)(et.InfoCircleOutlined,{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,s.jsx)(ei.default,{onChange:e=>v.setFieldValue("allowed_vector_store_ids",e),value:v.getFieldValue("allowed_vector_store_ids"),accessToken:f||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"MCP Settings"})}),(0,s.jsxs)(es.AccordionBody,{children:[(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,s.jsx)(O.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,s.jsx)(et.InfoCircleOutlined,{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,s.jsx)(eo.default,{onChange:e=>v.setFieldValue("allowed_mcp_servers_and_groups",e),value:v.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:f||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,s.jsx)(r.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,s.jsx)(Y.Input,{type:"hidden"})}),(0,s.jsx)(r.Form.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:()=>(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(eu.default,{accessToken:f||"",selectedServers:v.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:v.getFieldValue("mcp_tool_permissions")||{},onChange:e=>v.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Agent Settings"})}),(0,s.jsx)(es.AccordionBody,{children:(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Agents"," ",(0,s.jsx)(O.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,s.jsx)(en.default,{onChange:e=>v.setFieldValue("allowed_agents_and_groups",e),value:v.getFieldValue("allowed_agents_and_groups"),accessToken:f||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Logging Settings"})}),(0,s.jsx)(es.AccordionBody,{children:(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(ed.default,{value:x,onChange:p,premiumUser:b})})})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Model Aliases"})}),(0,s.jsx)(es.AccordionBody,{children:(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)(u.Text,{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,s.jsx)(ec.default,{accessToken:f||"",initialModelAliases:m,onAliasUpdate:h,showExampleConfig:!1})]})})]})]}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(q.Button,{htmlType:"submit","data-testid":"create-team-submit",children:"Create Team"})})]})})},ex=({teams:e,accessToken:_,setTeams:j,userID:f,userRole:b,organizations:v,premiumUser:y=!1})=>{let[T,C]=(0,l.useState)(null),[k,I]=(0,l.useState)(!1),[F,A]=(0,l.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),[z]=r.Form.useForm(),[M]=r.Form.useForm(),[O,P]=(0,l.useState)(null),[L,D]=(0,l.useState)(!1),[E,B]=(0,l.useState)(!1),[R,V]=(0,l.useState)(!1),[H,W]=(0,l.useState)(!1),[U,J]=(0,l.useState)([]),[$,q]=(0,l.useState)(!1),[Y,X]=(0,l.useState)(null),[Q,Z]=(0,l.useState)({}),[ee,es]=(0,l.useState)([]),[el,ea]=(0,l.useState)({}),{lastRefreshed:et,onRefreshClick:er}=(({currentOrg:e,setTeams:s})=>{let[a,r]=(0,l.useState)(""),{accessToken:i,userId:o,userRole:n}=(0,S.default)(),d=(0,l.useCallback)(()=>{r(new Date().toLocaleString())},[]);return(0,l.useEffect)(()=>{i&&(0,t.fetchTeams)(i,o,n,e,s).then(),d()},[i,e,a,d,s,o,n]),{lastRefreshed:a,setLastRefreshed:r,onRefreshClick:d}})({currentOrg:T,setTeams:j});(0,l.useEffect)(()=>{e&&Z(e.reduce((e,s)=>(e[s.team_id]={keys:s.keys||[],team_info:{members_with_roles:s.members_with_roles||[]}},e),{}))},[e]);let ei=async e=>{X(e),q(!0)},eo=async()=>{if(null!=Y&&null!=e&&null!=_){try{await (0,a.teamDeleteCall)(_,Y),(0,t.fetchTeams)(_,f,b,T,j)}catch(e){console.error("Error deleting the team:",e)}q(!1),X(null)}};return(0,s.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,s.jsx)(h.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,s.jsxs)(m.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[("Admin"==b||"Org Admin"==b)&&(0,s.jsx)(c.Button,{className:"w-fit",onClick:()=>B(!0),children:"+ Create New Team"}),O?(0,s.jsx)(i.default,{teamId:O,onUpdate:e=>{j(s=>{if(null==s)return s;let l=s.map(s=>e.team_id===s.team_id?(0,g.updateExistingKeys)(s,e):s);return _&&(0,t.fetchTeams)(_,f,b,T,j),l})},onClose:()=>{P(null),D(!1)},accessToken:_,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let s=0;se.team_id===O)),is_proxy_admin:"Admin"==b,is_org_admin:(()=>{let s=e?.find(e=>e.team_id===O);if(!s?.organization_id||!v||!f)return!1;let l=v.find(e=>e.organization_id===s.organization_id);return l?.members?.some(e=>e.user_id===f&&"org_admin"===e.user_role)??!1})(),userModels:U,editTeam:L,premiumUser:y}):(0,s.jsxs)(w,{lastRefreshed:et,onRefresh:er,userRole:b,children:[(0,s.jsxs)(x.TabPanel,{children:[(0,s.jsxs)(u.Text,{children:["Click on “Team ID” to view team details ",(0,s.jsx)("b",{children:"and"})," manage team members."]}),(0,s.jsx)(h.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,s.jsx)(m.Col,{numColSpan:1,children:(0,s.jsxs)(d.Card,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsx)("div",{className:"flex flex-col space-y-4",children:(0,s.jsx)(N,{filters:F,organizations:v,showFilters:k,onToggleFilters:I,onChange:(e,s)=>{let l={...F,[e]:s};A(l),_&&(0,a.v2TeamListCall)(_,l.organization_id||null,null,l.team_id||null,l.team_alias||null).then(e=>{e&&e.teams&&j(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"}),_&&(0,a.v2TeamListCall)(_,null,f||null,null,null).then(e=>{e&&e.teams&&j(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})}})})}),(0,s.jsx)(G,{teams:e,currentOrg:T,perTeamInfo:Q,userRole:b,userId:f,setSelectedTeamId:P,setEditTeam:D,onDeleteTeam:ei}),$&&(0,s.jsx)(K,{teams:e,teamToDelete:Y,onCancel:()=>{q(!1),X(null)},onConfirm:eo})]})})})]}),(0,s.jsx)(x.TabPanel,{children:(0,s.jsx)(p.default,{accessToken:_,userID:f})}),(0,n.isAdminRole)(b||"")&&(0,s.jsx)(x.TabPanel,{children:(0,s.jsx)(o.default,{accessToken:_,userID:f||"",userRole:b||""})})]}),("Admin"==b||"Org Admin"==b)&&(0,s.jsx)(eh,{isTeamModalVisible:E,handleOk:()=>{B(!1),z.resetFields(),es([]),ea({})},handleCancel:()=>{B(!1),z.resetFields(),es([]),ea({})},currentOrg:T,organizations:v,teams:e,setTeams:j,modelAliases:el,setModelAliases:ea,loggingSettings:ee,setLoggingSettings:es,setIsTeamModalVisible:B})]})})})};var ep=e.i(214541),eg=e.i(846835);e.s(["default",0,()=>{let{accessToken:e,userId:a,userRole:t}=(0,S.default)(),{teams:r,setTeams:i}=(0,ep.default)(),[o,n]=(0,l.useState)([]);return(0,l.useEffect)(()=>{(0,eg.fetchOrganizations)(e,n).then(()=>{})},[e]),(0,s.jsx)(ex,{teams:r,accessToken:e,setTeams:i,userID:a,userRole:t,organizations:o})}],596115)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0966511e4807d70c.js b/litellm/proxy/_experimental/out/_next/static/chunks/0966511e4807d70c.js new file mode 100644 index 0000000000..18df8e94be --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0966511e4807d70c.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,285027,e=>{"use strict";e.i(247167);var s=e.i(931067),t=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"};var a=e.i(9583),r=t.forwardRef(function(e,r){return t.createElement(a.default,(0,s.default)({},e,{ref:r,icon:l}))});e.s(["WarningOutlined",0,r],285027)},213205,e=>{"use strict";e.i(247167);var s=e.i(931067),t=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-add",theme:"outlined"};var a=e.i(9583),r=t.forwardRef(function(e,r){return t.createElement(a.default,(0,s.default)({},e,{ref:r,icon:l}))});e.s(["UserAddOutlined",0,r],213205)},355619,e=>{"use strict";var s=e.i(764205);let t=async(e,t,l)=>{try{if(null===e||null===t)return;if(null!==l){let a=(await (0,s.modelAvailableCall)(l,e,t,!0,null,!0)).data.map(e=>e.id),r=[],i=[];return a.forEach(e=>{e.endsWith("/*")?r.push(e):i.push(e)}),[...r,...i]}}catch(e){console.error("Error fetching user models:",e)}};e.s(["fetchAvailableModelsForTeamOrKey",0,t,"getModelDisplayName",0,e=>{if("all-proxy-models"===e)return"All Proxy Models";if(e.endsWith("/*")){let s=e.replace("/*","");return`All ${s} models`}return e},"unfurlWildcardModelsInList",0,(e,s)=>{let t=[],l=[];return console.log("teamModels",e),console.log("allModels",s),e.forEach(e=>{if(e.endsWith("/*")){let a=e.replace("/*",""),r=s.filter(e=>e.startsWith(a+"/"));l.push(...r),t.push(e)}else l.push(e)}),[...t,...l].filter((e,s,t)=>t.indexOf(e)===s)}])},860585,e=>{"use strict";var s=e.i(843476),t=e.i(199133);let{Option:l}=t.Select;e.s(["default",0,({value:e,onChange:a,className:r="",style:i={}})=>(0,s.jsxs)(t.Select,{style:{width:"100%",...i},value:e||void 0,onChange:a,className:r,placeholder:"n/a",allowClear:!0,children:[(0,s.jsx)(l,{value:"1h",children:"hourly"}),(0,s.jsx)(l,{value:"24h",children:"daily"}),(0,s.jsx)(l,{value:"7d",children:"weekly"}),(0,s.jsx)(l,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"1h":"hourly","24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])},447082,e=>{"use strict";var s=e.i(843476),t=e.i(271645),l=e.i(599724),a=e.i(464571),r=e.i(212931),i=e.i(291542),n=e.i(515831),d=e.i(898586),o=e.i(519756),c=e.i(737434),m=e.i(285027),u=e.i(993914),x=e.i(955135);e.i(247167);var h=e.i(931067);let p={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 42h216v494zM472 744a40 40 0 1080 0 40 40 0 10-80 0zm16-104h48c4.4 0 8-3.6 8-8V448c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8z"}}]},name:"file-exclamation",theme:"outlined"};var f=e.i(9583),g=t.forwardRef(function(e,s){return t.createElement(f.default,(0,h.default)({},e,{ref:s,icon:p}))}),j=e.i(764205),y=e.i(59935),v=e.i(220508),b=e.i(964306);let N=t.forwardRef(function(e,s){return t.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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))});var w=e.i(237016),_=e.i(727749);e.s(["default",0,({accessToken:e,teams:h,possibleUIRoles:p,onUsersCreated:f})=>{let[C,S]=(0,t.useState)(!1),[k,I]=(0,t.useState)([]),[T,U]=(0,t.useState)(!1),[V,B]=(0,t.useState)(null),[O,M]=(0,t.useState)(null),[L,F]=(0,t.useState)(null),[z,E]=(0,t.useState)(null),[P,A]=(0,t.useState)(null),[R,D]=(0,t.useState)("http://localhost:4000");(0,t.useEffect)(()=>{(async()=>{try{let s=await (0,j.getProxyUISettings)(e);A(s)}catch(e){console.error("Error fetching UI settings:",e)}})(),D(new URL("/",window.location.href).toString())},[e]);let $=async()=>{U(!0);let s=k.map(e=>({...e,status:"pending"}));I(s);let t=!1;for(let l=0;le.trim()).filter(Boolean),0===s.teams.length&&delete s.teams),a.models&&"string"==typeof a.models&&""!==a.models.trim()&&(s.models=a.models.split(",").map(e=>e.trim()).filter(Boolean),0===s.models.length&&delete s.models),a.max_budget&&""!==a.max_budget.toString().trim()){let e=parseFloat(a.max_budget.toString());!isNaN(e)&&e>0&&(s.max_budget=e)}a.budget_duration&&""!==a.budget_duration.trim()&&(s.budget_duration=a.budget_duration.trim()),a.metadata&&"string"==typeof a.metadata&&""!==a.metadata.trim()&&(s.metadata=a.metadata.trim()),console.log("Sending user data:",s);let r=await (0,j.userCreateCall)(e,null,s);if(console.log("Full response:",r),r&&(r.key||r.user_id)){t=!0,console.log("Success case triggered");let s=r.data?.user_id||r.user_id;try{if(P?.SSO_ENABLED){let e=new URL("/ui",R).toString();I(s=>s.map((s,t)=>t===l?{...s,status:"success",key:r.key||r.user_id,invitation_link:e}:s))}else{let t=await (0,j.invitationCreateCall)(e,s),a=new URL(`/ui?invitation_id=${t.id}`,R).toString();I(e=>e.map((e,s)=>s===l?{...e,status:"success",key:r.key||r.user_id,invitation_link:a}:e))}}catch(e){console.error("Error creating invitation:",e),I(e=>e.map((e,s)=>s===l?{...e,status:"success",key:r.key||r.user_id,error:"User created but failed to generate invitation link"}:e))}}else{console.log("Error case triggered");let e=r?.error||"Failed to create user";console.log("Error message:",e),I(s=>s.map((s,t)=>t===l?{...s,status:"failed",error:e}:s))}}catch(s){console.error("Caught error:",s);let e=s?.response?.data?.error||s?.message||String(s);I(s=>s.map((s,t)=>t===l?{...s,status:"failed",error:e}:s))}}U(!1),t&&f&&f()},W=[{title:"Row",dataIndex:"rowNumber",key:"rowNumber",width:80},{title:"Email",dataIndex:"user_email",key:"user_email"},{title:"Role",dataIndex:"user_role",key:"user_role"},{title:"Teams",dataIndex:"teams",key:"teams"},{title:"Budget",dataIndex:"max_budget",key:"max_budget"},{title:"Status",key:"status",render:(e,t)=>t.isValid?t.status&&"pending"!==t.status?"success"===t.status?(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(v.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}),(0,s.jsx)("span",{className:"text-green-500",children:"Success"})]}),t.invitation_link&&(0,s.jsx)("div",{className:"mt-1",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"text-xs text-gray-500 truncate max-w-[150px]",children:t.invitation_link}),(0,s.jsx)(w.CopyToClipboard,{text:t.invitation_link,onCopy:()=>_.default.success("Invitation link copied!"),children:(0,s.jsx)("button",{className:"ml-1 text-blue-500 text-xs hover:text-blue-700",children:"Copy"})})]})})]}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(b.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,s.jsx)("span",{className:"text-red-500",children:"Failed"})]}),t.error&&(0,s.jsx)("span",{className:"text-sm text-red-500 ml-7",children:JSON.stringify(t.error)})]}):(0,s.jsx)("span",{className:"text-gray-500",children:"Pending"}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(b.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,s.jsx)("span",{className:"text-red-500",children:"Invalid"})]}),t.error&&(0,s.jsx)("span",{className:"text-sm text-red-500 ml-7",children:t.error})]})}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.Button,{type:"primary",className:"mb-0",onClick:()=>S(!0),children:"+ Bulk Invite Users"}),(0,s.jsx)(r.Modal,{title:"Bulk Invite Users",open:C,width:800,onCancel:()=>S(!1),bodyStyle:{maxHeight:"70vh",overflow:"auto"},footer:null,children:(0,s.jsx)("div",{className:"flex flex-col",children:0===k.length?(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"1"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:"Download and fill the template"})]}),(0,s.jsxs)("div",{className:"ml-11 mb-6",children:[(0,s.jsx)("p",{className:"mb-4",children:"Add multiple users at once by following these steps:"}),(0,s.jsxs)("ol",{className:"list-decimal list-inside space-y-2 ml-2 mb-4",children:[(0,s.jsx)("li",{children:"Download our CSV template"}),(0,s.jsx)("li",{children:"Add your users' information to the spreadsheet"}),(0,s.jsx)("li",{children:"Save the file and upload it here"}),(0,s.jsx)("li",{children:"After creation, download the results file containing the Virtual Keys for each user"})]}),(0,s.jsxs)("div",{className:"bg-gray-50 p-4 rounded-md border border-gray-200 mb-4",children:[(0,s.jsx)("h4",{className:"font-medium mb-2",children:"Template Column Names"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"user_email"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"User's email address (required)"})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"user_role"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'User\'s role (one of: "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"teams"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated team IDs (e.g., "team-1,team-2")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"max_budget"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Maximum budget as a number (e.g., "100")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"budget_duration"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Budget reset period (e.g., "30d", "1mo")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"models"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated allowed models (e.g., "gpt-3.5-turbo,gpt-4")'})]})]})]})]}),(0,s.jsx)(a.Button,{type:"primary",size:"large",className:"w-full md:w-auto",icon:(0,s.jsx)(c.DownloadOutlined,{}),children:"Download CSV Template"})]}),(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"2"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:"Upload your completed CSV"})]}),(0,s.jsxs)("div",{className:"ml-11",children:[z?(0,s.jsxs)("div",{className:`mb-4 p-4 rounded-md border ${L?"bg-red-50 border-red-200":"bg-blue-50 border-blue-200"}`,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[L?(0,s.jsx)(g,{className:"text-red-500 text-xl mr-3"}):(0,s.jsx)(u.FileTextOutlined,{className:"text-blue-500 text-xl mr-3"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(d.Typography.Text,{strong:!0,className:L?"text-red-800":"text-blue-800",children:z.name}),(0,s.jsxs)(d.Typography.Text,{className:`block text-xs ${L?"text-red-600":"text-blue-600"}`,children:[(z.size/1024).toFixed(1)," KB • ",new Date().toLocaleDateString()]})]})]}),(0,s.jsx)(a.Button,{size:"small",onClick:()=>{E(null),I([]),B(null),M(null),F(null)},className:"flex items-center",icon:(0,s.jsx)(x.DeleteOutlined,{}),children:"Remove"})]}),L?(0,s.jsxs)("div",{className:"mt-3 text-red-600 text-sm flex items-start",children:[(0,s.jsx)(m.WarningOutlined,{className:"mr-2 mt-0.5"}),(0,s.jsx)("span",{children:L})]}):!O&&(0,s.jsxs)("div",{className:"mt-3 flex items-center",children:[(0,s.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:(0,s.jsx)("div",{className:"bg-blue-500 h-1.5 rounded-full w-full animate-pulse"})}),(0,s.jsx)("span",{className:"ml-2 text-xs text-blue-600",children:"Processing..."})]})]}):(0,s.jsx)(n.Upload,{beforeUpload:e=>((B(null),M(null),F(null),E(e),"text/csv"===e.type||e.name.endsWith(".csv"))?e.size>5242880?F(`File is too large (${(e.size/1048576).toFixed(1)} MB). Please upload a CSV file smaller than 5MB.`):y.default.parse(e,{complete:e=>{if(!e.data||0===e.data.length){M("The CSV file appears to be empty. Please upload a file with data."),I([]);return}if(1===e.data.length){M("The CSV file only contains headers but no user data. Please add user data to your CSV."),I([]);return}let s=e.data[0];if(0===s.length||1===s.length&&""===s[0]){M("The CSV file doesn't contain any column headers. Please make sure your CSV has headers."),I([]);return}let t=["user_email","user_role"].filter(e=>!s.includes(e));if(t.length>0){M(`Your CSV is missing these required columns: ${t.join(", ")}. Please add these columns to your CSV file.`),I([]);return}try{let t=e.data.slice(1).map((e,t)=>{if(0===e.length||1===e.length&&""===e[0])return null;if(e.length=parseFloat(l.max_budget.toString())&&a.push("Max budget must be greater than 0")),l.budget_duration&&!l.budget_duration.match(/^\d+[dhmwy]$|^\d+mo$/)&&a.push(`Invalid budget duration format "${l.budget_duration}". Use format like "30d", "1mo", "2w", "6h"`),l.teams&&"string"==typeof l.teams&&h&&h.length>0){let e=h.map(e=>e.team_id),s=l.teams.split(",").map(e=>e.trim()).filter(s=>!e.includes(s));s.length>0&&a.push(`Unknown team(s): ${s.join(", ")}`)}return a.length>0&&(l.isValid=!1,l.error=a.join(", ")),l}).filter(Boolean),l=t.filter(e=>e.isValid);I(t),0===t.length?M("No valid data rows found in the CSV file. Please check your file format."):0===l.length?B("No valid users found in the CSV. Please check the errors below and fix your CSV file."):l.length{B(`Failed to parse CSV file: ${e.message}`),I([])},header:!1}):(F(`Invalid file type: ${e.name}. Please upload a CSV file (.csv extension).`),_.default.fromBackend("Invalid file type. Please upload a CSV file.")),!1),accept:".csv",maxCount:1,showUploadList:!1,children:(0,s.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-blue-500 transition-colors cursor-pointer",children:[(0,s.jsx)(o.UploadOutlined,{className:"text-3xl text-gray-400 mb-2"}),(0,s.jsx)("p",{className:"mb-1",children:"Drag and drop your CSV file here"}),(0,s.jsx)("p",{className:"text-sm text-gray-500 mb-3",children:"or"}),(0,s.jsx)(a.Button,{size:"small",children:"Browse files"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-4",children:"Only CSV files (.csv) are supported"})]})}),O&&(0,s.jsx)("div",{className:"mb-4 p-4 bg-yellow-50 border border-yellow-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(N,{className:"h-5 w-5 text-yellow-500 mr-2 mt-0.5"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(d.Typography.Text,{strong:!0,className:"text-yellow-800",children:"CSV Structure Error"}),(0,s.jsx)(d.Typography.Paragraph,{className:"text-yellow-700 mt-1 mb-0",children:O}),(0,s.jsx)(d.Typography.Paragraph,{className:"text-yellow-700 mt-2 mb-0",children:"Please download our template and ensure your CSV follows the required format."})]})]})})]})]}):(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"3"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:k.some(e=>"success"===e.status||"failed"===e.status)?"User Creation Results":"Review and create users"})]}),V&&(0,s.jsx)("div",{className:"ml-11 mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(m.WarningOutlined,{className:"text-red-500 mr-2 mt-1"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(l.Text,{className:"text-red-600 font-medium",children:V}),k.some(e=>!e.isValid)&&(0,s.jsxs)("ul",{className:"mt-2 list-disc list-inside text-red-600 text-sm",children:[(0,s.jsx)("li",{children:"Check the table below for specific errors in each row"}),(0,s.jsx)("li",{children:"Common issues include invalid email formats, missing required fields, or incorrect role values"}),(0,s.jsx)("li",{children:"Fix these issues in your CSV file and upload again"})]})]})]})}),(0,s.jsxs)("div",{className:"ml-11",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,s.jsx)("div",{className:"flex items-center",children:k.some(e=>"success"===e.status||"failed"===e.status)?(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(l.Text,{className:"text-lg font-medium mr-3",children:"Creation Summary"}),(0,s.jsxs)(l.Text,{className:"text-sm bg-green-100 text-green-800 px-2 py-1 rounded mr-2",children:[k.filter(e=>"success"===e.status).length," Successful"]}),k.some(e=>"failed"===e.status)&&(0,s.jsxs)(l.Text,{className:"text-sm bg-red-100 text-red-800 px-2 py-1 rounded",children:[k.filter(e=>"failed"===e.status).length," Failed"]})]}):(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(l.Text,{className:"text-lg font-medium mr-3",children:"User Preview"}),(0,s.jsxs)(l.Text,{className:"text-sm bg-blue-100 text-blue-800 px-2 py-1 rounded",children:[k.filter(e=>e.isValid).length," of ",k.length," users valid"]})]})}),!k.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex space-x-3",children:[(0,s.jsx)(a.Button,{onClick:()=>{I([]),B(null)},children:"Back"}),(0,s.jsx)(a.Button,{type:"primary",onClick:$,disabled:0===k.filter(e=>e.isValid).length||T,children:T?"Creating...":`Create ${k.filter(e=>e.isValid).length} Users`})]})]}),k.some(e=>"success"===e.status)&&(0,s.jsx)("div",{className:"mb-4 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"mr-3 mt-1",children:(0,s.jsx)(v.CheckCircleIcon,{className:"h-5 w-5 text-blue-500"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(l.Text,{className:"font-medium text-blue-800",children:"User creation complete"}),(0,s.jsxs)(l.Text,{className:"block text-sm text-blue-700 mt-1",children:[(0,s.jsx)("span",{className:"font-medium",children:"Next step:"})," Download the credentials file containing Virtual Keys and invitation links. Users will need these Virtual Keys to make LLM requests through LiteLLM."]})]})]})}),(0,s.jsx)(i.Table,{dataSource:k,columns:W,size:"small",pagination:{pageSize:5},scroll:{y:300},rowClassName:e=>e.isValid?"":"bg-red-50"}),!k.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,s.jsx)(a.Button,{onClick:()=>{I([]),B(null)},className:"mr-3",children:"Back"}),(0,s.jsx)(a.Button,{type:"primary",onClick:$,disabled:0===k.filter(e=>e.isValid).length||T,children:T?"Creating...":`Create ${k.filter(e=>e.isValid).length} Users`})]}),k.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,s.jsx)(a.Button,{onClick:()=>{I([]),B(null)},className:"mr-3",children:"Start New Bulk Import"}),(0,s.jsx)(a.Button,{type:"primary",onClick:()=>{let e=k.map(e=>({user_email:e.user_email,user_role:e.user_role,status:e.status,key:e.key||"",invitation_link:e.invitation_link||"",error:e.error||""})),s=new Blob([y.default.unparse(e)],{type:"text/csv"}),t=window.URL.createObjectURL(s),l=document.createElement("a");l.href=t,l.download="bulk_users_results.csv",document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(t)},icon:(0,s.jsx)(c.DownloadOutlined,{}),children:"Download User Credentials"})]})]})]})})})]})}],447082)},371455,172372,e=>{"use strict";var s=e.i(843476),t=e.i(827252),l=e.i(213205),a=e.i(912598),r=e.i(109799),i=e.i(677667),n=e.i(130643),d=e.i(898667),o=e.i(35983),c=e.i(779241),m=e.i(560445),u=e.i(464571),x=e.i(808613),h=e.i(311451),p=e.i(212931),f=e.i(199133),g=e.i(770914),j=e.i(592968),y=e.i(898586),v=e.i(271645),b=e.i(447082),N=e.i(663435),w=e.i(355619),_=e.i(727749),C=e.i(764205),S=e.i(237016),k=e.i(599724);function I({isInvitationLinkModalVisible:e,setIsInvitationLinkModalVisible:t,baseUrl:l,invitationLinkData:a,modalType:r="invitation"}){let{Title:i,Paragraph:n}=y.Typography,d=()=>{if(!l)return"";let e=new URL(l).pathname,s=e&&"/"!==e?`${e}/ui`:"ui";if(a?.has_user_setup_sso)return new URL(s,l).toString();let t=`${s}?invitation_id=${a?.id}`;return"resetPassword"===r&&(t+="&action=reset_password"),new URL(t,l).toString()};return(0,s.jsxs)(p.Modal,{title:"invitation"===r?"Invitation Link":"Reset Password Link",open:e,width:800,footer:null,onOk:()=>{t(!1)},onCancel:()=>{t(!1)},children:[(0,s.jsx)(n,{children:"invitation"===r?"Copy and send the generated link to onboard this user to the proxy.":"Copy and send the generated link to the user to reset their password."}),(0,s.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,s.jsx)(k.Text,{className:"text-base",children:"User ID"}),(0,s.jsx)(k.Text,{children:a?.user_id})]}),(0,s.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,s.jsx)(k.Text,{children:"invitation"===r?"Invitation Link":"Reset Password Link"}),(0,s.jsx)(k.Text,{children:(0,s.jsx)(k.Text,{children:d()})})]}),(0,s.jsx)("div",{className:"flex justify-end mt-5",children:(0,s.jsx)(S.CopyToClipboard,{text:d(),onCopy:()=>_.default.success("Copied!"),children:(0,s.jsx)(u.Button,{type:"primary",children:"invitation"===r?"Copy invitation link":"Copy password reset link"})})})]})}e.s(["default",()=>I],172372);let{Option:T}=f.Select,{Text:U,Link:V,Title:B}=y.Typography;e.s(["CreateUserButton",0,({userID:e,accessToken:y,teams:S,possibleUIRoles:k,onUserCreated:B,isEmbedded:O=!1})=>{let M=(0,a.useQueryClient)(),[L,F]=(0,v.useState)(null),[z]=x.Form.useForm(),[E,P]=(0,v.useState)(!1),[A,R]=(0,v.useState)(!1),[D,$]=(0,v.useState)([]),[W,K]=(0,v.useState)(!1),[q,H]=(0,v.useState)(null),[G,J]=(0,v.useState)(null),{data:Q=[]}=(0,r.useOrganizations)();(0,v.useMemo)(()=>{let e=Q.flatMap(e=>e.teams||[]);return e.length>0?e:S||[]},[Q,S]),(0,v.useEffect)(()=>{let s=async()=>{try{let s=await (0,C.modelAvailableCall)(y,e,"any"),t=[];for(let e=0;e{try{_.default.info("Making API Call"),O||P(!0),s.models&&0!==s.models.length||"proxy_admin"===s.user_role||(s.models=["no-default-models"]),s.organization_ids&&(s.organizations=s.organization_ids,delete s.organization_ids);let t=await (0,C.userCreateCall)(y,null,s);await M.invalidateQueries({queryKey:["userList"]}),R(!0);let l=t.data?.user_id||t.user_id;if(B&&O){B(l),z.resetFields();return}if(L?.SSO_ENABLED){let s={id:"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let s=16*Math.random()|0;return("x"==e?s:3&s|8).toString(16)}),user_id:l,is_accepted:!1,accepted_at:null,expires_at:new Date(Date.now()+6048e5),created_at:new Date,created_by:e,updated_at:new Date,updated_by:e,has_user_setup_sso:!0};H(s),K(!0)}else(0,C.invitationCreateCall)(y,l).then(e=>{e.has_user_setup_sso=!1,H(e),K(!0)});_.default.success("API user Created"),z.resetFields(),localStorage.removeItem("userData"+e)}catch(s){let e=s.response?.data?.detail||s?.message||"Error creating the user";_.default.fromBackend(e),console.error("Error creating the user:",s)}};return O?(0,s.jsxs)(x.Form,{form:z,onFinish:X,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer"},children:[(0,s.jsx)(m.Alert,{message:"Email invitations",description:(0,s.jsxs)(s.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,s.jsx)(V,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,s.jsx)(x.Form.Item,{label:"User Email",name:"user_email",children:(0,s.jsx)(c.TextInput,{placeholder:""})}),(0,s.jsx)(x.Form.Item,{label:"User Role",name:"user_role",children:(0,s.jsx)(f.Select,{children:k&&Object.entries(k).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(o.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)(U,{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(x.Form.Item,{label:"Team",name:"team_id",children:(0,s.jsx)(N.default,{})}),(0,s.jsx)(x.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(h.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(u.Button,{htmlType:"submit",children:"Create User"})})]}):(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(u.Button,{type:"primary",className:"mb-0",onClick:()=>P(!0),children:"+ Invite User"}),(0,s.jsx)(b.default,{accessToken:y,teams:S,possibleUIRoles:k}),(0,s.jsxs)(p.Modal,{title:"Invite User",open:E,width:800,footer:null,onOk:()=>{P(!1),z.resetFields()},onCancel:()=>{P(!1),R(!1),z.resetFields()},children:[(0,s.jsxs)(g.Space,{direction:"vertical",size:"middle",children:[(0,s.jsx)(U,{className:"mb-1",children:"Create a User who can own keys"}),(0,s.jsx)(m.Alert,{message:"Email invitations",description:(0,s.jsxs)(s.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,s.jsx)(V,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"})]}),(0,s.jsxs)(x.Form,{form:z,onFinish:X,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer"},children:[(0,s.jsx)(x.Form.Item,{label:"User Email",name:"user_email",children:(0,s.jsx)(h.Input,{})}),(0,s.jsx)(x.Form.Item,{label:(0,s.jsxs)("span",{children:["Global Proxy Role"," ",(0,s.jsx)(j.Tooltip,{title:"This role is independent of any team/org specific roles. Configure Team / Organization Admins in the Settings",children:(0,s.jsx)(t.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,s.jsx)(f.Select,{children:k&&Object.entries(k).map(([e,{ui_label:t,description:l}])=>(0,s.jsxs)(o.SelectItem,{value:e,title:t,children:[(0,s.jsx)(U,{children:t}),(0,s.jsxs)(U,{type:"secondary",children:[" - ",l]})]},e))})}),(0,s.jsx)(x.Form.Item,{label:"Team",className:"gap-2",name:"team_id",help:"If selected, user will be added as a 'user' role to the team.",children:(0,s.jsx)(N.default,{})}),(0,s.jsx)(x.Form.Item,{label:"Organization",name:"organization_ids",help:"The user will be added to the selected organization(s).",children:(0,s.jsx)(f.Select,{mode:"multiple",placeholder:"Select Organization",style:{width:"100%"},children:Q.map(e=>(0,s.jsxs)(T,{value:e.organization_id,children:[e.organization_alias," (",e.organization_id,")"]},e.organization_id))})}),(0,s.jsx)(x.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(h.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsxs)(i.Accordion,{children:[(0,s.jsx)(d.AccordionHeader,{children:(0,s.jsx)(U,{strong:!0,children:"Personal Key Creation"})}),(0,s.jsx)(n.AccordionBody,{children:(0,s.jsx)(x.Form.Item,{className:"gap-2",label:(0,s.jsxs)("span",{children:["Models"," ",(0,s.jsx)(j.Tooltip,{title:"Models user has access to, outside of team scope.",children:(0,s.jsx)(t.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",help:"Models user has access to, outside of team scope.",children:(0,s.jsxs)(f.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,s.jsx)(f.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,s.jsx)(f.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),D.map(e=>(0,s.jsx)(f.Select.Option,{value:e,children:(0,w.getModelDisplayName)(e)},e))]})})})]}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(u.Button,{type:"primary",icon:(0,s.jsx)(l.UserAddOutlined,{}),htmlType:"submit",children:"Invite User"})})]})]}),A&&(0,s.jsx)(I,{isInvitationLinkModalVisible:W,setIsInvitationLinkModalVisible:K,baseUrl:G||"",invitationLinkData:q})]})}],371455)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0aa69cb206160fd2.js b/litellm/proxy/_experimental/out/_next/static/chunks/0aa69cb206160fd2.js deleted file mode 100644 index b1707a2d10..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/0aa69cb206160fd2.js +++ /dev/null @@ -1,3 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},906579,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),r=e.i(361275),n=e.i(702779),i=e.i(763731),o=e.i(242064);e.i(296059);var l=e.i(915654),s=e.i(694758),c=e.i(183293),u=e.i(403541),d=e.i(246422),f=e.i(838378);let m=new s.Keyframes("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),g=new s.Keyframes("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),h=new s.Keyframes("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),v=new s.Keyframes("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),p=new s.Keyframes("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),b=new s.Keyframes("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),y=e=>{let{fontHeight:t,lineWidth:a,marginXS:r,colorBorderBg:n}=e,i=e.colorTextLightSolid,o=e.colorError,l=e.colorErrorHover;return(0,f.mergeToken)(e,{badgeFontHeight:t,badgeShadowSize:a,badgeTextColor:i,badgeColor:o,badgeColorHover:l,badgeShadowColor:n,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},w=e=>{let{fontSize:t,lineHeight:a,fontSizeSM:r,lineWidth:n}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*a)-2*n,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}},x=(0,d.genStyleHooks)("Badge",e=>(e=>{let{componentCls:t,iconCls:a,antCls:r,badgeShadowSize:n,textFontSize:i,textFontSizeSM:o,statusSize:s,dotSize:d,textFontWeight:f,indicatorHeight:y,indicatorHeightSM:w,marginXS:x,calc:$}=e,S=`${r}-scroll-number`,z=(0,u.genPresetColor)(e,(e,{darkColor:a})=>({[`&${t} ${t}-color-${e}`]:{background:a,[`&:not(${t}-count)`]:{color:a},"a:hover &":{background:a}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:y,height:y,color:e.badgeTextColor,fontWeight:f,fontSize:i,lineHeight:(0,l.unit)(y),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:$(y).div(2).equal(),boxShadow:`0 0 0 ${(0,l.unit)(n)} ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:w,height:w,fontSize:o,lineHeight:(0,l.unit)(w),borderRadius:$(w).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${(0,l.unit)(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:d,minWidth:d,height:d,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${(0,l.unit)(n)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${S}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:b,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:n,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:m,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:x,color:e.colorText,fontSize:e.fontSize}}}),z),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:p,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${S}-custom-component, ${t}-count`]:{transform:"none"},[`${S}-custom-component, ${S}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[S]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${S}-only`]:{position:"relative",display:"inline-block",height:y,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${S}-only-unit`]:{height:y,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${S}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${S}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}})(y(e)),w),$=(0,d.genStyleHooks)(["Badge","Ribbon"],e=>(e=>{let{antCls:t,badgeFontHeight:a,marginXS:r,badgeRibbonOffset:n,calc:i}=e,o=`${t}-ribbon`,s=`${t}-ribbon-wrapper`,d=(0,u.genPresetColor)(e,(e,{darkColor:t})=>({[`&${o}-color-${e}`]:{background:t,color:t}}));return{[s]:{position:"relative"},[o]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"absolute",top:r,padding:`0 ${(0,l.unit)(e.paddingXS)}`,color:e.colorPrimary,lineHeight:(0,l.unit)(a),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${o}-text`]:{color:e.badgeTextColor},[`${o}-corner`]:{position:"absolute",top:"100%",width:n,height:n,color:"currentcolor",border:`${(0,l.unit)(i(n).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),d),{[`&${o}-placement-end`]:{insetInlineEnd:i(n).mul(-1).equal(),borderEndEndRadius:0,[`${o}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${o}-placement-start`]:{insetInlineStart:i(n).mul(-1).equal(),borderEndStartRadius:0,[`${o}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}})(y(e)),w),S=e=>{let r,{prefixCls:n,value:i,current:o,offset:l=0}=e;return l&&(r={position:"absolute",top:`${l}00%`,left:0}),t.createElement("span",{style:r,className:(0,a.default)(`${n}-only-unit`,{current:o})},i)},z=e=>{let a,r,{prefixCls:n,count:i,value:o}=e,l=Number(o),s=Math.abs(i),[c,u]=t.useState(l),[d,f]=t.useState(s),m=()=>{u(l),f(s)};if(t.useEffect(()=>{let e=setTimeout(m,1e3);return()=>clearTimeout(e)},[l]),c===l||Number.isNaN(l)||Number.isNaN(c))a=[t.createElement(S,Object.assign({},e,{key:l,current:!0}))],r={transition:"none"};else{a=[];let n=l+10,i=[];for(let e=l;e<=n;e+=1)i.push(e);let o=de%10===c);a=(o<0?i.slice(0,u+1):i.slice(u)).map((a,r)=>t.createElement(S,Object.assign({},e,{key:a,value:a%10,offset:o<0?r-u:r,current:r===u}))),r={transform:`translateY(${-function(e,t,a){let r=e,n=0;for(;(r+10)%10!==t;)r+=a,n+=a;return n}(c,l,o)}00%)`}}return t.createElement("span",{className:`${n}-only`,style:r,onTransitionEnd:m},a)};var E=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let O=t.forwardRef((e,r)=>{let{prefixCls:n,count:l,className:s,motionClassName:c,style:u,title:d,show:f,component:m="sup",children:g}=e,h=E(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:v}=t.useContext(o.ConfigContext),p=v("scroll-number",n),b=Object.assign(Object.assign({},h),{"data-show":f,style:u,className:(0,a.default)(p,s,c),title:d}),y=l;if(l&&Number(l)%1==0){let e=String(l).split("");y=t.createElement("bdi",null,e.map((a,r)=>t.createElement(z,{prefixCls:p,count:Number(l),value:a,key:e.length-r})))}return((null==u?void 0:u.borderColor)&&(b.style=Object.assign(Object.assign({},u),{boxShadow:`0 0 0 1px ${u.borderColor} inset`})),g)?(0,i.cloneElement)(g,e=>({className:(0,a.default)(`${p}-custom-component`,null==e?void 0:e.className,c)})):t.createElement(m,Object.assign({},b,{ref:r}),y)});var C=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let _=t.forwardRef((e,l)=>{var s,c,u,d,f;let{prefixCls:m,scrollNumberPrefixCls:g,children:h,status:v,text:p,color:b,count:y=null,overflowCount:w=99,dot:$=!1,size:S="default",title:z,offset:E,style:_,className:k,rootClassName:j,classNames:M,styles:N,showZero:I=!1}=e,L=C(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:P,direction:R,badge:T}=t.useContext(o.ConfigContext),H=P("badge",m),[B,V,D]=x(H),A=y>w?`${w}+`:y,F="0"===A||0===A||"0"===p||0===p,U=null===y||F&&!I,W=(null!=v||null!=b)&&U,K=null!=v||!F,q=$&&!F,Q=q?"":A,G=(0,t.useMemo)(()=>((null==Q||""===Q)&&(null==p||""===p)||F&&!I)&&!q,[Q,F,I,q,p]),X=(0,t.useRef)(y);G||(X.current=y);let Y=X.current,Z=(0,t.useRef)(Q);G||(Z.current=Q);let J=Z.current,ee=(0,t.useRef)(q);G||(ee.current=q);let et=(0,t.useMemo)(()=>{if(!E)return Object.assign(Object.assign({},null==T?void 0:T.style),_);let e={marginTop:E[1]};return"rtl"===R?e.left=Number.parseInt(E[0],10):e.right=-Number.parseInt(E[0],10),Object.assign(Object.assign(Object.assign({},e),null==T?void 0:T.style),_)},[R,E,_,null==T?void 0:T.style]),ea=null!=z?z:"string"==typeof Y||"number"==typeof Y?Y:void 0,er=!G&&(0===p?I:!!p&&!0!==p),en=er?t.createElement("span",{className:`${H}-status-text`},p):null,ei=Y&&"object"==typeof Y?(0,i.cloneElement)(Y,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,eo=(0,n.isPresetColor)(b,!1),el=(0,a.default)(null==M?void 0:M.indicator,null==(s=null==T?void 0:T.classNames)?void 0:s.indicator,{[`${H}-status-dot`]:W,[`${H}-status-${v}`]:!!v,[`${H}-color-${b}`]:eo}),es={};b&&!eo&&(es.color=b,es.background=b);let ec=(0,a.default)(H,{[`${H}-status`]:W,[`${H}-not-a-wrapper`]:!h,[`${H}-rtl`]:"rtl"===R},k,j,null==T?void 0:T.className,null==(c=null==T?void 0:T.classNames)?void 0:c.root,null==M?void 0:M.root,V,D);if(!h&&W&&(p||K||!U)){let e=et.color;return B(t.createElement("span",Object.assign({},L,{className:ec,style:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.root),null==(u=null==T?void 0:T.styles)?void 0:u.root),et)}),t.createElement("span",{className:el,style:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.indicator),null==(d=null==T?void 0:T.styles)?void 0:d.indicator),es)}),er&&t.createElement("span",{style:{color:e},className:`${H}-status-text`},p)))}return B(t.createElement("span",Object.assign({ref:l},L,{className:ec,style:Object.assign(Object.assign({},null==(f=null==T?void 0:T.styles)?void 0:f.root),null==N?void 0:N.root)}),h,t.createElement(r.default,{visible:!G,motionName:`${H}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:e})=>{var r,n;let i=P("scroll-number",g),o=ee.current,l=(0,a.default)(null==M?void 0:M.indicator,null==(r=null==T?void 0:T.classNames)?void 0:r.indicator,{[`${H}-dot`]:o,[`${H}-count`]:!o,[`${H}-count-sm`]:"small"===S,[`${H}-multiple-words`]:!o&&J&&J.toString().length>1,[`${H}-status-${v}`]:!!v,[`${H}-color-${b}`]:eo}),s=Object.assign(Object.assign(Object.assign({},null==N?void 0:N.indicator),null==(n=null==T?void 0:T.styles)?void 0:n.indicator),et);return b&&!eo&&((s=s||{}).background=b),t.createElement(O,{prefixCls:i,show:!G,motionClassName:e,className:l,count:J,title:ea,style:s,key:"scrollNumber"},ei)}),en))});_.Ribbon=e=>{let{className:r,prefixCls:i,style:l,color:s,children:c,text:u,placement:d="end",rootClassName:f}=e,{getPrefixCls:m,direction:g}=t.useContext(o.ConfigContext),h=m("ribbon",i),v=`${h}-wrapper`,[p,b,y]=$(h,v),w=(0,n.isPresetColor)(s,!1),x=(0,a.default)(h,`${h}-placement-${d}`,{[`${h}-rtl`]:"rtl"===g,[`${h}-color-${s}`]:w},r),S={},z={};return s&&!w&&(S.background=s,z.color=s),p(t.createElement("div",{className:(0,a.default)(v,f,b,y)},c,t.createElement("div",{className:(0,a.default)(x,b),style:Object.assign(Object.assign({},S),l)},t.createElement("span",{className:`${h}-text`},u),t.createElement("div",{className:`${h}-corner`,style:z}))))},e.s(["Badge",0,_],906579)},948401,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["MailOutlined",0,i],948401)},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={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"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["RobotOutlined",0,i],983561)},56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},771674,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={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"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["UserOutlined",0,i],771674)},645526,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["TeamOutlined",0,i],645526)},109799,e=>{"use strict";var t=e.i(135214),a=e.i(764205),r=e.i(266027),n=e.i(912598);let i=(0,e.i(243652).createQueryKeys)("organizations");e.s(["useOrganization",0,e=>{let o=(0,n.useQueryClient)(),{accessToken:l}=(0,t.default)();return(0,r.useQuery)({queryKey:i.detail(e),enabled:!!(l&&e),queryFn:async()=>{if(!l||!e)throw Error("Missing auth or teamId");return(0,a.organizationInfoCall)(l,e)},initialData:()=>{if(!e)return;let t=o.getQueryData(i.list({}));return t?.find(t=>t.organization_id===e)}})},"useOrganizations",0,()=>{let{accessToken:e,userId:n,userRole:o}=(0,t.default)();return(0,r.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.organizationListCall)(e),enabled:!!(e&&n&&o)})}])},993914,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={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"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["FileTextOutlined",0,i],993914)},631171,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",()=>t])},389083,e=>{"use strict";var t=e.i(290571),a=e.i(271645),r=e.i(829087),n=e.i(480731),i=e.i(95779),o=e.i(444755),l=e.i(673706);let s={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"}},c={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"}},u=(0,l.makeClassName)("Badge"),d=a.default.forwardRef((e,d)=>{let{color:f,icon:m,size:g=n.Sizes.SM,tooltip:h,className:v,children:p}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),y=m||null,{tooltipProps:w,getReferenceProps:x}=(0,r.useTooltip)();return a.default.createElement("span",Object.assign({ref:(0,l.mergeRefs)([d,w.refs.setReference]),className:(0,o.tremorTwMerge)(u("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",f?(0,o.tremorTwMerge)((0,l.getColorClassNames)(f,i.colorPalette.background).bgColor,(0,l.getColorClassNames)(f,i.colorPalette.iconText).textColor,(0,l.getColorClassNames)(f,i.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,o.tremorTwMerge)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),s[g].paddingX,s[g].paddingY,s[g].fontSize,v)},x,b),a.default.createElement(r.default,Object.assign({text:h},w)),y?a.default.createElement(y,{className:(0,o.tremorTwMerge)(u("icon"),"shrink-0 -ml-1 mr-1.5",c[g].height,c[g].width)}):null,a.default.createElement("span",{className:(0,o.tremorTwMerge)(u("text"),"whitespace-nowrap")},p))});d.displayName="Badge",e.s(["Badge",()=>d],389083)},560445,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(201072),r=e.i(726289),n=e.i(864517),i=e.i(562901),o=e.i(779573),l=e.i(343794),s=e.i(361275),c=e.i(244009),u=e.i(611935),d=e.i(763731),f=e.i(242064);e.i(296059);var m=e.i(915654),g=e.i(183293),h=e.i(246422);let v=(e,t,a,r,n)=>({background:e,border:`${(0,m.unit)(r.lineWidth)} ${r.lineType} ${t}`,[`${n}-icon`]:{color:a}}),p=(0,h.genStyleHooks)("Alert",e=>[(e=>{let{componentCls:t,motionDurationSlow:a,marginXS:r,marginSM:n,fontSize:i,fontSizeLG:o,lineHeight:l,borderRadiusLG:s,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:m,defaultPadding:h}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"relative",display:"flex",alignItems:"center",padding:h,wordWrap:"break-word",borderRadius:s,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:l},"&-message":{color:f},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${a} ${c}, opacity ${a} ${c}, - padding-top ${a} ${c}, padding-bottom ${a} ${c}, - margin-bottom ${a} ${c}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",padding:m,[`${t}-icon`]:{marginInlineEnd:n,fontSize:u,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:r,color:f,fontSize:o},[`${t}-description`]:{display:"block",color:d}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}})(e),(e=>{let{componentCls:t,colorSuccess:a,colorSuccessBorder:r,colorSuccessBg:n,colorWarning:i,colorWarningBorder:o,colorWarningBg:l,colorError:s,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:m}=e;return{[t]:{"&-success":v(n,r,a,e,t),"&-info":v(m,f,d,e,t),"&-warning":v(l,o,i,e,t),"&-error":Object.assign(Object.assign({},v(u,c,s,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}})(e),(e=>{let{componentCls:t,iconCls:a,motionDurationMid:r,marginXS:n,fontSizeIcon:i,colorIcon:o,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:n},[`${t}-close-icon`]:{marginInlineStart:n,padding:0,overflow:"hidden",fontSize:i,lineHeight:(0,m.unit)(i),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${a}-close`]:{color:o,transition:`color ${r}`,"&:hover":{color:l}}},"&-close-text":{color:o,transition:`color ${r}`,"&:hover":{color:l}}}}})(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}));var b=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let y={success:a.default,info:o.default,error:r.default,warning:i.default},w=e=>{let{icon:a,prefixCls:r,type:n}=e,i=y[n]||null;return a?(0,d.replaceElement)(a,t.createElement("span",{className:`${r}-icon`},a),()=>({className:(0,l.default)(`${r}-icon`,a.props.className)})):t.createElement(i,{className:`${r}-icon`})},x=e=>{let{isClosable:a,prefixCls:r,closeIcon:i,handleClose:o,ariaProps:l}=e,s=!0===i||void 0===i?t.createElement(n.default,null):i;return a?t.createElement("button",Object.assign({type:"button",onClick:o,className:`${r}-close-icon`,tabIndex:0},l),s):null},$=t.forwardRef((e,a)=>{let{description:r,prefixCls:n,message:i,banner:o,className:d,rootClassName:m,style:g,onMouseEnter:h,onMouseLeave:v,onClick:y,afterClose:$,showIcon:S,closable:z,closeText:E,closeIcon:O,action:C,id:_}=e,k=b(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[j,M]=t.useState(!1),N=t.useRef(null);t.useImperativeHandle(a,()=>({nativeElement:N.current}));let{getPrefixCls:I,direction:L,closable:P,closeIcon:R,className:T,style:H}=(0,f.useComponentConfig)("alert"),B=I("alert",n),[V,D,A]=p(B),F=t=>{var a;M(!0),null==(a=e.onClose)||a.call(e,t)},U=t.useMemo(()=>void 0!==e.type?e.type:o?"warning":"info",[e.type,o]),W=t.useMemo(()=>"object"==typeof z&&!!z.closeIcon||!!E||("boolean"==typeof z?z:!1!==O&&null!=O||!!P),[E,O,z,P]),K=!!o&&void 0===S||S,q=(0,l.default)(B,`${B}-${U}`,{[`${B}-with-description`]:!!r,[`${B}-no-icon`]:!K,[`${B}-banner`]:!!o,[`${B}-rtl`]:"rtl"===L},T,d,m,A,D),Q=(0,c.default)(k,{aria:!0,data:!0}),G=t.useMemo(()=>"object"==typeof z&&z.closeIcon?z.closeIcon:E||(void 0!==O?O:"object"==typeof P&&P.closeIcon?P.closeIcon:R),[O,z,P,E,R]),X=t.useMemo(()=>{let e=null!=z?z:P;if("object"==typeof e){let{closeIcon:t}=e;return b(e,["closeIcon"])}return{}},[z,P]);return V(t.createElement(s.default,{visible:!j,motionName:`${B}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:$},({className:a,style:n},o)=>t.createElement("div",Object.assign({id:_,ref:(0,u.composeRef)(N,o),"data-show":!j,className:(0,l.default)(q,a),style:Object.assign(Object.assign(Object.assign({},H),g),n),onMouseEnter:h,onMouseLeave:v,onClick:y,role:"alert"},Q),K?t.createElement(w,{description:r,icon:e.icon,prefixCls:B,type:U}):null,t.createElement("div",{className:`${B}-content`},i?t.createElement("div",{className:`${B}-message`},i):null,r?t.createElement("div",{className:`${B}-description`},r):null),C?t.createElement("div",{className:`${B}-action`},C):null,t.createElement(x,{isClosable:W,prefixCls:B,closeIcon:G,handleClose:F,ariaProps:X}))))});var S=e.i(278409),z=e.i(233848),E=e.i(487806),O=e.i(479671),C=e.i(480002),_=e.i(868917);let k=function(e){function a(){var e,t,r;return(0,S.default)(this,a),t=a,r=arguments,t=(0,E.default)(t),(e=(0,C.default)(this,(0,O.default)()?Reflect.construct(t,r||[],(0,E.default)(this).constructor):t.apply(this,r))).state={error:void 0,info:{componentStack:""}},e}return(0,_.default)(a,e),(0,z.default)(a,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,description:a,id:r,children:n}=this.props,{error:i,info:o}=this.state,l=(null==o?void 0:o.componentStack)||null,s=void 0===e?(i||"").toString():e;return i?t.createElement($,{id:r,type:"error",message:s,description:t.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},void 0===a?l:a)}):n}}])}(t.Component);$.ErrorBoundary=k,e.s(["Alert",0,$],560445)},366845,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["default",0,i],366845)},621482,e=>{"use strict";var t=e.i(869230),a=e.i(992571),r=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,a.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,a.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:l,isRefetchError:s}=n,c=r.fetchMeta?.fetchMore?.direction,u=l&&"forward"===c,d=i&&"forward"===c,f=l&&"backward"===c,m=i&&"backward"===c;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a.hasNextPage)(t,r.data),hasPreviousPage:(0,a.hasPreviousPage)(t,r.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:m,isRefetchError:s&&!u&&!f,isRefetching:o&&!d&&!m}}},n=e.i(469637);function i(e,t){return(0,n.useBaseQuery)(e,r,t)}e.s(["useInfiniteQuery",()=>i],621482)},270345,e=>{"use strict";var t=e.i(764205);let a=async(e,a,r,n)=>"Admin"!=r&&"Admin Viewer"!=r?await (0,t.teamListCall)(e,n?.organization_id||null,a):await (0,t.teamListCall)(e,n?.organization_id||null);e.s(["fetchTeams",0,a])},785242,e=>{"use strict";var t=e.i(619273),a=e.i(621482),r=e.i(266027),n=e.i(912598),i=e.i(135214),o=e.i(270345),l=e.i(243652),s=e.i(764205);let c=async(e,t,a,r={})=>{try{let n=(0,s.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:r.teamID,organization_id:r.organizationID,team_alias:r.team_alias,user_id:r.userID,page:t,page_size:a,sort_by:r.sortBy,sort_order:r.sortOrder,status:r.status}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${n?`${n}/v2/team/list`:"/v2/team/list"}?${i}`,l=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}let c=await l.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to list teams:",e),e}},u=(0,l.createQueryKeys)("teams"),d=(0,l.createQueryKeys)("infiniteTeams"),f=async(e,t,a,r={})=>{try{let n=(0,s.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:r.teamID,organization_id:r.organizationID,team_alias:r.team_alias,user_id:r.userID,page:t,page_size:a,sort_by:r.sortBy,sort_order:r.sortOrder,status:"deleted"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${n?`${n}/v2/team/list`:"/v2/team/list"}?${i}`,l=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}let c=await l.json();if(console.log("/team/list?status=deleted API Response:",c),c&&"object"==typeof c&&"teams"in c)return c.teams;return c}catch(e){throw console.error("Failed to list deleted teams:",e),e}},m=(0,l.createQueryKeys)("deletedTeams");e.s(["teamListCall",0,c,"useDeletedTeams",0,(e,a,n={})=>{let{accessToken:o}=(0,i.default)();return(0,r.useQuery)({queryKey:m.list({page:e,limit:a,...n}),queryFn:async()=>await f(o,e,a,n),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})},"useInfiniteTeams",0,(e=50,t,r)=>{let{accessToken:n,userId:o,userRole:l}=(0,i.default)(),s="Admin"===l||"Admin Viewer"===l;return(0,a.useInfiniteQuery)({queryKey:d.list({filters:{pageSize:e,...t&&{search:t},...r&&{organizationId:r},...o&&{userId:o}}}),queryFn:async({pageParam:a})=>await c(n,a,e,{team_alias:t||void 0,organizationID:r,userID:s?void 0:o}),initialPageParam:1,getNextPageParam:e=>{if(e.page{let{accessToken:t}=(0,i.default)(),a=(0,n.useQueryClient)();return(0,r.useQuery)({queryKey:u.detail(e),enabled:!!(t&&e),queryFn:async()=>{if(!t||!e)throw Error("Missing auth or teamId");return(0,s.teamInfoCall)(t,e)},initialData:()=>{if(!e)return;let t=a.getQueryData(u.list({}));return t?.find(t=>t.team_id===e)}})},"useTeams",0,()=>{let{accessToken:e,userId:t,userRole:a}=(0,i.default)();return(0,r.useQuery)({queryKey:u.list({}),queryFn:async()=>await (0,o.fetchTeams)(e,t,a,null),enabled:!!e})}])},371401,e=>{"use strict";var t=e.i(115571),a=e.i(271645);function r(e){let a=t=>{"disableUsageIndicator"===t.key&&e()},r=t=>{let{key:a}=t.detail;"disableUsageIndicator"===a&&e()};return window.addEventListener("storage",a),window.addEventListener(t.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",a),window.removeEventListener(t.LOCAL_STORAGE_EVENT,r)}}function n(){return"true"===(0,t.getLocalStorageItem)("disableUsageIndicator")}function i(){return(0,a.useSyncExternalStore)(r,n)}e.s(["useDisableUsageIndicator",()=>i])},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},115571,e=>{"use strict";let t="local-storage-change";function a(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))}function r(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}}function n(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}function i(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}}e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",()=>a,"getLocalStorageItem",()=>r,"removeLocalStorageItem",()=>i,"setLocalStorageItem",()=>n])},275144,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(764205);let n=(0,a.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:i})=>{let[o,l]=(0,a.useState)(null),[s,c]=(0,a.useState)(null);return(0,a.useEffect)(()=>{(async()=>{try{let e=(0,r.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",a=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(a.ok){let e=await a.json();e.values?.logo_url&&l(e.values.logo_url),e.values?.favicon_url&&c(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,a.useEffect)(()=>{if(s){let e=document.querySelectorAll("link[rel*='icon']");if(e.length>0)e.forEach(e=>{e.href=s});else{let e=document.createElement("link");e.rel="icon",e.href=s,document.head.appendChild(e)}}},[s]),(0,t.jsx)(n.Provider,{value:{logoUrl:o,setLogoUrl:l,faviconUrl:s,setFaviconUrl:c},children:e})},"useTheme",0,()=>{let e=(0,a.useContext)(n);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},44121,186515,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["MenuFoldOutlined",0,i],44121);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var l=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:o}))});e.s(["MenuUnfoldOutlined",0,l],186515)},755151,e=>{"use strict";var t=e.i(247153);e.s(["DownOutlined",()=>t.default])},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},295320,283713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["CloudServerOutlined",0,i],295320);var o=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,r=e?.workers??[],[n,i]=(0,a.useState)(()=>localStorage.getItem(s));(0,a.useEffect)(()=>{if(!n||0===r.length)return;let e=r.find(e=>e.worker_id===n);e&&(0,o.switchToWorkerUrl)(e.url)},[n,r]);let c=r.find(e=>e.worker_id===n)??null,u=(0,a.useCallback)(e=>{let t=r.find(t=>t.worker_id===e);t&&(i(e),localStorage.setItem(s,e),(0,o.switchToWorkerUrl)(t.url))},[r]);return{isControlPlane:t,workers:r,selectedWorkerId:n,selectedWorker:c,selectWorker:u,disconnectFromWorker:(0,a.useCallback)(()=>{i(null),localStorage.removeItem(s),(0,o.switchToWorkerUrl)(null)},[])}}],283713)},100486,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["CrownOutlined",0,i],100486)},818581,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useMergedRef",{enumerable:!0,get:function(){return n}});let r=e.r(271645);function n(e,t){let a=(0,r.useRef)(null),n=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=a.current;e&&(a.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(a.current=i(e,r)),t&&(n.current=i(t,r))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let a=e(t);return"function"==typeof a?a:()=>e(null)}}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},62478,e=>{"use strict";var t=e.i(764205);let a=async e=>{if(!e)return null;try{return await (0,t.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};e.s(["fetchProxySettings",0,a])},602073,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={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"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["SafetyOutlined",0,i],602073)},477189,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["AppstoreOutlined",0,i],477189)},788191,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["PlayCircleOutlined",0,i],788191)},399219,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",()=>t])},844444,e=>{"use strict";var t=e.i(843476),a=e.i(906579),r=e.i(271645),n=e.i(115571);function i(e){let t=t=>{"disableShowNewBadge"===t.key&&e()},a=t=>{let{key:a}=t.detail;"disableShowNewBadge"===a&&e()};return window.addEventListener("storage",t),window.addEventListener(n.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",t),window.removeEventListener(n.LOCAL_STORAGE_EVENT,a)}}function o(){return"true"===(0,n.getLocalStorageItem)("disableShowNewBadge")}function l({children:e,dot:n=!1}){return(0,r.useSyncExternalStore)(i,o)?e?(0,t.jsx)(t.Fragment,{children:e}):null:e?(0,t.jsx)(a.Badge,{color:"blue",count:n?void 0:"New",dot:n,children:e}):(0,t.jsx)(a.Badge,{color:"blue",count:n?void 0:"New",dot:n})}e.s(["default",()=>l],844444)},299251,153702,777579,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["BankOutlined",0,i],299251);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"};var l=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:o}))});e.s(["BarChartOutlined",0,l],153702);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"};var c=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["LineChartOutlined",0,c],777579)},582458,e=>{"use strict";let t=(0,e.i(475254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",()=>t])},19732,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z"}}]},name:"experiment",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ExperimentOutlined",0,i],19732)},438957,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z"}}]},name:"key",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["KeyOutlined",0,i],438957)},366308,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ToolOutlined",0,i],366308)},313603,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["SettingOutlined",0,i],313603)},872934,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ExportOutlined",0,i],872934)},232164,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["TagsOutlined",0,i],232164)},210612,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["DatabaseOutlined",0,i],210612)},218129,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={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"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ApiOutlined",0,i],218129)},878894,664659,531278,e=>{"use strict";var t=e.i(582458);e.s(["AlertTriangle",()=>t.default],878894);var a=e.i(631171);e.s(["ChevronDown",()=>a.default],664659);let r=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>r],531278)},902739,e=>{"use strict";var t=e.i(843476),a=e.i(111672),r=e.i(764205),n=e.i(135214),i=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:o,sidebarCollapsed:l})=>{let{accessToken:s}=(0,n.default)(),[c,u]=(0,i.useState)(null),[d,f]=(0,i.useState)(!1),[m,g]=(0,i.useState)(!1),[h,v]=(0,i.useState)(!1),[p,b]=(0,i.useState)(!1),[y,w]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{(async()=>{if(!s)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,r.getUISettings)(s);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),u(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&f(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&v(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&b(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&w(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[s]),(0,t.jsx)(a.default,{setPage:e,defaultSelectedKey:o,collapsed:l,enabledPagesInternalUsers:c,enableProjectsUI:d,disableAgentsForInternalUsers:m,allowAgentsForTeamAdmins:h,disableVectorStoresForInternalUsers:p,allowVectorStoresForTeamAdmins:y})}])},216370,e=>{"use strict";e.i(247167);var t=e.i(843476),a=e.i(271645),r=e.i(402874),n=e.i(275144),i=e.i(902739),o=e.i(135214),l=e.i(618566),s=e.i(560445),c=e.i(521323);let u=()=>{let{data:e}=(0,c.useHealthReadiness)();return e?.is_detailed_debug?(0,t.jsx)(s.Alert,{message:"Performance Warning: Detailed Debug Mode Active",description:(0,t.jsxs)(t.Fragment,{children:["Detailed debug logging (",(0,t.jsx)("code",{children:"LITELLM_LOG=DEBUG"}),") is currently enabled. This mode logs extensive diagnostic information and will significantly degrade performance. It should only be used for troubleshooting and disabled in production environments."]}),type:"warning",showIcon:!0,banner:!0,style:{marginBottom:0,borderRadius:0}}):null},d=function(e){let t="ui/".trim();if(!t)return"";let a=t.replace(/^\/+/,"").replace(/\/+$/,"");return a?`/${a}/`:"/"}(0);function f(e){let t=e.startsWith("/")?e.slice(1):e,a=`${d}${t}`;return a.startsWith("/")?a:`/${a}`}let m={"api-reference":"api-reference"};function g({children:e}){let s=(0,l.useRouter)(),c=(0,l.useSearchParams)(),{accessToken:d,userRole:g,userId:h,userEmail:v,premiumUser:p}=(0,o.default)(),[b,y]=a.default.useState(!1),[w,x]=(0,a.useState)(()=>c.get("page")||"api-keys");return(0,a.useEffect)(()=>{x(c.get("page")||"api-keys")},[c]),(0,t.jsx)(n.ThemeProvider,{accessToken:"",children:(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,t.jsx)(r.default,{isPublicPage:!1,sidebarCollapsed:b,onToggleSidebar:()=>y(e=>!e),userID:h,userEmail:v,userRole:g,premiumUser:p,proxySettings:void 0,setProxySettings:()=>{},accessToken:d,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,t.jsx)(u,{}),(0,t.jsxs)("div",{className:"flex flex-1 overflow-auto",children:[(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(i.default,{setPage:e=>{let t=m[e];if(t){s.push(f(t)),x(e);return}s.push(f(`?page=${e}`)),x(e)},defaultSelectedKey:w,sidebarCollapsed:b})}),(0,t.jsx)("main",{className:"flex-1",children:e})]})]})})}function h({children:e}){return(0,t.jsx)(a.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(g,{children:e})})}e.s(["default",()=>h],216370)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0f59b35ee0664fe0.js b/litellm/proxy/_experimental/out/_next/static/chunks/0f59b35ee0664fe0.js new file mode 100644 index 0000000000..3f1d0dc953 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0f59b35ee0664fe0.js @@ -0,0 +1,7 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),o=e.i(673706),n=e.i(271645);let a=n.default.forwardRef((e,a)=>{let{color:i,className:l,children:s}=e;return n.default.createElement("p",{ref:a,className:(0,r.tremorTwMerge)("text-tremor-default",i?(0,o.getColorClassNames)(i,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),l)},s)});a.displayName="Text",e.s(["default",()=>a],936325),e.s(["Text",()=>a],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(480731),n=e.i(95779),a=e.i(444755),i=e.i(673706);let l=(0,i.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:c="",decorationColor:u,children:d,className:f}=e,p=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,className:(0,a.tremorTwMerge)(l("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",u?(0,i.getColorClassNames)(u,n.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case o.HorizontalPositions.Left:return"border-l-4";case o.VerticalPositions.Top:return"border-t-4";case o.HorizontalPositions.Right:return"border-r-4";case o.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),f)},p),d)});s.displayName="Card",e.s(["Card",()=>s],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),o=e.i(444755),n=e.i(673706),a=e.i(271645);let i=a.default.forwardRef((e,i)=>{let{color:l,children:s,className:c}=e,u=(0,t.__rest)(e,["color","children","className"]);return a.default.createElement("p",Object.assign({ref:i,className:(0,o.tremorTwMerge)("font-medium text-tremor-title",l?(0,n.getColorClassNames)(l,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},u),s)});i.displayName="Title",e.s(["Title",()=>i],629569)},91874,e=>{"use strict";var t=e.i(931067),r=e.i(209428),o=e.i(211577),n=e.i(392221),a=e.i(703923),i=e.i(343794),l=e.i(914949),s=e.i(271645),c=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],u=(0,s.forwardRef)(function(e,u){var d=e.prefixCls,f=void 0===d?"rc-checkbox":d,p=e.className,m=e.style,g=e.checked,b=e.disabled,h=e.defaultChecked,v=e.type,y=void 0===v?"checkbox":v,$=e.title,C=e.onChange,k=(0,a.default)(e,c),x=(0,s.useRef)(null),S=(0,s.useRef)(null),w=(0,l.default)(void 0!==h&&h,{value:g}),O=(0,n.default)(w,2),E=O[0],j=O[1];(0,s.useImperativeHandle)(u,function(){return{focus:function(e){var t;null==(t=x.current)||t.focus(e)},blur:function(){var e;null==(e=x.current)||e.blur()},input:x.current,nativeElement:S.current}});var N=(0,i.default)(f,p,(0,o.default)((0,o.default)({},"".concat(f,"-checked"),E),"".concat(f,"-disabled"),b));return s.createElement("span",{className:N,title:$,style:m,ref:S},s.createElement("input",(0,t.default)({},k,{className:"".concat(f,"-input"),ref:x,onChange:function(t){b||("checked"in e||j(t.target.checked),null==C||C({target:(0,r.default)((0,r.default)({},e),{},{type:y,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:b,checked:!!E,type:y})),s.createElement("span",{className:"".concat(f,"-inner")}))});e.s(["default",0,u])},421512,236836,e=>{"use strict";let t=e.i(271645).default.createContext(null);e.s(["default",0,t],421512),e.i(296059);var r=e.i(915654),o=e.i(183293),n=e.i(246422),a=e.i(838378);function i(e,t){return(e=>{let{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,o.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},(0,o.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,o.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,o.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,r.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,r.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[` + ${n}:not(${n}-disabled), + ${t}:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[` + ${n}-checked:not(${n}-disabled), + ${t}-checked:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,a.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let l=(0,n.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[i(t,e)]);e.s(["default",0,l,"getStyle",()=>i],236836)},681216,e=>{"use strict";var t=e.i(271645),r=e.i(963188);function o(e){let o=t.default.useRef(null),n=()=>{r.default.cancel(o.current),o.current=null};return[()=>{n(),o.current=(0,r.default)(()=>{o.current=null})},t=>{o.current&&(t.stopPropagation(),n()),null==e||e(t)}]}e.s(["default",()=>o])},374276,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(91874),n=e.i(611935),a=e.i(121872),i=e.i(26905),l=e.i(242064),s=e.i(937328),c=e.i(321883),u=e.i(62139),d=e.i(421512),f=e.i(236836),p=e.i(681216),m=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let g=t.forwardRef((e,g)=>{var b;let{prefixCls:h,className:v,rootClassName:y,children:$,indeterminate:C=!1,style:k,onMouseEnter:x,onMouseLeave:S,skipGroup:w=!1,disabled:O}=e,E=m(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:j,direction:N,checkbox:P}=t.useContext(l.ConfigContext),I=t.useContext(d.default),{isFormItemInput:T}=t.useContext(u.FormItemInputContext),R=t.useContext(s.default),D=null!=(b=(null==I?void 0:I.disabled)||O)?b:R,z=t.useRef(E.value),M=t.useRef(null),A=(0,n.composeRef)(g,M);t.useEffect(()=>{null==I||I.registerValue(E.value)},[]),t.useEffect(()=>{if(!w)return E.value!==z.current&&(null==I||I.cancelValue(z.current),null==I||I.registerValue(E.value),z.current=E.value),()=>null==I?void 0:I.cancelValue(E.value)},[E.value]),t.useEffect(()=>{var e;(null==(e=M.current)?void 0:e.input)&&(M.current.input.indeterminate=C)},[C]);let W=j("checkbox",h),B=(0,c.default)(W),[F,L,X]=(0,f.default)(W,B),_=Object.assign({},E);I&&!w&&(_.onChange=(...e)=>{E.onChange&&E.onChange.apply(E,e),I.toggleOption&&I.toggleOption({label:$,value:E.value})},_.name=I.name,_.checked=I.value.includes(E.value));let H=(0,r.default)(`${W}-wrapper`,{[`${W}-rtl`]:"rtl"===N,[`${W}-wrapper-checked`]:_.checked,[`${W}-wrapper-disabled`]:D,[`${W}-wrapper-in-form-item`]:T},null==P?void 0:P.className,v,y,X,B,L),q=(0,r.default)({[`${W}-indeterminate`]:C},i.TARGET_CLS,L),[V,G]=(0,p.default)(_.onClick);return F(t.createElement(a.default,{component:"Checkbox",disabled:D},t.createElement("label",{className:H,style:Object.assign(Object.assign({},null==P?void 0:P.style),k),onMouseEnter:x,onMouseLeave:S,onClick:V},t.createElement(o.default,Object.assign({},_,{onClick:G,prefixCls:W,className:q,disabled:D,ref:A})),null!=$&&t.createElement("span",{className:`${W}-label`},$))))});var b=e.i(8211),h=e.i(529681),v=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let y=t.forwardRef((e,o)=>{let{defaultValue:n,children:a,options:i=[],prefixCls:s,className:u,rootClassName:p,style:m,onChange:y}=e,$=v(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:C,direction:k}=t.useContext(l.ConfigContext),[x,S]=t.useState($.value||n||[]),[w,O]=t.useState([]);t.useEffect(()=>{"value"in $&&S($.value||[])},[$.value]);let E=t.useMemo(()=>i.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[i]),j=e=>{O(t=>t.filter(t=>t!==e))},N=e=>{O(t=>[].concat((0,b.default)(t),[e]))},P=e=>{let t=x.indexOf(e.value),r=(0,b.default)(x);-1===t?r.push(e.value):r.splice(t,1),"value"in $||S(r),null==y||y(r.filter(e=>w.includes(e)).sort((e,t)=>E.findIndex(t=>t.value===e)-E.findIndex(e=>e.value===t)))},I=C("checkbox",s),T=`${I}-group`,R=(0,c.default)(I),[D,z,M]=(0,f.default)(I,R),A=(0,h.default)($,["value","disabled"]),W=i.length?E.map(e=>t.createElement(g,{prefixCls:I,key:e.value.toString(),disabled:"disabled"in e?e.disabled:$.disabled,value:e.value,checked:x.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${T}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):a,B=t.useMemo(()=>({toggleOption:P,value:x,disabled:$.disabled,name:$.name,registerValue:N,cancelValue:j}),[P,x,$.disabled,$.name,N,j]),F=(0,r.default)(T,{[`${T}-rtl`]:"rtl"===k},u,p,M,R,z);return D(t.createElement("div",Object.assign({className:F,style:m},A,{ref:o}),t.createElement(d.default.Provider,{value:B},W)))});g.Group=y,g.__ANT_CHECKBOX=!0,e.s(["default",0,g],374276)},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var r=e.i(135551),o=e.i(201072),n=e.i(121229),a=e.i(726289),i=e.i(864517),l=e.i(343794),s=e.i(529681),c=e.i(242064),u=e.i(931067),d=e.i(209428),f=e.i(703923),p={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},m=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),o=!1;e.current.forEach(function(e){if(e){o=!0;var n=e.style;n.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(n.transitionDuration="0s, 0s")}}),o&&(r.current=Date.now())}),e.current},g=e.i(410160),b=e.i(392221),h=e.i(654310),v=0,y=(0,h.default)();let $=function(e){var r=t.useState(),o=(0,b.default)(r,2),n=o[0],a=o[1];return t.useEffect(function(){var e;a("rc_progress_".concat((y?(e=v,v+=1):e="TEST_OR_SSR",e)))},[]),e||n};var C=function(e){var r=e.bg,o=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},o)};function k(e,t){return Object.keys(e).map(function(r){var o=parseFloat(r),n="".concat(Math.floor(o*t),"%");return"".concat(e[r]," ").concat(n)})}var x=t.forwardRef(function(e,r){var o=e.prefixCls,n=e.color,a=e.gradientId,i=e.radius,l=e.style,s=e.ptg,c=e.strokeLinecap,u=e.strokeWidth,d=e.size,f=e.gapDegree,p=n&&"object"===(0,g.default)(n),m=d/2,b=t.createElement("circle",{className:"".concat(o,"-circle-path"),r:i,cx:m,cy:m,stroke:p?"#FFF":void 0,strokeLinecap:c,strokeWidth:u,opacity:+(0!==s),style:l,ref:r});if(!p)return b;var h="".concat(a,"-conic"),v=k(n,(360-f)/360),y=k(n,1),$="conic-gradient(from ".concat(f?"".concat(180+f/2,"deg"):"0deg",", ").concat(v.join(", "),")"),x="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(y.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:h},b),t.createElement("foreignObject",{x:0,y:0,width:d,height:d,mask:"url(#".concat(h,")")},t.createElement(C,{bg:x},t.createElement(C,{bg:$}))))}),S=function(e,t,r,o,n,a,i,l,s,c){var u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,d=(100-o)/100*t;return"round"===s&&100!==o&&(d+=c/2)>=t&&(d=t-.01),{stroke:"string"==typeof l?l:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:d+u,transform:"rotate(".concat(n+r/100*360*((360-a)/360)+(0===a?0:({bottom:0,top:180,left:90,right:-90})[i]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},w=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function O(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let E=function(e){var r,o,n,a,i=(0,d.default)((0,d.default)({},p),e),s=i.id,c=i.prefixCls,b=i.steps,h=i.strokeWidth,v=i.trailWidth,y=i.gapDegree,C=void 0===y?0:y,k=i.gapPosition,E=i.trailColor,j=i.strokeLinecap,N=i.style,P=i.className,I=i.strokeColor,T=i.percent,R=(0,f.default)(i,w),D=$(s),z="".concat(D,"-gradient"),M=50-h/2,A=2*Math.PI*M,W=C>0?90+C/2:-90,B=(360-C)/360*A,F="object"===(0,g.default)(b)?b:{count:b,gap:2},L=F.count,X=F.gap,_=O(T),H=O(I),q=H.find(function(e){return e&&"object"===(0,g.default)(e)}),V=q&&"object"===(0,g.default)(q)?"butt":j,G=S(A,B,0,100,W,C,k,E,V,h),K=m();return t.createElement("svg",(0,u.default)({className:(0,l.default)("".concat(c,"-circle"),P),viewBox:"0 0 ".concat(100," ").concat(100),style:N,id:s,role:"presentation"},R),!L&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:M,cx:50,cy:50,stroke:E,strokeLinecap:V,strokeWidth:v||h,style:G}),L?(r=Math.round(L*(_[0]/100)),o=100/L,n=0,Array(L).fill(null).map(function(e,a){var i=a<=r-1?H[0]:E,l=i&&"object"===(0,g.default)(i)?"url(#".concat(z,")"):void 0,s=S(A,B,n,o,W,C,k,i,"butt",h,X);return n+=(B-s.strokeDashoffset+X)*100/B,t.createElement("circle",{key:a,className:"".concat(c,"-circle-path"),r:M,cx:50,cy:50,stroke:l,strokeWidth:h,opacity:1,style:s,ref:function(e){K[a]=e}})})):(a=0,_.map(function(e,r){var o=H[r]||H[H.length-1],n=S(A,B,a,e,W,C,k,o,V,h);return a+=e,t.createElement(x,{key:r,color:o,ptg:e,radius:M,prefixCls:c,gradientId:z,style:n,strokeLinecap:V,strokeWidth:h,gapDegree:C,ref:function(e){K[r]=e},size:100})}).reverse()))};var j=e.i(491816);e.i(765846);var N=e.i(896091);function P(e){return!e||e<0?0:e>100?100:e}function I({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let T=(e,t,r)=>{var o,n,a,i;let l=-1,s=-1;if("step"===t){let t=r.steps,o=r.strokeWidth;"string"==typeof e||void 0===e?(l="small"===e?2:14,s=null!=o?o:8):"number"==typeof e?[l,s]=[e,e]:[l=14,s=8]=Array.isArray(e)?e:[e.width,e.height],l*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?s=t||("small"===e?6:8):"number"==typeof e?[l,s]=[e,e]:[l=-1,s=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[l,s]="small"===e?[60,60]:[120,120]:"number"==typeof e?[l,s]=[e,e]:Array.isArray(e)&&(l=null!=(n=null!=(o=e[0])?o:e[1])?n:120,s=null!=(i=null!=(a=e[0])?a:e[1])?i:120));return[l,s]},R=e=>{let{prefixCls:r,trailColor:o=null,strokeLinecap:n="round",gapPosition:a,gapDegree:i,width:s=120,type:c,children:u,success:d,size:f=s,steps:p}=e,[m,g]=T(f,"circle"),{strokeWidth:b}=e;void 0===b&&(b=Math.max(3/m*100,6));let h=t.useMemo(()=>i||0===i?i:"dashboard"===c?75:void 0,[i,c]),v=(({percent:e,success:t,successPercent:r})=>{let o=P(I({success:t,successPercent:r}));return[o,P(P(e)-o)]})(e),y="[object Object]"===Object.prototype.toString.call(e.strokeColor),$=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||N.presetPrimaryColors.green,t||null]})({success:d,strokeColor:e.strokeColor}),C=(0,l.default)(`${r}-inner`,{[`${r}-circle-gradient`]:y}),k=t.createElement(E,{steps:p,percent:p?v[1]:v,strokeWidth:b,trailWidth:b,strokeColor:p?$[1]:$,strokeLinecap:n,trailColor:o,prefixCls:r,gapDegree:h,gapPosition:a||"dashboard"===c&&"bottom"||void 0}),x=m<=20,S=t.createElement("div",{className:C,style:{width:m,height:g,fontSize:.15*m+6}},k,!x&&u);return x?t.createElement(j.default,{title:u},S):S};e.i(296059);var D=e.i(694758),z=e.i(915654),M=e.i(183293),A=e.i(246422),W=e.i(838378);let B="--progress-line-stroke-color",F="--progress-percent",L=e=>{let t=e?"100%":"-100%";return new D.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},X=(0,A.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,W.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,M.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${B})`]},height:"100%",width:`calc(1 / var(${F}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,z.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:L(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:L(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var _=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let H=e=>{let{prefixCls:r,direction:o,percent:n,size:a,strokeWidth:i,strokeColor:s,strokeLinecap:c="round",children:u,trailColor:d=null,percentPosition:f,success:p}=e,{align:m,type:g}=f,b=s&&"string"!=typeof s?((e,t)=>{let{from:r=N.presetPrimaryColors.blue,to:o=N.presetPrimaryColors.blue,direction:n="rtl"===t?"to left":"to right"}=e,a=_(e,["from","to","direction"]);if(0!==Object.keys(a).length){let e,t=(e=[],Object.keys(a).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:a[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${n}, ${t})`;return{background:r,[B]:r}}let i=`linear-gradient(${n}, ${r}, ${o})`;return{background:i,[B]:i}})(s,o):{[B]:s,background:s},h="square"===c||"butt"===c?0:void 0,[v,y]=T(null!=a?a:[-1,i||("small"===a?6:8)],"line",{strokeWidth:i}),$=Object.assign(Object.assign({width:`${P(n)}%`,height:y,borderRadius:h},b),{[F]:P(n)/100}),C=I(e),k={width:`${P(C)}%`,height:y,borderRadius:h,backgroundColor:null==p?void 0:p.strokeColor},x=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:d||void 0,borderRadius:h}},t.createElement("div",{className:(0,l.default)(`${r}-bg`,`${r}-bg-${g}`),style:$},"inner"===g&&u),void 0!==C&&t.createElement("div",{className:`${r}-success-bg`,style:k})),S="outer"===g&&"start"===m,w="outer"===g&&"end"===m;return"outer"===g&&"center"===m?t.createElement("div",{className:`${r}-layout-bottom`},x,u):t.createElement("div",{className:`${r}-outer`,style:{width:v<0?"100%":v}},S&&u,x,w&&u)},q=e=>{let{size:r,steps:o,rounding:n=Math.round,percent:a=0,strokeWidth:i=8,strokeColor:s,trailColor:c=null,prefixCls:u,children:d}=e,f=n(a/100*o),[p,m]=T(null!=r?r:["small"===r?2:14,i],"step",{steps:o,strokeWidth:i}),g=p/o,b=Array.from({length:o});for(let e=0;et.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let G=["normal","exception","active","success"],K=t.forwardRef((e,u)=>{let d,{prefixCls:f,className:p,rootClassName:m,steps:g,strokeColor:b,percent:h=0,size:v="default",showInfo:y=!0,type:$="line",status:C,format:k,style:x,percentPosition:S={}}=e,w=V(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:O="end",type:E="outer"}=S,j=Array.isArray(b)?b[0]:b,N="string"==typeof b||Array.isArray(b)?b:void 0,D=t.useMemo(()=>{if(j){let e="string"==typeof j?j:Object.values(j)[0];return new r.FastColor(e).isLight()}return!1},[b]),z=t.useMemo(()=>{var t,r;let o=I(e);return Number.parseInt(void 0!==o?null==(t=null!=o?o:0)?void 0:t.toString():null==(r=null!=h?h:0)?void 0:r.toString(),10)},[h,e.success,e.successPercent]),M=t.useMemo(()=>!G.includes(C)&&z>=100?"success":C||"normal",[C,z]),{getPrefixCls:A,direction:W,progress:B}=t.useContext(c.ConfigContext),F=A("progress",f),[L,_,K]=X(F),U="line"===$,Q=U&&!g,Y=t.useMemo(()=>{let r;if(!y)return null;let s=I(e),c=k||(e=>`${e}%`),u=U&&D&&"inner"===E;return"inner"===E||k||"exception"!==M&&"success"!==M?r=c(P(h),P(s)):"exception"===M?r=U?t.createElement(a.default,null):t.createElement(i.default,null):"success"===M&&(r=U?t.createElement(o.default,null):t.createElement(n.default,null)),t.createElement("span",{className:(0,l.default)(`${F}-text`,{[`${F}-text-bright`]:u,[`${F}-text-${O}`]:Q,[`${F}-text-${E}`]:Q}),title:"string"==typeof r?r:void 0},r)},[y,h,z,M,$,F,k]);"line"===$?d=g?t.createElement(q,Object.assign({},e,{strokeColor:N,prefixCls:F,steps:"object"==typeof g?g.count:g}),Y):t.createElement(H,Object.assign({},e,{strokeColor:j,prefixCls:F,direction:W,percentPosition:{align:O,type:E}}),Y):("circle"===$||"dashboard"===$)&&(d=t.createElement(R,Object.assign({},e,{strokeColor:j,prefixCls:F,progressStatus:M}),Y));let J=(0,l.default)(F,`${F}-status-${M}`,{[`${F}-${"dashboard"===$&&"circle"||$}`]:"line"!==$,[`${F}-inline-circle`]:"circle"===$&&T(v,"circle")[0]<=20,[`${F}-line`]:Q,[`${F}-line-align-${O}`]:Q,[`${F}-line-position-${E}`]:Q,[`${F}-steps`]:g,[`${F}-show-info`]:y,[`${F}-${v}`]:"string"==typeof v,[`${F}-rtl`]:"rtl"===W},null==B?void 0:B.className,p,m,_,K);return L(t.createElement("div",Object.assign({ref:u,style:Object.assign(Object.assign({},null==B?void 0:B.style),x),className:J,role:"progressbar","aria-valuenow":z,"aria-valuemin":0,"aria-valuemax":100},(0,s.default)(w,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),d))});e.s(["default",0,K],309821)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1067d2c077cd73d6.js b/litellm/proxy/_experimental/out/_next/static/chunks/1067d2c077cd73d6.js deleted file mode 100644 index 0379598998..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/1067d2c077cd73d6.js +++ /dev/null @@ -1,4 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,751734,e=>{"use strict";let t=(0,e.i(271645).createContext)(0);e.s(["default",()=>t])},144582,e=>{"use strict";let t=(0,e.i(271645).createContext)({selectedValue:void 0,handleValueChange:void 0});e.s(["default",()=>t])},404206,e=>{"use strict";var t=e.i(290571),r=e.i(751734),n=e.i(144582),o=e.i(444755),a=e.i(673706),s=e.i(271645);let l=(0,a.makeClassName)("TabPanel"),i=s.default.forwardRef((e,a)=>{let{children:i,className:u}=e,c=(0,t.__rest)(e,["children","className"]),{selectedValue:d}=(0,s.useContext)(n.default),f=d===(0,s.useContext)(r.default);return s.default.createElement("div",Object.assign({ref:a,className:(0,o.tremorTwMerge)(l("root"),"w-full mt-2",f?"":"hidden",u),"aria-selected":f?"true":"false"},c),i)});i.displayName="TabPanel",e.s(["TabPanel",()=>i],404206)},429427,371330,80758,402155,368578,544508,746725,835696,941444,914189,394487,e=>{"use strict";let t;e.i(247167);var r=e.i(271645);let n="u">typeof document?r.default.useLayoutEffect:()=>{},o=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},a=e=>e&&"window"in e&&e.window===e?e:o(e).defaultView||window;"u">typeof Element&&Element.prototype;let s=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"];s.join(":not([hidden]),"),s.push('[tabindex]:not([tabindex="-1"]):not([disabled])'),s.join(':not([hidden]):not([tabindex="-1"]),');let l=null;function i(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function u(e){let t=(0,r.useRef)({isFocused:!1,observer:null});return n(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,r.useCallback)(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r.target;n.addEventListener("focusout",r=>{if(t.current.isFocused=!1,n.disabled){let t=i(r);null==e||e(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[e])}function c(e){var t;if("u"e.test(t.brand))||e.test(window.navigator.userAgent)}function d(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function f(e){let t=null;return()=>(null==t&&(t=e()),t)}let p=f(function(){return d(/^Mac/i)}),m=f(function(){return d(/^iPhone/i)}),v=f(function(){return d(/^iPad/i)||p()&&navigator.maxTouchPoints>1}),b=f(function(){return m()||v()});f(function(){return p()||b()});let g=f(function(){return c(/AppleWebKit/i)&&!h()}),h=f(function(){return c(/Chrome/i)}),y=f(function(){return c(/Android/i)}),E=f(function(){return c(/Firefox/i)});function w(e,t,r=!0){var n,o;let{metaKey:a,ctrlKey:s,altKey:i,shiftKey:u}=t;E()&&(null==(o=window.event)||null==(n=o.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(p()?a=!0:s=!0);let c=g()&&p()&&!v()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:s,altKey:i,shiftKey:u}):new MouseEvent("click",{metaKey:a,ctrlKey:s,altKey:i,shiftKey:u,detail:1,bubbles:!0,cancelable:!0});if(w.isOpening=r,function(){if(null==l){l=!1;try{document.createElement("div").focus({get preventScroll(){return l=!0,!0}})}catch{}}return l}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeighttypeof window&&window.document&&window.document.createElement,new WeakMap;r.default.useId;let x=null,F=new Set,P=new Map,k=!1,L=!1,N={Tab:!0,Escape:!0};function C(e,t){for(let r of F)r(e,t)}function I(e){k=!0,w.isOpening||e.metaKey||!p()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(x="keyboard",C("keyboard",e))}function S(e){x="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(k=!0,C("pointer",e))}function A(e){w.isOpening||(""!==e.pointerType||!e.isTrusted)&&(y()&&e.pointerType?"click"!==e.type||1!==e.buttons:0!==e.detail||e.pointerType)||(k=!0,x="virtual")}function M(e){e.target!==window&&e.target!==document&&e.isTrusted&&(k||L||(x="virtual",C("virtual",e)),k=!1,L=!1)}function R(){k=!1,L=!0}function O(e){if("u"typeof PointerEvent&&(r.addEventListener("pointerdown",S,!0),r.addEventListener("pointermove",S,!0),r.addEventListener("pointerup",S,!0)),t.addEventListener("beforeunload",()=>{D(e)},{once:!0}),P.set(t,{focus:n})}let D=(e,t)=>{let r=a(e),n=o(e);t&&n.removeEventListener("DOMContentLoaded",t),P.has(r)&&(r.HTMLElement.prototype.focus=P.get(r).focus,n.removeEventListener("keydown",I,!0),n.removeEventListener("keyup",I,!0),n.removeEventListener("click",A,!0),r.removeEventListener("focus",M,!0),r.removeEventListener("blur",R,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",S,!0),n.removeEventListener("pointermove",S,!0),n.removeEventListener("pointerup",S,!0)),P.delete(r))};function H(){return"pointer"!==x}"u">typeof document&&("loading"!==(t=o(void 0)).readyState?O(void 0):t.addEventListener("DOMContentLoaded",()=>{O(void 0)}));let j=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function K(e,t){return!!t&&!!e&&e.contains(t)}function W(){let e=(0,r.useRef)(new Map),t=(0,r.useCallback)((t,r,n,o)=>{let a=(null==o?void 0:o.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:a,options:o}),t.addEventListener(r,a,o)},[]),n=(0,r.useCallback)((t,r,n,o)=>{var a;let s=(null==(a=e.current.get(n))?void 0:a.fn)||n;t.removeEventListener(r,s,o),e.current.delete(n)},[]),o=(0,r.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,r.useEffect)(()=>o,[o]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:o}}function B(e={}){var t;let{autoFocus:n=!1,isTextInput:s,within:l}=e,c=(0,r.useRef)({isFocused:!1,isFocusVisible:n||H()}),[d,f]=(0,r.useState)(!1),[p,m]=(0,r.useState)(()=>c.current.isFocused&&c.current.isFocusVisible),v=(0,r.useCallback)(()=>m(c.current.isFocused&&c.current.isFocusVisible),[]),b=(0,r.useCallback)(e=>{c.current.isFocused=e,f(e),v()},[v]);t={isTextInput:s},O(),(0,r.useEffect)(()=>{let e=(e,r)=>{var n;let s,l,i,u,d;n=!!(null==t?void 0:t.isTextInput),s=o(null==r?void 0:r.target),l="u">typeof window?a(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,i="u">typeof window?a(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,u="u">typeof window?a(null==r?void 0:r.target).HTMLElement:HTMLElement,d="u">typeof window?a(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent,(n=n||s.activeElement instanceof l&&!j.has(s.activeElement.type)||s.activeElement instanceof i||s.activeElement instanceof u&&s.activeElement.isContentEditable)&&"keyboard"===e&&r instanceof d&&!N[r.key]||(e=>{c.current.isFocusVisible=e,v()})(H())};return F.add(e),()=>{F.delete(e)}},[]);let{focusProps:g}=function(e){let{isDisabled:t,onFocus:n,onBlur:a,onFocusChange:s}=e,l=(0,r.useCallback)(e=>{if(e.target===e.currentTarget)return a&&a(e),s&&s(!1),!0},[a,s]),i=u(l),c=(0,r.useCallback)(e=>{var t;let r=o(e.target),a=r?((e=document)=>e.activeElement)(r):((e=document)=>e.activeElement)();e.target===e.currentTarget&&a===(t=e.nativeEvent,t.target)&&(n&&n(e),s&&s(!0),i(e))},[s,n,i]);return{focusProps:{onFocus:!t&&(n||s||a)?c:void 0,onBlur:!t&&(a||s)?l:void 0}}}({isDisabled:l,onFocusChange:b}),{focusWithinProps:h}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:a,onFocusWithinChange:s}=e,l=(0,r.useRef)({isFocusWithin:!1}),{addGlobalListener:c,removeAllGlobalListeners:d}=W(),f=(0,r.useCallback)(e=>{e.currentTarget.contains(e.target)&&l.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(l.current.isFocusWithin=!1,d(),n&&n(e),s&&s(!1))},[n,s,l,d]),p=u(f),m=(0,r.useCallback)(e=>{var t;if(!e.currentTarget.contains(e.target))return;let r=o(e.target),n=((e=document)=>e.activeElement)(r);if(!l.current.isFocusWithin&&n===(t=e.nativeEvent,t.target)){a&&a(e),s&&s(!0),l.current.isFocusWithin=!0,p(e);let t=e.currentTarget;c(r,"focus",e=>{if(l.current.isFocusWithin&&!K(t,e.target)){let n=new r.defaultView.FocusEvent("blur",{relatedTarget:e.target});Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t}),f(i(n))}},{capture:!0})}},[a,s,p,c,f]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:m,onBlur:f}}}({isDisabled:!l,onFocusWithinChange:b});return{isFocused:d,isFocusVisible:p,focusProps:l?h:g}}e.s(["useFocusRing",()=>B],429427);let V=!1,_=0;function G(e){"touch"===e.pointerType&&(V=!0,setTimeout(()=>{V=!1},50))}function U(){if("u">typeof document)return 0===_&&"u">typeof PointerEvent&&document.addEventListener("pointerup",G),_++,()=>{!(--_>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",G)}}function $(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:a,isDisabled:s}=e,[l,i]=(0,r.useState)(!1),u=(0,r.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,r.useEffect)(U,[]);let{addGlobalListener:c,removeAllGlobalListeners:d}=W(),{hoverProps:f,triggerHoverEnd:p}=(0,r.useMemo)(()=>{let e=(e,t)=>{let r=u.target;u.pointerType="",u.target=null,"touch"!==t&&u.isHovered&&r&&(u.isHovered=!1,d(),a&&a({type:"hoverend",target:r,pointerType:t}),n&&n(!1),i(!1))},r={};return"u">typeof PointerEvent&&(r.onPointerEnter=r=>{V&&"mouse"===r.pointerType||((r,a)=>{if(u.pointerType=a,s||"touch"===a||u.isHovered||!r.currentTarget.contains(r.target))return;u.isHovered=!0;let l=r.currentTarget;u.target=l,c(o(r.target),"pointerover",t=>{u.isHovered&&u.target&&!K(u.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:l,pointerType:a}),n&&n(!0),i(!0)})(r,r.pointerType)},r.onPointerLeave=t=>{!s&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:r,triggerHoverEnd:e}},[t,n,a,s,u,c,d]);return(0,r.useEffect)(()=>{s&&p({currentTarget:u.target},u.pointerType)},[s]),{hoverProps:f,isHovered:l}}e.s(["useHover",()=>$],371330);var q=Object.defineProperty,X=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?q(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,r};let Y=new class{constructor(){X(this,"current",this.detect()),X(this,"handoffState","pending"),X(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"u"setTimeout(()=>{throw e}))}function J(){let e=[],t={addEventListener:(e,r,n,o)=>(e.addEventListener(r,n,o),t.add(()=>e.removeEventListener(r,n,o))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(r))},nextFrame:(...e)=>t.requestAnimationFrame(()=>t.requestAnimationFrame(...e)),setTimeout(...e){let r=setTimeout(...e);return t.add(()=>clearTimeout(r))},microTask(...e){let r={current:!0};return Z(()=>{r.current&&e[0]()}),t.add(()=>{r.current=!1})},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add(()=>{Object.assign(e.style,{[t]:n})})},group(e){let t=J();return e(t),this.add(()=>t.dispose())},add:t=>(e.includes(t)||e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Q(){let[e]=(0,r.useState)(J);return(0,r.useEffect)(()=>()=>e.dispose(),[e]),e}e.s(["env",()=>Y],80758),e.s(["getOwnerDocument",()=>z],402155),e.s(["microTask",()=>Z],368578),e.s(["disposables",()=>J],544508),e.s(["useDisposables",()=>Q],746725);let ee=(e,t)=>{Y.isServer?(0,r.useEffect)(e,t):(0,r.useLayoutEffect)(e,t)};function et(e){let t=(0,r.useRef)(e);return ee(()=>{t.current=e},[e]),t}e.s(["useIsoMorphicEffect",()=>ee],835696),e.s(["useLatestValue",()=>et],941444);let er=function(e){let t=et(e);return r.default.useCallback((...e)=>t.current(...e),[t])};function en({disabled:e=!1}={}){let t=(0,r.useRef)(null),[n,o]=(0,r.useState)(!1),a=Q(),s=er(()=>{t.current=null,o(!1),a.dispose()}),l=er(e=>{if(a.dispose(),null===t.current){t.current=e.currentTarget,o(!0);{let r=z(e.currentTarget);a.addEventListener(r,"pointerup",s,!1),a.addEventListener(r,"pointermove",e=>{if(t.current){var r,n;let a,s;o((a=e.width/2,s=e.height/2,r={top:e.clientY-s,right:e.clientX+a,bottom:e.clientY+s,left:e.clientX-a},n=t.current.getBoundingClientRect(),!(!r||!n||r.rightn.right||r.bottomn.bottom)))}},!1),a.addEventListener(r,"pointercancel",s,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:l,onPointerUp:s,onClick:s}}}e.s(["useEvent",()=>er],914189),e.s(["useActivePress",()=>en],394487)},144279,294316,e=>{"use strict";var t=e.i(271645);function r(e,r){return(0,t.useMemo)(()=>{var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";if("string"==typeof n&&"button"===n.toLowerCase()||(null==r?void 0:r.tagName)==="BUTTON"&&!r.hasAttribute("type"))return"button"},[e.type,e.as,r])}e.s(["useResolveButtonType",()=>r],144279);var n=e.i(914189);let o=Symbol();function a(e,t=!0){return Object.assign(e,{[o]:t})}function s(...e){let r=(0,t.useRef)(e);(0,t.useEffect)(()=>{r.current=e},[e]);let a=(0,n.useEvent)(e=>{for(let t of r.current)null!=t&&("function"==typeof t?t(e):t.current=e)});return e.every(e=>null==e||(null==e?void 0:e[o]))?void 0:a}e.s(["optionalRef",()=>a,"useSyncRefs",()=>s],294316)},553521,e=>{"use strict";var t=e.i(271645),r=e.i(835696);function n(){let e=(0,t.useRef)(!1);return(0,r.useIsoMorphicEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}e.s(["useIsMounted",()=>n])},732607,e=>{"use strict";function t(...e){return Array.from(new Set(e.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}e.s(["classNames",()=>t])},397701,e=>{"use strict";function t(e,r,...n){if(e in r){let t=r[e];return"function"==typeof t?t(...n):t}let o=Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(r).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,t),o}e.s(["match",()=>t])},700020,e=>{"use strict";let t,r;var n=e.i(271645),o=e.i(732607),a=e.i(397701),s=((t=s||{})[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t),l=((r=l||{})[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r);function i(){let e,t,r=(e=(0,n.useRef)([]),t=(0,n.useCallback)(t=>{for(let r of e.current)null!=r&&("function"==typeof r?r(t):r.current=t)},[]),(...r)=>{if(!r.every(e=>null==e))return e.current=r,t});return(0,n.useCallback)(e=>(function({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:s=!0,name:l,mergeRefs:i}){i=null!=i?i:c;let f=d(t,e);if(s)return u(f,r,n,l,i);let p=null!=o?o:0;if(2&p){let{static:e=!1,...t}=f;if(e)return u(t,r,n,l,i)}if(1&p){let{unmount:e=!0,...t}=f;return(0,a.match)(+!e,{0:()=>null,1:()=>u({...t,hidden:!0,style:{display:"none"}},r,n,l,i)})}return u(f,r,n,l,i)})({mergeRefs:r,...e}),[r])}function u(e,t={},r,a,s){let{as:l=r,children:i,refName:c="ref",...f}=v(e,["unmount","static"]),p=void 0!==e.ref?{[c]:e.ref}:{},b="function"==typeof i?i(t):i;"className"in f&&f.className&&"function"==typeof f.className&&(f.className=f.className(t)),f["aria-labelledby"]&&f["aria-labelledby"]===f.id&&(f["aria-labelledby"]=void 0);let g={};if(t){let e=!1,r=[];for(let[n,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&r.push(n.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e)for(let e of(g["data-headlessui-state"]=r.join(" "),r))g[`data-${e}`]=""}if(l===n.Fragment&&(Object.keys(m(f)).length>0||Object.keys(m(g)).length>0))if(!(0,n.isValidElement)(b)||Array.isArray(b)&&b.length>1){if(Object.keys(m(f)).length>0)throw Error(['Passing props on "Fragment"!',"",`The current component <${a} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(m(f)).concat(Object.keys(m(g))).map(e=>` - ${e}`).join(` -`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>` - ${e}`).join(` -`)].join(` -`))}else{var h;let e=b.props,t=null==e?void 0:e.className,r="function"==typeof t?(...e)=>(0,o.classNames)(t(...e),f.className):(0,o.classNames)(t,f.className),a=d(b.props,m(v(f,["ref"])));for(let e in g)e in a&&delete g[e];return(0,n.cloneElement)(b,Object.assign({},a,g,p,{ref:s((h=b,n.default.version.split(".")[0]>="19"?h.props.ref:h.ref),p.ref)},r?{className:r}:{}))}return(0,n.createElement)(l,Object.assign({},v(f,["ref"]),l!==n.Fragment&&p,l!==n.Fragment&&g),b)}function c(...e){return e.every(e=>null==e)?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}function d(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])for(let e in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(r[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in r)Object.assign(t,{[e](t,...n){for(let o of r[e]){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;o(t,...n)}}});return t}function f(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];for(let e in r)Object.assign(t,{[e](...t){for(let n of r[e])null==n||n(...t)}});return t}function p(e){var t;return Object.assign((0,n.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function m(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function v(e,t=[]){let r=Object.assign({},e);for(let e of t)e in r&&delete r[e];return r}e.s(["RenderFeatures",()=>s,"RenderStrategy",()=>l,"compact",()=>m,"forwardRefWithAs",()=>p,"mergeProps",()=>f,"useRender",()=>i])},2788,e=>{"use strict";let t;var r=e.i(700020),n=((t=n||{})[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t);let o=(0,r.forwardRefWithAs)(function(e,t){var n;let{features:o=1,...a}=e,s={ref:t,"aria-hidden":(2&o)==2||(null!=(n=a["aria-hidden"])?n:void 0),hidden:(4&o)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&o)==4&&(2&o)!=2&&{display:"none"}}};return(0,r.useRender)()({ourProps:s,theirProps:a,slot:{},defaultTag:"span",name:"Hidden"})});e.s(["Hidden",()=>o,"HiddenFeatures",()=>n])},640497,e=>{"use strict";var t=e.i(271645),r=e.i(553521),n=e.i(2788);function o({onFocus:e}){let[o,a]=(0,t.useState)(!0),s=(0,r.useIsMounted)();return o?t.default.createElement(n.Hidden,{as:"button",type:"button",features:n.HiddenFeatures.Focusable,onFocus:t=>{t.preventDefault();let r,n=50;r=requestAnimationFrame(function t(){if(n--<=0){r&&cancelAnimationFrame(r);return}if(e()){if(cancelAnimationFrame(r),!s.current)return;a(!1);return}r=requestAnimationFrame(t)})}}):null}e.s(["FocusSentinel",()=>o])},652265,e=>{"use strict";let t,r,n,o,a;e.i(544508);var s=e.i(397701),l=e.i(402155);let i=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),u=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var c=((t=c||{})[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t[t.AutoFocus=64]="AutoFocus",t),d=((r=d||{})[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r),f=((n=f||{})[n.Previous=-1]="Previous",n[n.Next=1]="Next",n);function p(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(i)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var m=((o=m||{})[o.Strict=0]="Strict",o[o.Loose=1]="Loose",o);function v(e,t=0){var r;return e!==(null==(r=(0,l.getOwnerDocument)(e))?void 0:r.body)&&(0,s.match)(t,{0:()=>e.matches(i),1(){let t=e;for(;null!==t;){if(t.matches(i))return!0;t=t.parentElement}return!1}})}var b=((a=b||{})[a.Keyboard=0]="Keyboard",a[a.Mouse=1]="Mouse",a);function g(e,t=e=>e){return e.slice().sort((e,r)=>{let n=t(e),o=t(r);if(null===n||null===o)return 0;let a=n.compareDocumentPosition(o);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function h(e,t){return y(p(),t,{relativeTo:e})}function y(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){var a,s,l;let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,c=Array.isArray(e)?r?g(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(u)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e):p(e);o.length>0&&c.length>1&&(c=c.filter(e=>!o.some(t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))),n=null!=n?n:i.activeElement;let d=(()=>{if(5&t)return 1;if(10&t)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,c.indexOf(n))-1;if(4&t)return Math.max(0,c.indexOf(n))+1;if(8&t)return c.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),m=32&t?{preventScroll:!0}:{},v=0,b=c.length,h;do{if(v>=b||v+b<=0)return 0;let e=f+v;if(16&t)e=(e+b)%b;else{if(e<0)return 3;if(e>=b)return 1}null==(h=c[e])||h.focus(m),v+=d}while(h!==i.activeElement)return 6&t&&null!=(l=null==(s=null==(a=h)?void 0:a.matches)?void 0:s.call(a,"textarea,input"))&&l&&h.select(),2}"u">typeof window&&"u">typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0)),e.s(["Focus",()=>c,"FocusResult",()=>d,"FocusableMode",()=>m,"focusFrom",()=>h,"focusIn",()=>y,"getFocusableElements",()=>p,"isFocusableElement",()=>v,"sortByDomNode",()=>g])},963703,e=>{"use strict";var t=e.i(271645);let r=t.createContext(null);function n({children:e}){let n=t.useRef({groups:new Map,get(e,t){var r;let n=this.groups.get(e);n||(n=new Map,this.groups.set(e,n));let o=null!=(r=n.get(t))?r:0;return n.set(t,o+1),[Array.from(n.keys()).indexOf(t),function(){let e=n.get(t);e>1?n.set(t,e-1):n.delete(t)}]}});return t.createElement(r.Provider,{value:n},e)}function o(e){let n=t.useContext(r);if(!n)throw Error("You must wrap your component in a ");let o=t.useId(),[a,s]=n.current.get(e,o);return t.useEffect(()=>s,[]),a}e.s(["StableCollection",()=>n,"useStableCollectionIndex",()=>o])},998348,e=>{"use strict";let t;var r=((t=r||{}).Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t);e.s(["Keys",()=>r])},970554,e=>{"use strict";let t,r,n;var o=e.i(429427),a=e.i(371330),s=e.i(271645),l=e.i(394487),i=e.i(914189),u=e.i(835696),c=e.i(941444),d=e.i(144279),f=e.i(294316),p=e.i(640497),m=e.i(2788),v=e.i(652265),b=e.i(397701),g=e.i(368578),h=e.i(402155),y=e.i(700020),E=e.i(963703),w=e.i(998348),T=((t=T||{})[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t),x=((r=x||{})[r.Less=-1]="Less",r[r.Equal=0]="Equal",r[r.Greater=1]="Greater",r),F=((n=F||{})[n.SetSelectedIndex=0]="SetSelectedIndex",n[n.RegisterTab=1]="RegisterTab",n[n.UnregisterTab=2]="UnregisterTab",n[n.RegisterPanel=3]="RegisterPanel",n[n.UnregisterPanel=4]="UnregisterPanel",n);let P={0(e,t){var r;let n=(0,v.sortByDomNode)(e.tabs,e=>e.current),o=(0,v.sortByDomNode)(e.panels,e=>e.current),a=n.filter(e=>{var t;return!(null!=(t=e.current)&&t.hasAttribute("disabled"))}),s={...e,tabs:n,panels:o};if(t.index<0||t.index>n.length-1){let r=(0,b.match)(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>(0,b.match)(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===a.length)return s;let o=(0,b.match)(r,{0:()=>n.indexOf(a[0]),1:()=>n.indexOf(a[a.length-1])});return{...s,selectedIndex:-1===o?e.selectedIndex:o}}let l=n.slice(0,t.index),i=[...n.slice(t.index),...l].find(e=>a.includes(e));if(!i)return s;let u=null!=(r=n.indexOf(i))?r:e.selectedIndex;return -1===u&&(u=e.selectedIndex),{...s,selectedIndex:u}},1(e,t){if(e.tabs.includes(t.tab))return e;let r=e.tabs[e.selectedIndex],n=(0,v.sortByDomNode)([...e.tabs,t.tab],e=>e.current),o=e.selectedIndex;return e.info.current.isControlled||-1===(o=n.indexOf(r))&&(o=e.selectedIndex),{...e,tabs:n,selectedIndex:o}},2:(e,t)=>({...e,tabs:e.tabs.filter(e=>e!==t.tab)}),3:(e,t)=>e.panels.includes(t.panel)?e:{...e,panels:(0,v.sortByDomNode)([...e.panels,t.panel],e=>e.current)},4:(e,t)=>({...e,panels:e.panels.filter(e=>e!==t.panel)})},k=(0,s.createContext)(null);function L(e){let t=(0,s.useContext)(k);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,L),t}return t}k.displayName="TabsDataContext";let N=(0,s.createContext)(null);function C(e){let t=(0,s.useContext)(N);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,C),t}return t}function I(e,t){return(0,b.match)(t.type,P,e,t)}N.displayName="TabsActionsContext";let S=y.RenderFeatures.RenderStrategy|y.RenderFeatures.Static,A=Object.assign((0,y.forwardRefWithAs)(function(e,t){var r,n;let c=(0,s.useId)(),{id:p=`headlessui-tabs-tab-${c}`,disabled:m=!1,autoFocus:T=!1,...x}=e,{orientation:F,activation:P,selectedIndex:k,tabs:N,panels:I}=L("Tab"),S=C("Tab"),A=L("Tab"),[M,R]=(0,s.useState)(null),O=(0,s.useRef)(null),D=(0,f.useSyncRefs)(O,t,R);(0,u.useIsoMorphicEffect)(()=>S.registerTab(O),[S,O]);let H=(0,E.useStableCollectionIndex)("tabs"),j=N.indexOf(O);-1===j&&(j=H);let K=j===k,W=(0,i.useEvent)(e=>{var t;let r=e();if(r===v.FocusResult.Success&&"auto"===P){let e=null==(t=(0,h.getOwnerDocument)(O))?void 0:t.activeElement,r=A.tabs.findIndex(t=>t.current===e);-1!==r&&S.change(r)}return r}),B=(0,i.useEvent)(e=>{let t=N.map(e=>e.current).filter(Boolean);if(e.key===w.Keys.Space||e.key===w.Keys.Enter){e.preventDefault(),e.stopPropagation(),S.change(j);return}switch(e.key){case w.Keys.Home:case w.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),W(()=>(0,v.focusIn)(t,v.Focus.First));case w.Keys.End:case w.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),W(()=>(0,v.focusIn)(t,v.Focus.Last))}if(W(()=>(0,b.match)(F,{vertical:()=>e.key===w.Keys.ArrowUp?(0,v.focusIn)(t,v.Focus.Previous|v.Focus.WrapAround):e.key===w.Keys.ArrowDown?(0,v.focusIn)(t,v.Focus.Next|v.Focus.WrapAround):v.FocusResult.Error,horizontal:()=>e.key===w.Keys.ArrowLeft?(0,v.focusIn)(t,v.Focus.Previous|v.Focus.WrapAround):e.key===w.Keys.ArrowRight?(0,v.focusIn)(t,v.Focus.Next|v.Focus.WrapAround):v.FocusResult.Error}))===v.FocusResult.Success)return e.preventDefault()}),V=(0,s.useRef)(!1),_=(0,i.useEvent)(()=>{var e;V.current||(V.current=!0,null==(e=O.current)||e.focus({preventScroll:!0}),S.change(j),(0,g.microTask)(()=>{V.current=!1}))}),G=(0,i.useEvent)(e=>{e.preventDefault()}),{isFocusVisible:U,focusProps:$}=(0,o.useFocusRing)({autoFocus:T}),{isHovered:q,hoverProps:X}=(0,a.useHover)({isDisabled:m}),{pressed:Y,pressProps:z}=(0,l.useActivePress)({disabled:m}),Z=(0,s.useMemo)(()=>({selected:K,hover:q,active:Y,focus:U,autofocus:T,disabled:m}),[K,q,U,Y,T,m]),J=(0,y.mergeProps)({ref:D,onKeyDown:B,onMouseDown:G,onClick:_,id:p,role:"tab",type:(0,d.useResolveButtonType)(e,M),"aria-controls":null==(n=null==(r=I[j])?void 0:r.current)?void 0:n.id,"aria-selected":K,tabIndex:K?0:-1,disabled:m||void 0,autoFocus:T},$,X,z);return(0,y.useRender)()({ourProps:J,theirProps:x,slot:Z,defaultTag:"button",name:"Tabs.Tab"})}),{Group:(0,y.forwardRefWithAs)(function(e,t){let{defaultIndex:r=0,vertical:n=!1,manual:o=!1,onChange:a,selectedIndex:l=null,...d}=e,m=n?"vertical":"horizontal",b=o?"manual":"auto",g=null!==l,h=(0,c.useLatestValue)({isControlled:g}),w=(0,f.useSyncRefs)(t),[T,x]=(0,s.useReducer)(I,{info:h,selectedIndex:null!=l?l:r,tabs:[],panels:[]}),F=(0,s.useMemo)(()=>({selectedIndex:T.selectedIndex}),[T.selectedIndex]),P=(0,c.useLatestValue)(a||(()=>{})),L=(0,c.useLatestValue)(T.tabs),C=(0,s.useMemo)(()=>({orientation:m,activation:b,...T}),[m,b,T]),S=(0,i.useEvent)(e=>(x({type:1,tab:e}),()=>x({type:2,tab:e}))),A=(0,i.useEvent)(e=>(x({type:3,panel:e}),()=>x({type:4,panel:e}))),M=(0,i.useEvent)(e=>{R.current!==e&&P.current(e),g||x({type:0,index:e})}),R=(0,c.useLatestValue)(g?e.selectedIndex:T.selectedIndex),O=(0,s.useMemo)(()=>({registerTab:S,registerPanel:A,change:M}),[]);(0,u.useIsoMorphicEffect)(()=>{x({type:0,index:null!=l?l:r})},[l]),(0,u.useIsoMorphicEffect)(()=>{if(void 0===R.current||T.tabs.length<=0)return;let e=(0,v.sortByDomNode)(T.tabs,e=>e.current);e.some((e,t)=>T.tabs[t]!==e)&&M(e.indexOf(T.tabs[R.current]))});let D=(0,y.useRender)();return s.default.createElement(E.StableCollection,null,s.default.createElement(N.Provider,{value:O},s.default.createElement(k.Provider,{value:C},C.tabs.length<=0&&s.default.createElement(p.FocusSentinel,{onFocus:()=>{var e,t;for(let r of L.current)if((null==(e=r.current)?void 0:e.tabIndex)===0)return null==(t=r.current)||t.focus(),!0;return!1}}),D({ourProps:{ref:w},theirProps:d,slot:F,defaultTag:"div",name:"Tabs"}))))}),List:(0,y.forwardRefWithAs)(function(e,t){let{orientation:r,selectedIndex:n}=L("Tab.List"),o=(0,f.useSyncRefs)(t),a=(0,s.useMemo)(()=>({selectedIndex:n}),[n]);return(0,y.useRender)()({ourProps:{ref:o,role:"tablist","aria-orientation":r},theirProps:e,slot:a,defaultTag:"div",name:"Tabs.List"})}),Panels:(0,y.forwardRefWithAs)(function(e,t){let{selectedIndex:r}=L("Tab.Panels"),n=(0,f.useSyncRefs)(t),o=(0,s.useMemo)(()=>({selectedIndex:r}),[r]);return(0,y.useRender)()({ourProps:{ref:n},theirProps:e,slot:o,defaultTag:"div",name:"Tabs.Panels"})}),Panel:(0,y.forwardRefWithAs)(function(e,t){var r,n,a,l;let i=(0,s.useId)(),{id:c=`headlessui-tabs-panel-${i}`,tabIndex:d=0,...p}=e,{selectedIndex:v,tabs:b,panels:g}=L("Tab.Panel"),h=C("Tab.Panel"),w=(0,s.useRef)(null),T=(0,f.useSyncRefs)(w,t);(0,u.useIsoMorphicEffect)(()=>h.registerPanel(w),[h,w]);let x=(0,E.useStableCollectionIndex)("panels"),F=g.indexOf(w);-1===F&&(F=x);let P=F===v,{isFocusVisible:k,focusProps:N}=(0,o.useFocusRing)(),I=(0,s.useMemo)(()=>({selected:P,focus:k}),[P,k]),A=(0,y.mergeProps)({ref:T,id:c,role:"tabpanel","aria-labelledby":null==(n=null==(r=b[F])?void 0:r.current)?void 0:n.id,tabIndex:P?d:-1},N),M=(0,y.useRender)();return P||null!=(a=p.unmount)&&!a||null!=(l=p.static)&&l?M({ourProps:A,theirProps:p,slot:I,defaultTag:"div",features:S,visible:P,name:"Tabs.Panel"}):s.default.createElement(m.Hidden,{"aria-hidden":"true",...A})})});e.s(["Tab",()=>A])},723731,e=>{"use strict";var t=e.i(290571),r=e.i(970554),n=e.i(751734),o=e.i(144582),a=e.i(444755),s=e.i(673706),l=e.i(271645);let i=(0,s.makeClassName)("TabPanels"),u=l.default.forwardRef((e,s)=>{let{children:u,className:c}=e,d=(0,t.__rest)(e,["children","className"]);return l.default.createElement(r.Tab.Panels,Object.assign({as:"div",ref:s,className:(0,a.tremorTwMerge)(i("root"),"w-full",c)},d),({selectedIndex:e})=>l.default.createElement(o.default.Provider,{value:{selectedValue:e}},l.default.Children.map(u,(e,t)=>l.default.createElement(n.default.Provider,{value:t},e))))});u.displayName="TabPanels",e.s(["TabPanels",()=>u],723731)},653824,e=>{"use strict";var t=e.i(290571),r=e.i(970554),n=e.i(444755),o=e.i(673706),a=e.i(271645);let s=(0,o.makeClassName)("TabGroup"),l=a.default.forwardRef((e,o)=>{let{defaultIndex:l,index:i,onIndexChange:u,children:c,className:d}=e,f=(0,t.__rest)(e,["defaultIndex","index","onIndexChange","children","className"]);return a.default.createElement(r.Tab.Group,Object.assign({as:"div",ref:o,defaultIndex:l,selectedIndex:i,onChange:u,className:(0,n.tremorTwMerge)(s("root"),"w-full",d)},f),c)});l.displayName="TabGroup",e.s(["TabGroup",()=>l],653824)},405371,910342,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(480731);let o=(0,r.createContext)(n.BaseColors.Blue);e.s(["default",()=>o],910342);var a=e.i(970554),s=e.i(444755);let l=(0,e.i(673706).makeClassName)("TabList"),i=(0,r.createContext)("line"),u={line:(0,s.tremorTwMerge)("flex border-b space-x-4","border-tremor-border","dark:border-dark-tremor-border"),solid:(0,s.tremorTwMerge)("inline-flex p-0.5 rounded-tremor-default space-x-1.5","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle")},c=r.default.forwardRef((e,n)=>{let{color:c,variant:d="line",children:f,className:p}=e,m=(0,t.__rest)(e,["color","variant","children","className"]);return r.default.createElement(a.Tab.List,Object.assign({ref:n,className:(0,s.tremorTwMerge)(l("root"),"justify-start overflow-x-clip",u[d],p)},m),r.default.createElement(i.Provider,{value:d},r.default.createElement(o.Provider,{value:c},f)))});c.displayName="TabList",e.s(["TabVariantContext",()=>i,"default",()=>c],405371)},881073,e=>{"use strict";var t=e.i(405371);e.s(["TabList",()=>t.default])},197647,e=>{"use strict";var t=e.i(290571),r=e.i(970554),n=e.i(95779),o=e.i(444755),a=e.i(673706),s=e.i(271645),l=e.i(405371),i=e.i(910342);let u=(0,a.makeClassName)("Tab"),c=s.default.forwardRef((e,c)=>{let{icon:d,className:f,children:p}=e,m=(0,t.__rest)(e,["icon","className","children"]),v=(0,s.useContext)(l.TabVariantContext),b=(0,s.useContext)(i.default);return s.default.createElement(r.Tab,Object.assign({ref:c,className:(0,o.tremorTwMerge)(u("root"),"flex whitespace-nowrap truncate max-w-xs outline-none data-focus-visible:ring text-tremor-default transition duration-100",function(e,t){switch(e){case"line":return(0,o.tremorTwMerge)("data-[selected]:border-b-2 hover:border-b-2 border-transparent transition duration-100 -mb-px px-2 py-2","hover:border-tremor-content hover:text-tremor-content-emphasis text-tremor-content","[&:not([data-selected])]:dark:hover:border-dark-tremor-content-emphasis [&:not([data-selected])]:dark:hover:text-dark-tremor-content-emphasis [&:not([data-selected])]:dark:text-dark-tremor-content",t?(0,a.getColorClassNames)(t,n.colorPalette.border).selectBorderColor:["data-[selected]:border-tremor-brand data-[selected]:text-tremor-brand","data-[selected]:dark:border-dark-tremor-brand data-[selected]:dark:text-dark-tremor-brand"]);case"solid":return(0,o.tremorTwMerge)("border-transparent border rounded-tremor-small px-2.5 py-1","data-[selected]:border-tremor-border data-[selected]:bg-tremor-background data-[selected]:shadow-tremor-input [&:not([data-selected])]:hover:text-tremor-content-emphasis data-[selected]:text-tremor-brand [&:not([data-selected])]:text-tremor-content","dark:data-[selected]:border-dark-tremor-border dark:data-[selected]:bg-dark-tremor-background dark:data-[selected]:shadow-dark-tremor-input dark:[&:not([data-selected])]:hover:text-dark-tremor-content-emphasis dark:data-[selected]:text-dark-tremor-brand dark:[&:not([data-selected])]:text-dark-tremor-content",t?(0,a.getColorClassNames)(t,n.colorPalette.text).selectTextColor:"text-tremor-content dark:text-dark-tremor-content")}}(v,b),f,b&&(0,a.getColorClassNames)(b,n.colorPalette.text).selectTextColor)},m),d?s.default.createElement(d,{className:(0,o.tremorTwMerge)(u("icon"),"flex-none h-5 w-5",p?"mr-2":"")}):null,p?s.default.createElement("span",null,p):null)});c.displayName="Tab",e.s(["Tab",()=>c],197647)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/142704439974f6b3.js b/litellm/proxy/_experimental/out/_next/static/chunks/142704439974f6b3.js deleted file mode 100644 index 22a02a7d4b..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/142704439974f6b3.js +++ /dev/null @@ -1,7 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,91874,e=>{"use strict";var t=e.i(931067),r=e.i(209428),n=e.i(211577),a=e.i(392221),o=e.i(703923),i=e.i(343794),l=e.i(914949),d=e.i(271645),s=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],c=(0,d.forwardRef)(function(e,c){var u=e.prefixCls,m=void 0===u?"rc-checkbox":u,g=e.className,h=e.style,b=e.checked,f=e.disabled,p=e.defaultChecked,C=e.type,v=void 0===C?"checkbox":C,k=e.title,x=e.onChange,$=(0,o.default)(e,s),w=(0,d.useRef)(null),y=(0,d.useRef)(null),S=(0,l.default)(void 0!==p&&p,{value:b}),I=(0,a.default)(S,2),E=I[0],N=I[1];(0,d.useImperativeHandle)(c,function(){return{focus:function(e){var t;null==(t=w.current)||t.focus(e)},blur:function(){var e;null==(e=w.current)||e.blur()},input:w.current,nativeElement:y.current}});var O=(0,i.default)(m,g,(0,n.default)((0,n.default)({},"".concat(m,"-checked"),E),"".concat(m,"-disabled"),f));return d.createElement("span",{className:O,title:k,style:h,ref:y},d.createElement("input",(0,t.default)({},$,{className:"".concat(m,"-input"),ref:w,onChange:function(t){f||("checked"in e||N(t.target.checked),null==x||x({target:(0,r.default)((0,r.default)({},e),{},{type:v,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:f,checked:!!E,type:v})),d.createElement("span",{className:"".concat(m,"-inner")}))});e.s(["default",0,c])},681216,e=>{"use strict";var t=e.i(271645),r=e.i(963188);function n(e){let n=t.default.useRef(null),a=()=>{r.default.cancel(n.current),n.current=null};return[()=>{a(),n.current=(0,r.default)(()=>{n.current=null})},t=>{n.current&&(t.stopPropagation(),a()),null==e||e(t)}]}e.s(["default",()=>n])},421512,236836,e=>{"use strict";let t=e.i(271645).default.createContext(null);e.s(["default",0,t],421512),e.i(296059);var r=e.i(915654),n=e.i(183293),a=e.i(246422),o=e.i(838378);function i(e,t){return(e=>{let{checkboxCls:t}=e,a=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,n.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[a]:Object.assign(Object.assign({},(0,n.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${a}`]:{marginInlineStart:0},[`&${a}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,n.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,n.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,r.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,r.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[` - ${a}:not(${a}-disabled), - ${t}:not(${t}-disabled) - `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${a}:not(${a}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[` - ${a}-checked:not(${a}-disabled), - ${t}-checked:not(${t}-disabled) - `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${a}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,o.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let l=(0,a.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[i(t,e)]);e.s(["default",0,l,"getStyle",()=>i],236836)},374276,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(91874),a=e.i(611935),o=e.i(121872),i=e.i(26905),l=e.i(242064),d=e.i(937328),s=e.i(321883),c=e.i(62139),u=e.i(421512),m=e.i(236836),g=e.i(681216),h=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let b=t.forwardRef((e,b)=>{var f;let{prefixCls:p,className:C,rootClassName:v,children:k,indeterminate:x=!1,style:$,onMouseEnter:w,onMouseLeave:y,skipGroup:S=!1,disabled:I}=e,E=h(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:N,direction:O,checkbox:T}=t.useContext(l.ConfigContext),P=t.useContext(u.default),{isFormItemInput:M}=t.useContext(c.FormItemInputContext),z=t.useContext(d.default),j=null!=(f=(null==P?void 0:P.disabled)||I)?f:z,R=t.useRef(E.value),B=t.useRef(null),H=(0,a.composeRef)(b,B);t.useEffect(()=>{null==P||P.registerValue(E.value)},[]),t.useEffect(()=>{if(!S)return E.value!==R.current&&(null==P||P.cancelValue(R.current),null==P||P.registerValue(E.value),R.current=E.value),()=>null==P?void 0:P.cancelValue(E.value)},[E.value]),t.useEffect(()=>{var e;(null==(e=B.current)?void 0:e.input)&&(B.current.input.indeterminate=x)},[x]);let q=N("checkbox",p),D=(0,s.default)(q),[X,L,_]=(0,m.default)(q,D),A=Object.assign({},E);P&&!S&&(A.onChange=(...e)=>{E.onChange&&E.onChange.apply(E,e),P.toggleOption&&P.toggleOption({label:k,value:E.value})},A.name=P.name,A.checked=P.value.includes(E.value));let Y=(0,r.default)(`${q}-wrapper`,{[`${q}-rtl`]:"rtl"===O,[`${q}-wrapper-checked`]:A.checked,[`${q}-wrapper-disabled`]:j,[`${q}-wrapper-in-form-item`]:M},null==T?void 0:T.className,C,v,_,D,L),V=(0,r.default)({[`${q}-indeterminate`]:x},i.TARGET_CLS,L),[W,F]=(0,g.default)(A.onClick);return X(t.createElement(o.default,{component:"Checkbox",disabled:j},t.createElement("label",{className:Y,style:Object.assign(Object.assign({},null==T?void 0:T.style),$),onMouseEnter:w,onMouseLeave:y,onClick:W},t.createElement(n.default,Object.assign({},A,{onClick:F,prefixCls:q,className:V,disabled:j,ref:H})),null!=k&&t.createElement("span",{className:`${q}-label`},k))))});var f=e.i(8211),p=e.i(529681),C=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let v=t.forwardRef((e,n)=>{let{defaultValue:a,children:o,options:i=[],prefixCls:d,className:c,rootClassName:g,style:h,onChange:v}=e,k=C(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:x,direction:$}=t.useContext(l.ConfigContext),[w,y]=t.useState(k.value||a||[]),[S,I]=t.useState([]);t.useEffect(()=>{"value"in k&&y(k.value||[])},[k.value]);let E=t.useMemo(()=>i.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[i]),N=e=>{I(t=>t.filter(t=>t!==e))},O=e=>{I(t=>[].concat((0,f.default)(t),[e]))},T=e=>{let t=w.indexOf(e.value),r=(0,f.default)(w);-1===t?r.push(e.value):r.splice(t,1),"value"in k||y(r),null==v||v(r.filter(e=>S.includes(e)).sort((e,t)=>E.findIndex(t=>t.value===e)-E.findIndex(e=>e.value===t)))},P=x("checkbox",d),M=`${P}-group`,z=(0,s.default)(P),[j,R,B]=(0,m.default)(P,z),H=(0,p.default)(k,["value","disabled"]),q=i.length?E.map(e=>t.createElement(b,{prefixCls:P,key:e.value.toString(),disabled:"disabled"in e?e.disabled:k.disabled,value:e.value,checked:w.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${M}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):o,D=t.useMemo(()=>({toggleOption:T,value:w,disabled:k.disabled,name:k.name,registerValue:O,cancelValue:N}),[T,w,k.disabled,k.name,O,N]),X=(0,r.default)(M,{[`${M}-rtl`]:"rtl"===$},c,g,B,z,R);return j(t.createElement("div",Object.assign({className:X,style:h},H,{ref:n}),t.createElement(u.default.Provider,{value:D},q)))});b.Group=v,b.__ANT_CHECKBOX=!0,e.s(["default",0,b],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),n=e.i(673706),a=e.i(271645);let o=a.default.forwardRef((e,o)=>{let{color:i,className:l,children:d}=e;return a.default.createElement("p",{ref:o,className:(0,r.tremorTwMerge)("text-tremor-default",i?(0,n.getColorClassNames)(i,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),l)},d)});o.displayName="Text",e.s(["default",()=>o],936325),e.s(["Text",()=>o],599724)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),n=e.i(271645);let a=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],o=e=>({_s:e,status:a[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,l=(e,t,r,n,a)=>{clearTimeout(n.current);let i=o(e);t(i),r.current=i,a&&a({current:i})};var d=e.i(480731),s=e.i(444755),c=e.i(673706);let u=e=>{var r=(0,t.__rest)(e,[]);return n.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),n.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),n.default.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 m=e.i(95779);let g={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"}},h=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,s.tremorTwMerge)((0,c.getColorClassNames)(t,m.colorPalette.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},b=(0,c.makeClassName)("Button"),f=({loading:e,iconSize:t,iconPosition:r,Icon:a,needMargin:o,transitionStatus:i})=>{let l=o?r===d.HorizontalPositions.Left?(0,s.tremorTwMerge)("-ml-1","mr-1.5"):(0,s.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,s.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?n.default.createElement(u,{className:(0,s.tremorTwMerge)(b("icon"),"animate-spin shrink-0",l,m.default,m[i]),style:{transition:"width 150ms"}}):n.default.createElement(a,{className:(0,s.tremorTwMerge)(b("icon"),"shrink-0",t,l)})},p=n.default.forwardRef((e,a)=>{let{icon:u,iconPosition:m=d.HorizontalPositions.Left,size:p=d.Sizes.SM,color:C,variant:v="primary",disabled:k,loading:x=!1,loadingText:$,children:w,tooltip:y,className:S}=e,I=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),E=x||k,N=void 0!==u||x,O=x&&$,T=!(!w&&!O),P=(0,s.tremorTwMerge)(g[p].height,g[p].width),M="light"!==v?(0,s.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",z=h(v,C),j=("light"!==v?{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"}})[p],{tooltipProps:R,getReferenceProps:B}=(0,r.useTooltip)(300),[H,q]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:a,timeout:d,initialEntered:s,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[g,h]=(0,n.useState)(()=>o(s?2:i(c))),b=(0,n.useRef)(g),f=(0,n.useRef)(0),[p,C]="object"==typeof d?[d.enter,d.exit]:[d,d],v=(0,n.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(b.current._s,u);e&&l(e,h,b,f,m)},[m,u]);return[g,(0,n.useCallback)(n=>{let o=e=>{switch(l(e,h,b,f,m),e){case 1:p>=0&&(f.current=((...e)=>setTimeout(...e))(v,p));break;case 4:C>=0&&(f.current=((...e)=>setTimeout(...e))(v,C));break;case 0:case 3:f.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||o(e+1)},0)}},d=b.current.isEnter;"boolean"!=typeof n&&(n=!d),n?d||o(e?+!r:2):d&&o(t?a?3:4:i(u))},[v,m,e,t,r,a,p,C,u]),v]})({timeout:50});return(0,n.useEffect)(()=>{q(x)},[x]),n.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([a,R.refs.setReference]),className:(0,s.tremorTwMerge)(b("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",M,j.paddingX,j.paddingY,j.fontSize,z.textColor,z.bgColor,z.borderColor,z.hoverBorderColor,E?"opacity-50 cursor-not-allowed":(0,s.tremorTwMerge)(h(v,C).hoverTextColor,h(v,C).hoverBgColor,h(v,C).hoverBorderColor),S),disabled:E},B,I),n.default.createElement(r.default,Object.assign({text:y},R)),N&&m!==d.HorizontalPositions.Right?n.default.createElement(f,{loading:x,iconSize:P,iconPosition:m,Icon:u,transitionStatus:H.status,needMargin:T}):null,O||w?n.default.createElement("span",{className:(0,s.tremorTwMerge)(b("text"),"text-tremor-default whitespace-nowrap")},O?$:w):null,N&&m===d.HorizontalPositions.Right?n.default.createElement(f,{loading:x,iconSize:P,iconPosition:m,Icon:u,transitionStatus:H.status,needMargin:T}):null)});p.displayName="Button",e.s(["Button",()=>p],994388)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(480731),a=e.i(95779),o=e.i(444755),i=e.i(673706);let l=(0,i.makeClassName)("Card"),d=r.default.forwardRef((e,d)=>{let{decoration:s="",decorationColor:c,children:u,className:m}=e,g=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:d,className:(0,o.tremorTwMerge)(l("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",c?(0,i.getColorClassNames)(c,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case n.HorizontalPositions.Left:return"border-l-4";case n.VerticalPositions.Top:return"border-t-4";case n.HorizontalPositions.Right:return"border-r-4";case n.VerticalPositions.Bottom:return"border-b-4";default:return""}})(s),m)},g),u)});d.displayName="Card",e.s(["Card",()=>d],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),n=e.i(444755),a=e.i(673706),o=e.i(271645);let i=o.default.forwardRef((e,i)=>{let{color:l,children:d,className:s}=e,c=(0,t.__rest)(e,["color","children","className"]);return o.default.createElement("p",Object.assign({ref:i,className:(0,n.tremorTwMerge)("font-medium text-tremor-title",l?(0,a.getColorClassNames)(l,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",s)},c),d)});i.displayName="Title",e.s(["Title",()=>i],629569)},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(739295),n=e.i(343794),a=e.i(931067),o=e.i(211577),i=e.i(392221),l=e.i(703923),d=e.i(914949),s=e.i(404948),c=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,r){var u,m=e.prefixCls,g=void 0===m?"rc-switch":m,h=e.className,b=e.checked,f=e.defaultChecked,p=e.disabled,C=e.loadingIcon,v=e.checkedChildren,k=e.unCheckedChildren,x=e.onClick,$=e.onChange,w=e.onKeyDown,y=(0,l.default)(e,c),S=(0,d.default)(!1,{value:b,defaultValue:f}),I=(0,i.default)(S,2),E=I[0],N=I[1];function O(e,t){var r=E;return p||(N(r=e),null==$||$(r,t)),r}var T=(0,n.default)(g,h,(u={},(0,o.default)(u,"".concat(g,"-checked"),E),(0,o.default)(u,"".concat(g,"-disabled"),p),u));return t.createElement("button",(0,a.default)({},y,{type:"button",role:"switch","aria-checked":E,disabled:p,className:T,ref:r,onKeyDown:function(e){e.which===s.default.LEFT?O(!1,e):e.which===s.default.RIGHT&&O(!0,e),null==w||w(e)},onClick:function(e){var t=O(!E,e);null==x||x(t,e)}}),C,t.createElement("span",{className:"".concat(g,"-inner")},t.createElement("span",{className:"".concat(g,"-inner-checked")},v),t.createElement("span",{className:"".concat(g,"-inner-unchecked")},k)))});u.displayName="Switch";var m=e.i(121872),g=e.i(242064),h=e.i(937328),b=e.i(517455);e.i(296059);var f=e.i(915654);e.i(262370);var p=e.i(135551),C=e.i(183293),v=e.i(246422),k=e.i(838378);let x=(0,v.genStyleHooks)("Switch",e=>{let t=(0,k.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,C.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:(0,f.unit)(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,C.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:a,innerMaxMargin:o,handleSize:i,calc:l}=e,d=`${t}-inner`,s=(0,f.unit)(l(i).add(l(n).mul(2)).equal()),c=(0,f.unit)(l(o).mul(2).equal());return{[t]:{[d]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${d}-checked, ${d}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${c})`,marginInlineEnd:`calc(100% - ${s} + ${c})`},[`${d}-unchecked`]:{marginTop:l(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${d}`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${c})`,marginInlineEnd:`calc(-100% + ${s} - ${c})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:l(n).mul(2).equal(),marginInlineEnd:l(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:l(n).mul(-1).mul(2).equal(),marginInlineEnd:l(n).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:r,handleBg:n,handleShadow:a,handleSize:o,calc:i}=e,l=`${t}-handle`;return{[t]:{[l]:{position:"absolute",top:r,insetInlineStart:r,width:o,height:o,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:i(o).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${l}`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(i(o).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${l}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${l}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:a,innerMinMarginSM:o,innerMaxMarginSM:i,handleSizeSM:l,calc:d}=e,s=`${t}-inner`,c=(0,f.unit)(d(l).add(d(n).mul(2)).equal()),u=(0,f.unit)(d(i).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:r,lineHeight:(0,f.unit)(r),[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${s}-checked, ${s}-unchecked`]:{minHeight:r},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${s}-unchecked`]:{marginTop:d(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:l,height:l},[`${t}-loading-icon`]:{top:d(d(l).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:i,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(d(l).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:d(e.marginXXS).div(2).equal(),marginInlineEnd:d(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:d(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:d(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:a}=e,o=t*r,i=n/2,l=o-4,d=i-4;return{trackHeight:o,trackHeightSM:i,trackMinWidth:2*l+8,trackMinWidthSM:2*d+4,trackPadding:2,handleBg:a,handleSize:l,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new p.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+2+4,innerMinMarginSM:d/2,innerMaxMarginSM:d+2+4}});var $=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let w=t.forwardRef((e,a)=>{let{prefixCls:o,size:i,disabled:l,loading:s,className:c,rootClassName:f,style:p,checked:C,value:v,defaultChecked:k,defaultValue:w,onChange:y}=e,S=$(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[I,E]=(0,d.default)(!1,{value:null!=C?C:v,defaultValue:null!=k?k:w}),{getPrefixCls:N,direction:O,switch:T}=t.useContext(g.ConfigContext),P=t.useContext(h.default),M=(null!=l?l:P)||s,z=N("switch",o),j=t.createElement("div",{className:`${z}-handle`},s&&t.createElement(r.default,{className:`${z}-loading-icon`})),[R,B,H]=x(z),q=(0,b.default)(i),D=(0,n.default)(null==T?void 0:T.className,{[`${z}-small`]:"small"===q,[`${z}-loading`]:s,[`${z}-rtl`]:"rtl"===O},c,f,B,H),X=Object.assign(Object.assign({},null==T?void 0:T.style),p);return R(t.createElement(m.default,{component:"Switch",disabled:M},t.createElement(u,Object.assign({},S,{checked:I,onChange:(...e)=>{E(e[0]),null==y||y.apply(void 0,e)},prefixCls:z,className:D,style:X,disabled:M,ref:a,loadingIcon:j}))))});w.__ANT_SWITCH=!0,e.s(["Switch",0,w],790848)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1488f40c80200d6a.js b/litellm/proxy/_experimental/out/_next/static/chunks/1488f40c80200d6a.js deleted file mode 100644 index 485ae69475..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/1488f40c80200d6a.js +++ /dev/null @@ -1,38 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},954616,e=>{"use strict";var t=e.i(271645),i=e.i(114272),r=e.i(540143),s=e.i(915823),n=e.i(619273),a=class extends s.Subscribable{#e;#t=void 0;#i;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,n.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#i,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,n.hashKey)(t.mutationKey)!==(0,n.hashKey)(this.options.mutationKey)?this.reset():this.#i?.state.status==="pending"&&this.#i.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#i?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#n(e)}getCurrentResult(){return this.#t}reset(){this.#i?.removeObserver(this),this.#i=void 0,this.#s(),this.#n()}mutate(e,t){return this.#r=t,this.#i?.removeObserver(this),this.#i=this.#e.getMutationCache().build(this.#e,this.options),this.#i.addObserver(this),this.#i.execute(e)}#s(){let e=this.#i?.state??(0,i.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#n(e){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,i=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,i,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,i,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,i,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,i,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},l=e.i(912598);function o(e,i){let s=(0,l.useQueryClient)(i),[o]=t.useState(()=>new a(s,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let u=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(r.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=t.useCallback((e,t)=>{o.mutate(e,t).catch(n.noop)},[o]);if(u.error&&(0,n.shouldThrowError)(o.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:c,mutateAsync:u.mutate}}e.s(["useMutation",()=>o],954616)},902555,e=>{"use strict";var t=e.i(843476),i=e.i(591935),r=e.i(122577),s=e.i(278587),n=e.i(68155),a=e.i(360820),l=e.i(871943),o=e.i(434626),u=e.i(551332),c=e.i(592968),d=e.i(115504),h=e.i(752978);function m({icon:e,onClick:i,className:r,disabled:s,dataTestId:n}){return s?(0,t.jsx)(h.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":n}):(0,t.jsx)(h.Icon,{icon:e,size:"sm",onClick:i,className:(0,d.cx)("cursor-pointer",r),"data-testid":n})}let p={Edit:{icon:i.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:n.TrashIcon,className:"hover:text-red-600"},Test:{icon:r.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:s.RefreshIcon,className:"hover:text-green-600"},Up:{icon:a.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:l.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:u.ClipboardCopyIcon,className:"hover:text-blue-600"}};function b({onClick:e,tooltipText:i,disabled:r=!1,disabledTooltipText:s,dataTestId:n,variant:a}){let{icon:l,className:o}=p[a];return(0,t.jsx)(c.Tooltip,{title:r?s:i,children:(0,t.jsx)("span",{children:(0,t.jsx)(m,{icon:l,onClick:e,className:o,disabled:r,dataTestId:n})})})}e.s(["default",()=>b],902555)},122577,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.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:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,i],122577)},551332,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.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:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});e.s(["ClipboardCopyIcon",0,i],551332)},434626,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.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:i},e),t.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"}))});e.s(["ExternalLinkIcon",0,i],434626)},207670,e=>{"use strict";function t(){for(var e,t,i=0,r="",s=arguments.length;it,"default",0,t])},591935,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.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:i},e),t.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.s(["PencilAltIcon",0,i],591935)},646050,e=>{"use strict";var t=e.i(843476),i=e.i(994388),r=e.i(304967),s=e.i(197647),n=e.i(653824),a=e.i(269200),l=e.i(942232),o=e.i(977572),u=e.i(427612),c=e.i(64848),d=e.i(496020),h=e.i(881073),m=e.i(404206),p=e.i(723731),b=e.i(599724),g=e.i(271645),x=e.i(650056),f=e.i(127952),y=e.i(902555),j=e.i(727749),v=e.i(266027),T=e.i(954616),C=e.i(912598),w=e.i(243652),I=e.i(764205),M=e.i(135214);let O=(0,w.createQueryKeys)("budgets");var k=e.i(779241),E=e.i(677667),A=e.i(898667),B=e.i(130643),_=e.i(464571),F=e.i(212931),P=e.i(808613),S=e.i(28651),R=e.i(199133);let N=({isModalVisible:e,setIsModalVisible:i})=>{let[r]=P.Form.useForm(),s=(()=>{let{accessToken:e}=(0,M.default)(),t=(0,C.useQueryClient)();return(0,T.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,I.budgetCreateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:O.all})}})})(),n=async e=>{try{j.default.info("Making API Call"),await s.mutateAsync(e),j.default.success("Budget Created"),r.resetFields(),i(!1)}catch(e){console.error("Error creating the budget:",e),j.default.fromBackend(`Error creating the budget: ${e}`)}};return(0,t.jsx)(F.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{i(!1),r.resetFields()},onCancel:()=>{i(!1),r.resetFields()},children:(0,t.jsxs)(P.Form,{form:r,onFinish:n,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.Form.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)(k.TextInput,{placeholder:""})}),(0,t.jsx)(P.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(S.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(P.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(S.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(E.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(A.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(B.AccordionBody,{children:[(0,t.jsx)(P.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(S.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(P.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(R.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(R.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(R.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(R.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(_.Button,{htmlType:"submit",children:"Create Budget"})})]})})},D=({isModalVisible:e,setIsModalVisible:i,existingBudget:r})=>{let[s]=P.Form.useForm(),n=(()=>{let{accessToken:e}=(0,M.default)(),t=(0,C.useQueryClient)();return(0,T.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,I.budgetUpdateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:O.all})}})})();(0,g.useEffect)(()=>{s.setFieldsValue(r)},[r,s]);let a=async e=>{try{j.default.info("Making API Call"),await n.mutateAsync(e),j.default.success("Budget Updated"),s.resetFields(),i(!1)}catch(e){console.error("Error updating the budget:",e),j.default.fromBackend(`Error updating the budget: ${e}`)}};return(0,t.jsx)(F.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{i(!1),s.resetFields()},onCancel:()=>{i(!1),s.resetFields()},children:(0,t.jsxs)(P.Form,{form:s,onFinish:a,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:r,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.Form.Item,{label:"Budget ID",name:"budget_id",help:"Budget ID cannot be changed after creation",children:(0,t.jsx)(k.TextInput,{placeholder:"",disabled:!0})}),(0,t.jsx)(P.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(S.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(P.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(S.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(E.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(A.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(B.AccordionBody,{children:[(0,t.jsx)(P.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(S.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(P.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(R.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(R.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(R.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(R.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(_.Button,{htmlType:"submit",children:"Save"})})]})})},H=` -curl -X POST --location '/end_user/new' \\ - --H 'Authorization: Bearer ' \\ - --H 'Content-Type: application/json' \\ - --d '{"user_id": "my-customer-id', "budget_id": ""}' # 👈 KEY CHANGE - -`,L=` -curl -X POST --location '/chat/completions' \\ - --H 'Authorization: Bearer ' \\ - --H 'Content-Type: application/json' \\ - --d '{ - "model": "gpt-3.5-turbo', - "messages":[{"role": "user", "content": "Hey, how's it going?"}], - "user": "my-customer-id" -}' # 👈 KEY CHANGE - -`,K=`from openai import OpenAI -client = OpenAI( - base_url="", - api_key="" -) - -completion = client.chat.completions.create( - model="gpt-3.5-turbo", - messages=[ - {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Hello!"} - ], - user="my-customer-id" -) - -print(completion.choices[0].message)`;e.s(["default",0,({accessToken:e})=>{let[w,k]=(0,g.useState)(!1),[E,A]=(0,g.useState)(!1),[B,_]=(0,g.useState)(null),[F,P]=(0,g.useState)(!1),{data:S=[]}=(()=>{let{accessToken:e}=(0,M.default)();return(0,v.useQuery)({queryKey:O.list({}),queryFn:async()=>(await (0,I.getBudgetList)(e)??[]).filter(e=>null!=e),enabled:!!e})})(),R=(()=>{let{accessToken:e}=(0,M.default)(),t=(0,C.useQueryClient)();return(0,T.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,I.budgetDeleteCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:O.all})}})})(),U=async t=>{null!=e&&(_(t),A(!0))},q=async()=>{if(B&&null!=e)try{await R.mutateAsync(B.budget_id),j.default.success("Budget deleted.")}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{P(!1),_(null)}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(i.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>k(!0),children:"+ Create Budget"}),(0,t.jsxs)(n.TabGroup,{children:[(0,t.jsxs)(h.TabList,{children:[(0,t.jsx)(s.Tab,{children:"Budgets"}),(0,t.jsx)(s.Tab,{children:"Examples"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsx)(m.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(N,{isModalVisible:w,setIsModalVisible:k}),B&&(0,t.jsx)(D,{isModalVisible:E,setIsModalVisible:A,existingBudget:B}),(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(b.Text,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(d.TableRow,{children:[(0,t.jsx)(c.TableHeaderCell,{children:"Budget ID"}),(0,t.jsx)(c.TableHeaderCell,{children:"Max Budget"}),(0,t.jsx)(c.TableHeaderCell,{children:"TPM"}),(0,t.jsx)(c.TableHeaderCell,{children:"RPM"})]})}),(0,t.jsx)(l.TableBody,{children:S.slice().sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()).map(e=>(0,t.jsxs)(d.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e.budget_id}),(0,t.jsx)(o.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(y.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>U(e),dataTestId:"edit-budget-button"}),(0,t.jsx)(y.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{_(e),P(!0)},dataTestId:"delete-budget-button"})]},e.budget_id))})]})]}),(0,t.jsx)(f.default,{isOpen:F,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:B?.budget_id,code:!0},{label:"Max Budget",value:B?.max_budget},{label:"TPM",value:B?.tpm_limit},{label:"RPM",value:B?.rpm_limit}],onCancel:()=>{P(!1)},onOk:q,confirmLoading:R.isPending})]})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(b.Text,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(n.TabGroup,{children:[(0,t.jsxs)(h.TabList,{children:[(0,t.jsx)(s.Tab,{children:"Assign Budget to Customer"}),(0,t.jsx)(s.Tab,{children:"Test it (Curl)"}),(0,t.jsx)(s.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(x.Prism,{language:"bash",children:H})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(x.Prism,{language:"bash",children:L})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(x.Prism,{language:"python",children:K})})]})]})]})})]})]})]})}],646050)},267167,e=>{"use strict";var t=e.i(843476),i=e.i(646050),r=e.i(135214);e.s(["default",0,()=>{let{accessToken:e}=(0,r.default)();return(0,t.jsx)(i.default,{accessToken:e})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/154af7547e4197e2.js b/litellm/proxy/_experimental/out/_next/static/chunks/154af7547e4197e2.js new file mode 100644 index 0000000000..1a2bc3ceac --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/154af7547e4197e2.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},906579,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),r=e.i(361275),n=e.i(702779),o=e.i(763731),l=e.i(242064);e.i(296059);var i=e.i(915654),s=e.i(694758),c=e.i(183293),u=e.i(403541),d=e.i(246422),f=e.i(838378);let m=new s.Keyframes("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),g=new s.Keyframes("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),v=new s.Keyframes("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),h=new s.Keyframes("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),b=new s.Keyframes("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),p=new s.Keyframes("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),w=e=>{let{fontHeight:t,lineWidth:a,marginXS:r,colorBorderBg:n}=e,o=e.colorTextLightSolid,l=e.colorError,i=e.colorErrorHover;return(0,f.mergeToken)(e,{badgeFontHeight:t,badgeShadowSize:a,badgeTextColor:o,badgeColor:l,badgeColorHover:i,badgeShadowColor:n,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},y=e=>{let{fontSize:t,lineHeight:a,fontSizeSM:r,lineWidth:n}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*a)-2*n,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}},S=(0,d.genStyleHooks)("Badge",e=>(e=>{let{componentCls:t,iconCls:a,antCls:r,badgeShadowSize:n,textFontSize:o,textFontSizeSM:l,statusSize:s,dotSize:d,textFontWeight:f,indicatorHeight:w,indicatorHeightSM:y,marginXS:S,calc:O}=e,x=`${r}-scroll-number`,E=(0,u.genPresetColor)(e,(e,{darkColor:a})=>({[`&${t} ${t}-color-${e}`]:{background:a,[`&:not(${t}-count)`]:{color:a},"a:hover &":{background:a}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:w,height:w,color:e.badgeTextColor,fontWeight:f,fontSize:o,lineHeight:(0,i.unit)(w),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:O(w).div(2).equal(),boxShadow:`0 0 0 ${(0,i.unit)(n)} ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:y,height:y,fontSize:l,lineHeight:(0,i.unit)(y),borderRadius:O(y).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${(0,i.unit)(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:d,minWidth:d,height:d,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${(0,i.unit)(n)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${x}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:p,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:n,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:m,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:S,color:e.colorText,fontSize:e.fontSize}}}),E),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:b,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${x}-custom-component, ${t}-count`]:{transform:"none"},[`${x}-custom-component, ${x}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[x]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${x}-only`]:{position:"relative",display:"inline-block",height:w,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${x}-only-unit`]:{height:w,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${x}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${x}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}})(w(e)),y),O=(0,d.genStyleHooks)(["Badge","Ribbon"],e=>(e=>{let{antCls:t,badgeFontHeight:a,marginXS:r,badgeRibbonOffset:n,calc:o}=e,l=`${t}-ribbon`,s=`${t}-ribbon-wrapper`,d=(0,u.genPresetColor)(e,(e,{darkColor:t})=>({[`&${l}-color-${e}`]:{background:t,color:t}}));return{[s]:{position:"relative"},[l]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"absolute",top:r,padding:`0 ${(0,i.unit)(e.paddingXS)}`,color:e.colorPrimary,lineHeight:(0,i.unit)(a),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${l}-text`]:{color:e.badgeTextColor},[`${l}-corner`]:{position:"absolute",top:"100%",width:n,height:n,color:"currentcolor",border:`${(0,i.unit)(o(n).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),d),{[`&${l}-placement-end`]:{insetInlineEnd:o(n).mul(-1).equal(),borderEndEndRadius:0,[`${l}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${l}-placement-start`]:{insetInlineStart:o(n).mul(-1).equal(),borderEndStartRadius:0,[`${l}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}})(w(e)),y),x=e=>{let r,{prefixCls:n,value:o,current:l,offset:i=0}=e;return i&&(r={position:"absolute",top:`${i}00%`,left:0}),t.createElement("span",{style:r,className:(0,a.default)(`${n}-only-unit`,{current:l})},o)},E=e=>{let a,r,{prefixCls:n,count:o,value:l}=e,i=Number(l),s=Math.abs(o),[c,u]=t.useState(i),[d,f]=t.useState(s),m=()=>{u(i),f(s)};if(t.useEffect(()=>{let e=setTimeout(m,1e3);return()=>clearTimeout(e)},[i]),c===i||Number.isNaN(i)||Number.isNaN(c))a=[t.createElement(x,Object.assign({},e,{key:i,current:!0}))],r={transition:"none"};else{a=[];let n=i+10,o=[];for(let e=i;e<=n;e+=1)o.push(e);let l=de%10===c);a=(l<0?o.slice(0,u+1):o.slice(u)).map((a,r)=>t.createElement(x,Object.assign({},e,{key:a,value:a%10,offset:l<0?r-u:r,current:r===u}))),r={transform:`translateY(${-function(e,t,a){let r=e,n=0;for(;(r+10)%10!==t;)r+=a,n+=a;return n}(c,i,l)}00%)`}}return t.createElement("span",{className:`${n}-only`,style:r,onTransitionEnd:m},a)};var $=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let z=t.forwardRef((e,r)=>{let{prefixCls:n,count:i,className:s,motionClassName:c,style:u,title:d,show:f,component:m="sup",children:g}=e,v=$(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:h}=t.useContext(l.ConfigContext),b=h("scroll-number",n),p=Object.assign(Object.assign({},v),{"data-show":f,style:u,className:(0,a.default)(b,s,c),title:d}),w=i;if(i&&Number(i)%1==0){let e=String(i).split("");w=t.createElement("bdi",null,e.map((a,r)=>t.createElement(E,{prefixCls:b,count:Number(i),value:a,key:e.length-r})))}return((null==u?void 0:u.borderColor)&&(p.style=Object.assign(Object.assign({},u),{boxShadow:`0 0 0 1px ${u.borderColor} inset`})),g)?(0,o.cloneElement)(g,e=>({className:(0,a.default)(`${b}-custom-component`,null==e?void 0:e.className,c)})):t.createElement(m,Object.assign({},p,{ref:r}),w)});var _=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let C=t.forwardRef((e,i)=>{var s,c,u,d,f;let{prefixCls:m,scrollNumberPrefixCls:g,children:v,status:h,text:b,color:p,count:w=null,overflowCount:y=99,dot:O=!1,size:x="default",title:E,offset:$,style:C,className:j,rootClassName:k,classNames:L,styles:N,showZero:M=!1}=e,T=_(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:I,direction:R,badge:B}=t.useContext(l.ConfigContext),H=I("badge",m),[P,V,A]=S(H),D=w>y?`${y}+`:w,F="0"===D||0===D||"0"===b||0===b,U=null===w||F&&!M,W=(null!=h||null!=p)&&U,K=null!=h||!F,G=O&&!F,Z=G?"":D,q=(0,t.useMemo)(()=>((null==Z||""===Z)&&(null==b||""===b)||F&&!M)&&!G,[Z,F,M,G,b]),X=(0,t.useRef)(w);q||(X.current=w);let Y=X.current,J=(0,t.useRef)(Z);q||(J.current=Z);let Q=J.current,ee=(0,t.useRef)(G);q||(ee.current=G);let et=(0,t.useMemo)(()=>{if(!$)return Object.assign(Object.assign({},null==B?void 0:B.style),C);let e={marginTop:$[1]};return"rtl"===R?e.left=Number.parseInt($[0],10):e.right=-Number.parseInt($[0],10),Object.assign(Object.assign(Object.assign({},e),null==B?void 0:B.style),C)},[R,$,C,null==B?void 0:B.style]),ea=null!=E?E:"string"==typeof Y||"number"==typeof Y?Y:void 0,er=!q&&(0===b?M:!!b&&!0!==b),en=er?t.createElement("span",{className:`${H}-status-text`},b):null,eo=Y&&"object"==typeof Y?(0,o.cloneElement)(Y,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,el=(0,n.isPresetColor)(p,!1),ei=(0,a.default)(null==L?void 0:L.indicator,null==(s=null==B?void 0:B.classNames)?void 0:s.indicator,{[`${H}-status-dot`]:W,[`${H}-status-${h}`]:!!h,[`${H}-color-${p}`]:el}),es={};p&&!el&&(es.color=p,es.background=p);let ec=(0,a.default)(H,{[`${H}-status`]:W,[`${H}-not-a-wrapper`]:!v,[`${H}-rtl`]:"rtl"===R},j,k,null==B?void 0:B.className,null==(c=null==B?void 0:B.classNames)?void 0:c.root,null==L?void 0:L.root,V,A);if(!v&&W&&(b||K||!U)){let e=et.color;return P(t.createElement("span",Object.assign({},T,{className:ec,style:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.root),null==(u=null==B?void 0:B.styles)?void 0:u.root),et)}),t.createElement("span",{className:ei,style:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.indicator),null==(d=null==B?void 0:B.styles)?void 0:d.indicator),es)}),er&&t.createElement("span",{style:{color:e},className:`${H}-status-text`},b)))}return P(t.createElement("span",Object.assign({ref:i},T,{className:ec,style:Object.assign(Object.assign({},null==(f=null==B?void 0:B.styles)?void 0:f.root),null==N?void 0:N.root)}),v,t.createElement(r.default,{visible:!q,motionName:`${H}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:e})=>{var r,n;let o=I("scroll-number",g),l=ee.current,i=(0,a.default)(null==L?void 0:L.indicator,null==(r=null==B?void 0:B.classNames)?void 0:r.indicator,{[`${H}-dot`]:l,[`${H}-count`]:!l,[`${H}-count-sm`]:"small"===x,[`${H}-multiple-words`]:!l&&Q&&Q.toString().length>1,[`${H}-status-${h}`]:!!h,[`${H}-color-${p}`]:el}),s=Object.assign(Object.assign(Object.assign({},null==N?void 0:N.indicator),null==(n=null==B?void 0:B.styles)?void 0:n.indicator),et);return p&&!el&&((s=s||{}).background=p),t.createElement(z,{prefixCls:o,show:!q,motionClassName:e,className:i,count:Q,title:ea,style:s,key:"scrollNumber"},eo)}),en))});C.Ribbon=e=>{let{className:r,prefixCls:o,style:i,color:s,children:c,text:u,placement:d="end",rootClassName:f}=e,{getPrefixCls:m,direction:g}=t.useContext(l.ConfigContext),v=m("ribbon",o),h=`${v}-wrapper`,[b,p,w]=O(v,h),y=(0,n.isPresetColor)(s,!1),S=(0,a.default)(v,`${v}-placement-${d}`,{[`${v}-rtl`]:"rtl"===g,[`${v}-color-${s}`]:y},r),x={},E={};return s&&!y&&(x.background=s,E.color=s),b(t.createElement("div",{className:(0,a.default)(h,f,p,w)},c,t.createElement("div",{className:(0,a.default)(S,p),style:Object.assign(Object.assign({},x),i)},t.createElement("span",{className:`${v}-text`},u),t.createElement("div",{className:`${v}-corner`,style:E}))))},e.s(["Badge",0,C],906579)},44121,186515,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["MenuFoldOutlined",0,o],44121);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var i=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["MenuUnfoldOutlined",0,i],186515)},295320,283713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["CloudServerOutlined",0,o],295320);var l=e.i(764205),i=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,i.useUIConfig)(),t=e?.is_control_plane??!1,r=e?.workers??[],[n,o]=(0,a.useState)(()=>localStorage.getItem(s));(0,a.useEffect)(()=>{if(!n||0===r.length)return;let e=r.find(e=>e.worker_id===n);e&&(0,l.switchToWorkerUrl)(e.url)},[n,r]);let c=r.find(e=>e.worker_id===n)??null,u=(0,a.useCallback)(e=>{let t=r.find(t=>t.worker_id===e);t&&(o(e),localStorage.setItem(s,e),(0,l.switchToWorkerUrl)(t.url))},[r]);return{isControlPlane:t,workers:r,selectedWorkerId:n,selectedWorker:c,selectWorker:u,disconnectFromWorker:(0,a.useCallback)(()=>{o(null),localStorage.removeItem(s),(0,l.switchToWorkerUrl)(null)},[])}}],283713)},275144,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(764205);let n=(0,a.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:o})=>{let[l,i]=(0,a.useState)(null),[s,c]=(0,a.useState)(null);return(0,a.useEffect)(()=>{(async()=>{try{let e=(0,r.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",a=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(a.ok){let e=await a.json();e.values?.logo_url&&i(e.values.logo_url),e.values?.favicon_url&&c(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,a.useEffect)(()=>{if(s){let e=document.querySelectorAll("link[rel*='icon']");if(e.length>0)e.forEach(e=>{e.href=s});else{let e=document.createElement("link");e.rel="icon",e.href=s,document.head.appendChild(e)}}},[s]),(0,t.jsx)(n.Provider,{value:{logoUrl:l,setLogoUrl:i,faviconUrl:s,setFaviconUrl:c},children:e})},"useTheme",0,()=>{let e=(0,a.useContext)(n);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},115571,e=>{"use strict";let t="local-storage-change";function a(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))}function r(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}}function n(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}function o(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}}e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",()=>a,"getLocalStorageItem",()=>r,"removeLocalStorageItem",()=>o,"setLocalStorageItem",()=>n])},371401,e=>{"use strict";var t=e.i(115571),a=e.i(271645);function r(e){let a=t=>{"disableUsageIndicator"===t.key&&e()},r=t=>{let{key:a}=t.detail;"disableUsageIndicator"===a&&e()};return window.addEventListener("storage",a),window.addEventListener(t.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",a),window.removeEventListener(t.LOCAL_STORAGE_EVENT,r)}}function n(){return"true"===(0,t.getLocalStorageItem)("disableUsageIndicator")}function o(){return(0,a.useSyncExternalStore)(r,n)}e.s(["useDisableUsageIndicator",()=>o])},100486,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["CrownOutlined",0,o],100486)},755151,e=>{"use strict";var t=e.i(247153);e.s(["DownOutlined",()=>t.default])},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},818581,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useMergedRef",{enumerable:!0,get:function(){return n}});let r=e.r(271645);function n(e,t){let a=(0,r.useRef)(null),n=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=a.current;e&&(a.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(a.current=o(e,r)),t&&(n.current=o(t,r))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let a=e(t);return"function"==typeof a?a:()=>e(null)}}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},62478,e=>{"use strict";var t=e.i(764205);let a=async e=>{if(!e)return null;try{return await (0,t.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};e.s(["fetchProxySettings",0,a])},602073,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={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"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["SafetyOutlined",0,o],602073)},477189,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["AppstoreOutlined",0,o],477189)},788191,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["PlayCircleOutlined",0,o],788191)},399219,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",()=>t])},844444,e=>{"use strict";var t=e.i(843476),a=e.i(906579),r=e.i(271645),n=e.i(115571);function o(e){let t=t=>{"disableShowNewBadge"===t.key&&e()},a=t=>{let{key:a}=t.detail;"disableShowNewBadge"===a&&e()};return window.addEventListener("storage",t),window.addEventListener(n.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",t),window.removeEventListener(n.LOCAL_STORAGE_EVENT,a)}}function l(){return"true"===(0,n.getLocalStorageItem)("disableShowNewBadge")}function i({children:e,dot:n=!1}){return(0,r.useSyncExternalStore)(o,l)?e?(0,t.jsx)(t.Fragment,{children:e}):null:e?(0,t.jsx)(a.Badge,{color:"blue",count:n?void 0:"New",dot:n,children:e}):(0,t.jsx)(a.Badge,{color:"blue",count:n?void 0:"New",dot:n})}e.s(["default",()=>i],844444)},299251,153702,777579,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["BankOutlined",0,o],299251);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"};var i=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["BarChartOutlined",0,i],153702);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"};var c=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["LineChartOutlined",0,c],777579)},582458,e=>{"use strict";let t=(0,e.i(475254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",()=>t])},19732,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z"}}]},name:"experiment",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["ExperimentOutlined",0,o],19732)},438957,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z"}}]},name:"key",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["KeyOutlined",0,o],438957)},366308,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["ToolOutlined",0,o],366308)},313603,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["SettingOutlined",0,o],313603)},872934,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["ExportOutlined",0,o],872934)},232164,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["TagsOutlined",0,o],232164)},210612,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["DatabaseOutlined",0,o],210612)},218129,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={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"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["ApiOutlined",0,o],218129)},878894,664659,531278,e=>{"use strict";var t=e.i(582458);e.s(["AlertTriangle",()=>t.default],878894);var a=e.i(631171);e.s(["ChevronDown",()=>a.default],664659);let r=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>r],531278)},902739,e=>{"use strict";var t=e.i(843476),a=e.i(111672),r=e.i(764205),n=e.i(135214),o=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:l,sidebarCollapsed:i})=>{let{accessToken:s}=(0,n.default)(),[c,u]=(0,o.useState)(null),[d,f]=(0,o.useState)(!1),[m,g]=(0,o.useState)(!1),[v,h]=(0,o.useState)(!1),[b,p]=(0,o.useState)(!1),[w,y]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{(async()=>{if(!s)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,r.getUISettings)(s);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),u(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&f(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&h(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&p(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&y(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[s]),(0,t.jsx)(a.default,{setPage:e,defaultSelectedKey:l,collapsed:i,enabledPagesInternalUsers:c,enableProjectsUI:d,disableAgentsForInternalUsers:m,allowAgentsForTeamAdmins:v,disableVectorStoresForInternalUsers:b,allowVectorStoresForTeamAdmins:w})}])},216370,e=>{"use strict";e.i(247167);var t=e.i(843476),a=e.i(271645),r=e.i(402874),n=e.i(275144),o=e.i(902739),l=e.i(135214),i=e.i(618566),s=e.i(560445),c=e.i(521323);let u=()=>{let{data:e}=(0,c.useHealthReadiness)();return e?.is_detailed_debug?(0,t.jsx)(s.Alert,{message:"Performance Warning: Detailed Debug Mode Active",description:(0,t.jsxs)(t.Fragment,{children:["Detailed debug logging (",(0,t.jsx)("code",{children:"LITELLM_LOG=DEBUG"}),") is currently enabled. This mode logs extensive diagnostic information and will significantly degrade performance. It should only be used for troubleshooting and disabled in production environments."]}),type:"warning",showIcon:!0,banner:!0,style:{marginBottom:0,borderRadius:0}}):null},d=function(e){let t="ui/".trim();if(!t)return"";let a=t.replace(/^\/+/,"").replace(/\/+$/,"");return a?`/${a}/`:"/"}(0);function f(e){let t=e.startsWith("/")?e.slice(1):e,a=`${d}${t}`;return a.startsWith("/")?a:`/${a}`}let m={"api-reference":"api-reference"};function g({children:e}){let s=(0,i.useRouter)(),c=(0,i.useSearchParams)(),{accessToken:d,userRole:g,userId:v,userEmail:h,premiumUser:b}=(0,l.default)(),[p,w]=a.default.useState(!1),[y,S]=(0,a.useState)(()=>c.get("page")||"api-keys");return(0,a.useEffect)(()=>{S(c.get("page")||"api-keys")},[c]),(0,t.jsx)(n.ThemeProvider,{accessToken:"",children:(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,t.jsx)(r.default,{isPublicPage:!1,sidebarCollapsed:p,onToggleSidebar:()=>w(e=>!e),userID:v,userEmail:h,userRole:g,premiumUser:b,proxySettings:void 0,setProxySettings:()=>{},accessToken:d,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,t.jsx)(u,{}),(0,t.jsxs)("div",{className:"flex flex-1 overflow-auto",children:[(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(o.default,{setPage:e=>{let t=m[e];if(t){s.push(f(t)),S(e);return}s.push(f(`?page=${e}`)),S(e)},defaultSelectedKey:y,sidebarCollapsed:p})}),(0,t.jsx)("main",{className:"flex-1",children:e})]})]})})}function v({children:e}){return(0,t.jsx)(a.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(g,{children:e})})}e.s(["default",()=>v],216370)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/179f4b987bc9083f.js b/litellm/proxy/_experimental/out/_next/static/chunks/179f4b987bc9083f.js deleted file mode 100644 index 46e69247ad..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/179f4b987bc9083f.js +++ /dev/null @@ -1,9 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,677667,674175,886148,543086,e=>{"use strict";let t,r;var a,l=e.i(290571),n=e.i(429427),o=e.i(371330),s=e.i(271645),i=e.i(394487),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(83733);let g=(0,s.createContext)(()=>{});function f({value:e,children:t}){return s.default.createElement(g.Provider,{value:e},t)}e.s(["CloseProvider",()=>f],674175);var p=e.i(233137),b=e.i(233538),h=e.i(397701),v=e.i(402155),C=e.i(700020);let k=null!=(a=s.default.startTransition)?a:function(e){e()};var x=e.i(998348),w=((t=w||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),E=((r=E||{})[r.ToggleDisclosure=0]="ToggleDisclosure",r[r.CloseDisclosure=1]="CloseDisclosure",r[r.SetButtonId=2]="SetButtonId",r[r.SetPanelId=3]="SetPanelId",r[r.SetButtonElement=4]="SetButtonElement",r[r.SetPanelElement=5]="SetPanelElement",r);let y={0:e=>({...e,disclosureState:(0,h.match)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},N=(0,s.createContext)(null);function T(e){let t=(0,s.useContext)(N);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,T),t}return t}N.displayName="DisclosureContext";let O=(0,s.createContext)(null);O.displayName="DisclosureAPIContext";let $=(0,s.createContext)(null);function j(e,t){return(0,h.match)(t.type,y,e,t)}$.displayName="DisclosurePanelContext";let S=s.Fragment,P=C.RenderFeatures.RenderStrategy|C.RenderFeatures.Static,R=Object.assign((0,C.forwardRefWithAs)(function(e,t){let{defaultOpen:r=!1,...a}=e,l=(0,s.useRef)(null),n=(0,u.useSyncRefs)(t,(0,u.optionalRef)(e=>{l.current=e},void 0===e.as||e.as===s.Fragment)),o=(0,s.useReducer)(j,{disclosureState:+!r,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:i,buttonId:c},m]=o,g=(0,d.useEvent)(e=>{m({type:1});let t=(0,v.getOwnerDocument)(l);if(!t||!c)return;let r=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(c):t.getElementById(c);null==r||r.focus()}),b=(0,s.useMemo)(()=>({close:g}),[g]),k=(0,s.useMemo)(()=>({open:0===i,close:g}),[i,g]),x=(0,C.useRender)();return s.default.createElement(N.Provider,{value:o},s.default.createElement(O.Provider,{value:b},s.default.createElement(f,{value:g},s.default.createElement(p.OpenClosedProvider,{value:(0,h.match)(i,{0:p.State.Open,1:p.State.Closed})},x({ourProps:{ref:n},theirProps:a,slot:k,defaultTag:S,name:"Disclosure"})))))}),{Button:(0,C.forwardRefWithAs)(function(e,t){let r=(0,s.useId)(),{id:a=`headlessui-disclosure-button-${r}`,disabled:l=!1,autoFocus:m=!1,...g}=e,[f,p]=T("Disclosure.Button"),h=(0,s.useContext)($),v=null!==h&&h===f.panelId,k=(0,s.useRef)(null),w=(0,u.useSyncRefs)(k,t,(0,d.useEvent)(e=>{if(!v)return p({type:4,element:e})}));(0,s.useEffect)(()=>{if(!v)return p({type:2,buttonId:a}),()=>{p({type:2,buttonId:null})}},[a,p,v]);let E=(0,d.useEvent)(e=>{var t;if(v){if(1===f.disclosureState)return;switch(e.key){case x.Keys.Space:case x.Keys.Enter:e.preventDefault(),e.stopPropagation(),p({type:0}),null==(t=f.buttonElement)||t.focus()}}else switch(e.key){case x.Keys.Space:case x.Keys.Enter:e.preventDefault(),e.stopPropagation(),p({type:0})}}),y=(0,d.useEvent)(e=>{e.key===x.Keys.Space&&e.preventDefault()}),N=(0,d.useEvent)(e=>{var t;(0,b.isDisabledReactIssue7711)(e.currentTarget)||l||(v?(p({type:0}),null==(t=f.buttonElement)||t.focus()):p({type:0}))}),{isFocusVisible:O,focusProps:j}=(0,n.useFocusRing)({autoFocus:m}),{isHovered:S,hoverProps:P}=(0,o.useHover)({isDisabled:l}),{pressed:R,pressProps:M}=(0,i.useActivePress)({disabled:l}),B=(0,s.useMemo)(()=>({open:0===f.disclosureState,hover:S,active:R,disabled:l,focus:O,autofocus:m}),[f,S,R,O,l,m]),I=(0,c.useResolveButtonType)(e,f.buttonElement),A=v?(0,C.mergeProps)({ref:w,type:I,disabled:l||void 0,autoFocus:m,onKeyDown:E,onClick:N},j,P,M):(0,C.mergeProps)({ref:w,id:a,type:I,"aria-expanded":0===f.disclosureState,"aria-controls":f.panelElement?f.panelId:void 0,disabled:l||void 0,autoFocus:m,onKeyDown:E,onKeyUp:y,onClick:N},j,P,M);return(0,C.useRender)()({ourProps:A,theirProps:g,slot:B,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,C.forwardRefWithAs)(function(e,t){let r=(0,s.useId)(),{id:a=`headlessui-disclosure-panel-${r}`,transition:l=!1,...n}=e,[o,i]=T("Disclosure.Panel"),{close:c}=function e(t){let r=(0,s.useContext)(O);if(null===r){let r=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}("Disclosure.Panel"),[g,f]=(0,s.useState)(null),b=(0,u.useSyncRefs)(t,(0,d.useEvent)(e=>{k(()=>i({type:5,element:e}))}),f);(0,s.useEffect)(()=>(i({type:3,panelId:a}),()=>{i({type:3,panelId:null})}),[a,i]);let h=(0,p.useOpenClosed)(),[v,x]=(0,m.useTransition)(l,g,null!==h?(h&p.State.Open)===p.State.Open:0===o.disclosureState),w=(0,s.useMemo)(()=>({open:0===o.disclosureState,close:c}),[o.disclosureState,c]),E={ref:b,id:a,...(0,m.transitionDataAttributes)(x)},y=(0,C.useRender)();return s.default.createElement(p.ResetOpenClosedProvider,null,s.default.createElement($.Provider,{value:o.panelId},y({ourProps:E,theirProps:n,slot:w,defaultTag:"div",features:P,visible:v,name:"Disclosure.Panel"})))})});e.s(["Disclosure",()=>R],886148);let M=(0,s.createContext)(void 0);var B=e.i(444755);let I=(0,e.i(673706).makeClassName)("Accordion"),A=(0,s.createContext)({isOpen:!1}),z=s.default.forwardRef((e,t)=>{var r;let{defaultOpen:a=!1,children:n,className:o}=e,i=(0,l.__rest)(e,["defaultOpen","children","className"]),d=null!=(r=(0,s.useContext)(M))?r:(0,B.tremorTwMerge)("rounded-tremor-default border");return s.default.createElement(R,Object.assign({as:"div",ref:t,className:(0,B.tremorTwMerge)(I("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",d,o),defaultOpen:a},i),({open:e})=>s.default.createElement(A.Provider,{value:{isOpen:e}},n))});z.displayName="Accordion",e.s(["OpenContext",()=>A,"default",()=>z],543086),e.s(["Accordion",()=>z],677667)},898667,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(886148);let l=e=>{var a=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},a),r.default.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var n=e.i(543086),o=e.i(444755);let s=(0,e.i(673706).makeClassName)("AccordionHeader"),i=r.default.forwardRef((e,i)=>{let{children:d,className:c}=e,u=(0,t.__rest)(e,["children","className"]),{isOpen:m}=(0,r.useContext)(n.OpenContext);return r.default.createElement(a.Disclosure.Button,Object.assign({ref:i,className:(0,o.tremorTwMerge)(s("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",c)},u),r.default.createElement("div",{className:(0,o.tremorTwMerge)(s("children"),"flex flex-1 text-inherit mr-4")},d),r.default.createElement("div",null,r.default.createElement(l,{className:(0,o.tremorTwMerge)(s("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m?"transition-all":"transition-all -rotate-180")})))});i.displayName="AccordionHeader",e.s(["AccordionHeader",()=>i],898667)},130643,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(886148),l=e.i(444755);let n=(0,e.i(673706).makeClassName)("AccordionBody"),o=r.default.forwardRef((e,o)=>{let{children:s,className:i}=e,d=(0,t.__rest)(e,["children","className"]);return r.default.createElement(a.Disclosure.Panel,Object.assign({ref:o,className:(0,l.tremorTwMerge)(n("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",i)},d),s)});o.displayName="AccordionBody",e.s(["AccordionBody",()=>o],130643)},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),a=e.i(673706),l=e.i(271645);let n=l.default.forwardRef((e,n)=>{let{color:o,className:s,children:i}=e;return l.default.createElement("p",{ref:n,className:(0,r.tremorTwMerge)("text-tremor-default",o?(0,a.getColorClassNames)(o,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),s)},i)});n.displayName="Text",e.s(["default",()=>n],936325),e.s(["Text",()=>n],599724)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],n=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),o=e=>e?6:5,s=(e,t,r,a,l)=>{clearTimeout(a.current);let o=n(e);t(o),r.current=o,l&&l({current:o})};var i=e.i(480731),d=e.i(444755),c=e.i(673706);let u=e=>{var r=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.default.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 m=e.i(95779);let g={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"}},f=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,m.colorPalette.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,c.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:l,needMargin:n,transitionStatus:o})=>{let s=n?r===i.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(u,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",s,m.default,m[o]),style:{transition:"width 150ms"}}):a.default.createElement(l,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,s)})},h=a.default.forwardRef((e,l)=>{let{icon:u,iconPosition:m=i.HorizontalPositions.Left,size:h=i.Sizes.SM,color:v,variant:C="primary",disabled:k,loading:x=!1,loadingText:w,children:E,tooltip:y,className:N}=e,T=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),O=x||k,$=void 0!==u||x,j=x&&w,S=!(!E&&!j),P=(0,d.tremorTwMerge)(g[h].height,g[h].width),R="light"!==C?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",M=f(C,v),B=("light"!==C?{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"}})[h],{tooltipProps:I,getReferenceProps:A}=(0,r.useTooltip)(300),[z,H]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:l,timeout:i,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[g,f]=(0,a.useState)(()=>n(d?2:o(c))),p=(0,a.useRef)(g),b=(0,a.useRef)(0),[h,v]="object"==typeof i?[i.enter,i.exit]:[i,i],C=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return o(t)}})(p.current._s,u);e&&s(e,f,p,b,m)},[m,u]);return[g,(0,a.useCallback)(a=>{let n=e=>{switch(s(e,f,p,b,m),e){case 1:h>=0&&(b.current=((...e)=>setTimeout(...e))(C,h));break;case 4:v>=0&&(b.current=((...e)=>setTimeout(...e))(C,v));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||n(e+1)},0)}},i=p.current.isEnter;"boolean"!=typeof a&&(a=!i),a?i||n(e?+!r:2):i&&n(t?l?3:4:o(u))},[C,m,e,t,r,l,h,v,u]),C]})({timeout:50});return(0,a.useEffect)(()=>{H(x)},[x]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([l,I.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",R,B.paddingX,B.paddingY,B.fontSize,M.textColor,M.bgColor,M.borderColor,M.hoverBorderColor,O?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(f(C,v).hoverTextColor,f(C,v).hoverBgColor,f(C,v).hoverBorderColor),N),disabled:O},A,T),a.default.createElement(r.default,Object.assign({text:y},I)),$&&m!==i.HorizontalPositions.Right?a.default.createElement(b,{loading:x,iconSize:P,iconPosition:m,Icon:u,transitionStatus:z.status,needMargin:S}):null,j||E?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},j?w:E):null,$&&m===i.HorizontalPositions.Right?a.default.createElement(b,{loading:x,iconSize:P,iconPosition:m,Icon:u,transitionStatus:z.status,needMargin:S}):null)});h.displayName="Button",e.s(["Button",()=>h],994388)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),l=e.i(95779),n=e.i(444755),o=e.i(673706);let s=(0,o.makeClassName)("Card"),i=r.default.forwardRef((e,i)=>{let{decoration:d="",decorationColor:c,children:u,className:m}=e,g=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:i,className:(0,n.tremorTwMerge)(s("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",c?(0,o.getColorClassNames)(c,l.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),m)},g),u)});i.displayName="Card",e.s(["Card",()=>i],304967)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(529681);let n=e=>{let{prefixCls:a,className:l,style:n,size:o,shape:s}=e,i=(0,r.default)({[`${a}-lg`]:"large"===o,[`${a}-sm`]:"small"===o}),d=(0,r.default)({[`${a}-circle`]:"circle"===s,[`${a}-square`]:"square"===s,[`${a}-round`]:"round"===s}),c=t.useMemo(()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return t.createElement("span",{className:(0,r.default)(a,i,d,l),style:Object.assign(Object.assign({},c),n)})};e.i(296059);var o=e.i(694758),s=e.i(915654),i=e.i(246422),d=e.i(838378);let c=new o.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,s.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),f=e=>Object.assign({width:e},u(e)),p=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),h=(0,i.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:l,skeletonButtonCls:n,skeletonInputCls:o,skeletonImageCls:s,controlHeight:i,controlHeightLG:d,controlHeightSM:u,gradientFromColor:h,padding:v,marginSM:C,borderRadius:k,titleHeight:x,blockRadius:w,paragraphLiHeight:E,controlHeightXS:y,paragraphMarginTop:N}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:v,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:h},m(i)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:x,background:h,borderRadius:w,[`+ ${l}`]:{marginBlockStart:u}},[l]:{padding:0,"> li":{width:"100%",height:E,listStyle:"none",background:h,borderRadius:w,"+ li":{marginBlockStart:y}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${l} > li`]:{borderRadius:k}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:C,[`+ ${l}`]:{marginBlockStart:N}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:l,controlHeightSM:n,gradientFromColor:o,calc:s}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:s(a).mul(2).equal(),minWidth:s(a).mul(2).equal()},b(a,s))},p(e,a,r)),{[`${r}-lg`]:Object.assign({},b(l,s))}),p(e,l,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(n,s))}),p(e,n,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:l,controlHeightSM:n}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(l)),[`${t}${t}-sm`]:Object.assign({},m(n))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:l,controlHeightSM:n,gradientFromColor:o,calc:s}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:r},g(t,s)),[`${a}-lg`]:Object.assign({},g(l,s)),[`${a}-sm`]:Object.assign({},g(n,s))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:l,calc:n}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:l},f(n(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(r)),{maxWidth:n(r).mul(4).equal(),maxHeight:n(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[n]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${a}, - ${l} > li, - ${r}, - ${n}, - ${o}, - ${s} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,d.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),v=e=>{let{prefixCls:a,className:l,style:n,rows:o=0}=e,s=Array.from({length:o}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:n},s)},C=({prefixCls:e,className:a,width:l,style:n})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},n)});function k(e){return e&&"object"==typeof e?e:{}}let x=e=>{let{prefixCls:l,loading:o,className:s,rootClassName:i,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:p}=e,{getPrefixCls:b,direction:x,className:w,style:E}=(0,a.useComponentConfig)("skeleton"),y=b("skeleton",l),[N,T,O]=h(y);if(o||!("loading"in e)){let e,a,l=!!u,o=!!m,c=!!g;if(l){let r=Object.assign(Object.assign({prefixCls:`${y}-avatar`},o&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),k(u));e=t.createElement("div",{className:`${y}-header`},t.createElement(n,Object.assign({},r)))}if(o||c){let e,r;if(o){let r=Object.assign(Object.assign({prefixCls:`${y}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),k(m));e=t.createElement(C,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},(e={},l&&o||(e.width="61%"),!l&&o?e.rows=3:e.rows=2,e)),k(g));r=t.createElement(v,Object.assign({},a))}a=t.createElement("div",{className:`${y}-content`},e,r)}let b=(0,r.default)(y,{[`${y}-with-avatar`]:l,[`${y}-active`]:f,[`${y}-rtl`]:"rtl"===x,[`${y}-round`]:p},w,s,i,T,O);return N(t.createElement("div",{className:b,style:Object.assign(Object.assign({},E),d)},e,a))}return null!=c?c:null};x.Button=e=>{let{prefixCls:o,className:s,rootClassName:i,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,p,b]=h(g),v=(0,l.default)(e,["prefixCls"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},s,i,p,b);return f(t.createElement("div",{className:C},t.createElement(n,Object.assign({prefixCls:`${g}-button`,size:u},v))))},x.Avatar=e=>{let{prefixCls:o,className:s,rootClassName:i,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,p,b]=h(g),v=(0,l.default)(e,["prefixCls","className"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},s,i,p,b);return f(t.createElement("div",{className:C},t.createElement(n,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},v))))},x.Input=e=>{let{prefixCls:o,className:s,rootClassName:i,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,p,b]=h(g),v=(0,l.default)(e,["prefixCls"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},s,i,p,b);return f(t.createElement("div",{className:C},t.createElement(n,Object.assign({prefixCls:`${g}-input`,size:u},v))))},x.Image=e=>{let{prefixCls:l,className:n,rootClassName:o,style:s,active:i}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[u,m,g]=h(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:i},n,o,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,n),style:s},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${c}-image-path`})))))},x.Node=e=>{let{prefixCls:l,className:n,rootClassName:o,style:s,active:i,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",l),[m,g,f]=h(u),p=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:i},g,n,o,f);return m(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${u}-image`,n),style:s},d)))},e.s(["default",0,x],185793)},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var l=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(l.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["default",0,n],959013)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),n=r.default.forwardRef((e,n)=>{let{children:o,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",s)},r.default.createElement("table",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},i),o))});n.displayName="Table",e.s(["Table",()=>n],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),n=r.default.forwardRef((e,n)=>{let{children:o,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",s)},i),o))});n.displayName="TableBody",e.s(["TableBody",()=>n],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),n=r.default.forwardRef((e,n)=>{let{children:o,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",s)},i),o))});n.displayName="TableCell",e.s(["TableCell",()=>n],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),n=r.default.forwardRef((e,n)=>{let{children:o,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",s)},i),o))});n.displayName="TableHead",e.s(["TableHead",()=>n],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),n=r.default.forwardRef((e,n)=>{let{children:o,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",s)},i),o))});n.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>n],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),n=r.default.forwardRef((e,n)=>{let{children:o,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("row"),s)},i),o))});n.displayName="TableRow",e.s(["TableRow",()=>n],496020)},68155,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,r],68155)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},871943,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943)},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},233538,e=>{"use strict";function t(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let a=(null==t?void 0:t.getAttribute("disabled"))==="";return!(a&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&a}e.s(["isDisabledReactIssue7711",()=>t])},83733,233137,e=>{"use strict";let t,r;var a,l,n=e.i(247167),o=e.i(271645),s=e.i(544508),i=e.i(746725),d=e.i(835696);void 0!==n.default&&"u">typeof globalThis&&"u">typeof Element&&(null==(a=null==n.default?void 0:n.default.env)?void 0:a.NODE_ENV)==="test"&&void 0===(null==(l=null==Element?void 0:Element.prototype)?void 0:l.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(` -`)),[]});var c=((t=c||{})[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t);function u(e){let t={};for(let r in e)!0===e[r]&&(t[`data-${r}`]="");return t}function m(e,t,r,a){let[l,n]=(0,o.useState)(r),{hasFlag:c,addFlag:u,removeFlag:m}=function(e=0){let[t,r]=(0,o.useState)(e),a=(0,o.useCallback)(e=>r(e),[t]),l=(0,o.useCallback)(e=>r(t=>t|e),[t]),n=(0,o.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:a,addFlag:l,hasFlag:n,removeFlag:(0,o.useCallback)(e=>r(t=>t&~e),[r]),toggleFlag:(0,o.useCallback)(e=>r(t=>t^e),[r])}}(e&&l?3:0),g=(0,o.useRef)(!1),f=(0,o.useRef)(!1),p=(0,i.useDisposables)();return(0,d.useIsoMorphicEffect)(()=>{var l;if(e){if(r&&n(!0),!t){r&&u(3);return}return null==(l=null==a?void 0:a.start)||l.call(a,r),function(e,{prepare:t,run:r,done:a,inFlight:l}){let n=(0,s.disposables)();return function(e,{inFlight:t,prepare:r}){if(null!=t&&t.current)return r();let a=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=a}(e,{prepare:t,inFlight:l}),n.nextFrame(()=>{r(),n.requestAnimationFrame(()=>{n.add(function(e,t){var r,a;let l=(0,s.disposables)();if(!e)return l.dispose;let n=!1;l.add(()=>{n=!0});let o=null!=(a=null==(r=e.getAnimations)?void 0:r.call(e).filter(e=>e instanceof CSSTransition))?a:[];return 0===o.length?t():Promise.allSettled(o.map(e=>e.finished)).then(()=>{n||t()}),l.dispose}(e,a))})}),n.dispose}(t,{inFlight:g,prepare(){f.current?f.current=!1:f.current=g.current,g.current=!0,f.current||(r?(u(3),m(4)):(u(4),m(2)))},run(){f.current?r?(m(3),u(4)):(m(4),u(3)):r?m(1):u(1)},done(){var e;f.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(g.current=!1,m(7),r||n(!1),null==(e=null==a?void 0:a.end)||e.call(a,r))}})}},[e,r,t,p]),e?[l,{closed:c(1),enter:c(2),leave:c(4),transition:c(2)||c(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}e.s(["transitionDataAttributes",()=>u,"useTransition",()=>m],83733);let g=(0,o.createContext)(null);g.displayName="OpenClosedContext";var f=((r=f||{})[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r);function p(){return(0,o.useContext)(g)}function b({value:e,children:t}){return o.default.createElement(g.Provider,{value:e},t)}function h({children:e}){return o.default.createElement(g.Provider,{value:null},e)}e.s(["OpenClosedProvider",()=>b,"ResetOpenClosedProvider",()=>h,"State",()=>f,"useOpenClosed",()=>p],233137)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1973a4cee645cb66.js b/litellm/proxy/_experimental/out/_next/static/chunks/1973a4cee645cb66.js deleted file mode 100644 index 0ea6d7014d..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/1973a4cee645cb66.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,309426,e=>{"use strict";var t=e.i(290571),r=e.i(444755),n=e.i(673706),i=e.i(271645),s=e.i(46757);let a=(0,n.makeClassName)("Col"),o=i.default.forwardRef((e,n)=>{let o,l,d,c,{numColSpan:u=1,numColSpanSm:h,numColSpanMd:f,numColSpanLg:p,children:m,className:g}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),b=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return i.default.createElement("div",Object.assign({ref:n,className:(0,r.tremorTwMerge)(a("root"),(o=b(u,s.colSpan),l=b(h,s.colSpanSm),d=b(f,s.colSpanMd),c=b(p,s.colSpanLg),(0,r.tremorTwMerge)(o,l,d,c)),g)},y),m)});o.displayName="Col",e.s(["Col",()=>o],309426)},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["UploadOutlined",0,s],519756)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,n]of Object.entries(t))e in r&&(r[e]=n);return r}let n=(e,t=0,r=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let i={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",i);let s=e<0?"-":"",a=Math.abs(e),o=a,l="";return a>=1e6?(o=a/1e6,l="M"):a>=1e3&&(o=a/1e3,l="K"),`${s}${o.toLocaleString("en-US",i)}${l}`},i=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return s(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),s(e,r)}},s=(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 i=document.execCommand("copy");if(document.body.removeChild(n),i)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,i,"formatNumberWithCommas",0,n,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=n(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},663435,152473,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(199133),i=e.i(898586),s=e.i(56456);let a={enabled:!0,leading:!1,trailing:!0,wait:0,onExecute:()=>{}};class o{constructor(e,t){this.fn=e,this._canLeadingExecute=!0,this._isPending=!1,this._executionCount=0,this._options={...a,...t}}setOptions(e){return this._options={...this._options,...e},this._options.enabled||(this._isPending=!1),this._options}getOptions(){return this._options}maybeExecute(...e){this._options.leading&&this._canLeadingExecute&&(this.executeFunction(...e),this._canLeadingExecute=!1),(this._options.leading||this._options.trailing)&&(this._isPending=!0),this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=setTimeout(()=>{this._canLeadingExecute=!0,this._isPending=!1,this._options.trailing&&this.executeFunction(...e)},this._options.wait)}executeFunction(...e){this._options.enabled&&(this.fn(...e),this._executionCount++,this._options.onExecute(this))}cancel(){this._timeoutId&&(clearTimeout(this._timeoutId),this._canLeadingExecute=!0,this._isPending=!1)}getExecutionCount(){return this._executionCount}getIsPending(){return this._options.enabled&&this._isPending}}function l(e,t){let[n,i]=(0,r.useState)(e),s=function(e,t){let[n]=(0,r.useState)(()=>{var r;return Object.getOwnPropertyNames(Object.getPrototypeOf(r=new o(e,t))).filter(e=>"function"==typeof r[e]).reduce((e,t)=>{let n=r[t];return"function"==typeof n&&(e[t]=n.bind(r)),e},{})});return n.setOptions(t),n}(i,t);return[n,s.maybeExecute,s]}e.s(["useDebouncedState",()=>l],152473);var d=e.i(785242);let{Text:c}=i.Typography;e.s(["default",0,({value:e,onChange:i,onTeamSelect:a,disabled:o,organizationId:u,pageSize:h=20})=>{let[f,p]=(0,r.useState)(""),[m,g]=l("",{wait:300}),{data:y,fetchNextPage:b,hasNextPage:x,isFetchingNextPage:v,isLoading:_}=(0,d.useInfiniteTeams)(h,m||void 0,u),k=(0,r.useMemo)(()=>{if(!y?.pages)return[];let e=new Set,t=[];for(let r of y.pages)for(let n of r.teams)e.has(n.team_id)||(e.add(n.team_id),t.push(n));return t},[y]);return(0,t.jsx)(n.Select,{showSearch:!0,placeholder:"Search or select a team",value:e||void 0,onChange:e=>{i?.(e??""),a&&a(e?k.find(t=>t.team_id===e)??null:null)},disabled:o,allowClear:!0,filterOption:!1,onSearch:e=>{p(e),g(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&x&&!v&&b()},loading:_,notFoundContent:_?(0,t.jsx)(s.LoadingOutlined,{spin:!0}):"No teams found","data-testid":"team-dropdown",popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,v&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(s.LoadingOutlined,{spin:!0})})]}),children:k.map(e=>(0,t.jsxs)(n.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(c,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})}],663435)},743151,(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var i=o(e.r(271645)),s=o(e.r(844343)),a=["text","onCopy","options","children"];function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,a),n=i.default.Children.only(t);return i.default.cloneElement(n,d(d({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var n=e.r(743151).CopyToClipboard;n.CopyToClipboard=n,t.exports=n},59935,(e,t,r)=>{var n;let i;e.e,n=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},n=!r.document&&!!r.postMessage,i=r.IS_PAPA_WORKER||!1,s={},a=0,o={};function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=x(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new f(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,i)r.postMessage({results:s,workerId:o.WORKER_ID,finished:n});else if(_(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!n||!_(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):i&&this._config.error&&r.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function d(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e,r,i=this._config.downloadRequestHeaders;for(r in i)t.setRequestHeader(r,i[r])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function c(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),l.call(this,e);var t,r,n="u">typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function u(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function h(e){l.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function f(e){var t,r,n,i,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,l=this,d=0,c=0,u=!1,h=!1,f=[],g={data:[],errors:[],meta:{}};function y(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function b(){if(g&&n&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!y(e)})),v()){if(g)if(Array.isArray(g.data[0])){for(var t,r=0;v()&&r(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(s.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):a.test(r)?new Date(r):""===r?null:r):r)(o=e.header?i>=f.length?"__parsed_extra":f[i]:o,l=e.transform?e.transform(l,o):l);"__parsed_extra"===o?(n[o]=n[o]||[],n[o].push(l)):n[o]=l}return e.header&&(i>f.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+f.length+" fields but parsed "+i,c+r):ie.preview?r.abort():(g.data=g.data[0],i(g,l))))}),this.parse=function(i,s,a){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(i,l)),n=!1,e.delimiter?_(e.delimiter)&&(e.delimiter=e.delimiter(i),g.meta.delimiter=e.delimiter):((l=((t,r,n,i,s)=>{var a,l,d,c;s=s||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var u=0;u=r.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode,l=null,d=!1,c=null==e.quoteChar?'"':e.quoteChar,u=c;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof t||-1=s)return A(!0);break}j.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:h}),M++}}else if(n&&0===C.length&&o.substring(h,h+v)===n){if(-1===R)return A();h=R+x,R=o.indexOf(r,h),O=o.indexOf(t,h)}else if(-1!==O&&(O=s)return A(!0)}return D();function L(e){w.push(e),S=h}function F(e){return -1!==e&&(e=o.substring(M+1,e))&&""===e.trim()?e.length:0}function D(e){return g||(void 0===e&&(e=o.substring(h)),C.push(e),h=y,L(C),k&&q()),A()}function I(e){h=e,L(C),C=[],R=o.indexOf(r,h)}function A(n){if(e.header&&!m&&w.length&&!d){var i=w[0],s=Object.create(null),a=new Set(i);let t=!1;for(let r=0;r{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(d=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,d);if("object"==typeof e[0])return f(c||Object.keys(e[0]),e,d)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||c),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),f(e.fields||[],e.data||[],d);throw Error("Unable to serialize unrecognized input");function f(e,t,r){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var r=0;r{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.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"}))});e.s(["PencilIcon",0,r],797672)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(779241),i=e.i(599724),s=e.i(199133),a=e.i(983561),o=e.i(689020);e.s(["default",0,({accessToken:e,value:l,placeholder:d="Select a Model",onChange:c,disabled:u=!1,style:h,className:f,showLabel:p=!0,labelText:m="Select Model"})=>{let[g,y]=(0,r.useState)(l),[b,x]=(0,r.useState)(!1),[v,_]=(0,r.useState)([]),k=(0,r.useRef)(null);return(0,r.useEffect)(()=>{y(l)},[l]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,o.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&_(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[p&&(0,t.jsxs)(i.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.RobotOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{value:g,placeholder:d,onChange:e=>{"custom"===e?(x(!0),y(void 0)):(x(!1),y(e),c&&c(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...h},showSearch:!0,className:`rounded-md ${f||""}`,disabled:u}),b&&(0,t.jsx)(n.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{y(e),c&&c(e)},500)},disabled:u})]})}])},500727,699857,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),n=e.i(764205),i=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,i.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,n.fetchMCPServers)(r,e),enabled:!!r})}],500727);let a=(0,r.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,i.default)();return(0,t.useQuery)({queryKey:a.list(),queryFn:async()=>await (0,n.fetchMCPToolsets)(e),enabled:!!e})}],699857);var o=e.i(843476),l=e.i(271645),d=e.i(536916),c=e.i(599724),u=e.i(409797),h=e.i(246349),h=h;let f=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,p=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,m=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,g=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function y(e,t=""){let r=e.toLowerCase();if(g.test(r))return"read";if(f.test(r))return"delete";if(m.test(r))return"update";if(p.test(r))return"create";if(t){let e=t.toLowerCase();if(g.test(e))return"read";if(f.test(e))return"delete";if(m.test(e))return"update";if(p.test(e))return"create"}return"unknown"}function b(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[y(r.name,r.description)].push(r);return t}let x={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,x,"classifyToolOp",()=>y,"groupToolsByCrud",()=>b],696609);let v=["read","create","update","delete","unknown"],_={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},k={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:n=!1,searchFilter:i=""})=>{let[s,a]=(0,l.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),f=(0,l.useMemo)(()=>b(e),[e]),p=(0,l.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),m=e=>{if(n)return;let t=new Set(p);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,o.jsx)("div",{className:"space-y-3",children:v.map(e=>{let t,l=f[e];if(0===l.length)return null;if(i){let e=i.toLowerCase();if(!l.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let g=x[e],y=(t=f[e]).length>0&&t.every(e=>p.has(e.name)),b=(e=>{let t=f[e];if(0===t.length)return!1;let r=t.filter(e=>p.has(e.name)).length;return r>0&&r{a(t=>({...t,[e]:!t[e]}))},children:[v?(0,o.jsx)(h.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,o.jsx)(u.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,o.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:g.label}),(0,o.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${_[g.risk]}`,children:"high"===g.risk?"High Risk":"medium"===g.risk?"Medium Risk":"low"===g.risk?"Safe":"Unclassified"}),(0,o.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[l.filter(e=>p.has(e.name)).length,"/",l.length," allowed"]})]}),!n&&(0,o.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,o.jsx)(c.Text,{className:"text-xs text-gray-500",children:y?"All on":b?"Partial":"All off"}),(0,o.jsx)(d.Checkbox,{checked:y,indeterminate:b,onChange:t=>((e,t)=>{if(n)return;let i=new Set(p);for(let r of f[e])t?i.add(r.name):i.delete(r.name);r(Array.from(i))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!v&&(0,o.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:g.description}),!v&&(0,o.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:l.filter(e=>!i||e.name.toLowerCase().includes(i.toLowerCase())||(e.description??"").toLowerCase().includes(i.toLowerCase())).map(e=>{let t,r=(t=e.name,p.has(t));return(0,o.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!n?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>m(e.name),children:[(0,o.jsx)(d.Checkbox,{checked:r,onChange:()=>m(e.name),disabled:n,onClick:e=>e.stopPropagation()}),(0,o.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,o.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,o.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,o.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),n=e.i(371330),i=e.i(271645),s=e.i(394487),a=e.i(503269),o=e.i(214520),l=e.i(746725),d=e.i(914189),c=e.i(144279),u=e.i(294316),h=e.i(601893),f=e.i(140721),p=e.i(942803),m=e.i(233538),g=e.i(694421),y=e.i(700020),b=e.i(35889),x=e.i(998348),v=e.i(722678);let _=(0,i.createContext)(null);_.displayName="GroupContext";let k=i.Fragment,w=Object.assign((0,y.forwardRefWithAs)(function(e,t){var k;let w=(0,i.useId)(),j=(0,p.useProvidedId)(),C=(0,h.useDisabled)(),{id:S=j||`headlessui-switch-${w}`,disabled:E=C||!1,checked:N,defaultChecked:O,onChange:R,name:T,value:M,form:P,autoFocus:L=!1,...F}=e,D=(0,i.useContext)(_),[I,A]=(0,i.useState)(null),q=(0,i.useRef)(null),z=(0,u.useSyncRefs)(q,t,null===D?null:D.setSwitch,A),B=(0,o.useDefaultValue)(O),[U,$]=(0,a.useControllable)(N,R,null!=B&&B),K=(0,l.useDisposables)(),[H,W]=(0,i.useState)(!1),Q=(0,d.useEvent)(()=>{W(!0),null==$||$(!U),K.nextFrame(()=>{W(!1)})}),V=(0,d.useEvent)(e=>{if((0,m.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),Q()}),G=(0,d.useEvent)(e=>{e.key===x.Keys.Space?(e.preventDefault(),Q()):e.key===x.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),J=(0,d.useEvent)(e=>e.preventDefault()),X=(0,v.useLabelledBy)(),Y=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:L}),{isHovered:et,hoverProps:er}=(0,n.useHover)({isDisabled:E}),{pressed:en,pressProps:ei}=(0,s.useActivePress)({disabled:E}),es=(0,i.useMemo)(()=>({checked:U,disabled:E,hover:et,focus:Z,active:en,autofocus:L,changing:H}),[U,et,Z,en,E,H,L]),ea=(0,y.mergeProps)({id:S,ref:z,role:"switch",type:(0,c.useResolveButtonType)(e,I),tabIndex:-1===e.tabIndex?0:null!=(k=e.tabIndex)?k:0,"aria-checked":U,"aria-labelledby":X,"aria-describedby":Y,disabled:E||void 0,autoFocus:L,onClick:V,onKeyUp:G,onKeyPress:J},ee,er,ei),eo=(0,i.useCallback)(()=>{if(void 0!==B)return null==$?void 0:$(B)},[$,B]),el=(0,y.useRender)();return i.default.createElement(i.default.Fragment,null,null!=T&&i.default.createElement(f.FormFields,{disabled:E,data:{[T]:M||"on"},overrides:{type:"checkbox",checked:U},form:P,onReset:eo}),el({ourProps:ea,theirProps:F,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,i.useState)(null),[s,a]=(0,v.useLabels)(),[o,l]=(0,b.useDescriptions)(),d=(0,i.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),c=(0,y.useRender)();return i.default.createElement(l,{name:"Switch.Description",value:o},i.default.createElement(a,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=d.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.default.createElement(_.Provider,{value:d},c({ourProps:{},theirProps:e,slot:{},defaultTag:k,name:"Switch.Group"}))))},Label:v.Label,Description:b.Description});var j=e.i(888288),C=e.i(95779),S=e.i(444755),E=e.i(673706),N=e.i(829087);let O=(0,E.makeClassName)("Switch"),R=i.default.forwardRef((e,r)=>{let{checked:n,defaultChecked:s=!1,onChange:a,color:o,name:l,error:d,errorMessage:c,disabled:u,required:h,tooltip:f,id:p}=e,m=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:o?(0,E.getColorClassNames)(o,C.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:o?(0,E.getColorClassNames)(o,C.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[y,b]=(0,j.default)(s,n),[x,v]=(0,i.useState)(!1),{tooltipProps:_,getReferenceProps:k}=(0,N.useTooltip)(300);return i.default.createElement("div",{className:"flex flex-row items-center justify-start"},i.default.createElement(N.default,Object.assign({text:f},_)),i.default.createElement("div",Object.assign({ref:(0,E.mergeRefs)([r,_.refs.setReference]),className:(0,S.tremorTwMerge)(O("root"),"flex flex-row relative h-5")},m,k),i.default.createElement("input",{type:"checkbox",className:(0,S.tremorTwMerge)(O("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:l,required:h,checked:y,onChange:e=>{e.preventDefault()}}),i.default.createElement(w,{checked:y,onChange:e=>{b(e),null==a||a(e)},disabled:u,className:(0,S.tremorTwMerge)(O("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:p},i.default.createElement("span",{className:(0,S.tremorTwMerge)(O("sr-only"),"sr-only")},"Switch ",y?"on":"off"),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(O("background"),y?g.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(O("round"),y?(0,S.tremorTwMerge)(g.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",x?(0,S.tremorTwMerge)("ring-2",g.ringColor):"")}))),d&&c?i.default.createElement("p",{className:(0,S.tremorTwMerge)(O("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});R.displayName="Switch",e.s(["Switch",()=>R],793130)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},361653,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>t])},158392,419470,e=>{"use strict";var t=e.i(843476),r=e.i(779241);let n={ttl:3600,lowest_latency_buffer:0},i=({routingStrategyArgs:e})=>{let i={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||n).map(([e,n])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i[e]||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:"object"==typeof n?JSON.stringify(n,null,2):n?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:n})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,i])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:n[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:n[e]?.field_description||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:null==i||"null"===i?"":"object"==typeof i?JSON.stringify(i,null,2):i?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var a=e.i(199133);let o=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:n,routerFieldsMetadata:i,onStrategyChange:s})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:i.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(a.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(a.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),n[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:n[e]})]})},e))})})]});var l=e.i(793130);let d=({enabled:e,routerFieldsMetadata:r,onToggle:n})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(l.Switch,{checked:e,onChange:n,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:n,availableRoutingStrategies:a,routingStrategyDescriptions:l})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),a.length>0&&(0,t.jsx)(o,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:a,routingStrategyDescriptions:l,routerFieldsMetadata:n,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(d,{enabled:e.enableTagFiltering,routerFieldsMetadata:n,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(i,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:n})]})],158392);var c=e.i(994388),u=e.i(653496),h=e.i(107233),f=e.i(271645),p=e.i(888259),m=e.i(592968),g=e.i(361653),g=g;let y=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var b=e.i(37727);function x({group:e,onChange:r,availableModels:n,maxFallbacks:i}){let s=n.filter(t=>t!==e.primaryModel),o=e.fallbackModels.length{let n=[...e.fallbackModels];n.includes(t)&&(n=n.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:n})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:n.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,t.jsx)(g.default,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-sm",children:[(0,t.jsx)(y,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",i," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:o?"Select fallback models to add...":`Maximum ${i} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let n=t.slice(0,i);r({...e,fallbackModels:n})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(r,n)=>{let i=e.fallbackModels.includes(r.value),s=i?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i&&null!==s&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(m.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:o?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${i} used)`:`Maximum ${i} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((n,i)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-sm transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:i+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:n})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==i),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(b.X,{className:"w-4 h-4"})})]},`${n}-${i}`))})]})]})]})}function v({groups:e,onGroupsChange:r,availableModels:n,maxFallbacks:i=10,maxGroups:s=5}){let[a,o]=(0,f.useState)(e.length>0?e[0].id:"1");(0,f.useEffect)(()=>{e.length>0?e.some(e=>e.id===a)||o(e[0].id):o("1")},[e]);let l=()=>{if(e.length>=s)return;let t=Date.now().toString();r([...e,{id:t,primaryModel:null,fallbackModels:[]}]),o(t)},d=t=>{r(e.map(e=>e.id===t.id?t:e))},m=e.map((r,s)=>{let a=r.primaryModel?r.primaryModel:`Group ${s+1}`;return{key:r.id,label:a,closable:e.length>1,children:(0,t.jsx)(x,{group:r,onChange:d,availableModels:n,maxFallbacks:i})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(c.Button,{variant:"primary",onClick:l,icon:()=>(0,t.jsx)(h.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:a,onChange:o,onEdit:(t,n)=>{"add"===n?l():"remove"===n&&e.length>1&&(t=>{if(1===e.length)return p.default.warning("At least one group is required");let n=e.filter(e=>e.id!==t);r(n),a===t&&n.length>0&&o(n[n.length-1].id)})(t)},items:m,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>v],419470)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d0d828f9a0668699.js b/litellm/proxy/_experimental/out/_next/static/chunks/1bc2898be56acd1b.js similarity index 63% rename from litellm/proxy/_experimental/out/_next/static/chunks/d0d828f9a0668699.js rename to litellm/proxy/_experimental/out/_next/static/chunks/1bc2898be56acd1b.js index a103f6f287..de96587b61 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/d0d828f9a0668699.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1bc2898be56acd1b.js @@ -1,14 +1,14 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,185793,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),l=e.i(242064),a=e.i(529681);let o=e=>{let{prefixCls:l,className:a,style:o,size:r,shape:i}=e,s=(0,n.default)({[`${l}-lg`]:"large"===r,[`${l}-sm`]:"small"===r}),c=(0,n.default)({[`${l}-circle`]:"circle"===i,[`${l}-square`]:"square"===i,[`${l}-round`]:"round"===i}),u=t.useMemo(()=>"number"==typeof r?{width:r,height:r,lineHeight:`${r}px`}:{},[r]);return t.createElement("span",{className:(0,n.default)(l,s,c,a),style:Object.assign(Object.assign({},u),o)})};e.i(296059);var r=e.i(694758),i=e.i(915654),s=e.i(246422),c=e.i(838378);let u=new r.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),d=e=>({height:e,lineHeight:(0,i.unit)(e)}),f=e=>Object.assign({width:e},d(e)),m=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},d(e)),g=e=>Object.assign({width:e},d(e)),p=(e,t,n)=>{let{skeletonButtonCls:l}=e;return{[`${n}${l}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${l}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},d(e)),v=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:n}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:l,skeletonParagraphCls:a,skeletonButtonCls:o,skeletonInputCls:r,skeletonImageCls:i,controlHeight:s,controlHeightLG:c,controlHeightSM:d,gradientFromColor:v,padding:$,marginSM:C,borderRadius:y,titleHeight:h,blockRadius:x,paragraphLiHeight:O,controlHeightXS:j,paragraphMarginTop:E}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:$,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:v},f(s)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},f(c)),[`${n}-sm`]:Object.assign({},f(d))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[l]:{width:"100%",height:h,background:v,borderRadius:x,[`+ ${a}`]:{marginBlockStart:d}},[a]:{padding:0,"> li":{width:"100%",height:O,listStyle:"none",background:v,borderRadius:x,"+ li":{marginBlockStart:j}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${l}, ${a} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-content`]:{[l]:{marginBlockStart:C,[`+ ${a}`]:{marginBlockStart:E}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:l,controlHeightLG:a,controlHeightSM:o,gradientFromColor:r,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:r,borderRadius:t,width:i(l).mul(2).equal(),minWidth:i(l).mul(2).equal()},b(l,i))},p(e,l,n)),{[`${n}-lg`]:Object.assign({},b(a,i))}),p(e,a,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},b(o,i))}),p(e,o,`${n}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:l,controlHeightLG:a,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},f(l)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},f(a)),[`${t}${t}-sm`]:Object.assign({},f(o))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:l,controlHeightLG:a,controlHeightSM:o,gradientFromColor:r,calc:i}=e;return{[l]:Object.assign({display:"inline-block",verticalAlign:"top",background:r,borderRadius:n},m(t,i)),[`${l}-lg`]:Object.assign({},m(a,i)),[`${l}-sm`]:Object.assign({},m(o,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:l,borderRadiusSM:a,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:l,borderRadius:a},g(o(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},g(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[r]:{width:"100%"}},[`${t}${t}-active`]:{[` +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,190144,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let l={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"};var a=e.i(9583),o=n.forwardRef(function(e,o){return n.createElement(a.default,(0,t.default)({},e,{ref:o,icon:l}))});e.s(["default",0,o],190144)},735049,e=>{"use strict";var t=e.i(654310),n=function(e){if((0,t.default)()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],l=window.document.documentElement;return n.some(function(e){return e in l.style})}return!1},l=function(e,t){if(!n(e))return!1;var l=document.createElement("div"),a=l.style[e];return l.style[e]=t,l.style[e]!==a};function a(e,t){return Array.isArray(e)||void 0===t?n(e):l(e,t)}e.s(["isStyleSupport",()=>a])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),l=e.i(242064),a=e.i(529681);let o=e=>{let{prefixCls:l,className:a,style:o,size:r,shape:i}=e,s=(0,n.default)({[`${l}-lg`]:"large"===r,[`${l}-sm`]:"small"===r}),c=(0,n.default)({[`${l}-circle`]:"circle"===i,[`${l}-square`]:"square"===i,[`${l}-round`]:"round"===i}),u=t.useMemo(()=>"number"==typeof r?{width:r,height:r,lineHeight:`${r}px`}:{},[r]);return t.createElement("span",{className:(0,n.default)(l,s,c,a),style:Object.assign(Object.assign({},u),o)})};e.i(296059);var r=e.i(694758),i=e.i(915654),s=e.i(246422),c=e.i(838378);let u=new r.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),d=e=>({height:e,lineHeight:(0,i.unit)(e)}),f=e=>Object.assign({width:e},d(e)),m=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},d(e)),g=e=>Object.assign({width:e},d(e)),p=(e,t,n)=>{let{skeletonButtonCls:l}=e;return{[`${n}${l}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${l}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},d(e)),v=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:n}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:l,skeletonParagraphCls:a,skeletonButtonCls:o,skeletonInputCls:r,skeletonImageCls:i,controlHeight:s,controlHeightLG:c,controlHeightSM:d,gradientFromColor:v,padding:y,marginSM:$,borderRadius:C,titleHeight:h,blockRadius:x,paragraphLiHeight:O,controlHeightXS:E,paragraphMarginTop:j}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:y,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:v},f(s)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},f(c)),[`${n}-sm`]:Object.assign({},f(d))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[l]:{width:"100%",height:h,background:v,borderRadius:x,[`+ ${a}`]:{marginBlockStart:d}},[a]:{padding:0,"> li":{width:"100%",height:O,listStyle:"none",background:v,borderRadius:x,"+ li":{marginBlockStart:E}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${l}, ${a} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[l]:{marginBlockStart:$,[`+ ${a}`]:{marginBlockStart:j}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:l,controlHeightLG:a,controlHeightSM:o,gradientFromColor:r,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:r,borderRadius:t,width:i(l).mul(2).equal(),minWidth:i(l).mul(2).equal()},b(l,i))},p(e,l,n)),{[`${n}-lg`]:Object.assign({},b(a,i))}),p(e,a,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},b(o,i))}),p(e,o,`${n}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:l,controlHeightLG:a,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},f(l)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},f(a)),[`${t}${t}-sm`]:Object.assign({},f(o))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:l,controlHeightLG:a,controlHeightSM:o,gradientFromColor:r,calc:i}=e;return{[l]:Object.assign({display:"inline-block",verticalAlign:"top",background:r,borderRadius:n},m(t,i)),[`${l}-lg`]:Object.assign({},m(a,i)),[`${l}-sm`]:Object.assign({},m(o,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:l,borderRadiusSM:a,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:l,borderRadius:a},g(o(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},g(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[r]:{width:"100%"}},[`${t}${t}-active`]:{[` ${l}, ${a} > li, ${n}, ${o}, ${r}, ${i} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:u,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,c.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n,gradientFromColor:t,gradientToColor:n,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),$=e=>{let{prefixCls:l,className:a,style:o,rows:r=0}=e,i=Array.from({length:r}).map((n,l)=>t.createElement("li",{key:l,style:{width:((e,t)=>{let{width:n,rows:l=2}=t;return Array.isArray(n)?n[e]:l-1===e?n:void 0})(l,e)}}));return t.createElement("ul",{className:(0,n.default)(l,a),style:o},i)},C=({prefixCls:e,className:l,width:a,style:o})=>t.createElement("h3",{className:(0,n.default)(e,l),style:Object.assign({width:a},o)});function y(e){return e&&"object"==typeof e?e:{}}let h=e=>{let{prefixCls:a,loading:r,className:i,rootClassName:s,style:c,children:u,avatar:d=!1,title:f=!0,paragraph:m=!0,active:g,round:p}=e,{getPrefixCls:b,direction:h,className:x,style:O}=(0,l.useComponentConfig)("skeleton"),j=b("skeleton",a),[E,k,w]=v(j);if(r||!("loading"in e)){let e,l,a=!!d,r=!!f,u=!!m;if(a){let n=Object.assign(Object.assign({prefixCls:`${j}-avatar`},r&&!u?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),y(d));e=t.createElement("div",{className:`${j}-header`},t.createElement(o,Object.assign({},n)))}if(r||u){let e,n;if(r){let n=Object.assign(Object.assign({prefixCls:`${j}-title`},!a&&u?{width:"38%"}:a&&u?{width:"50%"}:{}),y(f));e=t.createElement(C,Object.assign({},n))}if(u){let e,l=Object.assign(Object.assign({prefixCls:`${j}-paragraph`},(e={},a&&r||(e.width="61%"),!a&&r?e.rows=3:e.rows=2,e)),y(m));n=t.createElement($,Object.assign({},l))}l=t.createElement("div",{className:`${j}-content`},e,n)}let b=(0,n.default)(j,{[`${j}-with-avatar`]:a,[`${j}-active`]:g,[`${j}-rtl`]:"rtl"===h,[`${j}-round`]:p},x,i,s,k,w);return E(t.createElement("div",{className:b,style:Object.assign(Object.assign({},O),c)},e,l))}return null!=u?u:null};h.Button=e=>{let{prefixCls:r,className:i,rootClassName:s,active:c,block:u=!1,size:d="default"}=e,{getPrefixCls:f}=t.useContext(l.ConfigContext),m=f("skeleton",r),[g,p,b]=v(m),$=(0,a.default)(e,["prefixCls"]),C=(0,n.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:u},i,s,p,b);return g(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${m}-button`,size:d},$))))},h.Avatar=e=>{let{prefixCls:r,className:i,rootClassName:s,active:c,shape:u="circle",size:d="default"}=e,{getPrefixCls:f}=t.useContext(l.ConfigContext),m=f("skeleton",r),[g,p,b]=v(m),$=(0,a.default)(e,["prefixCls","className"]),C=(0,n.default)(m,`${m}-element`,{[`${m}-active`]:c},i,s,p,b);return g(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${m}-avatar`,shape:u,size:d},$))))},h.Input=e=>{let{prefixCls:r,className:i,rootClassName:s,active:c,block:u,size:d="default"}=e,{getPrefixCls:f}=t.useContext(l.ConfigContext),m=f("skeleton",r),[g,p,b]=v(m),$=(0,a.default)(e,["prefixCls"]),C=(0,n.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:u},i,s,p,b);return g(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${m}-input`,size:d},$))))},h.Image=e=>{let{prefixCls:a,className:o,rootClassName:r,style:i,active:s}=e,{getPrefixCls:c}=t.useContext(l.ConfigContext),u=c("skeleton",a),[d,f,m]=v(u),g=(0,n.default)(u,`${u}-element`,{[`${u}-active`]:s},o,r,f,m);return d(t.createElement("div",{className:g},t.createElement("div",{className:(0,n.default)(`${u}-image`,o),style:i},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${u}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${u}-image-path`})))))},h.Node=e=>{let{prefixCls:a,className:o,rootClassName:r,style:i,active:s,children:c}=e,{getPrefixCls:u}=t.useContext(l.ConfigContext),d=u("skeleton",a),[f,m,g]=v(d),p=(0,n.default)(d,`${d}-element`,{[`${d}-active`]:s},m,o,r,g);return f(t.createElement("div",{className:p},t.createElement("div",{className:(0,n.default)(`${d}-image`,o),style:i},c)))},e.s(["default",0,h],185793)},563113,887719,e=>{"use strict";var t=e.i(271645),n=e.i(864517),l=e.i(244009),a=e.i(408850),o=e.i(87414);let r=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{void 0!==e[n]&&(t[n]=e[n])})}),t};function i(e){if(!e)return;let{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function s(e){let{closable:n,closeIcon:l}=e||{};return t.default.useMemo(()=>{if(!n&&(!1===n||!1===l||null===l))return!1;if(void 0===n&&void 0===l)return null;let e={closeIcon:"boolean"!=typeof l&&null!==l?l:void 0};return n&&"object"==typeof n&&(e=Object.assign(Object.assign({},e),n)),e},[n,l])}e.s(["default",0,r],887719);let c={};e.s(["pickClosable",()=>i,"useClosable",0,(e,i,u=c)=>{let d=s(e),f=s(i),[m]=(0,a.useLocale)("global",o.default.global),g="boolean"!=typeof d&&!!(null==d?void 0:d.disabled),p=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(n.default,null)},u),[u]),b=t.default.useMemo(()=>!1!==d&&(d?r(p,f,d):!1!==f&&(f?r(p,f):!!p.closable&&p)),[d,f,p]);return t.default.useMemo(()=>{var e,n;if(!1===b)return[!1,null,g,{}];let{closeIconRender:a}=p,{closeIcon:o}=b,r=o,i=(0,l.default)(b,!0);return null!=r&&(a&&(r=a(o)),r=t.default.isValidElement(r)?t.default.cloneElement(r,Object.assign(Object.assign(Object.assign({},r.props),{"aria-label":null!=(n=null==(e=r.props)?void 0:e["aria-label"])?n:m.close}),i)):t.default.createElement("span",Object.assign({"aria-label":m.close},i),r)),[!0,r,g,i]},[g,m.close,b,p])}],563113)},212931,285781,922611,709656,e=>{"use strict";let t;e.i(247167);var n=e.i(8211),l=e.i(271645),a=e.i(609587),o=e.i(242064),r=e.i(783164),i=e.i(201072),s=e.i(726289),c=e.i(562901),u=e.i(779573),d=e.i(343794),f=e.i(122767),m=e.i(613541),g=e.i(408850),p=e.i(719581),b=e.i(290967),v=e.i(920228),$=e.i(62405);let C=e=>"function"==typeof(null==e?void 0:e.then),y=e=>{let{type:t,children:n,prefixCls:a,buttonProps:o,close:r,autoFocus:i,emitEvent:s,isSilent:c,quitOnNullishReturnValue:u,actionFn:d}=e,f=l.useRef(!1),m=l.useRef(null),[g,p]=(0,b.default)(!1),y=(...e)=>{null==r||r.apply(void 0,e)};return l.useEffect(()=>{let e=null;return i&&(e=setTimeout(()=>{var e;null==(e=m.current)||e.focus({preventScroll:!0})})),()=>{e&&clearTimeout(e)}},[i]),l.createElement(v.default,Object.assign({},(0,$.convertLegacyProps)(t),{onClick:e=>{let t;if(!f.current){var n;if(f.current=!0,!d)return void y();if(s){if(t=d(e),u&&!C(t)){f.current=!1,y(e);return}}else if(d.length)t=d(r),f.current=!1;else if(!C(t=d()))return void y();C(n=t)&&(p(!0),n.then((...e)=>{p(!1,!0),y.apply(void 0,e),f.current=!1},e=>{if(p(!1,!0),f.current=!1,null==c||!c())return Promise.reject(e)}))}},loading:g,prefixCls:a},o,{ref:m}),n)};e.s(["default",0,y],285781);let h=l.default.createContext({}),{Provider:x}=h,O=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:a,mergedOkCancel:o,rootPrefixCls:r,close:i,onCancel:s,onConfirm:c}=(0,l.useContext)(h);return o?l.default.createElement(y,{isSilent:a,actionFn:s,close:(...e)=>{null==i||i.apply(void 0,e),null==c||c(!1)},autoFocus:"cancel"===e,buttonProps:t,prefixCls:`${r}-btn`},n):null},j=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:a,rootPrefixCls:o,okTextLocale:r,okType:i,onConfirm:s,onOk:c}=(0,l.useContext)(h);return l.default.createElement(y,{isSilent:n,type:i||"primary",actionFn:c,close:(...e)=>{null==t||t.apply(void 0,e),null==s||s(!0)},autoFocus:"ok"===e,buttonProps:a,prefixCls:`${o}-btn`},r)};var E=e.i(864517),k=e.i(931067),w=e.i(392221),S=e.i(951160),N=l.createContext({}),T=e.i(209428),I=e.i(216459),P=e.i(981444),R=e.i(404948),B=e.i(244009);function M(e,t,n){var l=t;return!l&&n&&(l="".concat(e,"-").concat(n)),l}function z(e,t){var n=e["page".concat(t?"Y":"X","Offset")],l="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var a=e.document;"number"!=typeof(n=a.documentElement[l])&&(n=a.body[l])}return n}var H=e.i(361275),q=e.i(410160),L=e.i(611935);let A=l.memo(function(e){return e.children},function(e,t){return!t.shouldUpdate});var F={width:0,height:0,overflow:"hidden",outline:"none"},W={outline:"none"},D=l.default.forwardRef(function(e,t){var n=e.prefixCls,a=e.className,o=e.style,r=e.title,i=e.ariaId,s=e.footer,c=e.closable,u=e.closeIcon,f=e.onClose,m=e.children,g=e.bodyStyle,p=e.bodyProps,b=e.modalRender,v=e.onMouseDown,$=e.onMouseUp,C=e.holderRef,y=e.visible,h=e.forceRender,x=e.width,O=e.height,j=e.classNames,E=e.styles,w=l.default.useContext(N).panel,S=(0,L.useComposeRef)(C,w),I=(0,l.useRef)(),P=(0,l.useRef)();l.default.useImperativeHandle(t,function(){return{focus:function(){var e;null==(e=I.current)||e.focus({preventScroll:!0})},changeActive:function(e){var t=document.activeElement;e&&t===P.current?I.current.focus({preventScroll:!0}):e||t!==I.current||P.current.focus({preventScroll:!0})}}});var R={};void 0!==x&&(R.width=x),void 0!==O&&(R.height=O);var M=s?l.default.createElement("div",{className:(0,d.default)("".concat(n,"-footer"),null==j?void 0:j.footer),style:(0,T.default)({},null==E?void 0:E.footer)},s):null,z=r?l.default.createElement("div",{className:(0,d.default)("".concat(n,"-header"),null==j?void 0:j.header),style:(0,T.default)({},null==E?void 0:E.header)},l.default.createElement("div",{className:"".concat(n,"-title"),id:i},r)):null,H=(0,l.useMemo)(function(){return"object"===(0,q.default)(c)&&null!==c?c:c?{closeIcon:null!=u?u:l.default.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[c,u,n]),D=(0,B.default)(H,!0),G="object"===(0,q.default)(c)&&c.disabled,X=c?l.default.createElement("button",(0,k.default)({type:"button",onClick:f,"aria-label":"Close"},D,{className:"".concat(n,"-close"),disabled:G}),H.closeIcon):null,U=l.default.createElement("div",{className:(0,d.default)("".concat(n,"-content"),null==j?void 0:j.content),style:null==E?void 0:E.content},X,z,l.default.createElement("div",(0,k.default)({className:(0,d.default)("".concat(n,"-body"),null==j?void 0:j.body),style:(0,T.default)((0,T.default)({},g),null==E?void 0:E.body)},p),m),M);return l.default.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":r?i:null,"aria-modal":"true",ref:S,style:(0,T.default)((0,T.default)({},o),R),className:(0,d.default)(n,a),onMouseDown:v,onMouseUp:$},l.default.createElement("div",{ref:I,tabIndex:0,style:W},l.default.createElement(A,{shouldUpdate:y||h},b?b(U):U)),l.default.createElement("div",{tabIndex:0,ref:P,style:F}))}),G=l.forwardRef(function(e,t){var n=e.prefixCls,a=e.title,o=e.style,r=e.className,i=e.visible,s=e.forceRender,c=e.destroyOnClose,u=e.motionName,f=e.ariaId,m=e.onVisibleChanged,g=e.mousePosition,p=(0,l.useRef)(),b=l.useState(),v=(0,w.default)(b,2),$=v[0],C=v[1],y={};function h(){var e,t,n,l,a,o=(n={left:(t=(e=p.current).getBoundingClientRect()).left,top:t.top},a=(l=e.ownerDocument).defaultView||l.parentWindow,n.left+=z(a),n.top+=z(a,!0),n);C(g&&(g.x||g.y)?"".concat(g.x-o.left,"px ").concat(g.y-o.top,"px"):"")}return $&&(y.transformOrigin=$),l.createElement(H.default,{visible:i,onVisibleChanged:m,onAppearPrepare:h,onEnterPrepare:h,forceRender:s,motionName:u,removeOnLeave:c,ref:p},function(i,s){var c=i.className,u=i.style;return l.createElement(D,(0,k.default)({},e,{ref:t,title:a,ariaId:f,prefixCls:n,holderRef:s,style:(0,T.default)((0,T.default)((0,T.default)({},u),o),y),className:(0,d.default)(r,c)}))})});G.displayName="Content";let X=function(e){var t=e.prefixCls,n=e.style,a=e.visible,o=e.maskProps,r=e.motionName,i=e.className;return l.createElement(H.default,{key:"mask",visible:a,motionName:r,leavedClassName:"".concat(t,"-mask-hidden")},function(e,a){var r=e.className,s=e.style;return l.createElement("div",(0,k.default)({ref:a,style:(0,T.default)((0,T.default)({},s),n),className:(0,d.default)("".concat(t,"-mask"),r,i)},o))})};e.i(883110);let U=function(e){var t=e.prefixCls,n=void 0===t?"rc-dialog":t,a=e.zIndex,o=e.visible,r=void 0!==o&&o,i=e.keyboard,s=void 0===i||i,c=e.focusTriggerAfterClose,u=void 0===c||c,f=e.wrapStyle,m=e.wrapClassName,g=e.wrapProps,p=e.onClose,b=e.afterOpenChange,v=e.afterClose,$=e.transitionName,C=e.animation,y=e.closable,h=e.mask,x=void 0===h||h,O=e.maskTransitionName,j=e.maskAnimation,E=e.maskClosable,S=e.maskStyle,N=e.maskProps,z=e.rootClassName,H=e.classNames,q=e.styles,L=(0,l.useRef)(),A=(0,l.useRef)(),F=(0,l.useRef)(),W=l.useState(r),D=(0,w.default)(W,2),U=D[0],K=D[1],V=(0,P.default)();function Y(e){null==p||p(e)}var _=(0,l.useRef)(!1),Z=(0,l.useRef)(),J=null;(void 0===E||E)&&(J=function(e){_.current?_.current=!1:A.current===e.target&&Y(e)}),(0,l.useEffect)(function(){r&&(K(!0),(0,I.default)(A.current,document.activeElement)||(L.current=document.activeElement))},[r]),(0,l.useEffect)(function(){return function(){clearTimeout(Z.current)}},[]);var Q=(0,T.default)((0,T.default)((0,T.default)({zIndex:a},f),null==q?void 0:q.wrapper),{},{display:U?null:"none"});return l.createElement("div",(0,k.default)({className:(0,d.default)("".concat(n,"-root"),z)},(0,B.default)(e,{data:!0})),l.createElement(X,{prefixCls:n,visible:x&&r,motionName:M(n,O,j),style:(0,T.default)((0,T.default)({zIndex:a},S),null==q?void 0:q.mask),maskProps:N,className:null==H?void 0:H.mask}),l.createElement("div",(0,k.default)({tabIndex:-1,onKeyDown:function(e){if(s&&e.keyCode===R.default.ESC){e.stopPropagation(),Y(e);return}r&&e.keyCode===R.default.TAB&&F.current.changeActive(!e.shiftKey)},className:(0,d.default)("".concat(n,"-wrap"),m,null==H?void 0:H.wrapper),ref:A,onClick:J,style:Q},g),l.createElement(G,(0,k.default)({},e,{onMouseDown:function(){clearTimeout(Z.current),_.current=!0},onMouseUp:function(){Z.current=setTimeout(function(){_.current=!1})},ref:F,closable:void 0===y||y,ariaId:V,prefixCls:n,visible:r&&U,onClose:Y,onVisibleChanged:function(e){if(e){if(!(0,I.default)(A.current,document.activeElement)){var t;null==(t=F.current)||t.focus()}}else{if(K(!1),x&&L.current&&u){try{L.current.focus({preventScroll:!0})}catch(e){}L.current=null}U&&(null==v||v())}null==b||b(e)},motionName:M(n,$,C)}))))};var K=function(e){var t=e.visible,n=e.getContainer,a=e.forceRender,o=e.destroyOnClose,r=void 0!==o&&o,i=e.afterClose,s=e.panelRef,c=l.useState(t),u=(0,w.default)(c,2),d=u[0],f=u[1],m=l.useMemo(function(){return{panel:s}},[s]);return(l.useEffect(function(){t&&f(!0)},[t]),a||!r||d)?l.createElement(N.Provider,{value:m},l.createElement(S.default,{open:t||a||d,autoDestroy:!1,getContainer:n,autoLock:t||d},l.createElement(U,(0,k.default)({},e,{destroyOnClose:r,afterClose:function(){null==i||i(),f(!1)}})))):null};K.displayName="Dialog";var V=e.i(617206),Y=e.i(563113),_=e.i(654310);e.i(735049);var Z=e.i(340010),J=e.i(321883),Q=e.i(185793),ee=e.i(175066);function et(){}let en=l.createContext({add:et,remove:et});function el(e){let t=l.useContext(en),n=l.useRef(null);return(0,ee.default)(l=>{if(l){let a=e?l.querySelector(e):l;a&&(t.add(a),n.current=a)}else t.remove(n.current)})}e.s(["usePanelRef",()=>el],922611);var ea=e.i(937328);let eo=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,l.useContext)(h);return l.default.createElement(v.default,Object.assign({onClick:n},e),t)},er=()=>{let{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:a,onOk:o}=(0,l.useContext)(h);return l.default.createElement(v.default,Object.assign({},(0,$.convertLegacyProps)(n),{loading:e,onClick:o},t),a)};var ei=e.i(606780);function es(e,t){return l.default.createElement("span",{className:`${e}-close-x`},t||l.default.createElement(E.default,{className:`${e}-close-icon`}))}let ec=e=>{let t,{okText:n,okType:a="primary",cancelText:o,confirmLoading:r,onOk:i,onCancel:s,okButtonProps:c,cancelButtonProps:u,footer:d}=e,[f]=(0,g.useLocale)("Modal",(0,ei.getConfirmLocale)()),m=n||(null==f?void 0:f.okText),p=o||(null==f?void 0:f.cancelText),b=l.default.useMemo(()=>({confirmLoading:r,okButtonProps:c,cancelButtonProps:u,okTextLocale:m,cancelTextLocale:p,okType:a,onOk:i,onCancel:s}),[r,c,u,m,p,a,i,s]);return"function"==typeof d||void 0===d?(t=l.default.createElement(l.default.Fragment,null,l.default.createElement(eo,null),l.default.createElement(er,null)),"function"==typeof d&&(t=d(t,{OkBtn:er,CancelBtn:eo})),t=l.default.createElement(x,{value:b},t)):t=d,l.default.createElement(ea.DisabledContextProvider,{disabled:!1},t)};e.i(296059);var eu=e.i(915654),ed=e.i(756570),ef=e.i(183293),em=e.i(694758),eg=e.i(402366);let ep=new em.Keyframes("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),eb=new em.Keyframes("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),ev=(e,t=!1)=>{let{antCls:n}=e,l=`${n}-fade`,a=t?"&":"";return[(0,eg.initMotion)(l,ep,eb,e.motionDurationMid,t),{[` + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:u,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,c.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n,gradientFromColor:t,gradientToColor:n,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),y=e=>{let{prefixCls:l,className:a,style:o,rows:r=0}=e,i=Array.from({length:r}).map((n,l)=>t.createElement("li",{key:l,style:{width:((e,t)=>{let{width:n,rows:l=2}=t;return Array.isArray(n)?n[e]:l-1===e?n:void 0})(l,e)}}));return t.createElement("ul",{className:(0,n.default)(l,a),style:o},i)},$=({prefixCls:e,className:l,width:a,style:o})=>t.createElement("h3",{className:(0,n.default)(e,l),style:Object.assign({width:a},o)});function C(e){return e&&"object"==typeof e?e:{}}let h=e=>{let{prefixCls:a,loading:r,className:i,rootClassName:s,style:c,children:u,avatar:d=!1,title:f=!0,paragraph:m=!0,active:g,round:p}=e,{getPrefixCls:b,direction:h,className:x,style:O}=(0,l.useComponentConfig)("skeleton"),E=b("skeleton",a),[j,k,w]=v(E);if(r||!("loading"in e)){let e,l,a=!!d,r=!!f,u=!!m;if(a){let n=Object.assign(Object.assign({prefixCls:`${E}-avatar`},r&&!u?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),C(d));e=t.createElement("div",{className:`${E}-header`},t.createElement(o,Object.assign({},n)))}if(r||u){let e,n;if(r){let n=Object.assign(Object.assign({prefixCls:`${E}-title`},!a&&u?{width:"38%"}:a&&u?{width:"50%"}:{}),C(f));e=t.createElement($,Object.assign({},n))}if(u){let e,l=Object.assign(Object.assign({prefixCls:`${E}-paragraph`},(e={},a&&r||(e.width="61%"),!a&&r?e.rows=3:e.rows=2,e)),C(m));n=t.createElement(y,Object.assign({},l))}l=t.createElement("div",{className:`${E}-content`},e,n)}let b=(0,n.default)(E,{[`${E}-with-avatar`]:a,[`${E}-active`]:g,[`${E}-rtl`]:"rtl"===h,[`${E}-round`]:p},x,i,s,k,w);return j(t.createElement("div",{className:b,style:Object.assign(Object.assign({},O),c)},e,l))}return null!=u?u:null};h.Button=e=>{let{prefixCls:r,className:i,rootClassName:s,active:c,block:u=!1,size:d="default"}=e,{getPrefixCls:f}=t.useContext(l.ConfigContext),m=f("skeleton",r),[g,p,b]=v(m),y=(0,a.default)(e,["prefixCls"]),$=(0,n.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:u},i,s,p,b);return g(t.createElement("div",{className:$},t.createElement(o,Object.assign({prefixCls:`${m}-button`,size:d},y))))},h.Avatar=e=>{let{prefixCls:r,className:i,rootClassName:s,active:c,shape:u="circle",size:d="default"}=e,{getPrefixCls:f}=t.useContext(l.ConfigContext),m=f("skeleton",r),[g,p,b]=v(m),y=(0,a.default)(e,["prefixCls","className"]),$=(0,n.default)(m,`${m}-element`,{[`${m}-active`]:c},i,s,p,b);return g(t.createElement("div",{className:$},t.createElement(o,Object.assign({prefixCls:`${m}-avatar`,shape:u,size:d},y))))},h.Input=e=>{let{prefixCls:r,className:i,rootClassName:s,active:c,block:u,size:d="default"}=e,{getPrefixCls:f}=t.useContext(l.ConfigContext),m=f("skeleton",r),[g,p,b]=v(m),y=(0,a.default)(e,["prefixCls"]),$=(0,n.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:u},i,s,p,b);return g(t.createElement("div",{className:$},t.createElement(o,Object.assign({prefixCls:`${m}-input`,size:d},y))))},h.Image=e=>{let{prefixCls:a,className:o,rootClassName:r,style:i,active:s}=e,{getPrefixCls:c}=t.useContext(l.ConfigContext),u=c("skeleton",a),[d,f,m]=v(u),g=(0,n.default)(u,`${u}-element`,{[`${u}-active`]:s},o,r,f,m);return d(t.createElement("div",{className:g},t.createElement("div",{className:(0,n.default)(`${u}-image`,o),style:i},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${u}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${u}-image-path`})))))},h.Node=e=>{let{prefixCls:a,className:o,rootClassName:r,style:i,active:s,children:c}=e,{getPrefixCls:u}=t.useContext(l.ConfigContext),d=u("skeleton",a),[f,m,g]=v(d),p=(0,n.default)(d,`${d}-element`,{[`${d}-active`]:s},m,o,r,g);return f(t.createElement("div",{className:p},t.createElement("div",{className:(0,n.default)(`${d}-image`,o),style:i},c)))},e.s(["default",0,h],185793)},563113,887719,e=>{"use strict";var t=e.i(271645),n=e.i(864517),l=e.i(244009),a=e.i(408850),o=e.i(87414);let r=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{void 0!==e[n]&&(t[n]=e[n])})}),t};function i(e){if(!e)return;let{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function s(e){let{closable:n,closeIcon:l}=e||{};return t.default.useMemo(()=>{if(!n&&(!1===n||!1===l||null===l))return!1;if(void 0===n&&void 0===l)return null;let e={closeIcon:"boolean"!=typeof l&&null!==l?l:void 0};return n&&"object"==typeof n&&(e=Object.assign(Object.assign({},e),n)),e},[n,l])}e.s(["default",0,r],887719);let c={};e.s(["pickClosable",()=>i,"useClosable",0,(e,i,u=c)=>{let d=s(e),f=s(i),[m]=(0,a.useLocale)("global",o.default.global),g="boolean"!=typeof d&&!!(null==d?void 0:d.disabled),p=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(n.default,null)},u),[u]),b=t.default.useMemo(()=>!1!==d&&(d?r(p,f,d):!1!==f&&(f?r(p,f):!!p.closable&&p)),[d,f,p]);return t.default.useMemo(()=>{var e,n;if(!1===b)return[!1,null,g,{}];let{closeIconRender:a}=p,{closeIcon:o}=b,r=o,i=(0,l.default)(b,!0);return null!=r&&(a&&(r=a(o)),r=t.default.isValidElement(r)?t.default.cloneElement(r,Object.assign(Object.assign(Object.assign({},r.props),{"aria-label":null!=(n=null==(e=r.props)?void 0:e["aria-label"])?n:m.close}),i)):t.default.createElement("span",Object.assign({"aria-label":m.close},i),r)),[!0,r,g,i]},[g,m.close,b,p])}],563113)},212931,285781,922611,709656,e=>{"use strict";let t;e.i(247167);var n=e.i(8211),l=e.i(271645),a=e.i(609587),o=e.i(242064),r=e.i(783164),i=e.i(201072),s=e.i(726289),c=e.i(562901),u=e.i(779573),d=e.i(343794),f=e.i(122767),m=e.i(613541),g=e.i(408850),p=e.i(719581),b=e.i(290967),v=e.i(920228),y=e.i(62405);let $=e=>"function"==typeof(null==e?void 0:e.then),C=e=>{let{type:t,children:n,prefixCls:a,buttonProps:o,close:r,autoFocus:i,emitEvent:s,isSilent:c,quitOnNullishReturnValue:u,actionFn:d}=e,f=l.useRef(!1),m=l.useRef(null),[g,p]=(0,b.default)(!1),C=(...e)=>{null==r||r.apply(void 0,e)};return l.useEffect(()=>{let e=null;return i&&(e=setTimeout(()=>{var e;null==(e=m.current)||e.focus({preventScroll:!0})})),()=>{e&&clearTimeout(e)}},[i]),l.createElement(v.default,Object.assign({},(0,y.convertLegacyProps)(t),{onClick:e=>{let t;if(!f.current){var n;if(f.current=!0,!d)return void C();if(s){if(t=d(e),u&&!$(t)){f.current=!1,C(e);return}}else if(d.length)t=d(r),f.current=!1;else if(!$(t=d()))return void C();$(n=t)&&(p(!0),n.then((...e)=>{p(!1,!0),C.apply(void 0,e),f.current=!1},e=>{if(p(!1,!0),f.current=!1,null==c||!c())return Promise.reject(e)}))}},loading:g,prefixCls:a},o,{ref:m}),n)};e.s(["default",0,C],285781);let h=l.default.createContext({}),{Provider:x}=h,O=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:a,mergedOkCancel:o,rootPrefixCls:r,close:i,onCancel:s,onConfirm:c}=(0,l.useContext)(h);return o?l.default.createElement(C,{isSilent:a,actionFn:s,close:(...e)=>{null==i||i.apply(void 0,e),null==c||c(!1)},autoFocus:"cancel"===e,buttonProps:t,prefixCls:`${r}-btn`},n):null},E=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:a,rootPrefixCls:o,okTextLocale:r,okType:i,onConfirm:s,onOk:c}=(0,l.useContext)(h);return l.default.createElement(C,{isSilent:n,type:i||"primary",actionFn:c,close:(...e)=>{null==t||t.apply(void 0,e),null==s||s(!0)},autoFocus:"ok"===e,buttonProps:a,prefixCls:`${o}-btn`},r)};var j=e.i(864517),k=e.i(931067),w=e.i(392221),S=e.i(951160),N=l.createContext({}),T=e.i(209428),I=e.i(216459),P=e.i(981444),R=e.i(404948),M=e.i(244009);function B(e,t,n){var l=t;return!l&&n&&(l="".concat(e,"-").concat(n)),l}function z(e,t){var n=e["page".concat(t?"Y":"X","Offset")],l="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var a=e.document;"number"!=typeof(n=a.documentElement[l])&&(n=a.body[l])}return n}var H=e.i(361275),q=e.i(410160),A=e.i(611935);let L=l.memo(function(e){return e.children},function(e,t){return!t.shouldUpdate});var F={width:0,height:0,overflow:"hidden",outline:"none"},W={outline:"none"},D=l.default.forwardRef(function(e,t){var n=e.prefixCls,a=e.className,o=e.style,r=e.title,i=e.ariaId,s=e.footer,c=e.closable,u=e.closeIcon,f=e.onClose,m=e.children,g=e.bodyStyle,p=e.bodyProps,b=e.modalRender,v=e.onMouseDown,y=e.onMouseUp,$=e.holderRef,C=e.visible,h=e.forceRender,x=e.width,O=e.height,E=e.classNames,j=e.styles,w=l.default.useContext(N).panel,S=(0,A.useComposeRef)($,w),I=(0,l.useRef)(),P=(0,l.useRef)();l.default.useImperativeHandle(t,function(){return{focus:function(){var e;null==(e=I.current)||e.focus({preventScroll:!0})},changeActive:function(e){var t=document.activeElement;e&&t===P.current?I.current.focus({preventScroll:!0}):e||t!==I.current||P.current.focus({preventScroll:!0})}}});var R={};void 0!==x&&(R.width=x),void 0!==O&&(R.height=O);var B=s?l.default.createElement("div",{className:(0,d.default)("".concat(n,"-footer"),null==E?void 0:E.footer),style:(0,T.default)({},null==j?void 0:j.footer)},s):null,z=r?l.default.createElement("div",{className:(0,d.default)("".concat(n,"-header"),null==E?void 0:E.header),style:(0,T.default)({},null==j?void 0:j.header)},l.default.createElement("div",{className:"".concat(n,"-title"),id:i},r)):null,H=(0,l.useMemo)(function(){return"object"===(0,q.default)(c)&&null!==c?c:c?{closeIcon:null!=u?u:l.default.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[c,u,n]),D=(0,M.default)(H,!0),G="object"===(0,q.default)(c)&&c.disabled,X=c?l.default.createElement("button",(0,k.default)({type:"button",onClick:f,"aria-label":"Close"},D,{className:"".concat(n,"-close"),disabled:G}),H.closeIcon):null,V=l.default.createElement("div",{className:(0,d.default)("".concat(n,"-content"),null==E?void 0:E.content),style:null==j?void 0:j.content},X,z,l.default.createElement("div",(0,k.default)({className:(0,d.default)("".concat(n,"-body"),null==E?void 0:E.body),style:(0,T.default)((0,T.default)({},g),null==j?void 0:j.body)},p),m),B);return l.default.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":r?i:null,"aria-modal":"true",ref:S,style:(0,T.default)((0,T.default)({},o),R),className:(0,d.default)(n,a),onMouseDown:v,onMouseUp:y},l.default.createElement("div",{ref:I,tabIndex:0,style:W},l.default.createElement(L,{shouldUpdate:C||h},b?b(V):V)),l.default.createElement("div",{tabIndex:0,ref:P,style:F}))}),G=l.forwardRef(function(e,t){var n=e.prefixCls,a=e.title,o=e.style,r=e.className,i=e.visible,s=e.forceRender,c=e.destroyOnClose,u=e.motionName,f=e.ariaId,m=e.onVisibleChanged,g=e.mousePosition,p=(0,l.useRef)(),b=l.useState(),v=(0,w.default)(b,2),y=v[0],$=v[1],C={};function h(){var e,t,n,l,a,o=(n={left:(t=(e=p.current).getBoundingClientRect()).left,top:t.top},a=(l=e.ownerDocument).defaultView||l.parentWindow,n.left+=z(a),n.top+=z(a,!0),n);$(g&&(g.x||g.y)?"".concat(g.x-o.left,"px ").concat(g.y-o.top,"px"):"")}return y&&(C.transformOrigin=y),l.createElement(H.default,{visible:i,onVisibleChanged:m,onAppearPrepare:h,onEnterPrepare:h,forceRender:s,motionName:u,removeOnLeave:c,ref:p},function(i,s){var c=i.className,u=i.style;return l.createElement(D,(0,k.default)({},e,{ref:t,title:a,ariaId:f,prefixCls:n,holderRef:s,style:(0,T.default)((0,T.default)((0,T.default)({},u),o),C),className:(0,d.default)(r,c)}))})});G.displayName="Content";let X=function(e){var t=e.prefixCls,n=e.style,a=e.visible,o=e.maskProps,r=e.motionName,i=e.className;return l.createElement(H.default,{key:"mask",visible:a,motionName:r,leavedClassName:"".concat(t,"-mask-hidden")},function(e,a){var r=e.className,s=e.style;return l.createElement("div",(0,k.default)({ref:a,style:(0,T.default)((0,T.default)({},s),n),className:(0,d.default)("".concat(t,"-mask"),r,i)},o))})};e.i(883110);let V=function(e){var t=e.prefixCls,n=void 0===t?"rc-dialog":t,a=e.zIndex,o=e.visible,r=void 0!==o&&o,i=e.keyboard,s=void 0===i||i,c=e.focusTriggerAfterClose,u=void 0===c||c,f=e.wrapStyle,m=e.wrapClassName,g=e.wrapProps,p=e.onClose,b=e.afterOpenChange,v=e.afterClose,y=e.transitionName,$=e.animation,C=e.closable,h=e.mask,x=void 0===h||h,O=e.maskTransitionName,E=e.maskAnimation,j=e.maskClosable,S=e.maskStyle,N=e.maskProps,z=e.rootClassName,H=e.classNames,q=e.styles,A=(0,l.useRef)(),L=(0,l.useRef)(),F=(0,l.useRef)(),W=l.useState(r),D=(0,w.default)(W,2),V=D[0],U=D[1],K=(0,P.default)();function Y(e){null==p||p(e)}var _=(0,l.useRef)(!1),Z=(0,l.useRef)(),J=null;(void 0===j||j)&&(J=function(e){_.current?_.current=!1:L.current===e.target&&Y(e)}),(0,l.useEffect)(function(){r&&(U(!0),(0,I.default)(L.current,document.activeElement)||(A.current=document.activeElement))},[r]),(0,l.useEffect)(function(){return function(){clearTimeout(Z.current)}},[]);var Q=(0,T.default)((0,T.default)((0,T.default)({zIndex:a},f),null==q?void 0:q.wrapper),{},{display:V?null:"none"});return l.createElement("div",(0,k.default)({className:(0,d.default)("".concat(n,"-root"),z)},(0,M.default)(e,{data:!0})),l.createElement(X,{prefixCls:n,visible:x&&r,motionName:B(n,O,E),style:(0,T.default)((0,T.default)({zIndex:a},S),null==q?void 0:q.mask),maskProps:N,className:null==H?void 0:H.mask}),l.createElement("div",(0,k.default)({tabIndex:-1,onKeyDown:function(e){if(s&&e.keyCode===R.default.ESC){e.stopPropagation(),Y(e);return}r&&e.keyCode===R.default.TAB&&F.current.changeActive(!e.shiftKey)},className:(0,d.default)("".concat(n,"-wrap"),m,null==H?void 0:H.wrapper),ref:L,onClick:J,style:Q},g),l.createElement(G,(0,k.default)({},e,{onMouseDown:function(){clearTimeout(Z.current),_.current=!0},onMouseUp:function(){Z.current=setTimeout(function(){_.current=!1})},ref:F,closable:void 0===C||C,ariaId:K,prefixCls:n,visible:r&&V,onClose:Y,onVisibleChanged:function(e){if(e){if(!(0,I.default)(L.current,document.activeElement)){var t;null==(t=F.current)||t.focus()}}else{if(U(!1),x&&A.current&&u){try{A.current.focus({preventScroll:!0})}catch(e){}A.current=null}V&&(null==v||v())}null==b||b(e)},motionName:B(n,y,$)}))))};var U=function(e){var t=e.visible,n=e.getContainer,a=e.forceRender,o=e.destroyOnClose,r=void 0!==o&&o,i=e.afterClose,s=e.panelRef,c=l.useState(t),u=(0,w.default)(c,2),d=u[0],f=u[1],m=l.useMemo(function(){return{panel:s}},[s]);return(l.useEffect(function(){t&&f(!0)},[t]),a||!r||d)?l.createElement(N.Provider,{value:m},l.createElement(S.default,{open:t||a||d,autoDestroy:!1,getContainer:n,autoLock:t||d},l.createElement(V,(0,k.default)({},e,{destroyOnClose:r,afterClose:function(){null==i||i(),f(!1)}})))):null};U.displayName="Dialog";var K=e.i(617206),Y=e.i(563113),_=e.i(654310);e.i(735049);var Z=e.i(340010),J=e.i(321883),Q=e.i(185793),ee=e.i(175066);function et(){}let en=l.createContext({add:et,remove:et});function el(e){let t=l.useContext(en),n=l.useRef(null);return(0,ee.default)(l=>{if(l){let a=e?l.querySelector(e):l;a&&(t.add(a),n.current=a)}else t.remove(n.current)})}e.s(["usePanelRef",()=>el],922611);var ea=e.i(937328);let eo=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,l.useContext)(h);return l.default.createElement(v.default,Object.assign({onClick:n},e),t)},er=()=>{let{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:a,onOk:o}=(0,l.useContext)(h);return l.default.createElement(v.default,Object.assign({},(0,y.convertLegacyProps)(n),{loading:e,onClick:o},t),a)};var ei=e.i(606780);function es(e,t){return l.default.createElement("span",{className:`${e}-close-x`},t||l.default.createElement(j.default,{className:`${e}-close-icon`}))}let ec=e=>{let t,{okText:n,okType:a="primary",cancelText:o,confirmLoading:r,onOk:i,onCancel:s,okButtonProps:c,cancelButtonProps:u,footer:d}=e,[f]=(0,g.useLocale)("Modal",(0,ei.getConfirmLocale)()),m=n||(null==f?void 0:f.okText),p=o||(null==f?void 0:f.cancelText),b=l.default.useMemo(()=>({confirmLoading:r,okButtonProps:c,cancelButtonProps:u,okTextLocale:m,cancelTextLocale:p,okType:a,onOk:i,onCancel:s}),[r,c,u,m,p,a,i,s]);return"function"==typeof d||void 0===d?(t=l.default.createElement(l.default.Fragment,null,l.default.createElement(eo,null),l.default.createElement(er,null)),"function"==typeof d&&(t=d(t,{OkBtn:er,CancelBtn:eo})),t=l.default.createElement(x,{value:b},t)):t=d,l.default.createElement(ea.DisabledContextProvider,{disabled:!1},t)};e.i(296059);var eu=e.i(915654),ed=e.i(756570),ef=e.i(183293),em=e.i(694758),eg=e.i(402366);let ep=new em.Keyframes("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),eb=new em.Keyframes("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),ev=(e,t=!1)=>{let{antCls:n}=e,l=`${n}-fade`,a=t?"&":"";return[(0,eg.initMotion)(l,ep,eb,e.motionDurationMid,t),{[` ${a}${l}-enter, ${a}${l}-appear - `]:{opacity:0,animationTimingFunction:"linear"},[`${a}${l}-leave`]:{animationTimingFunction:"linear"}}]};e.s(["initFadeMotion",0,ev],709656);var e$=e.i(717356),eC=e.i(246422),ey=e.i(838378);function eh(e){return{position:e,inset:0}}let ex=e=>{let t=e.padding,n=e.fontSizeHeading5,l=e.lineHeightHeading5;return(0,ey.mergeToken)(e,{modalHeaderHeight:e.calc(e.calc(l).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},eO=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${(0,eu.unit)(e.paddingMD)} ${(0,eu.unit)(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${(0,eu.unit)(e.padding)} ${(0,eu.unit)(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${(0,eu.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${(0,eu.unit)(e.paddingXS)} ${(0,eu.unit)(e.padding)}`:0,footerBorderTop:e.wireframe?`${(0,eu.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${(0,eu.unit)(e.borderRadiusLG)} ${(0,eu.unit)(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${(0,eu.unit)(2*e.padding)} ${(0,eu.unit)(2*e.padding)} ${(0,eu.unit)(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),ej=(0,eC.genStyleHooks)("Modal",e=>{let t=ex(e);return[(e=>{let{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${(0,eu.unit)(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},(0,ef.resetComponent)(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${(0,eu.unit)(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:(0,eu.unit)(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},(0,ef.genFocusStyle)(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${(0,eu.unit)(e.borderRadiusLG)} ${(0,eu.unit)(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${(0,eu.unit)(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content, + `]:{opacity:0,animationTimingFunction:"linear"},[`${a}${l}-leave`]:{animationTimingFunction:"linear"}}]};e.s(["initFadeMotion",0,ev],709656);var ey=e.i(717356),e$=e.i(246422),eC=e.i(838378);function eh(e){return{position:e,inset:0}}let ex=e=>{let t=e.padding,n=e.fontSizeHeading5,l=e.lineHeightHeading5;return(0,eC.mergeToken)(e,{modalHeaderHeight:e.calc(e.calc(l).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},eO=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${(0,eu.unit)(e.paddingMD)} ${(0,eu.unit)(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${(0,eu.unit)(e.padding)} ${(0,eu.unit)(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${(0,eu.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${(0,eu.unit)(e.paddingXS)} ${(0,eu.unit)(e.padding)}`:0,footerBorderTop:e.wireframe?`${(0,eu.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${(0,eu.unit)(e.borderRadiusLG)} ${(0,eu.unit)(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${(0,eu.unit)(2*e.padding)} ${(0,eu.unit)(2*e.padding)} ${(0,eu.unit)(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),eE=(0,e$.genStyleHooks)("Modal",e=>{let t=ex(e);return[(e=>{let{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${(0,eu.unit)(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},(0,ef.resetComponent)(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${(0,eu.unit)(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:(0,eu.unit)(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},(0,ef.genFocusStyle)(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${(0,eu.unit)(e.borderRadiusLG)} ${(0,eu.unit)(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${(0,eu.unit)(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content, ${t}-body, - ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]})(t),(e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}})(t),(e=>{let{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},eh("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},eh("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:ev(e)}]})(t),(0,e$.initZoomMotion)(t,"zoom"),(e=>{let{componentCls:t}=e,l=(0,ed.getMediaSize)(e),a=Object.assign({},l);delete a.xs;let o=`--${t.replace(".","")}-`,r=Object.keys(a).map(e=>({[`@media (min-width: ${(0,eu.unit)(a[e])})`]:{width:`var(${o}${e}-width)`}}));return{[`${t}-root`]:{[t]:[].concat((0,n.default)(Object.keys(l).map((e,t)=>{let n=Object.keys(l)[t-1];return n?{[`${o}${e}-width`]:`var(${o}${n}-width)`}:null})),[{width:`var(${o}xs-width)`}],(0,n.default)(r))}}})(t)]},eO,{unitless:{titleLineHeight:!0}});var eE=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};(0,_.default)()&&window.document.documentElement&&document.documentElement.addEventListener("click",e=>{t={x:e.pageX,y:e.pageY},setTimeout(()=>{t=null},100)},!0);let ek=e=>{let{prefixCls:n,className:a,rootClassName:r,open:i,wrapClassName:s,centered:c,getContainer:u,focusTriggerAfterClose:g=!0,style:p,visible:b,width:v=520,footer:$,classNames:C,styles:y,children:h,loading:x,confirmLoading:O,zIndex:j,mousePosition:k,onOk:w,onCancel:S,destroyOnHidden:N,destroyOnClose:T,panelRef:I=null,modalRender:P}=e,R=eE(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef","modalRender"]),{getPopupContainer:B,getPrefixCls:M,direction:z,modal:H}=l.useContext(o.ConfigContext),q=e=>{O||null==S||S(e)},A=M("modal",n),F=M(),W=(0,J.default)(A),[D,G,X]=ej(A,W),U=(0,d.default)(s,{[`${A}-centered`]:null!=c?c:null==H?void 0:H.centered,[`${A}-wrap-rtl`]:"rtl"===z}),_=null===$||x?null:l.createElement(ec,Object.assign({},e,{onOk:e=>{null==w||w(e)},onCancel:q})),[ee,et,en,ea]=(0,Y.useClosable)((0,Y.pickClosable)(e),(0,Y.pickClosable)(H),{closable:!0,closeIcon:l.createElement(E.default,{className:`${A}-close-icon`}),closeIconRender:e=>es(A,e)}),eo=P?e=>l.createElement("div",{className:`${A}-render`},P(e)):void 0,er=el(`.${A}-${P?"render":"content"}`),ei=(0,L.composeRef)(I,er),[eu,ed]=(0,f.useZIndex)("Modal",j),[ef,em]=l.useMemo(()=>v&&"object"==typeof v?[void 0,v]:[v,void 0],[v]),eg=l.useMemo(()=>{let e={};return em&&Object.keys(em).forEach(t=>{let n=em[t];void 0!==n&&(e[`--${A}-${t}-width`]="number"==typeof n?`${n}px`:n)}),e},[A,em]);return D(l.createElement(V.default,{form:!0,space:!0},l.createElement(Z.default.Provider,{value:ed},l.createElement(K,Object.assign({width:ef},R,{zIndex:eu,getContainer:void 0===u?B:u,prefixCls:A,rootClassName:(0,d.default)(G,r,X,W),footer:_,visible:null!=i?i:b,mousePosition:null!=k?k:t,onClose:q,closable:ee?Object.assign({disabled:en,closeIcon:et},ea):ee,closeIcon:et,focusTriggerAfterClose:g,transitionName:(0,m.getTransitionName)(F,"zoom",e.transitionName),maskTransitionName:(0,m.getTransitionName)(F,"fade",e.maskTransitionName),className:(0,d.default)(G,a,null==H?void 0:H.className),style:Object.assign(Object.assign(Object.assign({},null==H?void 0:H.style),p),eg),classNames:Object.assign(Object.assign(Object.assign({},null==H?void 0:H.classNames),C),{wrapper:(0,d.default)(U,null==C?void 0:C.wrapper)}),styles:Object.assign(Object.assign({},null==H?void 0:H.styles),y),panelRef:ei,destroyOnClose:null!=N?N:T,modalRender:eo}),x?l.createElement(Q.default,{active:!0,title:!1,paragraph:{rows:4},className:`${A}-body-skeleton`}):h))))},ew=(0,eC.genSubStyleComponent)(["Modal","confirm"],e=>(e=>{let{componentCls:t,titleFontSize:n,titleLineHeight:l,modalConfirmIconSize:a,fontSize:o,lineHeight:r,modalTitleHeight:i,fontHeight:s,confirmBodyPadding:c}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},(0,ef.clearFix)()),[`&${t} ${t}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:a,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(s).sub(a).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(i).sub(a).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${(0,eu.unit)(e.marginSM)})`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${(0,eu.unit)(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:l},[`${u}-content`]:{color:e.colorText,fontSize:o,lineHeight:r},[`${u}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls}, - ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}})(ex(e)),eO,{order:-1e3});var eS=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};let eN=e=>{let{prefixCls:t,icon:n,okText:a,cancelText:o,confirmPrefixCls:r,type:f,okCancel:m,footer:p,locale:b}=e,v=eS(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]),$=n;if(!n&&null!==n)switch(f){case"info":$=l.createElement(u.default,null);break;case"success":$=l.createElement(i.default,null);break;case"error":$=l.createElement(s.default,null);break;default:$=l.createElement(c.default,null)}let C=null!=m?m:"confirm"===f,y=null!==e.autoFocusButton&&(e.autoFocusButton||"ok"),[h]=(0,g.useLocale)("Modal"),E=b||h,k=a||(C?null==E?void 0:E.okText:null==E?void 0:E.justOkText),w=o||(null==E?void 0:E.cancelText),S=l.useMemo(()=>Object.assign({autoFocusButton:y,cancelTextLocale:w,okTextLocale:k,mergedOkCancel:C},v),[y,w,k,C,v]),N=l.createElement(l.Fragment,null,l.createElement(O,null),l.createElement(j,null)),T=void 0!==e.title&&null!==e.title,I=`${r}-body`;return l.createElement("div",{className:`${r}-body-wrapper`},l.createElement("div",{className:(0,d.default)(I,{[`${I}-has-title`]:T})},$,l.createElement("div",{className:`${r}-paragraph`},T&&l.createElement("span",{className:`${r}-title`},e.title),l.createElement("div",{className:`${r}-content`},e.content))),void 0===p||"function"==typeof p?l.createElement(x,{value:S},l.createElement("div",{className:`${r}-btns`},"function"==typeof p?p(N,{OkBtn:j,CancelBtn:O}):N)):p,l.createElement(ew,{prefixCls:t}))},eT=e=>{let{close:t,zIndex:n,maskStyle:a,direction:o,prefixCls:r,wrapClassName:i,rootPrefixCls:s,bodyStyle:c,closable:u=!1,onConfirm:g,styles:b,title:v}=e,$=`${r}-confirm`,C=e.width||416,y=e.style||{},h=void 0===e.mask||e.mask,x=void 0!==e.maskClosable&&e.maskClosable,O=(0,d.default)($,`${$}-${e.type}`,{[`${$}-rtl`]:"rtl"===o},e.className),[,j]=(0,p.default)(),E=l.useMemo(()=>void 0!==n?n:j.zIndexPopupBase+f.CONTAINER_MAX_OFFSET,[n,j]);return l.createElement(ek,Object.assign({},e,{className:O,wrapClassName:(0,d.default)({[`${$}-centered`]:!!e.centered},i),onCancel:()=>{null==t||t({triggerCancel:!0}),null==g||g(!1)},title:v,footer:null,transitionName:(0,m.getTransitionName)(s||"","zoom",e.transitionName),maskTransitionName:(0,m.getTransitionName)(s||"","fade",e.maskTransitionName),mask:h,maskClosable:x,style:y,styles:Object.assign({body:c,mask:a},b),width:C,zIndex:E,closable:u}),l.createElement(eN,Object.assign({},e,{confirmPrefixCls:$})))},eI=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:o,theme:r}=e;return l.createElement(a.default,{prefixCls:t,iconPrefixCls:n,direction:o,theme:r},l.createElement(eT,Object.assign({},e)))},eP=[],eR="",eB=e=>{var t,n;let{prefixCls:a,getContainer:r,direction:i}=e,s=(0,ei.getConfirmLocale)(),c=(0,l.useContext)(o.ConfigContext),u=eR||c.getPrefixCls(),d=a||`${u}-modal`,f=r;return!1===f&&(f=void 0),l.default.createElement(eI,Object.assign({},e,{rootPrefixCls:u,prefixCls:d,iconPrefixCls:c.iconPrefixCls,theme:c.theme,direction:null!=i?i:c.direction,locale:null!=(n=null==(t=c.locale)?void 0:t.Modal)?n:s,getContainer:f}))};function eM(e){let t,o,i=(0,a.globalConfig)(),s=document.createDocumentFragment(),c=Object.assign(Object.assign({},e),{close:f,open:!0});function u(...t){var l;t.some(e=>null==e?void 0:e.triggerCancel)&&(null==(l=e.onCancel)||l.call.apply(l,[e,()=>{}].concat((0,n.default)(t.slice(1)))));for(let e=0;e{clearTimeout(t),t=setTimeout(()=>{let t=i.getPrefixCls(void 0,eR),n=i.getIconPrefixCls(),c=i.getTheme(),u=l.default.createElement(eB,Object.assign({},e));o=(0,r.unstableSetRender)()(l.default.createElement(a.default,{prefixCls:t,iconPrefixCls:n,theme:c},"function"==typeof i.holderRender?i.holderRender(u):u),s)})};function f(...t){(c=Object.assign(Object.assign({},c),{open:!1,afterClose:()=>{"function"==typeof e.afterClose&&e.afterClose(),u.apply(this,t)}})).visible&&delete c.visible,d(c)}return d(c),eP.push(f),{destroy:f,update:function(e){d(c="function"==typeof e?e(c):Object.assign(Object.assign({},c),e))}}}function ez(e){return Object.assign(Object.assign({},e),{type:"warning"})}function eH(e){return Object.assign(Object.assign({},e),{type:"info"})}function eq(e){return Object.assign(Object.assign({},e),{type:"success"})}function eL(e){return Object.assign(Object.assign({},e),{type:"error"})}function eA(e){return Object.assign(Object.assign({},e),{type:"confirm"})}var eF=e.i(805484),eW=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};let eD=(0,eF.withPureRenderTheme)(e=>{let{prefixCls:t,className:n,closeIcon:a,closable:r,type:i,title:s,children:c,footer:u}=e,f=eW(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:m}=l.useContext(o.ConfigContext),g=m(),p=t||m("modal"),b=(0,J.default)(g),[v,$,C]=ej(p,b),y=`${p}-confirm`,h={};return h=i?{closable:null!=r&&r,title:"",footer:"",children:l.createElement(eN,Object.assign({},e,{prefixCls:p,confirmPrefixCls:y,rootPrefixCls:g,content:c}))}:{closable:null==r||r,title:s,footer:null!==u&&l.createElement(ec,Object.assign({},e)),children:c},v(l.createElement(D,Object.assign({prefixCls:p,className:(0,d.default)($,`${p}-pure-panel`,i&&y,i&&`${y}-${i}`,n,C,b)},f,{closeIcon:es(p,a),closable:r},h)))});var eG=e.i(87414),eX=e.i(929447),eU=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};let eK=l.forwardRef((e,t)=>{var a,{afterClose:r,config:i}=e,s=eU(e,["afterClose","config"]);let[c,u]=l.useState(!0),[d,f]=l.useState(i),{direction:m,getPrefixCls:g}=l.useContext(o.ConfigContext),p=g("modal"),b=g(),v=(...e)=>{var t;u(!1),e.some(e=>null==e?void 0:e.triggerCancel)&&(null==(t=d.onCancel)||t.call.apply(t,[d,()=>{}].concat((0,n.default)(e.slice(1)))))};l.useImperativeHandle(t,()=>({destroy:v,update:e=>{f(t=>{let n="function"==typeof e?e(t):e;return Object.assign(Object.assign({},t),n)})}}));let $=null!=(a=d.okCancel)?a:"confirm"===d.type,[C]=(0,eX.default)("Modal",eG.default.Modal);return l.createElement(eI,Object.assign({prefixCls:p,rootPrefixCls:b},d,{close:v,open:c,afterClose:()=>{var e;r(),null==(e=d.afterClose)||e.call(d)},okText:d.okText||($?null==C?void 0:C.okText:null==C?void 0:C.justOkText),direction:d.direction||m,cancelText:d.cancelText||(null==C?void 0:C.cancelText)},s))}),eV=0,eY=l.memo(l.forwardRef((e,t)=>{let[a,o]=(()=>{let[e,t]=l.useState([]);return[e,l.useCallback(e=>(t(t=>[].concat((0,n.default)(t),[e])),()=>{t(t=>t.filter(t=>t!==e))}),[])]})();return l.useImperativeHandle(t,()=>({patchElement:o}),[o]),l.createElement(l.Fragment,null,a)}));function e_(e){return eM(ez(e))}ek.useModal=function(){let e=l.useRef(null),[t,a]=l.useState([]);l.useEffect(()=>{t.length&&((0,n.default)(t).forEach(e=>{e()}),a([]))},[t]);let o=l.useCallback(t=>function(o){var r;let i,s;eV+=1;let c=l.createRef(),u=new Promise(e=>{i=e}),d=!1,f=l.createElement(eK,{key:`modal-${eV}`,config:t(o),ref:c,afterClose:()=>{null==s||s()},isSilent:()=>d,onConfirm:e=>{i(e)}});return(s=null==(r=e.current)?void 0:r.patchElement(f))&&eP.push(s),{destroy:()=>{function e(){var e;null==(e=c.current)||e.destroy()}c.current?e():a(t=>[].concat((0,n.default)(t),[e]))},update:e=>{function t(){var t;null==(t=c.current)||t.update(e)}c.current?t():a(e=>[].concat((0,n.default)(e),[t]))},then:e=>(d=!0,u.then(e))}},[]);return[l.useMemo(()=>({info:o(eH),success:o(eq),error:o(eL),warning:o(ez),confirm:o(eA)}),[o]),l.createElement(eY,{key:"modal-holder",ref:e})]},ek.info=function(e){return eM(eH(e))},ek.success=function(e){return eM(eq(e))},ek.error=function(e){return eM(eL(e))},ek.warning=e_,ek.warn=e_,ek.confirm=function(e){return eM(eA(e))},ek.destroyAll=function(){for(;eP.length;){let e=eP.pop();e&&e()}},ek.config=function({rootPrefixCls:e}){eR=e},ek._InternalPanelDoNotUseOrYouWillBeFired=eD,e.s(["Modal",0,ek],212931)}]); \ No newline at end of file + ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]})(t),(e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}})(t),(e=>{let{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},eh("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},eh("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:ev(e)}]})(t),(0,ey.initZoomMotion)(t,"zoom"),(e=>{let{componentCls:t}=e,l=(0,ed.getMediaSize)(e),a=Object.assign({},l);delete a.xs;let o=`--${t.replace(".","")}-`,r=Object.keys(a).map(e=>({[`@media (min-width: ${(0,eu.unit)(a[e])})`]:{width:`var(${o}${e}-width)`}}));return{[`${t}-root`]:{[t]:[].concat((0,n.default)(Object.keys(l).map((e,t)=>{let n=Object.keys(l)[t-1];return n?{[`${o}${e}-width`]:`var(${o}${n}-width)`}:null})),[{width:`var(${o}xs-width)`}],(0,n.default)(r))}}})(t)]},eO,{unitless:{titleLineHeight:!0}});var ej=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};(0,_.default)()&&window.document.documentElement&&document.documentElement.addEventListener("click",e=>{t={x:e.pageX,y:e.pageY},setTimeout(()=>{t=null},100)},!0);let ek=e=>{let{prefixCls:n,className:a,rootClassName:r,open:i,wrapClassName:s,centered:c,getContainer:u,focusTriggerAfterClose:g=!0,style:p,visible:b,width:v=520,footer:y,classNames:$,styles:C,children:h,loading:x,confirmLoading:O,zIndex:E,mousePosition:k,onOk:w,onCancel:S,destroyOnHidden:N,destroyOnClose:T,panelRef:I=null,modalRender:P}=e,R=ej(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef","modalRender"]),{getPopupContainer:M,getPrefixCls:B,direction:z,modal:H}=l.useContext(o.ConfigContext),q=e=>{O||null==S||S(e)},L=B("modal",n),F=B(),W=(0,J.default)(L),[D,G,X]=eE(L,W),V=(0,d.default)(s,{[`${L}-centered`]:null!=c?c:null==H?void 0:H.centered,[`${L}-wrap-rtl`]:"rtl"===z}),_=null===y||x?null:l.createElement(ec,Object.assign({},e,{onOk:e=>{null==w||w(e)},onCancel:q})),[ee,et,en,ea]=(0,Y.useClosable)((0,Y.pickClosable)(e),(0,Y.pickClosable)(H),{closable:!0,closeIcon:l.createElement(j.default,{className:`${L}-close-icon`}),closeIconRender:e=>es(L,e)}),eo=P?e=>l.createElement("div",{className:`${L}-render`},P(e)):void 0,er=el(`.${L}-${P?"render":"content"}`),ei=(0,A.composeRef)(I,er),[eu,ed]=(0,f.useZIndex)("Modal",E),[ef,em]=l.useMemo(()=>v&&"object"==typeof v?[void 0,v]:[v,void 0],[v]),eg=l.useMemo(()=>{let e={};return em&&Object.keys(em).forEach(t=>{let n=em[t];void 0!==n&&(e[`--${L}-${t}-width`]="number"==typeof n?`${n}px`:n)}),e},[L,em]);return D(l.createElement(K.default,{form:!0,space:!0},l.createElement(Z.default.Provider,{value:ed},l.createElement(U,Object.assign({width:ef},R,{zIndex:eu,getContainer:void 0===u?M:u,prefixCls:L,rootClassName:(0,d.default)(G,r,X,W),footer:_,visible:null!=i?i:b,mousePosition:null!=k?k:t,onClose:q,closable:ee?Object.assign({disabled:en,closeIcon:et},ea):ee,closeIcon:et,focusTriggerAfterClose:g,transitionName:(0,m.getTransitionName)(F,"zoom",e.transitionName),maskTransitionName:(0,m.getTransitionName)(F,"fade",e.maskTransitionName),className:(0,d.default)(G,a,null==H?void 0:H.className),style:Object.assign(Object.assign(Object.assign({},null==H?void 0:H.style),p),eg),classNames:Object.assign(Object.assign(Object.assign({},null==H?void 0:H.classNames),$),{wrapper:(0,d.default)(V,null==$?void 0:$.wrapper)}),styles:Object.assign(Object.assign({},null==H?void 0:H.styles),C),panelRef:ei,destroyOnClose:null!=N?N:T,modalRender:eo}),x?l.createElement(Q.default,{active:!0,title:!1,paragraph:{rows:4},className:`${L}-body-skeleton`}):h))))},ew=(0,e$.genSubStyleComponent)(["Modal","confirm"],e=>(e=>{let{componentCls:t,titleFontSize:n,titleLineHeight:l,modalConfirmIconSize:a,fontSize:o,lineHeight:r,modalTitleHeight:i,fontHeight:s,confirmBodyPadding:c}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},(0,ef.clearFix)()),[`&${t} ${t}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:a,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(s).sub(a).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(i).sub(a).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${(0,eu.unit)(e.marginSM)})`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${(0,eu.unit)(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:l},[`${u}-content`]:{color:e.colorText,fontSize:o,lineHeight:r},[`${u}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls}, + ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}})(ex(e)),eO,{order:-1e3});var eS=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};let eN=e=>{let{prefixCls:t,icon:n,okText:a,cancelText:o,confirmPrefixCls:r,type:f,okCancel:m,footer:p,locale:b}=e,v=eS(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]),y=n;if(!n&&null!==n)switch(f){case"info":y=l.createElement(u.default,null);break;case"success":y=l.createElement(i.default,null);break;case"error":y=l.createElement(s.default,null);break;default:y=l.createElement(c.default,null)}let $=null!=m?m:"confirm"===f,C=null!==e.autoFocusButton&&(e.autoFocusButton||"ok"),[h]=(0,g.useLocale)("Modal"),j=b||h,k=a||($?null==j?void 0:j.okText:null==j?void 0:j.justOkText),w=o||(null==j?void 0:j.cancelText),S=l.useMemo(()=>Object.assign({autoFocusButton:C,cancelTextLocale:w,okTextLocale:k,mergedOkCancel:$},v),[C,w,k,$,v]),N=l.createElement(l.Fragment,null,l.createElement(O,null),l.createElement(E,null)),T=void 0!==e.title&&null!==e.title,I=`${r}-body`;return l.createElement("div",{className:`${r}-body-wrapper`},l.createElement("div",{className:(0,d.default)(I,{[`${I}-has-title`]:T})},y,l.createElement("div",{className:`${r}-paragraph`},T&&l.createElement("span",{className:`${r}-title`},e.title),l.createElement("div",{className:`${r}-content`},e.content))),void 0===p||"function"==typeof p?l.createElement(x,{value:S},l.createElement("div",{className:`${r}-btns`},"function"==typeof p?p(N,{OkBtn:E,CancelBtn:O}):N)):p,l.createElement(ew,{prefixCls:t}))},eT=e=>{let{close:t,zIndex:n,maskStyle:a,direction:o,prefixCls:r,wrapClassName:i,rootPrefixCls:s,bodyStyle:c,closable:u=!1,onConfirm:g,styles:b,title:v}=e,y=`${r}-confirm`,$=e.width||416,C=e.style||{},h=void 0===e.mask||e.mask,x=void 0!==e.maskClosable&&e.maskClosable,O=(0,d.default)(y,`${y}-${e.type}`,{[`${y}-rtl`]:"rtl"===o},e.className),[,E]=(0,p.default)(),j=l.useMemo(()=>void 0!==n?n:E.zIndexPopupBase+f.CONTAINER_MAX_OFFSET,[n,E]);return l.createElement(ek,Object.assign({},e,{className:O,wrapClassName:(0,d.default)({[`${y}-centered`]:!!e.centered},i),onCancel:()=>{null==t||t({triggerCancel:!0}),null==g||g(!1)},title:v,footer:null,transitionName:(0,m.getTransitionName)(s||"","zoom",e.transitionName),maskTransitionName:(0,m.getTransitionName)(s||"","fade",e.maskTransitionName),mask:h,maskClosable:x,style:C,styles:Object.assign({body:c,mask:a},b),width:$,zIndex:j,closable:u}),l.createElement(eN,Object.assign({},e,{confirmPrefixCls:y})))},eI=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:o,theme:r}=e;return l.createElement(a.default,{prefixCls:t,iconPrefixCls:n,direction:o,theme:r},l.createElement(eT,Object.assign({},e)))},eP=[],eR="",eM=e=>{var t,n;let{prefixCls:a,getContainer:r,direction:i}=e,s=(0,ei.getConfirmLocale)(),c=(0,l.useContext)(o.ConfigContext),u=eR||c.getPrefixCls(),d=a||`${u}-modal`,f=r;return!1===f&&(f=void 0),l.default.createElement(eI,Object.assign({},e,{rootPrefixCls:u,prefixCls:d,iconPrefixCls:c.iconPrefixCls,theme:c.theme,direction:null!=i?i:c.direction,locale:null!=(n=null==(t=c.locale)?void 0:t.Modal)?n:s,getContainer:f}))};function eB(e){let t,o,i=(0,a.globalConfig)(),s=document.createDocumentFragment(),c=Object.assign(Object.assign({},e),{close:f,open:!0});function u(...t){var l;t.some(e=>null==e?void 0:e.triggerCancel)&&(null==(l=e.onCancel)||l.call.apply(l,[e,()=>{}].concat((0,n.default)(t.slice(1)))));for(let e=0;e{clearTimeout(t),t=setTimeout(()=>{let t=i.getPrefixCls(void 0,eR),n=i.getIconPrefixCls(),c=i.getTheme(),u=l.default.createElement(eM,Object.assign({},e));o=(0,r.unstableSetRender)()(l.default.createElement(a.default,{prefixCls:t,iconPrefixCls:n,theme:c},"function"==typeof i.holderRender?i.holderRender(u):u),s)})};function f(...t){(c=Object.assign(Object.assign({},c),{open:!1,afterClose:()=>{"function"==typeof e.afterClose&&e.afterClose(),u.apply(this,t)}})).visible&&delete c.visible,d(c)}return d(c),eP.push(f),{destroy:f,update:function(e){d(c="function"==typeof e?e(c):Object.assign(Object.assign({},c),e))}}}function ez(e){return Object.assign(Object.assign({},e),{type:"warning"})}function eH(e){return Object.assign(Object.assign({},e),{type:"info"})}function eq(e){return Object.assign(Object.assign({},e),{type:"success"})}function eA(e){return Object.assign(Object.assign({},e),{type:"error"})}function eL(e){return Object.assign(Object.assign({},e),{type:"confirm"})}var eF=e.i(805484),eW=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};let eD=(0,eF.withPureRenderTheme)(e=>{let{prefixCls:t,className:n,closeIcon:a,closable:r,type:i,title:s,children:c,footer:u}=e,f=eW(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:m}=l.useContext(o.ConfigContext),g=m(),p=t||m("modal"),b=(0,J.default)(g),[v,y,$]=eE(p,b),C=`${p}-confirm`,h={};return h=i?{closable:null!=r&&r,title:"",footer:"",children:l.createElement(eN,Object.assign({},e,{prefixCls:p,confirmPrefixCls:C,rootPrefixCls:g,content:c}))}:{closable:null==r||r,title:s,footer:null!==u&&l.createElement(ec,Object.assign({},e)),children:c},v(l.createElement(D,Object.assign({prefixCls:p,className:(0,d.default)(y,`${p}-pure-panel`,i&&C,i&&`${C}-${i}`,n,$,b)},f,{closeIcon:es(p,a),closable:r},h)))});var eG=e.i(87414),eX=e.i(929447),eV=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};let eU=l.forwardRef((e,t)=>{var a,{afterClose:r,config:i}=e,s=eV(e,["afterClose","config"]);let[c,u]=l.useState(!0),[d,f]=l.useState(i),{direction:m,getPrefixCls:g}=l.useContext(o.ConfigContext),p=g("modal"),b=g(),v=(...e)=>{var t;u(!1),e.some(e=>null==e?void 0:e.triggerCancel)&&(null==(t=d.onCancel)||t.call.apply(t,[d,()=>{}].concat((0,n.default)(e.slice(1)))))};l.useImperativeHandle(t,()=>({destroy:v,update:e=>{f(t=>{let n="function"==typeof e?e(t):e;return Object.assign(Object.assign({},t),n)})}}));let y=null!=(a=d.okCancel)?a:"confirm"===d.type,[$]=(0,eX.default)("Modal",eG.default.Modal);return l.createElement(eI,Object.assign({prefixCls:p,rootPrefixCls:b},d,{close:v,open:c,afterClose:()=>{var e;r(),null==(e=d.afterClose)||e.call(d)},okText:d.okText||(y?null==$?void 0:$.okText:null==$?void 0:$.justOkText),direction:d.direction||m,cancelText:d.cancelText||(null==$?void 0:$.cancelText)},s))}),eK=0,eY=l.memo(l.forwardRef((e,t)=>{let[a,o]=(()=>{let[e,t]=l.useState([]);return[e,l.useCallback(e=>(t(t=>[].concat((0,n.default)(t),[e])),()=>{t(t=>t.filter(t=>t!==e))}),[])]})();return l.useImperativeHandle(t,()=>({patchElement:o}),[o]),l.createElement(l.Fragment,null,a)}));function e_(e){return eB(ez(e))}ek.useModal=function(){let e=l.useRef(null),[t,a]=l.useState([]);l.useEffect(()=>{t.length&&((0,n.default)(t).forEach(e=>{e()}),a([]))},[t]);let o=l.useCallback(t=>function(o){var r;let i,s;eK+=1;let c=l.createRef(),u=new Promise(e=>{i=e}),d=!1,f=l.createElement(eU,{key:`modal-${eK}`,config:t(o),ref:c,afterClose:()=>{null==s||s()},isSilent:()=>d,onConfirm:e=>{i(e)}});return(s=null==(r=e.current)?void 0:r.patchElement(f))&&eP.push(s),{destroy:()=>{function e(){var e;null==(e=c.current)||e.destroy()}c.current?e():a(t=>[].concat((0,n.default)(t),[e]))},update:e=>{function t(){var t;null==(t=c.current)||t.update(e)}c.current?t():a(e=>[].concat((0,n.default)(e),[t]))},then:e=>(d=!0,u.then(e))}},[]);return[l.useMemo(()=>({info:o(eH),success:o(eq),error:o(eA),warning:o(ez),confirm:o(eL)}),[o]),l.createElement(eY,{key:"modal-holder",ref:e})]},ek.info=function(e){return eB(eH(e))},ek.success=function(e){return eB(eq(e))},ek.error=function(e){return eB(eA(e))},ek.warning=e_,ek.warn=e_,ek.confirm=function(e){return eB(eL(e))},ek.destroyAll=function(){for(;eP.length;){let e=eP.pop();e&&e()}},ek.config=function({rootPrefixCls:e}){eR=e},ek._InternalPanelDoNotUseOrYouWillBeFired=eD,e.s(["Modal",0,ek],212931)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0ff09429cca56f00.js b/litellm/proxy/_experimental/out/_next/static/chunks/1c4d372849d019d5.js similarity index 64% rename from litellm/proxy/_experimental/out/_next/static/chunks/0ff09429cca56f00.js rename to litellm/proxy/_experimental/out/_next/static/chunks/1c4d372849d019d5.js index f8d9b64470..b9baad1375 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/0ff09429cca56f00.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1c4d372849d019d5.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,457202,439061,182399,234779,374615,330995,592143,372943,899268,87316,655900,299023,25652,882293,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-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-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};var l=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["AuditOutlined",0,i],457202);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"};var n=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["BgColorsOutlined",0,n],439061);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"};var d=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["BlockOutlined",0,d],182399);let c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};var u=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:c}))});e.s(["BookOutlined",0,u],234779);let m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var g=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:m}))});e.s(["CreditCardOutlined",0,g],374615);var x=e.i(366845);e.s(["FolderOutlined",()=>x.default],330995);var p=e.i(609587);e.s(["ConfigProvider",()=>p.default],592143);var h=e.i(8211),f=e.i(343794),y=e.i(529681),b=e.i(242064),j=e.i(704914),v=e.i(876556),N=e.i(290224),k=e.i(251224),w=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(s[a[l]]=e[a[l]]);return s};function O({suffixCls:e,tagName:t,displayName:a}){return a=>s.forwardRef((l,i)=>s.createElement(a,Object.assign({ref:i,suffixCls:e,tagName:t},l)))}let _=s.forwardRef((e,t)=>{let{prefixCls:a,suffixCls:l,className:i,tagName:r}=e,n=w(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:o}=s.useContext(b.ConfigContext),d=o("layout",a),[c,u,m]=(0,k.default)(d),g=l?`${d}-${l}`:d;return c(s.createElement(r,Object.assign({className:(0,f.default)(a||g,i,u,m),ref:t},n)))}),L=s.forwardRef((e,t)=>{let{direction:a}=s.useContext(b.ConfigContext),[l,i]=s.useState([]),{prefixCls:r,className:n,rootClassName:o,children:d,hasSider:c,tagName:u,style:m}=e,g=w(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),x=(0,y.default)(g,["suffixCls"]),{getPrefixCls:p,className:O,style:_}=(0,b.useComponentConfig)("layout"),L=p("layout",r),C="boolean"==typeof c?c:!!l.length||(0,v.default)(d).some(e=>e.type===N.default),[S,M,P]=(0,k.default)(L),T=(0,f.default)(L,{[`${L}-has-sider`]:C,[`${L}-rtl`]:"rtl"===a},O,n,o,M,P),z=s.useMemo(()=>({siderHook:{addSider:e=>{i(t=>[].concat((0,h.default)(t),[e]))},removeSider:e=>{i(t=>t.filter(t=>t!==e))}}}),[]);return S(s.createElement(j.LayoutContext.Provider,{value:z},s.createElement(u,Object.assign({ref:t,className:T,style:Object.assign(Object.assign({},_),m)},x),d)))}),C=O({tagName:"div",displayName:"Layout"})(L),S=O({suffixCls:"header",tagName:"header",displayName:"Header"})(_),M=O({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(_),P=O({suffixCls:"content",tagName:"main",displayName:"Content"})(_);C.Header=S,C.Footer=M,C.Content=P,C.Sider=N.default,C._InternalSiderContext=N.SiderContext,e.s(["Layout",0,C],372943);var T=e.i(60699);e.s(["Menu",()=>T.default],899268);var z=e.i(475254);let E=(0,z.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",()=>E],87316);var R=e.i(399219);e.s(["ChevronUp",()=>R.default],655900);let H=(0,z.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>H],299023);let U=(0,z.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>U],25652);let B=(0,z.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["UserCheck",()=>B],882293)},761911,98740,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>t],98740),e.s(["Users",()=>t],761911)},111672,e=>{"use strict";e.i(247167);var t=e.i(843476),s=e.i(109799),a=e.i(785242),l=e.i(135214),i=e.i(218129),r=e.i(477189),n=e.i(457202),o=e.i(299251),d=e.i(153702),c=e.i(439061),u=e.i(182399),m=e.i(234779),g=e.i(374615),x=e.i(210612),p=e.i(19732),h=e.i(872934),f=e.i(993914),y=e.i(330995),b=e.i(438957),j=e.i(777579),v=e.i(788191),N=e.i(983561),k=e.i(602073),w=e.i(928685),O=e.i(313603),_=e.i(232164),L=e.i(645526),C=e.i(366308),S=e.i(771674),M=e.i(592143),P=e.i(372943),T=e.i(899268),z=e.i(271645),E=e.i(708347),R=e.i(844444),H=e.i(371401);e.i(389083);var U=e.i(878894),B=e.i(87316);e.i(664659),e.i(655900);var A=e.i(531278),$=e.i(299023),I=e.i(25652),V=e.i(882293),D=e.i(761911),K=e.i(764205);let F=(...e)=>e.filter(Boolean).join(" ");function W({accessToken:e,width:s=220}){let a=(0,H.useDisableUsageIndicator)(),[l,i]=(0,z.useState)(!1),[r,n]=(0,z.useState)(!1),[o,d]=(0,z.useState)(null),[c,u]=(0,z.useState)(null),[m,g]=(0,z.useState)(!1),[x,p]=(0,z.useState)(null);(0,z.useEffect)(()=>{(async()=>{if(e){g(!0),p(null);try{let[t,s]=await Promise.all([(0,K.getRemainingUsers)(e),(0,K.getLicenseInfo)(e).catch(()=>null)]);d(t),u(s)}catch(e){console.error("Failed to fetch usage data:",e),p("Failed to load usage data")}finally{g(!1)}}})()},[e]);let h=c?.expiration_date?(e=>{if(!e)return null;let t=new Date(e+"T00:00:00Z"),s=new Date;return s.setHours(0,0,0,0),Math.ceil((t.getTime()-s.getTime())/864e5)})(c.expiration_date):null,f=null!==h&&h<0,y=null!==h&&h>=0&&h<30,{isOverLimit:b,isNearLimit:j,usagePercentage:v,userMetrics:N,teamMetrics:k}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let t=e.total_users?e.total_users_used/e.total_users*100:0,s=t>100,a=t>=80&&t<=100,l=e.total_teams?e.total_teams_used/e.total_teams*100:0,i=l>100,r=l>=80&&l<=100,n=s||i;return{isOverLimit:n,isNearLimit:(a||r)&&!n,usagePercentage:Math.max(t,l),userMetrics:{isOverLimit:s,isNearLimit:a,usagePercentage:t},teamMetrics:{isOverLimit:i,isNearLimit:r,usagePercentage:l}}})(o),w=b||j||f||y,O=b||f,_=(j||y)&&!O;return a||!e||o?.total_users===null&&o?.total_teams===null?null:(0,t.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:`${Math.min(s,220)}px`},children:(0,t.jsx)(()=>r?(0,t.jsx)("button",{onClick:()=>n(!1),className:F("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(D.Users,{className:"h-4 w-4 flex-shrink-0"}),w&&(0,t.jsx)("span",{className:"flex-shrink-0",children:O?(0,t.jsx)(U.AlertTriangle,{className:"h-3 w-3"}):_?(0,t.jsx)(I.TrendingUp,{className:"h-3 w-3"}):null}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[o&&null!==o.total_users&&(0,t.jsxs)("span",{className:F("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",o.total_users_used,"/",o.total_users]}),o&&null!==o.total_teams&&(0,t.jsxs)("span",{className:F("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",o.total_teams_used,"/",o.total_teams]}),c?.expiration_date&&null!==h&&(0,t.jsx)("span",{className:F("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-700 border-gray-200"),children:h<0?"Exp!":`${h}d`}),!o||null===o.total_users&&null===o.total_teams&&!c&&(0,t.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):m?(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,t.jsx)(A.Loader2,{className:"h-4 w-4 animate-spin"}),(0,t.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):x||!o?(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:x||"No data"})}),(0,t.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,t.jsx)($.Minus,{className:"h-3 w-3 text-gray-400"})})]})}):(0,t.jsxs)("div",{className:F("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,t.jsx)(D.Users,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,t.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,t.jsx)($.Minus,{className:"h-3 w-3 text-gray-400"})})]}),(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[c?.has_license&&c.expiration_date&&(0,t.jsxs)("div",{className:F("space-y-1 border rounded-md p-2",f&&"border-red-200 bg-red-50",y&&"border-yellow-200 bg-yellow-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,t.jsx)(B.Calendar,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-medium",children:"License"}),(0,t.jsx)("span",{className:F("ml-1 px-1.5 py-0.5 rounded border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-600 border-gray-200"),children:f?"Expired":y?"Expiring soon":"OK"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Status:"}),(0,t.jsx)("span",{className:F("font-medium text-right",f&&"text-red-600",y&&"text-yellow-600"),children:(e=>{if(null===e)return"No expiration";if(e<0)return"Expired";if(0===e)return"Expires today";if(1===e)return"1 day remaining";if(e<30)return`${e} days remaining`;if(e<60)return"1 month remaining";let t=Math.floor(e/30);return`${t} months remaining`})(h)})]}),c.license_type&&(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Type:"}),(0,t.jsx)("span",{className:"font-medium text-right capitalize",children:c.license_type})]})]}),null!==o.total_users&&(0,t.jsxs)("div",{className:F("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,t.jsx)(D.Users,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-medium",children:"Users"}),(0,t.jsx)("span",{className:F("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[o.total_users_used,"/",o.total_users]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,t.jsx)("span",{className:F("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:o.total_users_remaining})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,t.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,t.jsx)("div",{className:F("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(N.usagePercentage,100)}%`}})})]}),null!==o.total_teams&&(0,t.jsxs)("div",{className:F("space-y-1 border rounded-md p-2",k.isOverLimit&&"border-red-200 bg-red-50",k.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,t.jsx)(V.UserCheck,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-medium",children:"Teams"}),(0,t.jsx)("span",{className:F("ml-1 px-1.5 py-0.5 rounded border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:k.isOverLimit?"Over limit":k.isNearLimit?"Near limit":"OK"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[o.total_teams_used,"/",o.total_teams]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,t.jsx)("span",{className:F("font-medium text-right",k.isOverLimit&&"text-red-600",k.isNearLimit&&"text-yellow-600"),children:o.total_teams_remaining})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[Math.round(k.usagePercentage),"%"]})]}),(0,t.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,t.jsx)("div",{className:F("h-2 rounded-full transition-all duration-300",k.isOverLimit&&"bg-red-500",k.isNearLimit&&"bg-yellow-500",!k.isOverLimit&&!k.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(k.usagePercentage,100)}%`}})})]})]})]}),{})})}let{Sider:G}=P.Layout,q={"api-reference":"api-reference"},Y=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,t.jsx)(b.KeyOutlined,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,t.jsx)(v.PlayCircleOutlined,{}),roles:E.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,t.jsx)(u.BlockOutlined,{}),roles:E.rolesWithWriteAccess},{key:"agents",page:"agents",label:"Agents",icon:(0,t.jsx)(N.RobotOutlined,{}),roles:E.rolesWithWriteAccess},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,t.jsx)(C.ToolOutlined,{})},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,t.jsx)(k.SafetyOutlined,{})},{key:"policies",page:"policies",label:(0,t.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,t.jsx)(n.AuditOutlined,{}),roles:E.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,t.jsx)(C.ToolOutlined,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,t.jsx)(w.SearchOutlined,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,t.jsx)(x.DatabaseOutlined,{})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,t.jsx)(k.SafetyOutlined,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,t.jsx)(d.BarChartOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles],label:"Usage"},{key:"logs",page:"logs",label:"Logs",icon:(0,t.jsx)(j.LineChartOutlined,{})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,t.jsx)(k.SafetyOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,t.jsx)(L.TeamOutlined,{})},{key:"projects",page:"projects",label:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,t.jsx)(R.default,{})]}),icon:(0,t.jsx)(y.FolderOutlined,{}),roles:E.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,t.jsx)(S.UserOutlined,{}),roles:E.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,t.jsx)(o.BankOutlined,{}),roles:E.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,t.jsx)(u.BlockOutlined,{}),roles:E.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,t.jsx)(g.CreditCardOutlined,{}),roles:E.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api-reference",page:"api-reference",label:"API Reference",icon:(0,t.jsx)(i.ApiOutlined,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,t.jsx)(r.AppstoreOutlined,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,t.jsx)(m.BookOutlined,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,t.jsx)(p.ExperimentOutlined,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,t.jsx)(x.DatabaseOutlined,{}),roles:E.all_admin_roles},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,t.jsx)(f.FileTextOutlined,{}),roles:E.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,t.jsx)(i.ApiOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,t.jsx)(_.TagsOutlined,{}),roles:E.all_admin_roles},{key:"claude-code-plugins",page:"claude-code-plugins",label:"Claude Code Plugins",icon:(0,t.jsx)(C.ToolOutlined,{}),roles:E.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,t.jsx)(d.BarChartOutlined,{})}]}]},{groupLabel:"SETTINGS",roles:E.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,t.jsx)(R.default,{})]}),icon:(0,t.jsx)(O.SettingOutlined,{}),roles:E.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,t.jsx)(O.SettingOutlined,{}),roles:E.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,t.jsx)(O.SettingOutlined,{}),roles:E.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings ",(0,t.jsx)(R.default,{dot:!0,children:(0,t.jsx)("span",{})})]}),icon:(0,t.jsx)(O.SettingOutlined,{}),roles:E.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,t.jsx)(d.BarChartOutlined,{}),roles:E.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,t.jsx)(c.BgColorsOutlined,{}),roles:E.all_admin_roles}]}]}];e.s(["default",0,({setPage:e,defaultSelectedKey:i,collapsed:r=!1,enabledPagesInternalUsers:n,enableProjectsUI:o,disableAgentsForInternalUsers:d,allowAgentsForTeamAdmins:c,disableVectorStoresForInternalUsers:u,allowVectorStoresForTeamAdmins:m})=>{let g,{userId:x,accessToken:p,userRole:f}=(0,l.default)(),{data:y}=(0,s.useOrganizations)(),{data:b}=(0,a.useTeams)(),j=(0,z.useMemo)(()=>!!x&&!!y&&y.some(e=>e.members?.some(e=>e.user_id===x&&"org_admin"===e.user_role)),[x,y]),v=(0,z.useMemo)(()=>(0,E.isUserTeamAdminForAnyTeam)(b??null,x??""),[b,x]),N=t=>{if(q[t])return void e(t);let s=new URLSearchParams(window.location.search);s.set("page",t),window.history.pushState(null,"",`?${s.toString()}`),e(t)},k=(e,s,a)=>{let l;if(a)return(0,t.jsxs)("a",{href:a,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{color:"inherit",textDecoration:"none"},children:[e," ",(0,t.jsx)(h.ExportOutlined,{style:{fontSize:10,marginLeft:4}})]});let i=q[s],r=i?function(e){let t="ui/".replace(/^\/+|\/+$/g,""),s=t?`/${t}/`:"/";if(K.serverRootPath&&"/"!==K.serverRootPath){let e=K.serverRootPath.replace(/\/+$/,""),t=s.replace(/^\/+/,"");s=`${e}/${t}`}return`${s}${e}`}(i):((l=new URLSearchParams(window.location.search)).set("page",s),`?${l.toString()}`);return(0,t.jsx)("a",{href:r,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button?e.stopPropagation():e.preventDefault()},style:{color:"inherit",textDecoration:"none"},children:e})},w=e=>{let t=(0,E.isAdminRole)(f);return null!=n&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:f,isAdmin:t,enabledPagesInternalUsers:n}),e.map(e=>({...e,children:e.children?w(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key){if(!(!e.roles||e.roles.includes(f)||j))return!1;if(!t&&null!=n){let t=n.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0}if("projects"===e.key&&!o||!t&&"agents"===e.key&&d&&!(c&&v)||!t&&"vector-stores"===e.key&&u&&!(m&&v)||e.roles&&!e.roles.includes(f))return!1;if(!t&&null!=n){if(e.children&&e.children.length>0&&e.children.some(e=>n.includes(e.page)))return console.log(`[LeftNav] Parent "${e.page}" (${e.key}): VISIBLE (has visible children)`),!0;let t=n.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0})},O=(e=>{for(let t of Y)for(let s of t.items){if(s.page===e)return s.key;if(s.children){let t=s.children.find(t=>t.page===e);if(t)return t.key}}return"api-keys"})(i);return(0,t.jsx)(P.Layout,{children:(0,t.jsxs)(G,{theme:"light",width:220,collapsed:r,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,t.jsx)(M.ConfigProvider,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,t.jsx)(T.Menu,{mode:"inline",selectedKeys:[O],defaultOpenKeys:[],inlineCollapsed:r,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(g=[],Y.forEach(e=>{if(e.roles&&!e.roles.includes(f))return;let s=w(e.items);0!==s.length&&g.push({type:"group",label:r?null:(0,t.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:e.groupLabel}),children:s.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),children:e.children?.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):N(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):N(e.page)}}))})}),g)})}),(0,E.isAdminRole)(f)&&!r&&(0,t.jsx)(W,{accessToken:p,width:220})]})})},"menuGroups",()=>Y],111672)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,457202,439061,182399,234779,374615,330995,592143,372943,899268,87316,655900,299023,25652,882293,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-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-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};var l=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["AuditOutlined",0,i],457202);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"};var n=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["BgColorsOutlined",0,n],439061);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"};var d=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["BlockOutlined",0,d],182399);let c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};var m=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:c}))});e.s(["BookOutlined",0,m],234779);let u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var g=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:u}))});e.s(["CreditCardOutlined",0,g],374615);var x=e.i(366845);e.s(["FolderOutlined",()=>x.default],330995);var p=e.i(609587);e.s(["ConfigProvider",()=>p.default],592143);var h=e.i(8211),f=e.i(343794),y=e.i(529681),b=e.i(242064),j=e.i(704914),v=e.i(876556),N=e.i(290224),k=e.i(251224),w=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(s[a[l]]=e[a[l]]);return s};function O({suffixCls:e,tagName:t,displayName:a}){return a=>s.forwardRef((l,i)=>s.createElement(a,Object.assign({ref:i,suffixCls:e,tagName:t},l)))}let _=s.forwardRef((e,t)=>{let{prefixCls:a,suffixCls:l,className:i,tagName:r}=e,n=w(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:o}=s.useContext(b.ConfigContext),d=o("layout",a),[c,m,u]=(0,k.default)(d),g=l?`${d}-${l}`:d;return c(s.createElement(r,Object.assign({className:(0,f.default)(a||g,i,m,u),ref:t},n)))}),L=s.forwardRef((e,t)=>{let{direction:a}=s.useContext(b.ConfigContext),[l,i]=s.useState([]),{prefixCls:r,className:n,rootClassName:o,children:d,hasSider:c,tagName:m,style:u}=e,g=w(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),x=(0,y.default)(g,["suffixCls"]),{getPrefixCls:p,className:O,style:_}=(0,b.useComponentConfig)("layout"),L=p("layout",r),C="boolean"==typeof c?c:!!l.length||(0,v.default)(d).some(e=>e.type===N.default),[S,M,P]=(0,k.default)(L),T=(0,f.default)(L,{[`${L}-has-sider`]:C,[`${L}-rtl`]:"rtl"===a},O,n,o,M,P),z=s.useMemo(()=>({siderHook:{addSider:e=>{i(t=>[].concat((0,h.default)(t),[e]))},removeSider:e=>{i(t=>t.filter(t=>t!==e))}}}),[]);return S(s.createElement(j.LayoutContext.Provider,{value:z},s.createElement(m,Object.assign({ref:t,className:T,style:Object.assign(Object.assign({},_),u)},x),d)))}),C=O({tagName:"div",displayName:"Layout"})(L),S=O({suffixCls:"header",tagName:"header",displayName:"Header"})(_),M=O({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(_),P=O({suffixCls:"content",tagName:"main",displayName:"Content"})(_);C.Header=S,C.Footer=M,C.Content=P,C.Sider=N.default,C._InternalSiderContext=N.SiderContext,e.s(["Layout",0,C],372943);var T=e.i(60699);e.s(["Menu",()=>T.default],899268);var z=e.i(475254);let E=(0,z.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",()=>E],87316);var R=e.i(399219);e.s(["ChevronUp",()=>R.default],655900);let H=(0,z.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>H],299023);let U=(0,z.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>U],25652);let A=(0,z.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["UserCheck",()=>A],882293)},761911,98740,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>t],98740),e.s(["Users",()=>t],761911)},111672,e=>{"use strict";e.i(247167);var t=e.i(843476),s=e.i(109799),a=e.i(785242),l=e.i(135214),i=e.i(218129),r=e.i(477189),n=e.i(457202),o=e.i(299251),d=e.i(153702),c=e.i(439061),m=e.i(182399),u=e.i(234779),g=e.i(374615),x=e.i(210612),p=e.i(19732),h=e.i(872934),f=e.i(993914),y=e.i(330995),b=e.i(438957),j=e.i(777579),v=e.i(788191),N=e.i(983561),k=e.i(602073),w=e.i(928685),O=e.i(313603),_=e.i(232164),L=e.i(645526),C=e.i(366308),S=e.i(771674),M=e.i(592143),P=e.i(372943),T=e.i(899268),z=e.i(271645),E=e.i(708347),R=e.i(844444),H=e.i(371401);e.i(389083);var U=e.i(878894),A=e.i(87316);e.i(664659),e.i(655900);var B=e.i(531278),$=e.i(299023),I=e.i(25652),V=e.i(882293),D=e.i(761911),K=e.i(764205);let F=(...e)=>e.filter(Boolean).join(" ");function W({accessToken:e,width:s=220}){let a=(0,H.useDisableUsageIndicator)(),[l,i]=(0,z.useState)(!1),[r,n]=(0,z.useState)(!1),[o,d]=(0,z.useState)(null),[c,m]=(0,z.useState)(null),[u,g]=(0,z.useState)(!1),[x,p]=(0,z.useState)(null);(0,z.useEffect)(()=>{(async()=>{if(e){g(!0),p(null);try{let[t,s]=await Promise.all([(0,K.getRemainingUsers)(e),(0,K.getLicenseInfo)(e).catch(()=>null)]);d(t),m(s)}catch(e){console.error("Failed to fetch usage data:",e),p("Failed to load usage data")}finally{g(!1)}}})()},[e]);let h=c?.expiration_date?(e=>{if(!e)return null;let t=new Date(e+"T00:00:00Z"),s=new Date;return s.setHours(0,0,0,0),Math.ceil((t.getTime()-s.getTime())/864e5)})(c.expiration_date):null,f=null!==h&&h<0,y=null!==h&&h>=0&&h<30,{isOverLimit:b,isNearLimit:j,usagePercentage:v,userMetrics:N,teamMetrics:k}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let t=e.total_users?e.total_users_used/e.total_users*100:0,s=t>100,a=t>=80&&t<=100,l=e.total_teams?e.total_teams_used/e.total_teams*100:0,i=l>100,r=l>=80&&l<=100,n=s||i;return{isOverLimit:n,isNearLimit:(a||r)&&!n,usagePercentage:Math.max(t,l),userMetrics:{isOverLimit:s,isNearLimit:a,usagePercentage:t},teamMetrics:{isOverLimit:i,isNearLimit:r,usagePercentage:l}}})(o),w=b||j||f||y,O=b||f,_=(j||y)&&!O;return a||!e||o?.total_users===null&&o?.total_teams===null?null:(0,t.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:`${Math.min(s,220)}px`},children:(0,t.jsx)(()=>r?(0,t.jsx)("button",{onClick:()=>n(!1),className:F("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(D.Users,{className:"h-4 w-4 flex-shrink-0"}),w&&(0,t.jsx)("span",{className:"flex-shrink-0",children:O?(0,t.jsx)(U.AlertTriangle,{className:"h-3 w-3"}):_?(0,t.jsx)(I.TrendingUp,{className:"h-3 w-3"}):null}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[o&&null!==o.total_users&&(0,t.jsxs)("span",{className:F("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",o.total_users_used,"/",o.total_users]}),o&&null!==o.total_teams&&(0,t.jsxs)("span",{className:F("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",o.total_teams_used,"/",o.total_teams]}),c?.expiration_date&&null!==h&&(0,t.jsx)("span",{className:F("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-700 border-gray-200"),children:h<0?"Exp!":`${h}d`}),!o||null===o.total_users&&null===o.total_teams&&!c&&(0,t.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):u?(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,t.jsx)(B.Loader2,{className:"h-4 w-4 animate-spin"}),(0,t.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):x||!o?(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:x||"No data"})}),(0,t.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,t.jsx)($.Minus,{className:"h-3 w-3 text-gray-400"})})]})}):(0,t.jsxs)("div",{className:F("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,t.jsx)(D.Users,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,t.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,t.jsx)($.Minus,{className:"h-3 w-3 text-gray-400"})})]}),(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[c?.has_license&&c.expiration_date&&(0,t.jsxs)("div",{className:F("space-y-1 border rounded-md p-2",f&&"border-red-200 bg-red-50",y&&"border-yellow-200 bg-yellow-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,t.jsx)(A.Calendar,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-medium",children:"License"}),(0,t.jsx)("span",{className:F("ml-1 px-1.5 py-0.5 rounded border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-600 border-gray-200"),children:f?"Expired":y?"Expiring soon":"OK"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Status:"}),(0,t.jsx)("span",{className:F("font-medium text-right",f&&"text-red-600",y&&"text-yellow-600"),children:(e=>{if(null===e)return"No expiration";if(e<0)return"Expired";if(0===e)return"Expires today";if(1===e)return"1 day remaining";if(e<30)return`${e} days remaining`;if(e<60)return"1 month remaining";let t=Math.floor(e/30);return`${t} months remaining`})(h)})]}),c.license_type&&(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Type:"}),(0,t.jsx)("span",{className:"font-medium text-right capitalize",children:c.license_type})]})]}),null!==o.total_users&&(0,t.jsxs)("div",{className:F("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,t.jsx)(D.Users,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-medium",children:"Users"}),(0,t.jsx)("span",{className:F("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[o.total_users_used,"/",o.total_users]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,t.jsx)("span",{className:F("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:o.total_users_remaining})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,t.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,t.jsx)("div",{className:F("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(N.usagePercentage,100)}%`}})})]}),null!==o.total_teams&&(0,t.jsxs)("div",{className:F("space-y-1 border rounded-md p-2",k.isOverLimit&&"border-red-200 bg-red-50",k.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,t.jsx)(V.UserCheck,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-medium",children:"Teams"}),(0,t.jsx)("span",{className:F("ml-1 px-1.5 py-0.5 rounded border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:k.isOverLimit?"Over limit":k.isNearLimit?"Near limit":"OK"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[o.total_teams_used,"/",o.total_teams]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,t.jsx)("span",{className:F("font-medium text-right",k.isOverLimit&&"text-red-600",k.isNearLimit&&"text-yellow-600"),children:o.total_teams_remaining})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[Math.round(k.usagePercentage),"%"]})]}),(0,t.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,t.jsx)("div",{className:F("h-2 rounded-full transition-all duration-300",k.isOverLimit&&"bg-red-500",k.isNearLimit&&"bg-yellow-500",!k.isOverLimit&&!k.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(k.usagePercentage,100)}%`}})})]})]})]}),{})})}let{Sider:G}=P.Layout,q={"api-reference":"api-reference"},Y=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,t.jsx)(b.KeyOutlined,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,t.jsx)(v.PlayCircleOutlined,{}),roles:E.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,t.jsx)(m.BlockOutlined,{}),roles:E.rolesWithWriteAccess},{key:"agents",page:"agents",label:"Agents",icon:(0,t.jsx)(N.RobotOutlined,{}),roles:E.rolesWithWriteAccess},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,t.jsx)(C.ToolOutlined,{})},{key:"skills",page:"skills",label:"Skills",icon:(0,t.jsx)(i.ApiOutlined,{}),roles:E.all_admin_roles},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,t.jsx)(k.SafetyOutlined,{})},{key:"policies",page:"policies",label:(0,t.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,t.jsx)(n.AuditOutlined,{}),roles:E.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,t.jsx)(C.ToolOutlined,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,t.jsx)(w.SearchOutlined,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,t.jsx)(x.DatabaseOutlined,{})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,t.jsx)(k.SafetyOutlined,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,t.jsx)(d.BarChartOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles],label:"Usage"},{key:"logs",page:"logs",label:"Logs",icon:(0,t.jsx)(j.LineChartOutlined,{})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,t.jsx)(k.SafetyOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,t.jsx)(L.TeamOutlined,{})},{key:"projects",page:"projects",label:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,t.jsx)(R.default,{})]}),icon:(0,t.jsx)(y.FolderOutlined,{}),roles:E.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,t.jsx)(S.UserOutlined,{}),roles:E.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,t.jsx)(o.BankOutlined,{}),roles:E.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,t.jsx)(m.BlockOutlined,{}),roles:E.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,t.jsx)(g.CreditCardOutlined,{}),roles:E.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api-reference",page:"api-reference",label:"API Reference",icon:(0,t.jsx)(i.ApiOutlined,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,t.jsx)(r.AppstoreOutlined,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,t.jsx)(u.BookOutlined,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,t.jsx)(p.ExperimentOutlined,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,t.jsx)(x.DatabaseOutlined,{}),roles:E.all_admin_roles},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,t.jsx)(f.FileTextOutlined,{}),roles:E.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,t.jsx)(i.ApiOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,t.jsx)(_.TagsOutlined,{}),roles:E.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,t.jsx)(d.BarChartOutlined,{})}]}]},{groupLabel:"SETTINGS",roles:E.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,t.jsx)(R.default,{})]}),icon:(0,t.jsx)(O.SettingOutlined,{}),roles:E.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,t.jsx)(O.SettingOutlined,{}),roles:E.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,t.jsx)(O.SettingOutlined,{}),roles:E.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings ",(0,t.jsx)(R.default,{dot:!0,children:(0,t.jsx)("span",{})})]}),icon:(0,t.jsx)(O.SettingOutlined,{}),roles:E.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,t.jsx)(d.BarChartOutlined,{}),roles:E.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,t.jsx)(c.BgColorsOutlined,{}),roles:E.all_admin_roles}]}]}];e.s(["default",0,({setPage:e,defaultSelectedKey:i,collapsed:r=!1,enabledPagesInternalUsers:n,enableProjectsUI:o,disableAgentsForInternalUsers:d,allowAgentsForTeamAdmins:c,disableVectorStoresForInternalUsers:m,allowVectorStoresForTeamAdmins:u})=>{let g,{userId:x,accessToken:p,userRole:f}=(0,l.default)(),{data:y}=(0,s.useOrganizations)(),{data:b}=(0,a.useTeams)(),j=(0,z.useMemo)(()=>!!x&&!!y&&y.some(e=>e.members?.some(e=>e.user_id===x&&"org_admin"===e.user_role)),[x,y]),v=(0,z.useMemo)(()=>(0,E.isUserTeamAdminForAnyTeam)(b??null,x??""),[b,x]),N=t=>{if(q[t])return void e(t);let s=new URLSearchParams(window.location.search);s.set("page",t),window.history.pushState(null,"",`?${s.toString()}`),e(t)},k=(e,s,a)=>{let l;if(a)return(0,t.jsxs)("a",{href:a,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{color:"inherit",textDecoration:"none"},children:[e," ",(0,t.jsx)(h.ExportOutlined,{style:{fontSize:10,marginLeft:4}})]});let i=q[s],r=i?function(e){let t="ui/".replace(/^\/+|\/+$/g,""),s=t?`/${t}/`:"/";if(K.serverRootPath&&"/"!==K.serverRootPath){let e=K.serverRootPath.replace(/\/+$/,""),t=s.replace(/^\/+/,"");s=`${e}/${t}`}return`${s}${e}`}(i):((l=new URLSearchParams(window.location.search)).set("page",s),`?${l.toString()}`);return(0,t.jsx)("a",{href:r,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button?e.stopPropagation():e.preventDefault()},style:{color:"inherit",textDecoration:"none"},children:e})},w=e=>{let t=(0,E.isAdminRole)(f);return null!=n&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:f,isAdmin:t,enabledPagesInternalUsers:n}),e.map(e=>({...e,children:e.children?w(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key){if(!(!e.roles||e.roles.includes(f)||j))return!1;if(!t&&null!=n){let t=n.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0}if("projects"===e.key&&!o||!t&&"agents"===e.key&&d&&!(c&&v)||!t&&"vector-stores"===e.key&&m&&!(u&&v)||e.roles&&!e.roles.includes(f))return!1;if(!t&&null!=n){if(e.children&&e.children.length>0&&e.children.some(e=>n.includes(e.page)))return console.log(`[LeftNav] Parent "${e.page}" (${e.key}): VISIBLE (has visible children)`),!0;let t=n.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0})},O=(e=>{for(let t of Y)for(let s of t.items){if(s.page===e)return s.key;if(s.children){let t=s.children.find(t=>t.page===e);if(t)return t.key}}return"api-keys"})(i);return(0,t.jsx)(P.Layout,{children:(0,t.jsxs)(G,{theme:"light",width:220,collapsed:r,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,t.jsx)(M.ConfigProvider,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,t.jsx)(T.Menu,{mode:"inline",selectedKeys:[O],defaultOpenKeys:[],inlineCollapsed:r,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(g=[],Y.forEach(e=>{if(e.roles&&!e.roles.includes(f))return;let s=w(e.items);0!==s.length&&g.push({type:"group",label:r?null:(0,t.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:e.groupLabel}),children:s.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),children:e.children?.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):N(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):N(e.page)}}))})}),g)})}),(0,E.isAdminRole)(f)&&!r&&(0,t.jsx)(W,{accessToken:p,width:220})]})})},"menuGroups",()=>Y],111672)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1d37f4159623f97f.js b/litellm/proxy/_experimental/out/_next/static/chunks/1d37f4159623f97f.js new file mode 100644 index 0000000000..caec0dc207 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1d37f4159623f97f.js @@ -0,0 +1,8 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,434626,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.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"}))});e.s(["ExternalLinkIcon",0,r],434626)},551332,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});e.s(["ClipboardCopyIcon",0,r],551332)},902555,e=>{"use strict";var t=e.i(843476),r=e.i(591935),a=e.i(122577),o=e.i(278587),l=e.i(68155),n=e.i(360820),i=e.i(871943),s=e.i(434626),d=e.i(551332),c=e.i(592968),m=e.i(115504),g=e.i(752978);function u({icon:e,onClick:r,className:a,disabled:o,dataTestId:l}){return o?(0,t.jsx)(g.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":l}):(0,t.jsx)(g.Icon,{icon:e,size:"sm",onClick:r,className:(0,m.cx)("cursor-pointer",a),"data-testid":l})}let b={Edit:{icon:r.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:l.TrashIcon,className:"hover:text-red-600"},Test:{icon:a.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:o.RefreshIcon,className:"hover:text-green-600"},Up:{icon:n.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:i.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:s.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function h({onClick:e,tooltipText:r,disabled:a=!1,disabledTooltipText:o,dataTestId:l,variant:n}){let{icon:i,className:s}=b[n];return(0,t.jsx)(c.Tooltip,{title:a?o:r,children:(0,t.jsx)("span",{children:(0,t.jsx)(u,{icon:i,onClick:e,className:s,disabled:a,dataTestId:l})})})}e.s(["default",()=>h],902555)},122577,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,r],122577)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),l=e.i(444755),n=e.i(673706),i=e.i(95779);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"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},c={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:""}},m=(0,n.makeClassName)("Icon"),g=r.default.forwardRef((e,g)=>{let{icon:u,variant:b="simple",tooltip:h,size:f=o.Sizes.SM,color:p,className:C}=e,k=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),x=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.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,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.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,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,n.getColorClassNames)(t,i.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(b,p),{tooltipProps:w,getReferenceProps:v}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,n.mergeRefs)([g,w.refs.setReference]),className:(0,l.tremorTwMerge)(m("root"),"inline-flex shrink-0 items-center justify-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,c[b].rounded,c[b].border,c[b].shadow,c[b].ring,s[f].paddingX,s[f].paddingY,C)},v,k),r.default.createElement(a.default,Object.assign({text:h},w)),r.default.createElement(u,{className:(0,l.tremorTwMerge)(m("icon"),"shrink-0",d[f].height,d[f].width)}))});g.displayName="Icon",e.s(["default",()=>g],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.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.s(["PencilAltIcon",0,r],591935)},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var o=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(o.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),o=e.i(529681);let l=e=>{let{prefixCls:a,className:o,style:l,size:n,shape:i}=e,s=(0,r.default)({[`${a}-lg`]:"large"===n,[`${a}-sm`]:"small"===n}),d=(0,r.default)({[`${a}-circle`]:"circle"===i,[`${a}-square`]:"square"===i,[`${a}-round`]:"round"===i}),c=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(a,s,d,o),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var n=e.i(694758),i=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),m=e=>({height:e,lineHeight:(0,i.unit)(e)}),g=e=>Object.assign({width:e},m(e)),u=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},m(e)),b=e=>Object.assign({width:e},m(e)),h=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},f=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},m(e)),p=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:o,skeletonButtonCls:l,skeletonInputCls:n,skeletonImageCls:i,controlHeight:s,controlHeightLG:d,controlHeightSM:m,gradientFromColor:p,padding:C,marginSM:k,borderRadius:x,titleHeight:w,blockRadius:v,paragraphLiHeight:N,controlHeightXS:$,paragraphMarginTop:j}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:C,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:p},g(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},g(d)),[`${r}-sm`]:Object.assign({},g(m))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:w,background:p,borderRadius:v,[`+ ${o}`]:{marginBlockStart:m}},[o]:{padding:0,"> li":{width:"100%",height:N,listStyle:"none",background:p,borderRadius:v,"+ li":{marginBlockStart:$}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${o} > li`]:{borderRadius:x}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:k,[`+ ${o}`]:{marginBlockStart:j}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:t,width:i(a).mul(2).equal(),minWidth:i(a).mul(2).equal()},f(a,i))},h(e,a,r)),{[`${r}-lg`]:Object.assign({},f(o,i))}),h(e,o,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},f(l,i))}),h(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},g(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},g(o)),[`${t}${t}-sm`]:Object.assign({},g(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},u(t,i)),[`${a}-lg`]:Object.assign({},u(o,i)),[`${a}-sm`]:Object.assign({},u(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:o,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:o},b(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},b(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${o} > li, + ${r}, + ${l}, + ${n}, + ${i} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,d.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),C=e=>{let{prefixCls:a,className:o,style:l,rows:n=0}=e,i=Array.from({length:n}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,o),style:l},i)},k=({prefixCls:e,className:a,width:o,style:l})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:o},l)});function x(e){return e&&"object"==typeof e?e:{}}let w=e=>{let{prefixCls:o,loading:n,className:i,rootClassName:s,style:d,children:c,avatar:m=!1,title:g=!0,paragraph:u=!0,active:b,round:h}=e,{getPrefixCls:f,direction:w,className:v,style:N}=(0,a.useComponentConfig)("skeleton"),$=f("skeleton",o),[j,y,E]=p($);if(n||!("loading"in e)){let e,a,o=!!m,n=!!g,c=!!u;if(o){let r=Object.assign(Object.assign({prefixCls:`${$}-avatar`},n&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),x(m));e=t.createElement("div",{className:`${$}-header`},t.createElement(l,Object.assign({},r)))}if(n||c){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${$}-title`},!o&&c?{width:"38%"}:o&&c?{width:"50%"}:{}),x(g));e=t.createElement(k,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},o&&n||(e.width="61%"),!o&&n?e.rows=3:e.rows=2,e)),x(u));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${$}-content`},e,r)}let f=(0,r.default)($,{[`${$}-with-avatar`]:o,[`${$}-active`]:b,[`${$}-rtl`]:"rtl"===w,[`${$}-round`]:h},v,i,s,y,E);return j(t.createElement("div",{className:f,style:Object.assign(Object.assign({},N),d)},e,a))}return null!=c?c:null};w.Button=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c=!1,size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[b,h,f]=p(u),C=(0,o.default)(e,["prefixCls"]),k=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},i,s,h,f);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${u}-button`,size:m},C))))},w.Avatar=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,shape:c="circle",size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[b,h,f]=p(u),C=(0,o.default)(e,["prefixCls","className"]),k=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d},i,s,h,f);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${u}-avatar`,shape:c,size:m},C))))},w.Input=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c,size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[b,h,f]=p(u),C=(0,o.default)(e,["prefixCls"]),k=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},i,s,h,f);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${u}-input`,size:m},C))))},w.Image=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",o),[m,g,u]=p(c),b=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},l,n,g,u);return m(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${c}-image`,l),style:i},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${c}-image-path`})))))},w.Node=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),m=c("skeleton",o),[g,u,b]=p(m),h=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:s},u,l,n,b);return g(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${m}-image`,l),style:i},d)))},e.s(["default",0,w],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let o=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],l=e=>({_s:e,status:o[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),n=e=>e?6:5,i=(e,t,r,a,o)=>{clearTimeout(a.current);let n=l(e);t(n),r.current=n,o&&o({current:n})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let m=e=>{var r=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.default.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 g=e.i(95779);let u={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"}},b=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,g.colorPalette.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,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},h=(0,c.makeClassName)("Button"),f=({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:l,transitionStatus:n})=>{let i=l?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),g={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(m,{className:(0,d.tremorTwMerge)(h("icon"),"animate-spin shrink-0",i,g.default,g[n]),style:{transition:"width 150ms"}}):a.default.createElement(o,{className:(0,d.tremorTwMerge)(h("icon"),"shrink-0",t,i)})},p=a.default.forwardRef((e,o)=>{let{icon:m,iconPosition:g=s.HorizontalPositions.Left,size:p=s.Sizes.SM,color:C,variant:k="primary",disabled:x,loading:w=!1,loadingText:v,children:N,tooltip:$,className:j}=e,y=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),E=w||x,T=void 0!==m||w,O=w&&v,M=!(!N&&!O),R=(0,d.tremorTwMerge)(u[p].height,u[p].width),z="light"!==k?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",P=b(k,C),B=("light"!==k?{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"}})[p],{tooltipProps:S,getReferenceProps:I}=(0,r.useTooltip)(300),[L,q]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:m,onStateChange:g}={})=>{let[u,b]=(0,a.useState)(()=>l(d?2:n(c))),h=(0,a.useRef)(u),f=(0,a.useRef)(0),[p,C]="object"==typeof s?[s.enter,s.exit]:[s,s],k=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return n(t)}})(h.current._s,m);e&&i(e,b,h,f,g)},[g,m]);return[u,(0,a.useCallback)(a=>{let l=e=>{switch(i(e,b,h,f,g),e){case 1:p>=0&&(f.current=((...e)=>setTimeout(...e))(k,p));break;case 4:C>=0&&(f.current=((...e)=>setTimeout(...e))(k,C));break;case 0:case 3:f.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},s=h.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||l(e?+!r:2):s&&l(t?o?3:4:n(m))},[k,g,e,t,r,o,p,C,m]),k]})({timeout:50});return(0,a.useEffect)(()=>{q(w)},[w]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([o,S.refs.setReference]),className:(0,d.tremorTwMerge)(h("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",z,B.paddingX,B.paddingY,B.fontSize,P.textColor,P.bgColor,P.borderColor,P.hoverBorderColor,E?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(b(k,C).hoverTextColor,b(k,C).hoverBgColor,b(k,C).hoverBorderColor),j),disabled:E},I,y),a.default.createElement(r.default,Object.assign({text:$},S)),T&&g!==s.HorizontalPositions.Right?a.default.createElement(f,{loading:w,iconSize:R,iconPosition:g,Icon:m,transitionStatus:L.status,needMargin:M}):null,O||N?a.default.createElement("span",{className:(0,d.tremorTwMerge)(h("text"),"text-tremor-default whitespace-nowrap")},O?v:N):null,T&&g===s.HorizontalPositions.Right?a.default.createElement(f,{loading:w,iconSize:R,iconPosition:g,Icon:m,transitionStatus:L.status,needMargin:M}):null)});p.displayName="Button",e.s(["Button",()=>p],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("Table"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(o("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),n))});l.displayName="Table",e.s(["Table",()=>l],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableBody"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),n))});l.displayName="TableBody",e.s(["TableBody",()=>l],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),n))});l.displayName="TableCell",e.s(["TableCell",()=>l],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHead"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),n))});l.displayName="TableHead",e.s(["TableHead",()=>l],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHeaderCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},s),n))});l.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>l],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableRow"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("row"),i)},s),n))});l.displayName="TableRow",e.s(["TableRow",()=>l],496020)},68155,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,r],68155)},871943,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},207670,e=>{"use strict";function t(){for(var e,t,r=0,a="",o=arguments.length;rt,"default",0,t])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1e1da84ff36bc348.js b/litellm/proxy/_experimental/out/_next/static/chunks/1e1da84ff36bc348.js new file mode 100644 index 0000000000..2bde570a40 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1e1da84ff36bc348.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),s=e.i(480731),l=e.i(444755),o=e.i(673706),n=e.i(95779);let i={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},c={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:""}},m=(0,o.makeClassName)("Icon"),u=r.default.forwardRef((e,u)=>{let{icon:g,variant:h="simple",tooltip:p,size:f=s.Sizes.SM,color:x,className:b}=e,C=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),v=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,o.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,o.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,o.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,o.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,o.getColorClassNames)(t,n.colorPalette.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,o.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.tremorTwMerge)((0,o.getColorClassNames)(t,n.colorPalette.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,o.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,o.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,o.getColorClassNames)(t,n.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.tremorTwMerge)((0,o.getColorClassNames)(t,n.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,x),{tooltipProps:y,getReferenceProps:w}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,y.refs.setReference]),className:(0,l.tremorTwMerge)(m("root"),"inline-flex shrink-0 items-center justify-center",v.bgColor,v.textColor,v.borderColor,v.ringColor,c[h].rounded,c[h].border,c[h].shadow,c[h].ring,i[f].paddingX,i[f].paddingY,b)},w,C),r.default.createElement(a.default,Object.assign({text:p},y)),r.default.createElement(g,{className:(0,l.tremorTwMerge)(m("icon"),"shrink-0",d[f].height,d[f].width)}))});u.displayName="Icon",e.s(["default",()=>u],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},207670,e=>{"use strict";function t(){for(var e,t,r=0,a="",s=arguments.length;rt,"default",0,t])},551332,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});e.s(["ClipboardCopyIcon",0,r],551332)},37091,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),s=e.i(673706),l=e.i(271645);let o=l.default.forwardRef((e,o)=>{let{color:n,children:i,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return l.default.createElement("p",Object.assign({ref:o,className:(0,a.tremorTwMerge)(n?(0,s.getColorClassNames)(n,r.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",d)},c),i)});o.displayName="Subtitle",e.s(["Subtitle",()=>o],37091)},888288,e=>{"use strict";var t=e.i(271645);let r=(e,r)=>{let a=void 0!==r,[s,l]=(0,t.useState)(e);return[a?r:s,e=>{a||l(e)}]};e.s(["default",()=>r])},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode: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}};e.s(["fetchAvailableModels",0,r])},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),a=e.i(673706),s=e.i(271645);let l=s.default.forwardRef((e,l)=>{let{color:o,className:n,children:i}=e;return s.default.createElement("p",{ref:l,className:(0,r.tremorTwMerge)("text-tremor-default",o?(0,a.getColorClassNames)(o,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),n)},i)});l.displayName="Text",e.s(["default",()=>l],936325),e.s(["Text",()=>l],599724)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let s=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],l=e=>({_s:e,status:s[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),o=e=>e?6:5,n=(e,t,r,a,s)=>{clearTimeout(a.current);let o=l(e);t(o),r.current=o,s&&s({current:o})};var i=e.i(480731),d=e.i(444755),c=e.i(673706);let m=e=>{var r=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.default.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 u=e.i(95779);let g={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"}},h=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,u.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,u.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,u.colorPalette.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,c.getColorClassNames)(t,u.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,c.makeClassName)("Button"),f=({loading:e,iconSize:t,iconPosition:r,Icon:s,needMargin:l,transitionStatus:o})=>{let n=l?r===i.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),u={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(m,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",n,u.default,u[o]),style:{transition:"width 150ms"}}):a.default.createElement(s,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,n)})},x=a.default.forwardRef((e,s)=>{let{icon:m,iconPosition:u=i.HorizontalPositions.Left,size:x=i.Sizes.SM,color:b,variant:C="primary",disabled:v,loading:y=!1,loadingText:w,children:N,tooltip:_,className:k}=e,j=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),S=y||v,T=void 0!==m||y,E=y&&w,M=!(!N&&!E),R=(0,d.tremorTwMerge)(g[x].height,g[x].width),P="light"!==C?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",L=h(C,b),A=("light"!==C?{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"}})[x],{tooltipProps:I,getReferenceProps:O}=(0,r.useTooltip)(300),[B,D]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:s,timeout:i,initialEntered:d,mountOnEnter:c,unmountOnExit:m,onStateChange:u}={})=>{let[g,h]=(0,a.useState)(()=>l(d?2:o(c))),p=(0,a.useRef)(g),f=(0,a.useRef)(0),[x,b]="object"==typeof i?[i.enter,i.exit]:[i,i],C=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return o(t)}})(p.current._s,m);e&&n(e,h,p,f,u)},[u,m]);return[g,(0,a.useCallback)(a=>{let l=e=>{switch(n(e,h,p,f,u),e){case 1:x>=0&&(f.current=((...e)=>setTimeout(...e))(C,x));break;case 4:b>=0&&(f.current=((...e)=>setTimeout(...e))(C,b));break;case 0:case 3:f.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},i=p.current.isEnter;"boolean"!=typeof a&&(a=!i),a?i||l(e?+!r:2):i&&l(t?s?3:4:o(m))},[C,u,e,t,r,s,x,b,m]),C]})({timeout:50});return(0,a.useEffect)(()=>{D(y)},[y]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([s,I.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",P,A.paddingX,A.paddingY,A.fontSize,L.textColor,L.bgColor,L.borderColor,L.hoverBorderColor,S?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(h(C,b).hoverTextColor,h(C,b).hoverBgColor,h(C,b).hoverBorderColor),k),disabled:S},O,j),a.default.createElement(r.default,Object.assign({text:_},I)),T&&u!==i.HorizontalPositions.Right?a.default.createElement(f,{loading:y,iconSize:R,iconPosition:u,Icon:m,transitionStatus:B.status,needMargin:M}):null,E||N?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},E?w:N):null,T&&u===i.HorizontalPositions.Right?a.default.createElement(f,{loading:y,iconSize:R,iconPosition:u,Icon:m,transitionStatus:B.status,needMargin:M}):null)});x.displayName="Button",e.s(["Button",()=>x],994388)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),s=e.i(95779),l=e.i(444755),o=e.i(673706);let n=(0,o.makeClassName)("Card"),i=r.default.forwardRef((e,i)=>{let{decoration:d="",decorationColor:c,children:m,className:u}=e,g=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:i,className:(0,l.tremorTwMerge)(n("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",c?(0,o.getColorClassNames)(c,s.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),u)},g),m)});i.displayName="Card",e.s(["Card",()=>i],304967)},350967,46757,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),s=e.i(271645);let l={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},o={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},n={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},i={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},d={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},c={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},m={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},u={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"};e.s(["colSpan",()=>d,"colSpanLg",()=>u,"colSpanMd",()=>m,"colSpanSm",()=>c,"gridCols",()=>l,"gridColsLg",()=>i,"gridColsMd",()=>n,"gridColsSm",()=>o],46757);let g=(0,a.makeClassName)("Grid"),h=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",p=s.default.forwardRef((e,a)=>{let{numItems:d=1,numItemsSm:c,numItemsMd:m,numItemsLg:u,children:p,className:f}=e,x=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),b=h(d,l),C=h(c,o),v=h(m,n),y=h(u,i),w=(0,r.tremorTwMerge)(b,C,v,y);return s.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(g("root"),"grid",w,f)},x),p)});p.displayName="Grid",e.s(["Grid",()=>p],350967)},309426,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),s=e.i(271645),l=e.i(46757);let o=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,i,d,c,{numColSpan:m=1,numColSpanSm:u,numColSpanMd:g,numColSpanLg:h,children:p,className:f}=e,x=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),b=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(o("root"),(n=b(m,l.colSpan),i=b(u,l.colSpanSm),d=b(g,l.colSpanMd),c=b(h,l.colSpanLg),(0,r.tremorTwMerge)(n,i,d,c)),f)},x),p)});n.displayName="Col",e.s(["Col",()=>n],309426)},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let s=t(e);return isNaN(a)?r(e,NaN):(a&&s.setDate(s.getDate()+a),s)}function s(e,a){let s=t(e);if(isNaN(a))return r(e,NaN);if(!a)return s;let l=s.getDate(),o=r(e,s.getTime());return(o.setMonth(s.getMonth()+a+1,0),l>=o.getDate())?o:(s.setFullYear(o.getFullYear(),o.getMonth(),l),s)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>s],497245)},757440,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let a=e=>{var a=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},a),r.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>a])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),a=e.i(271645);let s=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.default.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))};e.s(["default",()=>s],446428);var l=e.i(746725),o=e.i(914189),n=e.i(553521),i=e.i(835696),d=e.i(941444),c=e.i(178677),m=e.i(294316),u=e.i(83733),g=e.i(233137),h=e.i(732607),p=e.i(397701),f=e.i(700020);function x(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:N)!==a.Fragment||1===a.default.Children.count(e.children)}let b=(0,a.createContext)(null);b.displayName="TransitionContext";var C=((t=C||{}).Visible="visible",t.Hidden="hidden",t);let v=(0,a.createContext)(null);function y(e){return"children"in e?y(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function w(e,t){let r=(0,d.useLatestValue)(e),s=(0,a.useRef)([]),i=(0,n.useIsMounted)(),c=(0,l.useDisposables)(),m=(0,o.useEvent)((e,t=f.RenderStrategy.Hidden)=>{let a=s.current.findIndex(({el:t})=>t===e);-1!==a&&((0,p.match)(t,{[f.RenderStrategy.Unmount](){s.current.splice(a,1)},[f.RenderStrategy.Hidden](){s.current[a].state="hidden"}}),c.microTask(()=>{var e;!y(s)&&i.current&&(null==(e=r.current)||e.call(r))}))}),u=(0,o.useEvent)(e=>{let t=s.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):s.current.push({el:e,state:"visible"}),()=>m(e,f.RenderStrategy.Unmount)}),g=(0,a.useRef)([]),h=(0,a.useRef)(Promise.resolve()),x=(0,a.useRef)({enter:[],leave:[]}),b=(0,o.useEvent)((e,r,a)=>{g.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter(([t])=>t!==e)),null==t||t.chains.current[r].push([e,new Promise(e=>{g.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(x.current[r].map(([e,t])=>t)).then(()=>e())})]),"enter"===r?h.current=h.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(r)):a(r)}),C=(0,o.useEvent)((e,t,r)=>{Promise.all(x.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=g.current.shift())||e()}).then(()=>r(t))});return(0,a.useMemo)(()=>({children:s,register:u,unregister:m,onStart:b,onStop:C,wait:h,chains:x}),[u,m,s,b,C,x,h])}v.displayName="NestingContext";let N=a.Fragment,_=f.RenderFeatures.RenderStrategy,k=(0,f.forwardRefWithAs)(function(e,t){let{show:r,appear:s=!1,unmount:l=!0,...n}=e,d=(0,a.useRef)(null),u=x(e),h=(0,m.useSyncRefs)(...u?[d,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let p=(0,g.useOpenClosed)();if(void 0===r&&null!==p&&(r=(p&g.State.Open)===g.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[C,N]=(0,a.useState)(r?"visible":"hidden"),k=w(()=>{r||N("hidden")}),[S,T]=(0,a.useState)(!0),E=(0,a.useRef)([r]);(0,i.useIsoMorphicEffect)(()=>{!1!==S&&E.current[E.current.length-1]!==r&&(E.current.push(r),T(!1))},[E,r]);let M=(0,a.useMemo)(()=>({show:r,appear:s,initial:S}),[r,s,S]);(0,i.useIsoMorphicEffect)(()=>{r?N("visible"):y(k)||null===d.current||N("hidden")},[r,k]);let R={unmount:l},P=(0,o.useEvent)(()=>{var t;S&&T(!1),null==(t=e.beforeEnter)||t.call(e)}),L=(0,o.useEvent)(()=>{var t;S&&T(!1),null==(t=e.beforeLeave)||t.call(e)}),A=(0,f.useRender)();return a.default.createElement(v.Provider,{value:k},a.default.createElement(b.Provider,{value:M},A({ourProps:{...R,as:a.Fragment,children:a.default.createElement(j,{ref:h,...R,...n,beforeEnter:P,beforeLeave:L})},theirProps:{},defaultTag:a.Fragment,features:_,visible:"visible"===C,name:"Transition"})))}),j=(0,f.forwardRefWithAs)(function(e,t){var r,s;let{transition:l=!0,beforeEnter:n,afterEnter:d,beforeLeave:C,afterLeave:k,enter:j,enterFrom:S,enterTo:T,entered:E,leave:M,leaveFrom:R,leaveTo:P,...L}=e,[A,I]=(0,a.useState)(null),O=(0,a.useRef)(null),B=x(e),D=(0,m.useSyncRefs)(...B?[O,t,I]:null===t?[]:[t]),H=null==(r=L.unmount)||r?f.RenderStrategy.Unmount:f.RenderStrategy.Hidden,{show:F,appear:z,initial:V}=function(){let e=(0,a.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[Y,X]=(0,a.useState)(F?"visible":"hidden"),G=function(){let e=(0,a.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:J,unregister:q}=G;(0,i.useIsoMorphicEffect)(()=>J(O),[J,O]),(0,i.useIsoMorphicEffect)(()=>{if(H===f.RenderStrategy.Hidden&&O.current)return F&&"visible"!==Y?void X("visible"):(0,p.match)(Y,{hidden:()=>q(O),visible:()=>J(O)})},[Y,O,J,q,F,H]);let U=(0,c.useServerHandoffComplete)();(0,i.useIsoMorphicEffect)(()=>{if(B&&U&&"visible"===Y&&null===O.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[O,Y,U,B]);let W=V&&!z,$=z&&F&&V,K=(0,a.useRef)(!1),Z=w(()=>{K.current||(X("hidden"),q(O))},G),Q=(0,o.useEvent)(e=>{K.current=!0,Z.onStart(O,e?"enter":"leave",e=>{"enter"===e?null==n||n():"leave"===e&&(null==C||C())})}),ee=(0,o.useEvent)(e=>{let t=e?"enter":"leave";K.current=!1,Z.onStop(O,t,e=>{"enter"===e?null==d||d():"leave"===e&&(null==k||k())}),"leave"!==t||y(Z)||(X("hidden"),q(O))});(0,a.useEffect)(()=>{B&&l||(Q(F),ee(F))},[F,B,l]);let et=!(!l||!B||!U||W),[,er]=(0,u.useTransition)(et,A,F,{start:Q,end:ee}),ea=(0,f.compact)({ref:D,className:(null==(s=(0,h.classNames)(L.className,$&&j,$&&S,er.enter&&j,er.enter&&er.closed&&S,er.enter&&!er.closed&&T,er.leave&&M,er.leave&&!er.closed&&R,er.leave&&er.closed&&P,!er.transition&&F&&E))?void 0:s.trim())||void 0,...(0,u.transitionDataAttributes)(er)}),es=0;"visible"===Y&&(es|=g.State.Open),"hidden"===Y&&(es|=g.State.Closed),er.enter&&(es|=g.State.Opening),er.leave&&(es|=g.State.Closing);let el=(0,f.useRender)();return a.default.createElement(v.Provider,{value:Z},a.default.createElement(g.OpenClosedProvider,{value:es},el({ourProps:ea,theirProps:L,defaultTag:N,features:_,visible:"visible"===Y,name:"Transition.Child"})))}),S=(0,f.forwardRefWithAs)(function(e,t){let r=null!==(0,a.useContext)(b),s=null!==(0,g.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!r&&s?a.default.createElement(k,{ref:t,...e}):a.default.createElement(j,{ref:t,...e}))}),T=Object.assign(k,{Child:S,Root:k});e.s(["Transition",()=>T],854056)},206929,e=>{"use strict";var t=e.i(290571),r=e.i(757440),a=e.i(271645),s=e.i(446428),l=e.i(444755),o=e.i(673706),n=e.i(103471),i=e.i(495470),d=e.i(854056),c=e.i(888288);let m=(0,o.makeClassName)("Select"),u=a.default.forwardRef((e,o)=>{let{defaultValue:u="",value:g,onValueChange:h,placeholder:p="Select...",disabled:f=!1,icon:x,enableClear:b=!1,required:C,children:v,name:y,error:w=!1,errorMessage:N,className:_,id:k}=e,j=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),S=(0,a.useRef)(null),T=a.Children.toArray(v),[E,M]=(0,c.default)(u,g),R=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(v).filter(a.isValidElement);return(0,n.constructValueToNameMapping)(e)},[v]);return a.default.createElement("div",{className:(0,l.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",_)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:C,className:(0,l.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:E,onChange:e=>{e.preventDefault()},name:y,disabled:f,id:k,onFocus:()=>{let e=S.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},p),T.map(e=>{let t=e.props.value,r=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},r)})),a.default.createElement(i.Listbox,Object.assign({as:"div",ref:o,defaultValue:E,value:E,onChange:e=>{null==h||h(e),M(e)},disabled:f,id:k},j),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(i.ListboxButton,{ref:S,className:(0,l.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",x?"pl-10":"pl-3",(0,n.getSelectButtonColors)((0,n.hasValue)(e),f,w))},x&&a.default.createElement("span",{className:(0,l.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(x,{className:(0,l.tremorTwMerge)(m("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=R.get(e))?t:p),a.default.createElement("span",{className:(0,l.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(r.default,{className:(0,l.tremorTwMerge)(m("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&E?a.default.createElement("button",{type:"button",className:(0,l.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),M(""),null==h||h("")}},a.default.createElement(s.default,{className:(0,l.tremorTwMerge)(m("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(d.Transition,{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"},a.default.createElement(i.ListboxOptions,{anchor:"bottom start",className:(0,l.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","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")},v)))})),w&&N?a.default.createElement("p",{className:(0,l.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},N):null)});u.displayName="Select",e.s(["Select",()=>u],206929)},559061,e=>{"use strict";var t=e.i(843476),r=e.i(584935),a=e.i(304967),s=e.i(309426),l=e.i(350967),o=e.i(752978),n=e.i(621642),i=e.i(25080),d=e.i(37091),c=e.i(197647),m=e.i(653824),u=e.i(881073),g=e.i(404206),h=e.i(723731),p=e.i(599724),f=e.i(271645),x=e.i(727749),b=e.i(144267),C=e.i(278587),v=e.i(764205),y=e.i(994388),w=e.i(220508),N=e.i(964306),_=e.i(551332);let k=({responseTimeMs:e})=>null==e?null:(0,t.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-500 font-mono",children:[(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 6V12L16 14M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,t.jsxs)("span",{children:[e.toFixed(0),"ms"]})]}),j=e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{}return t},S=({label:e,value:r})=>{let[a,s]=f.default.useState(!1),[l,o]=f.default.useState(!1),n=r?.toString()||"N/A",i=n.length>50?n.substring(0,50)+"...":n;return(0,t.jsx)("tr",{className:"hover:bg-gray-50",children:(0,t.jsx)("td",{className:"px-4 py-2 align-top",colSpan:2,children:(0,t.jsxs)("div",{className:"flex items-center justify-between group",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[(0,t.jsx)("button",{onClick:()=>s(!a),className:"text-gray-400 hover:text-gray-600 mr-2",children:a?"▼":"▶"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm text-gray-600",children:e}),(0,t.jsx)("pre",{className:"mt-1 text-sm font-mono text-gray-800 whitespace-pre-wrap",children:a?n:i})]})]}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(n),o(!0),setTimeout(()=>o(!1),2e3)},className:"opacity-0 group-hover:opacity-100 text-gray-400 hover:text-gray-600",children:(0,t.jsx)(_.ClipboardCopyIcon,{className:"h-4 w-4"})})]})})})},T=({response:e})=>{let r=null,a={},s={};try{if(e?.error)try{let t="string"==typeof e.error.message?JSON.parse(e.error.message):e.error.message;r={message:t?.message||"Unknown error",traceback:t?.traceback||"No traceback available",litellm_params:t?.litellm_cache_params||{},health_check_cache_params:t?.health_check_cache_params||{}},a=j(r.litellm_params)||{},s=j(r.health_check_cache_params)||{}}catch(t){console.warn("Error parsing error details:",t),r={message:String(e.error.message||"Unknown error"),traceback:"Error parsing details",litellm_params:{},health_check_cache_params:{}}}else a=j(e?.litellm_cache_params)||{},s=j(e?.health_check_cache_params)||{}}catch(e){console.warn("Error in response parsing:",e),a={},s={}}let l={redis_host:s?.redis_client?.connection_pool?.connection_kwargs?.host||s?.redis_async_client?.connection_pool?.connection_kwargs?.host||s?.connection_kwargs?.host||s?.host||"N/A",redis_port:s?.redis_client?.connection_pool?.connection_kwargs?.port||s?.redis_async_client?.connection_pool?.connection_kwargs?.port||s?.connection_kwargs?.port||s?.port||"N/A",redis_version:s?.redis_version||"N/A",startup_nodes:(()=>{try{if(s?.redis_kwargs?.startup_nodes)return JSON.stringify(s.redis_kwargs.startup_nodes);let e=s?.redis_client?.connection_pool?.connection_kwargs?.host||s?.redis_async_client?.connection_pool?.connection_kwargs?.host,t=s?.redis_client?.connection_pool?.connection_kwargs?.port||s?.redis_async_client?.connection_pool?.connection_kwargs?.port;return e&&t?JSON.stringify([{host:e,port:t}]):"N/A"}catch(e){return"N/A"}})(),namespace:s?.namespace||"N/A"};return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,t.jsxs)(m.TabGroup,{children:[(0,t.jsxs)(u.TabList,{className:"border-b border-gray-200 px-4",children:[(0,t.jsx)(c.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Summary"}),(0,t.jsx)(c.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Raw Response"})]}),(0,t.jsxs)(h.TabPanels,{children:[(0,t.jsx)(g.TabPanel,{className:"p-4",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-6",children:[e?.status==="healthy"?(0,t.jsx)(w.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}):(0,t.jsx)(N.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsxs)(p.Text,{className:`text-sm font-medium ${e?.status==="healthy"?"text-green-500":"text-red-500"}`,children:["Cache Status: ",e?.status||"unhealthy"]})]}),(0,t.jsx)("table",{className:"w-full border-collapse",children:(0,t.jsxs)("tbody",{children:[r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold text-red-600",children:"Error Details"})}),(0,t.jsx)(S,{label:"Error Message",value:r.message}),(0,t.jsx)(S,{label:"Traceback",value:r.traceback})]}),(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Cache Details"})}),(0,t.jsx)(S,{label:"Cache Configuration",value:String(a?.type)}),(0,t.jsx)(S,{label:"Ping Response",value:String(e.ping_response)}),(0,t.jsx)(S,{label:"Set Cache Response",value:e.set_cache_response||"N/A"}),(0,t.jsx)(S,{label:"litellm_settings.cache_params",value:JSON.stringify(a,null,2)}),a?.type==="redis"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Redis Details"})}),(0,t.jsx)(S,{label:"Redis Host",value:l.redis_host||"N/A"}),(0,t.jsx)(S,{label:"Redis Port",value:l.redis_port||"N/A"}),(0,t.jsx)(S,{label:"Redis Version",value:l.redis_version||"N/A"}),(0,t.jsx)(S,{label:"Startup Nodes",value:l.startup_nodes||"N/A"}),(0,t.jsx)(S,{label:"Namespace",value:l.namespace||"N/A"})]})]})})]})}),(0,t.jsx)(g.TabPanel,{className:"p-4",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded-md p-4 font-mono text-sm",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words overflow-auto max-h-[500px]",children:(()=>{try{let t={...e,litellm_cache_params:a,health_check_cache_params:s},r=JSON.parse(JSON.stringify(t,(e,t)=>{if("string"==typeof t)try{return JSON.parse(t)}catch{}return t}));return JSON.stringify(r,null,2)}catch(e){return"Error formatting JSON: "+e.message}})()})})})]})]})})},E=({accessToken:e,healthCheckResponse:r,runCachingHealthCheck:a,responseTimeMs:s})=>{let[l,o]=f.default.useState(null),[n,i]=f.default.useState(!1),d=async()=>{i(!0);let e=performance.now();await a(),o(performance.now()-e),i(!1)};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(y.Button,{onClick:d,disabled:n,className:"bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 text-white text-sm px-4 py-2 rounded-md",children:n?"Running Health Check...":"Run Health Check"}),(0,t.jsx)(k,{responseTimeMs:l})]}),r&&(0,t.jsx)(T,{response:r})]})};var M=e.i(677667),R=e.i(898667),P=e.i(130643),L=e.i(206929),A=e.i(35983);let I=({redisType:e,redisTypeDescriptions:r,onTypeChange:a})=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Redis Type"}),(0,t.jsxs)(L.Select,{value:e,onValueChange:a,children:[(0,t.jsx)(A.SelectItem,{value:"node",children:"Node (Single Instance)"}),(0,t.jsx)(A.SelectItem,{value:"cluster",children:"Cluster"}),(0,t.jsx)(A.SelectItem,{value:"sentinel",children:"Sentinel"}),(0,t.jsx)(A.SelectItem,{value:"semantic",children:"Semantic"})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:r[e]||"Select the type of Redis deployment you're using"})]});var O=e.i(135214),B=e.i(620250),D=e.i(779241),H=e.i(199133),F=e.i(689020),z=e.i(435451);let V=({field:e,currentValue:r})=>{let[a,s]=(0,f.useState)([]),[l,o]=(0,f.useState)(r||""),{accessToken:n}=(0,O.default)();if((0,f.useEffect)(()=>{n&&(async()=>{try{let e=await (0,F.fetchAvailableModels)(n);console.log("Fetched models for selector:",e),e.length>0&&s(e)}catch(e){console.error("Error fetching model info:",e)}})()},[n]),"Boolean"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",name:e.field_name,defaultChecked:!0===r||"true"===r,className:"h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:e.field_description})]})]});if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(z.default,{name:e.field_name,type:"number",defaultValue:r,placeholder:e.field_description}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("List"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)("textarea",{name:e.field_name,defaultValue:"object"==typeof r?JSON.stringify(r,null,2):r,placeholder:e.field_description,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500",rows:4}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("Models_Select"===e.field_type){let r=a.filter(e=>"embedding"===e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(H.Select,{value:l,onChange:o,showSearch:!0,placeholder:"Search and select a model...",options:r,style:{width:"100%"},className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("input",{type:"hidden",name:e.field_name,value:l}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})}if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(B.NumberInput,{name:e.field_name,defaultValue:r,placeholder:e.field_description,step:"Float"===e.field_type?.01:1}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});let i="password"===e.field_name||e.field_name.includes("password")?"password":"text";return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(D.TextInput,{name:e.field_name,type:i,defaultValue:r,placeholder:e.field_description}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})},Y=(e,t)=>e.find(e=>e.field_name===t),X=(e,t)=>{let r={type:"redis"};return e.forEach(e=>{if("redis_type"===e.field_name||null!==e.redis_type&&void 0!==e.redis_type&&e.redis_type!==t)return;let a=e.field_name,s=null;if("Boolean"===e.field_type){let e=document.querySelector(`input[name="${a}"]`);e?.checked!==void 0&&(s=e.checked)}else if("List"===e.field_type){let e=document.querySelector(`textarea[name="${a}"]`);if(e?.value)try{s=JSON.parse(e.value)}catch(e){console.error(`Invalid JSON for ${a}:`,e)}}else{let t=document.querySelector(`input[name="${a}"]`);if(t?.value){let r=t.value.trim();if(""!==r)if("Integer"===e.field_type){let e=Number(r);isNaN(e)||(s=e)}else if("Float"===e.field_type){let e=Number(r);isNaN(e)||(s=e)}else s=r}}null!=s&&(r[a]=s)}),r},G=({accessToken:e,userRole:r,userID:a})=>{let s,l,o,n,i,[d,c]=(0,f.useState)({}),[m,u]=(0,f.useState)([]),[g,h]=(0,f.useState)({}),[p,b]=(0,f.useState)("node"),[C,w]=(0,f.useState)(!1),[N,_]=(0,f.useState)(!1),k=(0,f.useCallback)(async()=>{try{let t=await (0,v.getCacheSettingsCall)(e);console.log("cache settings from API",t),t.fields&&u(t.fields),t.current_values&&(c(t.current_values),t.current_values.redis_type&&b(t.current_values.redis_type)),t.redis_type_descriptions&&h(t.redis_type_descriptions)}catch(e){console.error("Failed to load cache settings:",e),x.default.fromBackend("Failed to load cache settings")}},[e]);(0,f.useEffect)(()=>{e&&k()},[e,k]);let j=async()=>{if(e){w(!0);try{let t=X(m,p),r=await (0,v.testCacheConnectionCall)(e,t);"success"===r.status?x.default.success("Cache connection test successful!"):x.default.fromBackend(`Connection test failed: ${r.message||r.error}`)}catch(e){console.error("Test connection error:",e),x.default.fromBackend(`Connection test failed: ${e.message||"Unknown error"}`)}finally{w(!1)}}},S=async()=>{if(e){_(!0);try{let t=X(m,p);"semantic"===p&&(t.type="redis-semantic"),await (0,v.updateCacheSettingsCall)(e,t),x.default.success("Cache settings updated successfully"),await k()}catch(e){console.error("Failed to save cache settings:",e),x.default.fromBackend("Failed to update cache settings")}finally{_(!1)}}};if(!e)return null;let{basicFields:T,sslFields:E,cacheManagementFields:L,gcpFields:A,clusterFields:O,sentinelFields:B,semanticFields:D}=(s=["host","port","password","username"].map(e=>Y(m,e)).filter(Boolean),l=["ssl","ssl_cert_reqs","ssl_check_hostname"].map(e=>Y(m,e)).filter(Boolean),o=["namespace","ttl","max_connections"].map(e=>Y(m,e)).filter(Boolean),n=["gcp_service_account","gcp_ssl_ca_certs"].map(e=>Y(m,e)).filter(Boolean),i=m.filter(e=>"cluster"===e.redis_type),{basicFields:s,sslFields:l,cacheManagementFields:o,gcpFields:n,clusterFields:i,sentinelFields:m.filter(e=>"sentinel"===e.redis_type),semanticFields:m.filter(e=>"semantic"===e.redis_type)});return(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Cache Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure Redis cache for LiteLLM"})]}),(0,t.jsx)(I,{redisType:p,redisTypeDescriptions:g,onTypeChange:b}),(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Connection Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:T.map(e=>{if(!e)return null;let r=d[e.field_name]??e.field_default??"";return(0,t.jsx)(V,{field:e,currentValue:r},e.field_name)})})]}),"cluster"===p&&O.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Cluster Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6",children:O.map(e=>{let r=d[e.field_name]??e.field_default??"";return(0,t.jsx)(V,{field:e,currentValue:r},e.field_name)})})]}),"sentinel"===p&&B.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Sentinel Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:B.map(e=>{let r=d[e.field_name]??e.field_default??"";return(0,t.jsx)(V,{field:e,currentValue:r},e.field_name)})})]}),"semantic"===p&&D.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Semantic Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:D.map(e=>{let r=d[e.field_name]??e.field_default??"";return(0,t.jsx)(V,{field:e,currentValue:r},e.field_name)})})]}),(0,t.jsxs)(M.Accordion,{className:"mt-4",children:[(0,t.jsx)(R.AccordionHeader,{children:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Advanced Settings"})}),(0,t.jsx)(P.AccordionBody,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[E.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"SSL Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:E.map(e=>{if(!e)return null;let r=d[e.field_name]??e.field_default??"";return(0,t.jsx)(V,{field:e,currentValue:r},e.field_name)})})]}),L.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"Cache Management"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:L.map(e=>{if(!e)return null;let r=d[e.field_name]??e.field_default??"";return(0,t.jsx)(V,{field:e,currentValue:r},e.field_name)})})]}),A.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"GCP Authentication"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:A.map(e=>{if(!e)return null;let r=d[e.field_name]??e.field_default??"";return(0,t.jsx)(V,{field:e,currentValue:r},e.field_name)})})]})]})})]})]}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(y.Button,{variant:"secondary",size:"sm",onClick:j,disabled:C,className:"text-sm",children:C?"Testing...":"Test Connection"}),(0,t.jsx)(y.Button,{size:"sm",onClick:S,disabled:N,className:"text-sm font-medium",children:N?"Saving...":"Save Changes"})]})]})},J=e=>{if(e)return e.toISOString().split("T")[0]};function q(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}e.s(["default",0,({accessToken:e,token:y,userRole:w,userID:N,premiumUser:_})=>{let[k,j]=(0,f.useState)([]),[S,T]=(0,f.useState)([]),[M,R]=(0,f.useState)([]),[P,L]=(0,f.useState)([]),[A,I]=(0,f.useState)("0"),[O,B]=(0,f.useState)("0"),[D,H]=(0,f.useState)("0"),[F,z]=(0,f.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[V,Y]=(0,f.useState)(""),[X,U]=(0,f.useState)("");(0,f.useEffect)(()=>{e&&F&&((async()=>{L(await (0,v.adminGlobalCacheActivity)(e,J(F.from),J(F.to)))})(),Y(new Date().toLocaleString()))},[e]);let W=Array.from(new Set(P.map(e=>e?.api_key??""))),$=Array.from(new Set(P.map(e=>e?.model??"")));Array.from(new Set(P.map(e=>e?.call_type??"")));let K=async(t,r)=>{t&&r&&e&&L(await (0,v.adminGlobalCacheActivity)(e,J(t),J(r)))};(0,f.useEffect)(()=>{console.log("DATA IN CACHE DASHBOARD",P);let e=P;S.length>0&&(e=e.filter(e=>S.includes(e.api_key))),M.length>0&&(e=e.filter(e=>M.includes(e.model))),console.log("before processed data in cache dashboard",e);let t=0,r=0,a=0,s=e.reduce((e,s)=>{console.log("Processing item:",s),s.call_type||(console.log("Item has no call_type:",s),s.call_type="Unknown"),t+=(s.total_rows||0)-(s.cache_hit_true_rows||0),r+=s.cache_hit_true_rows||0,a+=s.cached_completion_tokens||0;let l=e.find(e=>e.name===s.call_type);return l?(l["LLM API requests"]+=(s.total_rows||0)-(s.cache_hit_true_rows||0),l["Cache hit"]+=s.cache_hit_true_rows||0,l["Cached Completion Tokens"]+=s.cached_completion_tokens||0,l["Generated Completion Tokens"]+=s.generated_completion_tokens||0):e.push({name:s.call_type,"LLM API requests":(s.total_rows||0)-(s.cache_hit_true_rows||0),"Cache hit":s.cache_hit_true_rows||0,"Cached Completion Tokens":s.cached_completion_tokens||0,"Generated Completion Tokens":s.generated_completion_tokens||0}),e},[]);I(q(r)),B(q(a));let l=r+t;l>0?H((r/l*100).toFixed(2)):H("0"),j(s),console.log("PROCESSED DATA IN CACHE DASHBOARD",s)},[S,M,F,P]);let Z=async()=>{try{x.default.info("Running cache health check..."),U("");let t=await (0,v.cachingHealthCheckCall)(null!==e?e:"");console.log("CACHING HEALTH CHECK RESPONSE",t),U(t)}catch(t){let e;if(console.error("Error running health check:",t),t&&t.message)try{let r=JSON.parse(t.message);r.error&&(r=r.error),e=r}catch(r){e={message:t.message}}else e={message:"Unknown error occurred"};U({error:e})}};return(0,t.jsxs)(m.TabGroup,{className:"gap-2 p-8 h-full w-full mt-2 mb-8",children:[(0,t.jsxs)(u.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(c.Tab,{children:"Cache Analytics"}),(0,t.jsx)(c.Tab,{children:"Cache Health"}),(0,t.jsx)(c.Tab,{children:"Cache Settings"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[V&&(0,t.jsxs)(p.Text,{children:["Last Refreshed: ",V]}),(0,t.jsx)(o.Icon,{icon:C.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:()=>{Y(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(h.TabPanels,{children:[(0,t.jsx)(g.TabPanel,{children:(0,t.jsxs)(a.Card,{children:[(0,t.jsxs)(l.Grid,{numItems:3,className:"gap-4 mt-4",children:[(0,t.jsx)(s.Col,{children:(0,t.jsx)(n.MultiSelect,{placeholder:"Select Virtual Keys",value:S,onValueChange:T,children:W.map(e=>(0,t.jsx)(i.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(s.Col,{children:(0,t.jsx)(n.MultiSelect,{placeholder:"Select Models",value:M,onValueChange:R,children:$.map(e=>(0,t.jsx)(i.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(s.Col,{children:(0,t.jsx)(b.default,{value:F,onValueChange:e=>{z(e),K(e.from,e.to)}})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mt-4",children:[(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hit Ratio"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsxs)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:[D,"%"]})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hits"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:A})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cached Tokens"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:O})})]})]}),(0,t.jsx)(d.Subtitle,{className:"mt-4",children:"Cache Hits vs API Requests"}),(0,t.jsx)(r.BarChart,{title:"Cache Hits vs API Requests",data:k,stack:!0,index:"name",valueFormatter:q,categories:["LLM API requests","Cache hit"],colors:["sky","teal"],yAxisWidth:48}),(0,t.jsx)(d.Subtitle,{className:"mt-4",children:"Cached Completion Tokens vs Generated Completion Tokens"}),(0,t.jsx)(r.BarChart,{className:"mt-6",data:k,stack:!0,index:"name",valueFormatter:q,categories:["Generated Completion Tokens","Cached Completion Tokens"],colors:["sky","teal"],yAxisWidth:48})]})}),(0,t.jsx)(g.TabPanel,{children:(0,t.jsx)(E,{accessToken:e,healthCheckResponse:X,runCachingHealthCheck:Z})}),(0,t.jsx)(g.TabPanel,{children:(0,t.jsx)(G,{accessToken:e,userRole:w,userID:N})})]})]})}],559061)},891881,e=>{"use strict";var t=e.i(843476),r=e.i(559061),a=e.i(135214);e.s(["default",0,()=>{let{token:e,accessToken:s,userRole:l,userId:o,premiumUser:n}=(0,a.default)();return(0,t.jsx)(r.default,{accessToken:s,token:e,userRole:l,userID:o,premiumUser:n})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1efbd5b35545b10a.js b/litellm/proxy/_experimental/out/_next/static/chunks/1efbd5b35545b10a.js new file mode 100644 index 0000000000..be2365f45b --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1efbd5b35545b10a.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,738014,e=>{"use strict";var l=e.i(135214),a=e.i(764205),t=e.i(266027);let s=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:i}=(0,l.default)();return(0,t.useQuery)({queryKey:s.detail(i),queryFn:async()=>await (0,a.userGetInfoV2)(e),enabled:!!(e&&i)})}])},625901,e=>{"use strict";var l=e.i(266027),a=e.i(621482),t=e.i(243652),s=e.i(764205),i=e.i(135214);let r=(0,t.createQueryKeys)("models"),n=(0,t.createQueryKeys)("modelHub"),o=(0,t.createQueryKeys)("allProxyModels");(0,t.createQueryKeys)("selectedTeamModels");let d=(0,t.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:a,userRole:t}=(0,i.default)();return(0,l.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,s.modelAvailableCall)(e,a,t,!0,null,!0,!1,"expand"),enabled:!!(e&&a&&t)})},"useInfiniteModelInfo",0,(e=50,l)=>{let{accessToken:t,userId:r,userRole:n}=(0,i.default)();return(0,a.useInfiniteQuery)({queryKey:d.list({filters:{...r&&{userId:r},...n&&{userRole:n},size:e,...l&&{search:l}}}),queryFn:async({pageParam:a})=>await (0,s.modelInfoCall)(t,r,n,a,e,l),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,i.default)();return(0,l.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,s.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,a=50,t,n,o,d,c)=>{let{accessToken:m,userId:u,userRole:x}=(0,i.default)();return(0,l.useQuery)({queryKey:r.list({filters:{...u&&{userId:u},...x&&{userRole:x},page:e,size:a,...t&&{search:t},...n&&{modelId:n},...o&&{teamId:o},...d&&{sortBy:d},...c&&{sortOrder:c}}}),queryFn:async()=>await (0,s.modelInfoCall)(m,u,x,e,a,t,n,o,d,c),enabled:!!(m&&u&&x)})}])},907308,e=>{"use strict";var l=e.i(843476),a=e.i(271645),t=e.i(212931),s=e.i(808613),i=e.i(464571),r=e.i(199133),n=e.i(592968),o=e.i(213205),d=e.i(374009),c=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:m,onSubmit:u,accessToken:x,title:h="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:p="user",teamId:_})=>{let[j]=s.Form.useForm(),[b,v]=(0,a.useState)([]),[f,y]=(0,a.useState)(!1),[w,C]=(0,a.useState)("user_email"),[T,z]=(0,a.useState)(!1),S=async(e,l)=>{if(!e)return void v([]);y(!0);try{let a=new URLSearchParams;if(a.append(l,e),_&&a.append("team_id",_),null==x)return;let t=(await (0,c.userFilterUICall)(x,a)).map(e=>({label:"user_email"===l?`${e.user_email}`:`${e.user_id}`,value:"user_email"===l?e.user_email:e.user_id,user:e}));v(t)}catch(e){console.error("Error fetching users:",e)}finally{y(!1)}},N=(0,a.useCallback)((0,d.default)((e,l)=>S(e,l),300),[]),F=(e,l)=>{C(l),N(e,l)},M=(e,l)=>{let a=l.user;j.setFieldsValue({user_email:a.user_email,user_id:a.user_id,role:j.getFieldValue("role")})},I=async e=>{z(!0);try{await u(e)}finally{z(!1)}};return(0,l.jsx)(t.Modal,{title:h,open:e,onCancel:()=>{j.resetFields(),v([]),m()},footer:null,width:800,maskClosable:!T,children:(0,l.jsxs)(s.Form,{form:j,onFinish:I,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:p},children:[(0,l.jsx)(s.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,l.jsx)(r.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>F(e,"user_email"),onSelect:(e,l)=>M(e,l),options:"user_email"===w?b:[],loading:f,allowClear:!0,"data-testid":"member-email-search"})}),(0,l.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,l.jsx)(s.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,l.jsx)(r.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>F(e,"user_id"),onSelect:(e,l)=>M(e,l),options:"user_id"===w?b:[],loading:f,allowClear:!0})}),(0,l.jsx)(s.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,l.jsx)(r.Select,{defaultValue:p,children:g.map(e=>(0,l.jsx)(r.Select.Option,{value:e.value,children:(0,l.jsxs)(n.Tooltip,{title:e.description,children:[(0,l.jsx)("span",{className:"font-medium",children:e.label}),(0,l.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,l.jsx)("div",{className:"text-right mt-4",children:(0,l.jsx)(i.Button,{type:"primary",htmlType:"submit",icon:(0,l.jsx)(o.UserAddOutlined,{}),loading:T,children:T?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var l=e.i(843476),a=e.i(625901),t=e.i(109799),s=e.i(785242),i=e.i(738014),r=e.i(199133),n=e.i(981339),o=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},c={label:"No Default Models",value:"no-default-models"},m=[d,c],u={user:({allProxyModels:e,userModels:l,options:a})=>l&&a?.includeUserModels?l:[],team:({allProxyModels:e,selectedOrganization:l,userModels:a})=>l?l.models.includes(d.value)||0===l.models.length?e:e.filter(e=>l.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:x,organizationID:h,options:g,context:p,dataTestId:_,value:j=[],onChange:b,style:v}=e,{includeUserModels:f,showAllTeamModelsOption:y,showAllProxyModelsOverride:w,includeSpecialOptions:C}=g||{},{data:T,isLoading:z}=(0,a.useAllProxyModels)(),{data:S,isLoading:N}=(0,s.useTeam)(x),{data:F,isLoading:M}=(0,t.useOrganization)(h),{data:I,isLoading:O}=(0,i.useCurrentUser)(),k=e=>m.some(l=>l.value===e),A=j.some(k),P=F?.models.includes(d.value)||F?.models.length===0;if(z||N||M||O)return(0,l.jsx)(n.Skeleton.Input,{active:!0,block:!0});let{wildcard:B,regular:D}=(e=>{let l=[],a=[];for(let t of e)t.endsWith("/*")?l.push(t):a.push(t);return{wildcard:l,regular:a}})(((e,l,a)=>{let t=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(l.options?.showAllProxyModelsOverride)return t;let s=u[l.context];return s?s({allProxyModels:t,...a,options:l.options}):[]})(T?.data??[],e,{selectedTeam:S,selectedOrganization:F,userModels:I?.models}));return(0,l.jsx)(r.Select,{"data-testid":_,value:j,onChange:e=>{let l=e.filter(k);b(l.length>0?[l[l.length-1]]:e)},style:v,options:[C?{label:(0,l.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...w||P&&C||"global"===p?[{label:(0,l.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:j.length>0&&j.some(e=>k(e)&&e!==d.value),key:d.value}]:[],{label:(0,l.jsx)("span",{children:"No Default Models"}),value:c.value,disabled:j.length>0&&j.some(e=>k(e)&&e!==c.value),key:c.value}]}:[],...B.length>0?[{label:(0,l.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:B.map(e=>{let a=e.replace("/*",""),t=a.charAt(0).toUpperCase()+a.slice(1);return{label:(0,l.jsx)("span",{children:`All ${t} models`}),value:e,disabled:A}})}]:[],{label:(0,l.jsx)("span",{children:"Models"}),title:"Models",options:D.map(e=>({label:(0,l.jsx)("span",{children:e}),value:e,disabled:A}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,l.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,l.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},276173,e=>{"use strict";var l=e.i(843476),a=e.i(599724),t=e.i(779241),s=e.i(464571),i=e.i(808613),r=e.i(212931),n=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:c,onSubmit:m,initialData:u,mode:x,config:h})=>{let g,[p]=i.Form.useForm(),[_,j]=(0,o.useState)(!1);console.log("Initial Data:",u),(0,o.useEffect)(()=>{if(e)if("edit"===x&&u){let e={...u,role:u.role||h.defaultRole,max_budget_in_team:u.max_budget_in_team||null,tpm_limit:u.tpm_limit||null,rpm_limit:u.rpm_limit||null,allowed_models:u.allowed_models||[]};console.log("Setting form values:",e),p.setFieldsValue(e)}else p.resetFields(),p.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,u,x,p,h.defaultRole,h.roleOptions]);let b=async e=>{try{j(!0);let l=Object.entries(e).reduce((e,[l,a])=>{if("string"==typeof a){let t=a.trim();return""===t&&("max_budget_in_team"===l||"tpm_limit"===l||"rpm_limit"===l)?{...e,[l]:null}:{...e,[l]:t}}return{...e,[l]:a}},{});console.log("Submitting form data:",l),await Promise.resolve(m(l)),p.resetFields()}catch(e){console.error("Form submission error:",e)}finally{j(!1)}};return(0,l.jsx)(r.Modal,{title:h.title||("add"===x?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:c,children:(0,l.jsxs)(i.Form,{form:p,onFinish:b,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.showEmail&&(0,l.jsx)(i.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,l.jsx)(t.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,l.jsx)("div",{className:"text-center mb-4",children:(0,l.jsx)(a.Text,{children:"OR"})}),h.showUserId&&(0,l.jsx)(i.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,l.jsx)(t.TextInput,{placeholder:"user_123"})}),(0,l.jsx)(i.Form.Item,{label:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{children:"Role"}),"edit"===x&&u&&(0,l.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(g=u.role,h.roleOptions.find(e=>e.value===g)?.label||g),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,l.jsx)(n.Select,{children:"edit"===x&&u?[...h.roleOptions.filter(e=>e.value===u.role),...h.roleOptions.filter(e=>e.value!==u.role)].map(e=>(0,l.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,l.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))})}),h.additionalFields?.map(e=>(0,l.jsx)(i.Form.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:(e=>{switch(e.type){case"input":return(0,l.jsx)(t.TextInput,{placeholder:e.placeholder});case"numerical":return(0,l.jsx)(d.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,l.jsx)(n.Select,{children:e.options?.map(e=>(0,l.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))});case"multi-select":return(0,l.jsx)(n.Select,{mode:"multiple",placeholder:e.placeholder||"Select options",options:e.options,allowClear:!0});default:return null}})(e)},e.name)),(0,l.jsxs)("div",{className:"text-right mt-6",children:[(0,l.jsx)(s.Button,{onClick:c,className:"mr-2",disabled:_,children:"Cancel"}),(0,l.jsx)(s.Button,{type:"default",htmlType:"submit",loading:_,children:"add"===x?_?"Adding...":"Add Member":_?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var l=e.i(843476),a=e.i(100486),t=e.i(827252),s=e.i(213205),i=e.i(771674),r=e.i(464571),n=e.i(770914),o=e.i(291542),d=e.i(262218),c=e.i(592968),m=e.i(898586),u=e.i(902555);let{Text:x}=m.Typography;function h({members:e,canEdit:m,onEdit:h,onDelete:g,onAddMember:p,roleColumnTitle:_="Role",roleTooltip:j,extraColumns:b=[],showDeleteForMember:v,emptyText:f}){let y=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,l.jsx)(x,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,l.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,l.jsx)(x,{children:e||"-"})},{title:j?(0,l.jsxs)(n.Space,{direction:"horizontal",children:[_,(0,l.jsx)(c.Tooltip,{title:j,children:(0,l.jsx)(t.InfoCircleOutlined,{})})]}):_,dataIndex:"role",key:"role",render:e=>(0,l.jsxs)(n.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,l.jsx)(a.CrownOutlined,{}):(0,l.jsx)(i.UserOutlined,{}),(0,l.jsx)(x,{style:{textTransform:"capitalize"},children:e||"-"})]})},...b,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,a)=>m?(0,l.jsxs)(n.Space,{children:[(0,l.jsx)(u.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(a)}),(!v||v(a))&&(0,l.jsx)(u.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>g(a)})]}):null}];return(0,l.jsxs)(n.Space,{direction:"vertical",style:{width:"100%"},children:[(0,l.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,l.jsx)(o.Table,{columns:y,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:f?{emptyText:f}:void 0}),p&&m&&(0,l.jsx)(r.Button,{icon:(0,l.jsx)(s.UserAddOutlined,{}),type:"primary",onClick:p,children:"Add Member"})]})}e.s(["default",()=>h])},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,l)=>(e[l.team_id]=l.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,l)=>{let a=l.find(l=>l.team_id===e);return a?a.team_alias:null}])},367240,555436,e=>{"use strict";let l=(0,e.i(475254).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>l],367240);var a=e.i(54943);e.s(["Search",()=>a.default],555436)},846753,e=>{"use strict";let l=(0,e.i(475254).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["default",()=>l])},655913,38419,78334,e=>{"use strict";var l=e.i(843476),a=e.i(115504),t=e.i(311451),s=e.i(374009),i=e.i(271645);e.s(["FilterInput",0,({placeholder:e,value:r,onChange:n,icon:o,className:d})=>{let[c,m]=(0,i.useState)(r);(0,i.useEffect)(()=>{m(r)},[r]);let u=(0,i.useMemo)(()=>(0,s.default)(e=>n(e),300),[n]);(0,i.useEffect)(()=>()=>{u.cancel()},[u]);let x=(0,i.useCallback)(e=>{let l=e.target.value;m(l),u(l)},[u]);return(0,l.jsx)(t.Input,{placeholder:e,value:c,onChange:x,prefix:o?(0,l.jsx)(o,{size:16,className:"text-gray-500"}):void 0,className:(0,a.cx)("w-64",d)})}],655913);var r=e.i(906579),n=e.i(464571);let o=(0,e.i(475254).default)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);e.s(["FiltersButton",0,({onClick:e,active:a,hasActiveFilters:t,label:s="Filters"})=>(0,l.jsx)(r.Badge,{color:"blue",dot:t,children:(0,l.jsx)(n.Button,{type:"default",onClick:e,icon:(0,l.jsx)(o,{size:16}),className:a?"bg-gray-100":"",children:s})})],38419);var d=e.i(367240);e.s(["ResetFiltersButton",0,({onClick:e,label:a="Reset Filters"})=>(0,l.jsx)(n.Button,{type:"default",onClick:e,icon:(0,l.jsx)(d.RotateCcw,{size:16}),children:a})],78334)},284614,e=>{"use strict";var l=e.i(846753);e.s(["User",()=>l.default])},846835,e=>{"use strict";var l=e.i(843476),a=e.i(655913),t=e.i(38419),s=e.i(78334),i=e.i(555436),r=e.i(284614);let n=({filters:e,showFilters:n,onToggleFilters:o,onChange:d,onReset:c})=>{let m=!!(e.org_id||e.org_alias);return(0,l.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,l.jsx)(a.FilterInput,{placeholder:"Search by Organization Name",value:e.org_alias,onChange:e=>d("org_alias",e),icon:i.Search,className:"w-64"}),(0,l.jsx)(t.FiltersButton,{onClick:()=>o(!n),active:n,hasActiveFilters:m}),(0,l.jsx)(s.ResetFiltersButton,{onClick:c})]}),n&&(0,l.jsx)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:(0,l.jsx)(a.FilterInput,{placeholder:"Search by Organization ID",value:e.org_id,onChange:e=>d("org_id",e),icon:r.User,className:"w-64"})})]})};var o=e.i(827252),d=e.i(871943),c=e.i(502547),m=e.i(278587),u=e.i(389083),x=e.i(994388),h=e.i(304967),g=e.i(309426),p=e.i(350967),_=e.i(752978),j=e.i(197647),b=e.i(653824),v=e.i(269200),f=e.i(942232),y=e.i(977572),w=e.i(427612),C=e.i(64848),T=e.i(496020),z=e.i(881073),S=e.i(404206),N=e.i(723731),F=e.i(599724),M=e.i(779241),I=e.i(808613),O=e.i(311451),k=e.i(212931),A=e.i(199133),P=e.i(592968),B=e.i(271645),D=e.i(500330),L=e.i(127952),R=e.i(902555),U=e.i(355619),E=e.i(75921),q=e.i(162386),V=e.i(727749),K=e.i(764205),Q=e.i(785242),H=e.i(109799),$=e.i(912598),G=e.i(980187),W=e.i(530212),J=e.i(629569),Y=e.i(464571),X=e.i(653496),Z=e.i(898586),ee=e.i(678784),el=e.i(118366),ea=e.i(294612),et=e.i(907308),es=e.i(384767),ei=e.i(435451),er=e.i(276173),en=e.i(916940);let eo=({organizationId:e,onClose:a,accessToken:t,is_org_admin:s,is_proxy_admin:i,userModels:r,editOrg:n})=>{let o=(0,$.useQueryClient)(),{data:d,isLoading:c}=(0,H.useOrganization)(e),[m]=I.Form.useForm(),[g,_]=(0,B.useState)(!1),[j,b]=(0,B.useState)(!1),[v,f]=(0,B.useState)(!1),[y,w]=(0,B.useState)(null),[C,T]=(0,B.useState)({}),[z,S]=(0,B.useState)(!1),N=s||i,{data:k}=(0,Q.useTeams)(),P=(0,B.useMemo)(()=>(0,G.createTeamAliasMap)(k),[k]),L=async l=>{try{if(null==t)return;let a={user_email:l.user_email,user_id:l.user_id,role:l.role};await (0,K.organizationMemberAddCall)(t,e,a),V.default.success("Organization member added successfully"),b(!1),m.resetFields(),o.invalidateQueries({queryKey:H.organizationKeys.all})}catch(e){V.default.fromBackend("Failed to add organization member"),console.error("Error adding organization member:",e)}},R=async l=>{try{if(!t)return;let a={user_email:l.user_email,user_id:l.user_id,role:l.role};await (0,K.organizationMemberUpdateCall)(t,e,a),V.default.success("Organization member updated successfully"),f(!1),m.resetFields(),o.invalidateQueries({queryKey:H.organizationKeys.all})}catch(e){V.default.fromBackend("Failed to update organization member"),console.error("Error updating organization member:",e)}},U=async l=>{try{if(!t)return;await (0,K.organizationMemberDeleteCall)(t,e,l.user_id),V.default.success("Organization member deleted successfully"),f(!1),m.resetFields(),o.invalidateQueries({queryKey:H.organizationKeys.all})}catch(e){V.default.fromBackend("Failed to delete organization member"),console.error("Error deleting organization member:",e)}},eo=async l=>{try{if(!t)return;S(!0);let a={organization_id:e,organization_alias:l.organization_alias,models:l.models,litellm_budget_table:{tpm_limit:l.tpm_limit,rpm_limit:l.rpm_limit,max_budget:l.max_budget,budget_duration:l.budget_duration},metadata:l.metadata?JSON.parse(l.metadata):null};if((void 0!==l.vector_stores||void 0!==l.mcp_servers_and_groups)&&(a.object_permission={...d?.object_permission,vector_stores:l.vector_stores||[]},void 0!==l.mcp_servers_and_groups)){let{servers:e,accessGroups:t}=l.mcp_servers_and_groups||{servers:[],accessGroups:[]};e&&e.length>0&&(a.object_permission.mcp_servers=e),t&&t.length>0&&(a.object_permission.mcp_access_groups=t)}await (0,K.organizationUpdateCall)(t,a),V.default.success("Organization settings updated successfully"),_(!1),o.invalidateQueries({queryKey:H.organizationKeys.all})}catch(e){V.default.fromBackend("Failed to update organization settings"),console.error("Error updating organization:",e)}finally{S(!1)}};if(c)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Organization not found"});let ed=async(e,l)=>{await (0,D.copyToClipboard)(e)&&(T(e=>({...e,[l]:!0})),setTimeout(()=>{T(e=>({...e,[l]:!1}))},2e3))},ec=[{title:"Spend (USD)",key:"spend",render:(e,a)=>{let t=null!=a.user_id?(d.members||[]).find(e=>e.user_id===a.user_id):void 0;return(0,l.jsxs)(Z.Typography.Text,{children:["$",(0,D.formatNumberWithCommas)(t?.spend??0,4)]})}},{title:"Created At",key:"created_at",render:(e,a)=>{let t=null!=a.user_id?(d.members||[]).find(e=>e.user_id===a.user_id):void 0;return(0,l.jsx)(Z.Typography.Text,{children:t?.created_at?new Date(t.created_at).toLocaleString():"-"})}}];return(0,l.jsxs)("div",{className:"w-full h-screen p-4 bg-white",children:[(0,l.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Button,{icon:W.ArrowLeftIcon,onClick:a,variant:"light",className:"mb-4",children:"Back to Organizations"}),(0,l.jsx)(J.Title,{children:d.organization_alias}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(F.Text,{className:"text-gray-500 font-mono",children:d.organization_id}),(0,l.jsx)(Y.Button,{type:"text",size:"small",icon:C["org-id"]?(0,l.jsx)(ee.CheckIcon,{size:12}):(0,l.jsx)(el.CopyIcon,{size:12}),onClick:()=>ed(d.organization_id,"org-id"),className:`left-2 z-10 transition-all duration-200 ${C["org-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,l.jsx)(X.Tabs,{defaultActiveKey:n?"settings":"overview",className:"mb-4",items:[{key:"overview",label:"Overview",children:(0,l.jsxs)(p.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(h.Card,{children:[(0,l.jsx)(F.Text,{children:"Organization Details"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(F.Text,{children:["Created: ",new Date(d.created_at).toLocaleDateString()]}),(0,l.jsxs)(F.Text,{children:["Updated: ",new Date(d.updated_at).toLocaleDateString()]}),(0,l.jsxs)(F.Text,{children:["Created By: ",d.created_by]})]})]}),(0,l.jsxs)(h.Card,{children:[(0,l.jsx)(F.Text,{children:"Budget Status"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(J.Title,{children:["$",(0,D.formatNumberWithCommas)(d.spend,4)]}),(0,l.jsxs)(F.Text,{children:["of"," ",null===d.litellm_budget_table.max_budget?"Unlimited":`$${(0,D.formatNumberWithCommas)(d.litellm_budget_table.max_budget,4)}`]}),d.litellm_budget_table.budget_duration&&(0,l.jsxs)(F.Text,{className:"text-gray-500",children:["Reset: ",d.litellm_budget_table.budget_duration]})]})]}),(0,l.jsxs)(h.Card,{children:[(0,l.jsx)(F.Text,{children:"Rate Limits"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(F.Text,{children:["TPM: ",d.litellm_budget_table.tpm_limit||"Unlimited"]}),(0,l.jsxs)(F.Text,{children:["RPM: ",d.litellm_budget_table.rpm_limit||"Unlimited"]}),d.litellm_budget_table.max_parallel_requests&&(0,l.jsxs)(F.Text,{children:["Max Parallel Requests: ",d.litellm_budget_table.max_parallel_requests]})]})]}),(0,l.jsxs)(h.Card,{children:[(0,l.jsx)(F.Text,{children:"Models"}),(0,l.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===d.models.length?(0,l.jsx)(u.Badge,{color:"red",children:"All proxy models"}):d.models.map((e,a)=>(0,l.jsx)(u.Badge,{color:"red",children:e},a))})]}),(0,l.jsxs)(h.Card,{children:[(0,l.jsx)(F.Text,{children:"Teams"}),(0,l.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:d.teams?.map((e,a)=>(0,l.jsx)(u.Badge,{color:"red",children:P[e.team_id]||e.team_id},a))})]}),(0,l.jsx)(es.default,{objectPermission:d.object_permission,variant:"card",accessToken:t})]})},{key:"members",label:"Members",children:(0,l.jsx)("div",{className:"space-y-4",children:(0,l.jsx)(ea.default,{members:(d.members||[]).map(e=>({role:e.user_role||"",user_id:e.user_id,user_email:e.user_email})),canEdit:N,onEdit:e=>{w(e),f(!0)},onDelete:e=>U(e),onAddMember:()=>b(!0),roleColumnTitle:"Organization Role",extraColumns:ec,emptyText:"No members found"})})},{key:"settings",label:"Settings",children:(0,l.jsxs)(h.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(J.Title,{children:"Organization Settings"}),N&&!g&&(0,l.jsx)(x.Button,{onClick:()=>_(!0),children:"Edit Settings"})]}),g?(0,l.jsxs)(I.Form,{form:m,onFinish:eo,initialValues:{organization_alias:d.organization_alias,models:d.models,tpm_limit:d.litellm_budget_table.tpm_limit,rpm_limit:d.litellm_budget_table.rpm_limit,max_budget:d.litellm_budget_table.max_budget,budget_duration:d.litellm_budget_table.budget_duration,metadata:d.metadata?JSON.stringify(d.metadata,null,2):"",vector_stores:d.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:d.object_permission?.mcp_servers||[],accessGroups:d.object_permission?.mcp_access_groups||[]}},layout:"vertical",children:[(0,l.jsx)(I.Form.Item,{label:"Organization Name",name:"organization_alias",rules:[{required:!0,message:"Please input an organization name"}],children:(0,l.jsx)(M.TextInput,{})}),(0,l.jsx)(I.Form.Item,{label:"Models",name:"models",children:(0,l.jsx)(q.ModelSelect,{value:m.getFieldValue("models"),onChange:e=>m.setFieldValue("models",e),context:"organization",options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!0}})}),(0,l.jsx)(I.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,l.jsx)(ei.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,l.jsx)(I.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,l.jsxs)(A.Select,{placeholder:"n/a",children:[(0,l.jsx)(A.Select.Option,{value:"24h",children:"daily"}),(0,l.jsx)(A.Select.Option,{value:"7d",children:"weekly"}),(0,l.jsx)(A.Select.Option,{value:"30d",children:"monthly"})]})}),(0,l.jsx)(I.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,l.jsx)(ei.default,{step:1,style:{width:"100%"}})}),(0,l.jsx)(I.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,l.jsx)(ei.default,{step:1,style:{width:"100%"}})}),(0,l.jsx)(I.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,l.jsx)(en.default,{onChange:e=>m.setFieldValue("vector_stores",e),value:m.getFieldValue("vector_stores"),accessToken:t||"",placeholder:"Select vector stores"})}),(0,l.jsx)(I.Form.Item,{label:"MCP Servers & Access Groups",name:"mcp_servers_and_groups",children:(0,l.jsx)(E.default,{onChange:e=>m.setFieldValue("mcp_servers_and_groups",e),value:m.getFieldValue("mcp_servers_and_groups"),accessToken:t||"",placeholder:"Select MCP servers and access groups"})}),(0,l.jsx)(I.Form.Item,{label:"Metadata",name:"metadata",children:(0,l.jsx)(O.Input.TextArea,{rows:4})}),(0,l.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,l.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,l.jsx)(x.Button,{variant:"secondary",onClick:()=>_(!1),disabled:z,children:"Cancel"}),(0,l.jsx)(x.Button,{type:"submit",loading:z,children:"Save Changes"})]})})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Organization Name"}),(0,l.jsx)("div",{children:d.organization_alias})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Organization ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.organization_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:new Date(d.created_at).toLocaleString()})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Models"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:d.models.map((e,a)=>(0,l.jsx)(u.Badge,{color:"red",children:e},a))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Rate Limits"}),(0,l.jsxs)("div",{children:["TPM: ",d.litellm_budget_table.tpm_limit||"Unlimited"]}),(0,l.jsxs)("div",{children:["RPM: ",d.litellm_budget_table.rpm_limit||"Unlimited"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Budget"}),(0,l.jsxs)("div",{children:["Max:"," ",null!==d.litellm_budget_table.max_budget?`$${(0,D.formatNumberWithCommas)(d.litellm_budget_table.max_budget,4)}`:"No Limit"]}),(0,l.jsxs)("div",{children:["Reset: ",d.litellm_budget_table.budget_duration||"Never"]})]}),(0,l.jsx)(es.default,{objectPermission:d.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:t})]})]})}]}),(0,l.jsx)(et.default,{isVisible:j,onCancel:()=>b(!1),onSubmit:L,accessToken:t,title:"Add Organization Member",roles:[{label:"org_admin",value:"org_admin",description:"Can add and remove members, and change their roles."},{label:"internal_user",value:"internal_user",description:"Can view/create keys for themselves within organization."},{label:"internal_user_viewer",value:"internal_user_viewer",description:"Can only view their keys within organization."}],defaultRole:"internal_user"}),(0,l.jsx)(er.default,{visible:v,onCancel:()=>f(!1),onSubmit:R,initialData:y,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Org Admin",value:"org_admin"},{label:"Internal User",value:"internal_user"},{label:"Internal User Viewer",value:"internal_user_viewer"}]}})]})},ed=async(e,l,a=null,t=null)=>{l(await (0,K.organizationListCall)(e,a,t))};e.s(["default",0,({organizations:e,userRole:a,userModels:t,accessToken:s,lastRefreshed:i,handleRefreshClick:r,currentOrg:Q,guardrailsList:H=[],setOrganizations:$,premiumUser:G})=>{let[W,J]=(0,B.useState)(null),[Y,X]=(0,B.useState)(!1),[Z,ee]=(0,B.useState)(!1),[el,ea]=(0,B.useState)(null),[et,es]=(0,B.useState)(!1),[er,ec]=(0,B.useState)(!1),[em]=I.Form.useForm(),[eu,ex]=(0,B.useState)({}),[eh,eg]=(0,B.useState)(!1),[ep,e_]=(0,B.useState)({org_id:"",org_alias:"",sort_by:"created_at",sort_order:"desc"}),ej=async()=>{if(el&&s)try{es(!0),await (0,K.organizationDeleteCall)(s,el),V.default.success("Organization deleted successfully"),ee(!1),ea(null),await ed(s,$,ep.org_id||null,ep.org_alias||null)}catch(e){console.error("Error deleting organization:",e)}finally{es(!1)}},eb=async e=>{try{if(!s)return;console.log(`values in organizations new create call: ${JSON.stringify(e)}`),(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0))&&(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&&(e.allowed_mcp_servers_and_groups.servers?.length>0&&(e.object_permission.mcp_servers=e.allowed_mcp_servers_and_groups.servers),e.allowed_mcp_servers_and_groups.accessGroups?.length>0&&(e.object_permission.mcp_access_groups=e.allowed_mcp_servers_and_groups.accessGroups),delete e.allowed_mcp_servers_and_groups)),await (0,K.organizationCreateCall)(s,e),V.default.success("Organization created successfully"),ec(!1),em.resetFields(),ed(s,$,ep.org_id||null,ep.org_alias||null)}catch(e){console.error("Error creating organization:",e)}};return G?(0,l.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[(0,l.jsx)(p.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,l.jsxs)(g.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[("Admin"===a||"Org Admin"===a)&&(0,l.jsx)(x.Button,{className:"w-fit",onClick:()=>ec(!0),children:"+ Create New Organization"}),W?(0,l.jsx)(eo,{organizationId:W,onClose:()=>{J(null),X(!1)},accessToken:s,is_org_admin:!0,is_proxy_admin:"Admin"===a,userModels:t,editOrg:Y}):(0,l.jsxs)(b.TabGroup,{className:"gap-2 h-[75vh] w-full",children:[(0,l.jsxs)(z.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,l.jsx)("div",{className:"flex",children:(0,l.jsx)(j.Tab,{children:"Your Organizations"})}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[i&&(0,l.jsxs)(F.Text,{children:["Last Refreshed: ",i]}),(0,l.jsx)(_.Icon,{icon:m.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:r})]})]}),(0,l.jsx)(N.TabPanels,{children:(0,l.jsxs)(S.TabPanel,{children:[(0,l.jsx)(F.Text,{children:"Click on “Organization ID” to view organization details."}),(0,l.jsx)(p.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,l.jsx)(g.Col,{numColSpan:1,children:(0,l.jsxs)(h.Card,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,l.jsx)("div",{className:"border-b px-6 py-4",children:(0,l.jsx)("div",{className:"flex flex-col space-y-4",children:(0,l.jsx)(n,{filters:ep,showFilters:eh,onToggleFilters:eg,onChange:(e,l)=>{let a={...ep,[e]:l};e_(a),s&&(0,K.organizationListCall)(s,a.org_id||null,a.org_alias||null).then(e=>{e&&$(e)}).catch(e=>{console.error("Error fetching organizations:",e)})},onReset:()=>{e_({org_id:"",org_alias:"",sort_by:"created_at",sort_order:"desc"}),s&&(0,K.organizationListCall)(s,null,null).then(e=>{e&&$(e)}).catch(e=>{console.error("Error fetching organizations:",e)})}})})}),(0,l.jsxs)(v.Table,{children:[(0,l.jsx)(w.TableHead,{children:(0,l.jsxs)(T.TableRow,{children:[(0,l.jsx)(C.TableHeaderCell,{children:"Organization ID"}),(0,l.jsx)(C.TableHeaderCell,{children:"Organization Name"}),(0,l.jsx)(C.TableHeaderCell,{children:"Created"}),(0,l.jsx)(C.TableHeaderCell,{children:"Spend (USD)"}),(0,l.jsx)(C.TableHeaderCell,{children:"Budget (USD)"}),(0,l.jsx)(C.TableHeaderCell,{children:"Models"}),(0,l.jsx)(C.TableHeaderCell,{children:"TPM / RPM Limits"}),(0,l.jsx)(C.TableHeaderCell,{children:"Info"}),(0,l.jsx)(C.TableHeaderCell,{children:"Actions"})]})}),(0,l.jsx)(f.TableBody,{children:e&&e.length>0?e.sort((e,l)=>new Date(l.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,l.jsxs)(T.TableRow,{children:[(0,l.jsx)(y.TableCell,{children:(0,l.jsx)("div",{className:"overflow-hidden",children:(0,l.jsx)(P.Tooltip,{title:e.organization_id,children:(0,l.jsxs)(x.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>J(e.organization_id),children:[e.organization_id?.slice(0,7),"..."]})})})}),(0,l.jsx)(y.TableCell,{children:e.organization_alias}),(0,l.jsx)(y.TableCell,{children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,l.jsx)(y.TableCell,{children:(0,D.formatNumberWithCommas)(e.spend,4)}),(0,l.jsx)(y.TableCell,{children:e.litellm_budget_table?.max_budget!==null&&e.litellm_budget_table?.max_budget!==void 0?e.litellm_budget_table?.max_budget:"No limit"}),(0,l.jsx)(y.TableCell,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:e.models.length>3?"px-0":"",children:(0,l.jsx)("div",{className:"flex flex-col",children:Array.isArray(e.models)?(0,l.jsx)("div",{className:"flex flex-col",children:0===e.models.length?(0,l.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,l.jsx)(F.Text,{children:"All Proxy Models"})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"flex items-start",children:[e.models.length>3&&(0,l.jsx)("div",{children:(0,l.jsx)(_.Icon,{icon:eu[e.organization_id||""]?d.ChevronDownIcon:c.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{ex(l=>({...l,[e.organization_id||""]:!l[e.organization_id||""]}))}})}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.models.slice(0,3).map((e,a)=>"all-proxy-models"===e?(0,l.jsx)(u.Badge,{size:"xs",color:"red",children:(0,l.jsx)(F.Text,{children:"All Proxy Models"})},a):(0,l.jsx)(u.Badge,{size:"xs",color:"blue",children:(0,l.jsx)(F.Text,{children:e.length>30?`${(0,U.getModelDisplayName)(e).slice(0,30)}...`:(0,U.getModelDisplayName)(e)})},a)),e.models.length>3&&!eu[e.organization_id||""]&&(0,l.jsx)(u.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,l.jsxs)(F.Text,{children:["+",e.models.length-3," ",e.models.length-3==1?"more model":"more models"]})}),eu[e.organization_id||""]&&(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:e.models.slice(3).map((e,a)=>"all-proxy-models"===e?(0,l.jsx)(u.Badge,{size:"xs",color:"red",children:(0,l.jsx)(F.Text,{children:"All Proxy Models"})},a+3):(0,l.jsx)(u.Badge,{size:"xs",color:"blue",children:(0,l.jsx)(F.Text,{children:e.length>30?`${(0,U.getModelDisplayName)(e).slice(0,30)}...`:(0,U.getModelDisplayName)(e)})},a+3))})]})]})})}):null})}),(0,l.jsx)(y.TableCell,{children:(0,l.jsxs)(F.Text,{children:["TPM:"," ",e.litellm_budget_table?.tpm_limit?e.litellm_budget_table?.tpm_limit:"Unlimited",(0,l.jsx)("br",{}),"RPM:"," ",e.litellm_budget_table?.rpm_limit?e.litellm_budget_table?.rpm_limit:"Unlimited"]})}),(0,l.jsx)(y.TableCell,{children:(0,l.jsxs)(F.Text,{children:[e.members?.length||0," Members"]})}),(0,l.jsx)(y.TableCell,{children:"Admin"===a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(R.default,{variant:"Edit",tooltipText:"Edit organization",onClick:()=>{J(e.organization_id),X(!0)}}),(0,l.jsx)(R.default,{variant:"Delete",tooltipText:"Delete organization",onClick:()=>{var l;(l=e.organization_id)&&(ea(l),ee(!0))}})]})})]},e.organization_id)):null})]})]})})})]})})]})]})}),(0,l.jsx)(k.Modal,{title:"Create Organization",visible:er,width:800,footer:null,onCancel:()=>{ec(!1),em.resetFields()},children:(0,l.jsxs)(I.Form,{form:em,onFinish:eb,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,l.jsx)(I.Form.Item,{label:"Organization Name",name:"organization_alias",rules:[{required:!0,message:"Please input an organization name"}],children:(0,l.jsx)(M.TextInput,{placeholder:""})}),(0,l.jsx)(I.Form.Item,{label:"Models",name:"models",children:(0,l.jsx)(q.ModelSelect,{options:{showAllProxyModelsOverride:!0,includeSpecialOptions:!0},value:em.getFieldValue("models"),onChange:e=>em.setFieldValue("models",e),context:"organization"})}),(0,l.jsx)(I.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,l.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,l.jsx)(I.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,l.jsxs)(A.Select,{defaultValue:null,placeholder:"n/a",children:[(0,l.jsx)(A.Select.Option,{value:"24h",children:"daily"}),(0,l.jsx)(A.Select.Option,{value:"7d",children:"weekly"}),(0,l.jsx)(A.Select.Option,{value:"30d",children:"monthly"})]})}),(0,l.jsx)(I.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,l.jsx)(ei.default,{step:1,width:400})}),(0,l.jsx)(I.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,l.jsx)(ei.default,{step:1,width:400})}),(0,l.jsx)(I.Form.Item,{label:(0,l.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,l.jsx)(P.Tooltip,{title:"Select which vector stores this organization can access by default. Leave empty for access to all vector stores",children:(0,l.jsx)(o.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this organization can access. Leave empty for access to all vector stores",children:(0,l.jsx)(en.default,{onChange:e=>em.setFieldValue("allowed_vector_store_ids",e),value:em.getFieldValue("allowed_vector_store_ids"),accessToken:s||"",placeholder:"Select vector stores (optional)"})}),(0,l.jsx)(I.Form.Item,{label:(0,l.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,l.jsx)(P.Tooltip,{title:"Select which MCP servers and access groups this organization can access by default.",children:(0,l.jsx)(o.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers and access groups this organization can access.",children:(0,l.jsx)(E.default,{onChange:e=>em.setFieldValue("allowed_mcp_servers_and_groups",e),value:em.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:s||"",placeholder:"Select MCP servers and access groups (optional)"})}),(0,l.jsx)(I.Form.Item,{label:"Metadata",name:"metadata",children:(0,l.jsx)(O.Input.TextArea,{rows:4})}),(0,l.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,l.jsx)(x.Button,{type:"submit",children:"Create Organization"})})]})}),(0,l.jsx)(L.default,{isOpen:Z,title:"Delete Organization?",message:"Are you sure you want to delete this organization? This action cannot be undone.",resourceInformationTitle:"Organization Information",resourceInformation:[{label:"Organization ID",value:el,code:!0}],onCancel:()=>{ee(!1),ea(null)},onOk:ej,confirmLoading:et})]}):(0,l.jsx)("div",{children:(0,l.jsxs)(F.Text,{children:["This is a LiteLLM Enterprise feature, and requires a valid key to use. Get a trial key"," ",(0,l.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})},"fetchOrganizations",0,ed],846835)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/27289c624996260b.js b/litellm/proxy/_experimental/out/_next/static/chunks/27289c624996260b.js deleted file mode 100644 index 0909a74f69..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/27289c624996260b.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,625901,e=>{"use strict";var t=e.i(266027),r=e.i(621482),a=e.i(243652),l=e.i(764205),s=e.i(135214);let i=(0,a.createQueryKeys)("models"),n=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let d=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:r,userRole:a}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,r,a,!0,null,!0,!1,"expand"),enabled:!!(e&&r&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:i,userRole:n}=(0,s.default)();return(0,r.useInfiniteQuery)({queryKey:d.list({filters:{...i&&{userId:i},...n&&{userRole:n},size:e,...t&&{search:t}}}),queryFn:async({pageParam:r})=>await (0,l.modelInfoCall)(a,i,n,r,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,r=50,a,n,o,d,c)=>{let{accessToken:m,userId:u,userRole:g}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({filters:{...u&&{userId:u},...g&&{userRole:g},page:e,size:r,...a&&{search:a},...n&&{modelId:n},...o&&{teamId:o},...d&&{sortBy:d},...c&&{sortOrder:c}}}),queryFn:async()=>await (0,l.modelInfoCall)(m,u,g,e,r,a,n,o,d,c),enabled:!!(m&&u&&g)})}])},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),a=e.i(673706),l=e.i(271645);let s=l.default.forwardRef((e,s)=>{let{color:i,className:n,children:o}=e;return l.default.createElement("p",{ref:s,className:(0,r.tremorTwMerge)("text-tremor-default",i?(0,a.getColorClassNames)(i,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),n)},o)});s.displayName="Text",e.s(["default",()=>s],936325),e.s(["Text",()=>s],599724)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],s=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,n=(e,t,r,a,l)=>{clearTimeout(a.current);let i=s(e);t(i),r.current=i,l&&l({current:i})};var o=e.i(480731),d=e.i(444755),c=e.i(673706);let m=e=>{var r=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.default.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 u=e.i(95779);let g={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"}},h=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,u.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,u.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,u.colorPalette.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,c.getColorClassNames)(t,u.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,c.makeClassName)("Button"),x=({loading:e,iconSize:t,iconPosition:r,Icon:l,needMargin:s,transitionStatus:i})=>{let n=s?r===o.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),u={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(m,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",n,u.default,u[i]),style:{transition:"width 150ms"}}):a.default.createElement(l,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,n)})},f=a.default.forwardRef((e,l)=>{let{icon:m,iconPosition:u=o.HorizontalPositions.Left,size:f=o.Sizes.SM,color:b,variant:v="primary",disabled:w,loading:j=!1,loadingText:y,children:C,tooltip:k,className:N}=e,T=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),$=j||w,E=void 0!==m||j,M=j&&y,O=!(!C&&!M),_=(0,d.tremorTwMerge)(g[f].height,g[f].width),S="light"!==v?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",I=h(v,b),R=("light"!==v?{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"}})[f],{tooltipProps:P,getReferenceProps:A}=(0,r.useTooltip)(300),[z,B]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:l,timeout:o,initialEntered:d,mountOnEnter:c,unmountOnExit:m,onStateChange:u}={})=>{let[g,h]=(0,a.useState)(()=>s(d?2:i(c))),p=(0,a.useRef)(g),x=(0,a.useRef)(0),[f,b]="object"==typeof o?[o.enter,o.exit]:[o,o],v=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(p.current._s,m);e&&n(e,h,p,x,u)},[u,m]);return[g,(0,a.useCallback)(a=>{let s=e=>{switch(n(e,h,p,x,u),e){case 1:f>=0&&(x.current=((...e)=>setTimeout(...e))(v,f));break;case 4:b>=0&&(x.current=((...e)=>setTimeout(...e))(v,b));break;case 0:case 3:x.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||s(e+1)},0)}},o=p.current.isEnter;"boolean"!=typeof a&&(a=!o),a?o||s(e?+!r:2):o&&s(t?l?3:4:i(m))},[v,u,e,t,r,l,f,b,m]),v]})({timeout:50});return(0,a.useEffect)(()=>{B(j)},[j]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([l,P.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",S,R.paddingX,R.paddingY,R.fontSize,I.textColor,I.bgColor,I.borderColor,I.hoverBorderColor,$?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(h(v,b).hoverTextColor,h(v,b).hoverBgColor,h(v,b).hoverBorderColor),N),disabled:$},A,T),a.default.createElement(r.default,Object.assign({text:k},P)),E&&u!==o.HorizontalPositions.Right?a.default.createElement(x,{loading:j,iconSize:_,iconPosition:u,Icon:m,transitionStatus:z.status,needMargin:O}):null,M||C?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},M?y:C):null,E&&u===o.HorizontalPositions.Right?a.default.createElement(x,{loading:j,iconSize:_,iconPosition:u,Icon:m,transitionStatus:z.status,needMargin:O}):null)});f.displayName="Button",e.s(["Button",()=>f],994388)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),l=e.i(95779),s=e.i(444755),i=e.i(673706);let n=(0,i.makeClassName)("Card"),o=r.default.forwardRef((e,o)=>{let{decoration:d="",decorationColor:c,children:m,className:u}=e,g=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:o,className:(0,s.tremorTwMerge)(n("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",c?(0,i.getColorClassNames)(c,l.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),u)},g),m)});o.displayName="Card",e.s(["Card",()=>o],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),l=e.i(673706),s=e.i(271645);let i=s.default.forwardRef((e,i)=>{let{color:n,children:o,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return s.default.createElement("p",Object.assign({ref:i,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",n?(0,l.getColorClassNames)(n,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},c),o)});i.displayName="Title",e.s(["Title",()=>i],629569)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},292639,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},250980,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,r],250980)},502547,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,r],502547)},384767,e=>{"use strict";var t=e.i(843476),r=e.i(599724),a=e.i(271645),l=e.i(389083);let s=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:"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"}))});var i=e.i(764205);let n=function({vectorStores:e,accessToken:n}){let[o,d]=(0,a.useState)([]);return(0,a.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(n);e.data&&d(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)}})()},[n,e.length]),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,t.jsx)(l.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((e,r)=>{let a;return(0,t.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:(a=o.find(t=>t.vector_store_id===e))?`${a.vector_store_name||a.vector_store_id} (${a.vector_store_id})`:e},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(s,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=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:"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"}))});var d=e.i(871943),c=e.i(502547),m=e.i(592968);let u=function({mcpServers:e,mcpAccessGroups:s=[],mcpToolPermissions:n={},mcpToolsets:u=[],accessToken:g}){let[h,p]=(0,a.useState)([]),[x,f]=(0,a.useState)([]),[b,v]=(0,a.useState)(new Set),[w,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{(async()=>{if(g&&e.length>0)try{let e=await (0,i.fetchMCPServers)(g);e&&Array.isArray(e)?p(e):e.data&&Array.isArray(e.data)&&p(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[g,e.length]),(0,a.useEffect)(()=>{(async()=>{if(g&&u.length>0)try{let e=await (0,i.fetchMCPToolsets)(g),t=Array.isArray(e)?e.filter(e=>u.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[g,u.length]);let y=[...e.map(e=>({type:"server",value:e})),...s.map(e=>({type:"accessGroup",value:e}))],C=y.length+u.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(l.Badge,{color:"blue",size:"xs",children:C})]}),C>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[y.map((e,r)=>{let a="server"===e.type?n[e.value]:void 0,l=a&&a.length>0,s=b.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return l&&(t=e.value,void v(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}))},className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ${l?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,t.jsx)(m.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=h.find(t=>t.server_id===e);if(t){let r=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${r})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.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"})]})}),l&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:a.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===a.length?"tool":"tools"}),s?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l&&s&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:a.map((e,r)=>(0,t.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)}),u.length>0&&u.map((e,r)=>{let a=x.find(t=>t.toolset_id===e),l=w.has(e),s=a?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>s>0&&void j(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r}),className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-purple-200 transition-all ${s>0?"cursor-pointer hover:bg-purple-50 hover:border-purple-300":"bg-white"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:a?.toolset_name??e}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-purple-600 bg-purple-50 border border-purple-200 rounded uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),s>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:s}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===s?"tool":"tools"}),l?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),s>0&&l&&a&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-purple-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:a.tools.map((e,r)=>(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-purple-50 border border-purple-200 text-purple-800 text-xs font-medium",children:[(0,t.jsxs)("span",{className:"text-purple-400 mr-1 text-[10px]",children:[e.server_id.slice(0,6),"…"]}),e.tool_name]},r))})})]},`toolset-${r}`)})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No MCP servers, access groups, or toolsets configured"})]})]})},g=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:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))}),h=function({agents:e,agentAccessGroups:s=[],accessToken:n}){let[o,d]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,i.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...s.map(e=>({type:"accessGroup",value:e}))],u=c.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(l.Badge,{color:"purple",size:"xs",children:u})]}),u>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.map((e,r)=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 bg-white",children:(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"agent"===e.type?(0,t.jsx)(m.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=o.find(t=>t.agent_id===e);if(t){let r=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${r})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.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"})]})})})},r))}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(g,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No agents or access groups configured"})]})]})};e.s(["default",0,function({objectPermission:e,variant:a="card",className:l="",accessToken:s}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},m=e?.mcp_toolsets||[],g=e?.agents||[],p=e?.agent_access_groups||[],x=(0,t.jsxs)("div",{className:"card"===a?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:i,accessToken:s}),(0,t.jsx)(u,{mcpServers:o,mcpAccessGroups:d,mcpToolPermissions:c,mcpToolsets:m,accessToken:s}),(0,t.jsx)(h,{agents:g,agentAccessGroups:p,accessToken:s})]});return"card"===a?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${l}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(r.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),x]}):(0,t.jsxs)("div",{className:`${l}`,children:[(0,t.jsx)(r.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)},738014,e=>{"use strict";var t=e.i(135214),r=e.i(764205),a=e.i(266027);let l=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:s}=(0,t.default)();return(0,a.useQuery)({queryKey:l.detail(s),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&s)})}])},551332,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});e.s(["ClipboardCopyIcon",0,r],551332)},122577,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,r],122577)},902555,e=>{"use strict";var t=e.i(843476),r=e.i(591935),a=e.i(122577),l=e.i(278587),s=e.i(68155),i=e.i(360820),n=e.i(871943),o=e.i(434626),d=e.i(551332),c=e.i(592968),m=e.i(115504),u=e.i(752978);function g({icon:e,onClick:r,className:a,disabled:l,dataTestId:s}){return l?(0,t.jsx)(u.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":s}):(0,t.jsx)(u.Icon,{icon:e,size:"sm",onClick:r,className:(0,m.cx)("cursor-pointer",a),"data-testid":s})}let h={Edit:{icon:r.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:s.TrashIcon,className:"hover:text-red-600"},Test:{icon:a.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:l.RefreshIcon,className:"hover:text-green-600"},Up:{icon:i.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:n.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function p({onClick:e,tooltipText:r,disabled:a=!1,disabledTooltipText:l,dataTestId:s,variant:i}){let{icon:n,className:o}=h[i];return(0,t.jsx)(c.Tooltip,{title:a?l:r,children:(0,t.jsx)("span",{children:(0,t.jsx)(g,{icon:n,onClick:e,className:o,disabled:a,dataTestId:s})})})}e.s(["default",()=>p],902555)},434626,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.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"}))});e.s(["ExternalLinkIcon",0,r],434626)},591935,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.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.s(["PencilAltIcon",0,r],591935)},871943,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(529681);let s=e=>{let{prefixCls:a,className:l,style:s,size:i,shape:n}=e,o=(0,r.default)({[`${a}-lg`]:"large"===i,[`${a}-sm`]:"small"===i}),d=(0,r.default)({[`${a}-circle`]:"circle"===n,[`${a}-square`]:"square"===n,[`${a}-round`]:"round"===n}),c=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(a,o,d,l),style:Object.assign(Object.assign({},c),s)})};e.i(296059);var i=e.i(694758),n=e.i(915654),o=e.i(246422),d=e.i(838378);let c=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),m=e=>({height:e,lineHeight:(0,n.unit)(e)}),u=e=>Object.assign({width:e},m(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},m(e)),h=e=>Object.assign({width:e},m(e)),p=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},x=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},m(e)),f=(0,o.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:l,skeletonButtonCls:s,skeletonInputCls:i,skeletonImageCls:n,controlHeight:o,controlHeightLG:d,controlHeightSM:m,gradientFromColor:f,padding:b,marginSM:v,borderRadius:w,titleHeight:j,blockRadius:y,paragraphLiHeight:C,controlHeightXS:k,paragraphMarginTop:N}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:b,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:f},u(o)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},u(d)),[`${r}-sm`]:Object.assign({},u(m))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:j,background:f,borderRadius:y,[`+ ${l}`]:{marginBlockStart:m}},[l]:{padding:0,"> li":{width:"100%",height:C,listStyle:"none",background:f,borderRadius:y,"+ li":{marginBlockStart:k}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${l} > li`]:{borderRadius:w}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:v,[`+ ${l}`]:{marginBlockStart:N}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:l,controlHeightSM:s,gradientFromColor:i,calc:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:n(a).mul(2).equal(),minWidth:n(a).mul(2).equal()},x(a,n))},p(e,a,r)),{[`${r}-lg`]:Object.assign({},x(l,n))}),p(e,l,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},x(s,n))}),p(e,s,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:l,controlHeightSM:s}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},u(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},u(l)),[`${t}${t}-sm`]:Object.assign({},u(s))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:l,controlHeightSM:s,gradientFromColor:i,calc:n}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},g(t,n)),[`${a}-lg`]:Object.assign({},g(l,n)),[`${a}-sm`]:Object.assign({},g(s,n))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:l,calc:s}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:l},h(s(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},h(r)),{maxWidth:s(r).mul(4).equal(),maxHeight:s(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[s]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${a}, - ${l} > li, - ${r}, - ${s}, - ${i}, - ${n} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,d.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),b=e=>{let{prefixCls:a,className:l,style:s,rows:i=0}=e,n=Array.from({length:i}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:s},n)},v=({prefixCls:e,className:a,width:l,style:s})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},s)});function w(e){return e&&"object"==typeof e?e:{}}let j=e=>{let{prefixCls:l,loading:i,className:n,rootClassName:o,style:d,children:c,avatar:m=!1,title:u=!0,paragraph:g=!0,active:h,round:p}=e,{getPrefixCls:x,direction:j,className:y,style:C}=(0,a.useComponentConfig)("skeleton"),k=x("skeleton",l),[N,T,$]=f(k);if(i||!("loading"in e)){let e,a,l=!!m,i=!!u,c=!!g;if(l){let r=Object.assign(Object.assign({prefixCls:`${k}-avatar`},i&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),w(m));e=t.createElement("div",{className:`${k}-header`},t.createElement(s,Object.assign({},r)))}if(i||c){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${k}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),w(u));e=t.createElement(v,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${k}-paragraph`},(e={},l&&i||(e.width="61%"),!l&&i?e.rows=3:e.rows=2,e)),w(g));r=t.createElement(b,Object.assign({},a))}a=t.createElement("div",{className:`${k}-content`},e,r)}let x=(0,r.default)(k,{[`${k}-with-avatar`]:l,[`${k}-active`]:h,[`${k}-rtl`]:"rtl"===j,[`${k}-round`]:p},y,n,o,T,$);return N(t.createElement("div",{className:x,style:Object.assign(Object.assign({},C),d)},e,a))}return null!=c?c:null};j.Button=e=>{let{prefixCls:i,className:n,rootClassName:o,active:d,block:c=!1,size:m="default"}=e,{getPrefixCls:u}=t.useContext(a.ConfigContext),g=u("skeleton",i),[h,p,x]=f(g),b=(0,l.default)(e,["prefixCls"]),v=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,o,p,x);return h(t.createElement("div",{className:v},t.createElement(s,Object.assign({prefixCls:`${g}-button`,size:m},b))))},j.Avatar=e=>{let{prefixCls:i,className:n,rootClassName:o,active:d,shape:c="circle",size:m="default"}=e,{getPrefixCls:u}=t.useContext(a.ConfigContext),g=u("skeleton",i),[h,p,x]=f(g),b=(0,l.default)(e,["prefixCls","className"]),v=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},n,o,p,x);return h(t.createElement("div",{className:v},t.createElement(s,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:m},b))))},j.Input=e=>{let{prefixCls:i,className:n,rootClassName:o,active:d,block:c,size:m="default"}=e,{getPrefixCls:u}=t.useContext(a.ConfigContext),g=u("skeleton",i),[h,p,x]=f(g),b=(0,l.default)(e,["prefixCls"]),v=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,o,p,x);return h(t.createElement("div",{className:v},t.createElement(s,Object.assign({prefixCls:`${g}-input`,size:m},b))))},j.Image=e=>{let{prefixCls:l,className:s,rootClassName:i,style:n,active:o}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[m,u,g]=f(c),h=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:o},s,i,u,g);return m(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${c}-image`,s),style:n},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${c}-image-path`})))))},j.Node=e=>{let{prefixCls:l,className:s,rootClassName:i,style:n,active:o,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),m=c("skeleton",l),[u,g,h]=f(m),p=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:o},g,s,i,h);return u(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${m}-image`,s),style:n},d)))},e.s(["default",0,j],185793)},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["default",0,s],959013)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),s=r.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",n)},r.default.createElement("table",Object.assign({ref:s,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},o),i))});s.displayName="Table",e.s(["Table",()=>s],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),s=r.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:s,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",n)},o),i))});s.displayName="TableBody",e.s(["TableBody",()=>s],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),s=r.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:s,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",n)},o),i))});s.displayName="TableCell",e.s(["TableCell",()=>s],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),s=r.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:s,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",n)},o),i))});s.displayName="TableHead",e.s(["TableHead",()=>s],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),s=r.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:s,className:(0,a.tremorTwMerge)(l("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",n)},o),i))});s.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>s],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),s=r.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:s,className:(0,a.tremorTwMerge)(l("row"),n)},o),i))});s.displayName="TableRow",e.s(["TableRow",()=>s],496020)},68155,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,r],68155)},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},207670,e=>{"use strict";function t(){for(var e,t,r=0,a="",l=arguments.length;rt,"default",0,t])},162386,e=>{"use strict";var t=e.i(843476),r=e.i(625901),a=e.i(109799),l=e.i(785242),s=e.i(738014),i=e.i(199133),n=e.i(981339),o=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},c={label:"No Default Models",value:"no-default-models"},m=[d,c],u={user:({allProxyModels:e,userModels:t,options:r})=>t&&r?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:r})=>t?t.models.includes(d.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:g,organizationID:h,options:p,context:x,dataTestId:f,value:b=[],onChange:v,style:w}=e,{includeUserModels:j,showAllTeamModelsOption:y,showAllProxyModelsOverride:C,includeSpecialOptions:k}=p||{},{data:N,isLoading:T}=(0,r.useAllProxyModels)(),{data:$,isLoading:E}=(0,l.useTeam)(g),{data:M,isLoading:O}=(0,a.useOrganization)(h),{data:_,isLoading:S}=(0,s.useCurrentUser)(),I=e=>m.some(t=>t.value===e),R=b.some(I),P=M?.models.includes(d.value)||M?.models.length===0;if(T||E||O||S)return(0,t.jsx)(n.Skeleton.Input,{active:!0,block:!0});let{wildcard:A,regular:z}=(e=>{let t=[],r=[];for(let a of e)a.endsWith("/*")?t.push(a):r.push(a);return{wildcard:t,regular:r}})(((e,t,r)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return a;let l=u[t.context];return l?l({allProxyModels:a,...r,options:t.options}):[]})(N?.data??[],e,{selectedTeam:$,selectedOrganization:M,userModels:_?.models}));return(0,t.jsx)(i.Select,{"data-testid":f,value:b,onChange:e=>{let t=e.filter(I);v(t.length>0?[t[t.length-1]]:e)},style:w,options:[k?{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...C||P&&k||"global"===x?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:b.length>0&&b.some(e=>I(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:c.value,disabled:b.length>0&&b.some(e=>I(e)&&e!==c.value),key:c.value}]}:[],...A.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:A.map(e=>{let r=e.replace("/*",""),a=r.charAt(0).toUpperCase()+r.slice(1);return{label:(0,t.jsx)("span",{children:`All ${a} models`}),value:e,disabled:R}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:z.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:R}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},294612,e=>{"use strict";var t=e.i(843476),r=e.i(100486),a=e.i(827252),l=e.i(213205),s=e.i(771674),i=e.i(464571),n=e.i(770914),o=e.i(291542),d=e.i(262218),c=e.i(592968),m=e.i(898586),u=e.i(902555);let{Text:g}=m.Typography;function h({members:e,canEdit:m,onEdit:h,onDelete:p,onAddMember:x,roleColumnTitle:f="Role",roleTooltip:b,extraColumns:v=[],showDeleteForMember:w,emptyText:j}){let y=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,t.jsx)(g,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,t.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(g,{children:e||"-"})},{title:b?(0,t.jsxs)(n.Space,{direction:"horizontal",children:[f,(0,t.jsx)(c.Tooltip,{title:b,children:(0,t.jsx)(a.InfoCircleOutlined,{})})]}):f,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(n.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(r.CrownOutlined,{}):(0,t.jsx)(s.UserOutlined,{}),(0,t.jsx)(g,{style:{textTransform:"capitalize"},children:e||"-"})]})},...v,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,r)=>m?(0,t.jsxs)(n.Space,{children:[(0,t.jsx)(u.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(r)}),(!w||w(r))&&(0,t.jsx)(u.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>p(r)})]}):null}];return(0,t.jsxs)(n.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,t.jsx)(o.Table,{columns:y,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:j?{emptyText:j}:void 0}),x&&m&&(0,t.jsx)(i.Button,{icon:(0,t.jsx)(l.UserAddOutlined,{}),type:"primary",onClick:x,children:"Add Member"})]})}e.s(["default",()=>h])},907308,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(212931),l=e.i(808613),s=e.i(464571),i=e.i(199133),n=e.i(592968),o=e.i(213205),d=e.i(374009),c=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:m,onSubmit:u,accessToken:g,title:h="Add Team Member",roles:p=[{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:x="user",teamId:f})=>{let[b]=l.Form.useForm(),[v,w]=(0,r.useState)([]),[j,y]=(0,r.useState)(!1),[C,k]=(0,r.useState)("user_email"),[N,T]=(0,r.useState)(!1),$=async(e,t)=>{if(!e)return void w([]);y(!0);try{let r=new URLSearchParams;if(r.append(t,e),f&&r.append("team_id",f),null==g)return;let a=(await (0,c.userFilterUICall)(g,r)).map(e=>({label:"user_email"===t?`${e.user_email}`:`${e.user_id}`,value:"user_email"===t?e.user_email:e.user_id,user:e}));w(a)}catch(e){console.error("Error fetching users:",e)}finally{y(!1)}},E=(0,r.useCallback)((0,d.default)((e,t)=>$(e,t),300),[]),M=(e,t)=>{k(t),E(e,t)},O=(e,t)=>{let r=t.user;b.setFieldsValue({user_email:r.user_email,user_id:r.user_id,role:b.getFieldValue("role")})},_=async e=>{T(!0);try{await u(e)}finally{T(!1)}};return(0,t.jsx)(a.Modal,{title:h,open:e,onCancel:()=>{b.resetFields(),w([]),m()},footer:null,width:800,maskClosable:!N,children:(0,t.jsxs)(l.Form,{form:b,onFinish:_,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:x},children:[(0,t.jsx)(l.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>M(e,"user_email"),onSelect:(e,t)=>O(e,t),options:"user_email"===C?v:[],loading:j,allowClear:!0,"data-testid":"member-email-search"})}),(0,t.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,t.jsx)(l.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>M(e,"user_id"),onSelect:(e,t)=>O(e,t),options:"user_id"===C?v:[],loading:j,allowClear:!0})}),(0,t.jsx)(l.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(i.Select,{defaultValue:x,children:p.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:(0,t.jsxs)(n.Tooltip,{title:e.description,children:[(0,t.jsx)("span",{className:"font-medium",children:e.label}),(0,t.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(s.Button,{type:"primary",htmlType:"submit",icon:(0,t.jsx)(o.UserAddOutlined,{}),loading:N,children:N?"Adding...":"Add Member"})})]})})}])},276173,e=>{"use strict";var t=e.i(843476),r=e.i(599724),a=e.i(779241),l=e.i(464571),s=e.i(808613),i=e.i(212931),n=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:c,onSubmit:m,initialData:u,mode:g,config:h})=>{let p,[x]=s.Form.useForm(),[f,b]=(0,o.useState)(!1);console.log("Initial Data:",u),(0,o.useEffect)(()=>{if(e)if("edit"===g&&u){let e={...u,role:u.role||h.defaultRole,max_budget_in_team:u.max_budget_in_team||null,tpm_limit:u.tpm_limit||null,rpm_limit:u.rpm_limit||null};console.log("Setting form values:",e),x.setFieldsValue(e)}else x.resetFields(),x.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,u,g,x,h.defaultRole,h.roleOptions]);let v=async e=>{try{b(!0);let t=Object.entries(e).reduce((e,[t,r])=>{if("string"==typeof r){let a=r.trim();return""===a&&("max_budget_in_team"===t||"tpm_limit"===t||"rpm_limit"===t)?{...e,[t]:null}:{...e,[t]:a}}return{...e,[t]:r}},{});console.log("Submitting form data:",t),await Promise.resolve(m(t)),x.resetFields()}catch(e){console.error("Form submission error:",e)}finally{b(!1)}};return(0,t.jsx)(i.Modal,{title:h.title||("add"===g?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:c,children:(0,t.jsxs)(s.Form,{form:x,onFinish:v,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.showEmail&&(0,t.jsx)(s.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,t.jsx)(a.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(r.Text,{children:"OR"})}),h.showUserId&&(0,t.jsx)(s.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(a.TextInput,{placeholder:"user_123"})}),(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Role"}),"edit"===g&&u&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(p=u.role,h.roleOptions.find(e=>e.value===p)?.label||p),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(n.Select,{children:"edit"===g&&u?[...h.roleOptions.filter(e=>e.value===u.role),...h.roleOptions.filter(e=>e.value!==u.role)].map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))})}),h.additionalFields?.map(e=>(0,t.jsx)(s.Form.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:(e=>{switch(e.type){case"input":return(0,t.jsx)(a.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(d.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,t.jsx)(n.Select,{children:e.options?.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(l.Button,{onClick:c,className:"mr-2",disabled:f,children:"Cancel"}),(0,t.jsx)(l.Button,{type:"default",htmlType:"submit",loading:f,children:"add"===g?f?"Adding...":"Add Member":f?"Saving...":"Save Changes"})]})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/293db6ec66827abf.js b/litellm/proxy/_experimental/out/_next/static/chunks/293db6ec66827abf.js deleted file mode 100644 index 176434624a..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/293db6ec66827abf.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),a=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),c=e.i(199133);let d="toolset:";e.s(["default",0,({onChange:e,value:a,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:j=[],isLoading:b}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...x.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...j.map(e=>({label:e.toolset_name,value:`${d}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...a?.servers||[],...a?.accessGroups||[],...(a?.toolsets||[]).map(e=>`${d}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(c.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(d)).map(e=>e.slice(d.length)),a=t.filter(e=>!e.startsWith(d));e({servers:a.filter(e=>!v.has(e)),accessGroups:a.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||b,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(c.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:N[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:N[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:k[e.type]})]})},e.value))})})}],75921)},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),a=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("keys"),n=async(e,t,s,a={})=>{try{let r=(0,l.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:s,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}let c=await o.json();return console.log("/key/list API Response:",c),c}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,a,l={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:a,...l}),queryFn:async()=>await n(i,e,a,{...l,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,l={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:a,...l}),queryFn:async()=>await n(o,e,a,l),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),a=e.i(764205),l=e.i(708347),r=e.i(135214);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,a.getProxyBaseUrl)(),s=`${t}/project/list`,l=await fetch(s,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return l.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&l.all_admin_roles.includes(s||"")})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),a=e.i(764205),l=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&s&&i)})}])},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:c=!1})=>{let[d,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...d.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:g,className:i,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:c,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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"},{id:"SQS",displayName:"SQS",logo:`${t}aws.svg`,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],a=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),l=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,a,"callback_map",0,l,"mapDisplayToInternalNames",0,e=>e.map(e=>l[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),a=e.i(981339),l=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),c=e.i(708347),d=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,a=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return a.json()},p=()=>{let{accessToken:e,userRole:t}=(0,d.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&c.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:c,className:d,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...c}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...c},className:`rounded-md ${d??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(199133),l=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),c=e.i(779241);let{Option:d}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,j]=(0,s.useState)(f),[b,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(l.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(c.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(l.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(l.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?j(!0):(j(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(d,{value:"7d",children:"7 days"}),(0,t.jsx)(d,{value:"30d",children:"30 days"}),(0,t.jsx)(d,{value:"90d",children:"90 days"}),(0,t.jsx)(d,{value:"180d",children:"180 days"}),(0,t.jsx)(d,{value:"365d",children:"365 days"}),(0,t.jsx)(d,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:b,onChange:e=>{let t=e.target.value;v(t),g(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),u&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(250980),l=e.i(797672),r=e.i(68155),i=e.i(304967),n=e.i(629569),o=e.i(599724),c=e.i(269200),d=e.i(427612),u=e.i(64848),m=e.i(942232),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[j,b]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{b(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===N.id?N:e);b(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>w({...v,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,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>w({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];b(e),w({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(d.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(l.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=s.id,b(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===j.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:c=!1,teamId:d})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,l.getPassThroughEndpointsCall)(n,d);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,d]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){return t.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:s},e),t.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"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,s],810757);let a=t.forwardRef(function(e,s){return t.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:s},e),t.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"}))});e.s(["BanIcon",0,a],477386)},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),a=e.i(592968),l=e.i(312361),r=e.i(827252),i=e.i(994388),n=e.i(304967),o=e.i(779241),c=e.i(988297),d=e.i(68155),u=e.i(810757),m=e.i(477386),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),j=Object.keys(p.callbackInfo),b=e=>{x?.(e)},v=(t,s,a)=>{let l=[...e];if("callback_name"===s){let e=p.callback_map[a]||a;l[t]={...l[t],[s]:e,callback_vars:{}}}else l[t]={...l[t],[s]:a};b(l)},w=(t,s,a)=>{let l=[...e];l[t]={...l[t],callback_vars:{...l[t].callback_vars,[s]:a}},b(l)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:j.map(e=>{let s=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,a=s.parentElement;if(a){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),a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.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,t.jsx)(l.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{b([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:c.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((l,c)=>{let u=l.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===l.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{b(e.filter((e,t)=>t!==c))},icon:d.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(c,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,a=s.parentElement;if(a){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),a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(s.Select,{value:l.callback_type,onChange:e=>v(c,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(h,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(h,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,s)=>{if(!e.callback_name)return null;let l=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!l)return null;let i=p.callbackInfo[l]?.dynamic_params||{};return 0===Object.keys(i).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(i).map(([l,i])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:l.replace(/_/g," ")}),(0,t.jsx)(a.Tooltip,{title:`Environment variable reference recommended: os.environ/${l.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.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"===i&&(0,t.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"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(s,l,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(s,l,e.target.value)})]},l))})]})})(l,c)]})]},c)})}),0===e.length&&(0,t.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,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),s=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:l,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(a.default,{value:e,onChange:l,disabledCallbacks:i,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.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,t.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,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(s.Text,{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,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),a=e.i(199133),l=e.i(592968),r=e.i(827252);let{Option:i}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:c="",initialValue:d=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(l.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:d,className:c,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",p," (e.g. 2 ",p,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(404206),l=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),c=e.i(158392),d=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[j,b]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];_(a),b(a&&0!==a.length?a.map((e,t)=>{let[s,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),b([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,a])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let l=document.querySelector(`input[name="${s}"]`);if(l){if(void 0!==l.value&&""!==l.value){let r=((s,a,l)=>{if(null==a)return l;let r=String(a).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?l:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return l}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,l.value,a);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(s.routing_strategy),allowed_fails:a(s.allowed_fails,!0),cooldown_time:a(s.cooldown_time,!0),num_retries:a(s.num_retries,!0),timeout:a(s.timeout,!0),retry_after:a(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:a(s.context_window_fallbacks),retry_policy:a(s.retry_policy),model_group_alias:a(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:a(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(l.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(d.FallbackSelectionForm,{groups:j,onGroupsChange:e=>{b(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:l,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:l,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let a=e?.find(e=>e.organization_id===s.key);if(!a)return!1;let l=t.toLowerCase().trim(),r=(a.organization_alias||"").toLowerCase(),i=(a.organization_id||"").toLowerCase();return r.includes(l)||i.includes(l)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),a=e.i(482725),l=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:c})=>{let d=c?e?.filter(e=>e.team_id===c):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(l.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=d?.find(e=>e.project_id===t.key);if(!s)return!1;let a=e.toLowerCase().trim(),l=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return l.includes(a)||r.includes(a)},optionFilterProp:"children",children:!o&&d?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(764205),l=e.i(599724),r=e.i(482725),i=e.i(91739),n=e.i(500727),o=e.i(531516),c=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:d,toolPermissions:u,onChange:m,disabled:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,j]=(0,s.useState)({}),[b,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===d.length?[]:g.filter(e=>d.includes(e.server_id)),[g,d]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let s=await (0,a.listMCPTools)(t,e);if(s.error)j(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let a=w.current;if(!a[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,c.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===d.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],c=y[e.server_id],d=_[e.server_id],g=b[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(l.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&a.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.map(e=>e.name)})},disabled:c,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:c,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[c&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(r.Spin,{size:"large"}),(0,t.jsx)(l.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),d&&!c&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(l.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(l.Text,{className:"text-sm text-red-500 mt-1",children:d})]}),!c&&!d&&a.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!c&&!d&&a.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(s=>{let a=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(p)return;let t=a?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!c&&!d&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(l.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),a=e.i(109799),l=e.i(510674),r=e.i(109034),i=e.i(292639),n=e.i(135214),o=e.i(500330),c=e.i(827252),d=e.i(912598),u=e.i(677667),m=e.i(130643),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),j=e.i(464571),b=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),V=e.i(533882),B=e.i(844565),R=e.i(651904),G=e.i(939510),D=e.i(460285),K=e.i(663435),z=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(355619),H=e.i(75921),Q=e.i(390605),J=e.i(727749),Y=e.i(764205),X=e.i(237016),Z=e.i(888259);let ee=({apiKey:e})=>{let[s,a]=(0,A.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(X.CopyToClipboard,{text:e,onCopy:()=>{a(!0),Z.default.success("Key copied to clipboard"),setTimeout(()=>a(!1),2e3)},children:(0,t.jsx)(j.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,ee],364769);var et=e.i(435451),es=e.i(916940);let{Option:ea}=k.Select,el=async(e,t,s,a)=>{try{if(null===e||null===t)return[];if(null!==s){let l=(await (0,Y.modelAvailableCall)(s,e,t,!0,a,!0)).data.map(e=>e.id);return console.log("available_model_names:",l),l}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},er=async(e,t,s,a)=>{try{if(null===e||null===t)return;if(null!==s){let l=(await (0,Y.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",l),a(l)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:X,data:Z,addKey:ei,autoOpenCreate:en,prefillData:eo})=>{let{accessToken:ec,userId:ed,userRole:eu,premiumUser:em}=(0,n.default)(),ep=em||null!=eu&&L.rolesWithWriteAccess.includes(eu),{data:eg,isLoading:eh}=(0,a.useOrganizations)(),{data:ex,isLoading:ey}=(0,l.useProjects)(),{data:ef}=(0,i.useUISettings)(),{data:e_}=(0,r.useTags)(),ej=!!ef?.values?.enable_projects_ui,eb=!!ef?.values?.disable_custom_api_keys,ev=e_?Object.values(e_).map(e=>({value:e.name,label:e.name})):[],ew=(0,d.useQueryClient)(),[eN]=b.Form.useForm(),[ek,eS]=(0,A.useState)(!1),[eC,eT]=(0,A.useState)(null),[eI,eA]=(0,A.useState)(null),[eL,eF]=(0,A.useState)([]),[eO,eM]=(0,A.useState)([]),[eP,eE]=(0,A.useState)("you"),[e$,eV]=(0,A.useState)(!1),[eB,eR]=(0,A.useState)(null),[eG,eD]=(0,A.useState)([]),[eK,ez]=(0,A.useState)([]),[eU,eq]=(0,A.useState)([]),[eW,eH]=(0,A.useState)([]),[eQ,eJ]=(0,A.useState)(e),[eY,eX]=(0,A.useState)(null),[eZ,e0]=(0,A.useState)(null),[e1,e2]=(0,A.useState)(!1),[e4,e5]=(0,A.useState)(null),[e3,e6]=(0,A.useState)({}),[e7,e9]=(0,A.useState)([]),[e8,te]=(0,A.useState)(!1),[tt,ts]=(0,A.useState)([]),[ta,tl]=(0,A.useState)([]),[tr,ti]=(0,A.useState)("llm_api"),[tn,to]=(0,A.useState)({}),[tc,td]=(0,A.useState)(!1),[tu,tm]=(0,A.useState)("30d"),[tp,tg]=(0,A.useState)(null),[th,tx]=(0,A.useState)(0),[ty,tf]=(0,A.useState)([]),[t_,tj]=(0,A.useState)(null),tb=()=>{eS(!1),eN.resetFields(),eH([]),tl([]),ti("llm_api"),to({}),td(!1),tm("30d"),tg(null),tx(e=>e+1),tj(null),eX(null),e0(null)},tv=()=>{eS(!1),eT(null),eJ(null),eN.resetFields(),eH([]),tl([]),ti("llm_api"),to({}),td(!1),tm("30d"),tg(null),tx(e=>e+1),tj(null),eX(null),e0(null)};(0,A.useEffect)(()=>{ed&&eu&&ec&&er(ed,eu,ec,eF)},[ec,ed,eu]),(0,A.useEffect)(()=>{ec&&(0,Y.getAgentsList)(ec).then(e=>tf(e?.agents||[])).catch(()=>tf([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,Y.getPoliciesList)(ec)).policies.map(e=>e.policy_name);ez(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,Y.getPromptsList)(ec);eq(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,Y.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);eD(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e6(JSON.parse(e));else{let e=await (0,Y.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e6(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(en&&!e$&&X&&eu&&L.rolesWithWriteAccess.includes(eu)&&(eS(!0),eV(!0),eo)){if(eo.owned_by&&("another_user"===eo.owned_by&&"Admin"!==eu?eE("you"):eE(eo.owned_by)),eo.team_id){let e=X?.find(e=>e.team_id===eo.team_id)||null;e&&(eJ(e),eN.setFieldsValue({team_id:eo.team_id}))}eo.key_alias&&eN.setFieldsValue({key_alias:eo.key_alias}),eo.models&&eo.models.length>0&&eR(eo.models),eo.key_type&&(ti(eo.key_type),eN.setFieldsValue({key_type:eo.key_type}))}},[en,eo,X,e$,eN,eu]);let tw=eO.includes("no-default-models")&&!eQ,tN=async e=>{try{let t,a=e?.key_alias??"",l=e?.team_id??null;if((Z?.filter(e=>e.team_id===l).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${l}, please provide another key alias`);if(J.default.info("Making API Call"),eS(!0),"you"===eP)e.user_id=ed;else if("agent"===eP){if(!t_)return void J.default.fromBackend("Please select an agent");e.agent_id=t_}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eP&&(r.service_account_id=e.key_alias),eW.length>0&&(r={...r,logging:eW.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tu),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(tn).length>0&&(e.aliases=JSON.stringify(tn)),tp?.router_settings&&Object.values(tp.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tp.router_settings),t="service_account"===eP?await (0,Y.keyCreateServiceAccountCall)(ec,e):await (0,Y.keyCreateCall)(ec,ed,e),console.log("key create Response:",t),ei(t),ew.invalidateQueries({queryKey:s.keyKeys.lists()}),eT(t.key),eA(t.soft_budget),J.default.success("Virtual Key Created"),eN.resetFields(),localStorage.removeItem("userData"+ed)}catch(t){console.log("error in create key:",t);let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(s=a.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);J.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(eZ){let e=ex?.find(e=>e.project_id===eZ);eM(e?.models??[]),eN.setFieldValue("models",[]);return}ed&&eu&&ec&&el(ed,eu,ec,eQ?.team_id??null).then(e=>{eM(Array.from(new Set([...eQ?.models??[],...e])))}),eB||eN.setFieldValue("models",[]),eN.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eQ,eZ,ec,ed,eu,eN]),(0,A.useEffect)(()=>{if(!eB||0===eB.length||!eO||0===eO.length)return;let e=eB.filter(e=>eO.includes(e));e.length>0&&eN.setFieldsValue({models:e}),eR(null)},[eB,eO,eN]),(0,A.useEffect)(()=>{if(!eZ||!X)return;let e=ex?.find(e=>e.project_id===eZ);if(!e?.team_id||eQ?.team_id===e.team_id)return;let t=X.find(t=>t.team_id===e.team_id)||null;t&&(eJ(t),eN.setFieldValue("team_id",t.team_id))},[X,eZ,ex]);let tk=async e=>{if(!e)return void e9([]);te(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,Y.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e9(s)}catch(e){console.error("Error fetching users:",e),J.default.fromBackend("Failed to search for users")}finally{te(!1)}},tS=(0,A.useCallback)((0,I.default)(e=>tk(e),300),[ec]);return(0,t.jsxs)("div",{children:[eu&&L.rolesWithWriteAccess.includes(eu)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eS(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:ek,width:1e3,footer:null,onOk:tb,onCancel:tv,children:(0,t.jsxs)(b.Form,{form:eN,onFinish:tN,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(N.Radio.Group,{onChange:e=>eE(e.target.value),value:eP,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===eu&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eP&&(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===eP,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tS(e)},onSelect:(e,t)=>{let s;return s=t.user,void eN.setFieldsValue({user_id:s.user_id})},options:e7,loading:e8,allowClear:!0,style:{width:"100%"},notFoundContent:e8?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e2(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===eP&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:t_,onChange:e=>tj(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:ty.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(z.default,{organizations:eg,loading:eh,disabled:"Admin"!==eu,onChange:e=>{eX(e||null),eJ(null),e0(null),eN.setFieldValue("team_id",void 0),eN.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===eP,message:"Please select a team for the service account"}],help:"service_account"===eP?"required":"",children:(0,t.jsx)(K.default,{disabled:null!==eZ,organizationId:eY,onTeamSelect:e=>{eJ(e),e0(null),eN.setFieldValue("project_id",void 0),e?.organization_id?(eX(e.organization_id),eN.setFieldValue("organization_id",e.organization_id)):e||(eX(null),eN.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(U.default,{projects:ex,teamId:eQ?.team_id,loading:ey||!X,onChange:e=>{if(!e){e0(null),eJ(null),eN.setFieldValue("team_id",void 0);return}e0(e)}})})]}),tw&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tw&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eP||"another_user"===eP?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eP||"another_user"===eP?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===eP?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tr||"read_only"===tr?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tr||"read_only"===tr,onChange:e=>{e.includes("all-team-models")&&eN.setFieldsValue({models:["all-team-models"]})},children:[!eZ&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eO.map(e=>(0,t.jsx)(ea,{value:e,children:(0,W.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{ti(e),("management"===e||"read_only"===e)&&eN.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tw&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(et.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(P.default,{onChange:e=>eN.setFieldValue("budget_duration",e)})}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(et.default,{step:1,width:400})}),(0,t.jsx)(G.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eN,showDetailedDescriptions:!0}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(et.default,{step:1,width:400})}),(0,t.jsx)(G.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eN,showDetailedDescriptions:!0}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:ep?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:ep?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!ep,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:em?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!em,placeholder:em?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:em?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!em,placeholder:em?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eU.map(e=>({value:e,label:e}))})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:em?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(B.default,{onChange:e=>eN.setFieldValue("allowed_passthrough_routes",e),value:eN.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:em?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!em,teamId:eQ?eQ.team_id:null})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(es.default,{onChange:e=>eN.setFieldValue("allowed_vector_store_ids",e),value:eN.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:ev})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(H.default,{onChange:e=>eN.setFieldValue("allowed_mcp_servers_and_groups",e),value:eN.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eQ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(Q.default,{accessToken:ec,selectedServers:eN.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:eN.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eN.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eN.setFieldValue("allowed_agents_and_groups",e),value:eN.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),em?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(R.default,{value:eW,onChange:eH,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tl})})})]}):(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(R.default,{value:eW,onChange:eH,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tl})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(D.default,{accessToken:ec||"",value:tp||void 0,onChange:tg,modelData:eL.length>0?{data:eL.map(e=>({model_name:e}))}:void 0},th)})})]},`router-settings-accordion-${th}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(V.default,{accessToken:ec,initialModelAliases:tn,onAliasUpdate:to,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)($.default,{form:eN,autoRotationEnabled:tc,onAutoRotationChange:td,rotationInterval:tu,onRotationIntervalChange:tm,isCreateMode:!0})})}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:Y.proxyBaseUrl?`${Y.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(c.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(E.default,{schemaComponent:"GenerateKeyRequest",form:eN,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eb?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tw,style:{opacity:tw?.5:1},children:"Create Key"})})]})}),e1&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e1,onCancel:()=>e2(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ed,accessToken:ec,teams:X,possibleUIRoles:e3,onUserCreated:e=>{e5(e),eN.setFieldsValue({user_id:e}),e2(!1)},isEmbedded:!0})}),eC&&(0,t.jsx)(w.Modal,{open:ek,onOk:tb,onCancel:tv,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eC?(0,t.jsx)(ee,{apiKey:eC}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,el,"fetchUserModels",0,er],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2bca6e6a96b0858a.js b/litellm/proxy/_experimental/out/_next/static/chunks/2bca6e6a96b0858a.js new file mode 100644 index 0000000000..1d27002abf --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/2bca6e6a96b0858a.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),o=e.i(673706),a=e.i(271645);let l=a.default.forwardRef((e,l)=>{let{color:s,className:i,children:n}=e;return a.default.createElement("p",{ref:l,className:(0,r.tremorTwMerge)("text-tremor-default",s?(0,o.getColorClassNames)(s,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),i)},n)});l.displayName="Text",e.s(["default",()=>l],936325),e.s(["Text",()=>l],599724)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),o=e.i(271645);let a=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],l=e=>({_s:e,status:a[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),s=e=>e?6:5,i=(e,t,r,o,a)=>{clearTimeout(o.current);let s=l(e);t(s),r.current=s,a&&a({current:s})};var n=e.i(480731),d=e.i(444755),c=e.i(673706);let m=e=>{var r=(0,t.__rest)(e,[]);return o.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),o.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),o.default.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 u=e.i(95779);let g={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"}},h=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,u.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,u.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,u.colorPalette.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,c.getColorClassNames)(t,u.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},x=(0,c.makeClassName)("Button"),f=({loading:e,iconSize:t,iconPosition:r,Icon:a,needMargin:l,transitionStatus:s})=>{let i=l?r===n.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),u={default:c,entering:c,entered:t,exiting:t,exited:c};return e?o.default.createElement(m,{className:(0,d.tremorTwMerge)(x("icon"),"animate-spin shrink-0",i,u.default,u[s]),style:{transition:"width 150ms"}}):o.default.createElement(a,{className:(0,d.tremorTwMerge)(x("icon"),"shrink-0",t,i)})},p=o.default.forwardRef((e,a)=>{let{icon:m,iconPosition:u=n.HorizontalPositions.Left,size:p=n.Sizes.SM,color:b,variant:C="primary",disabled:v,loading:k=!1,loadingText:w,children:T,tooltip:N,className:y}=e,P=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),j=k||v,_=void 0!==m||k,B=k&&w,S=!(!T&&!B),z=(0,d.tremorTwMerge)(g[p].height,g[p].width),E="light"!==C?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",M=h(C,b),R=("light"!==C?{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"}})[p],{tooltipProps:L,getReferenceProps:H}=(0,r.useTooltip)(300),[X,Y]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:a,timeout:n,initialEntered:d,mountOnEnter:c,unmountOnExit:m,onStateChange:u}={})=>{let[g,h]=(0,o.useState)(()=>l(d?2:s(c))),x=(0,o.useRef)(g),f=(0,o.useRef)(0),[p,b]="object"==typeof n?[n.enter,n.exit]:[n,n],C=(0,o.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return s(t)}})(x.current._s,m);e&&i(e,h,x,f,u)},[u,m]);return[g,(0,o.useCallback)(o=>{let l=e=>{switch(i(e,h,x,f,u),e){case 1:p>=0&&(f.current=((...e)=>setTimeout(...e))(C,p));break;case 4:b>=0&&(f.current=((...e)=>setTimeout(...e))(C,b));break;case 0:case 3:f.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},n=x.current.isEnter;"boolean"!=typeof o&&(o=!n),o?n||l(e?+!r:2):n&&l(t?a?3:4:s(m))},[C,u,e,t,r,a,p,b,m]),C]})({timeout:50});return(0,o.useEffect)(()=>{Y(k)},[k]),o.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([a,L.refs.setReference]),className:(0,d.tremorTwMerge)(x("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",E,R.paddingX,R.paddingY,R.fontSize,M.textColor,M.bgColor,M.borderColor,M.hoverBorderColor,j?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(h(C,b).hoverTextColor,h(C,b).hoverBgColor,h(C,b).hoverBorderColor),y),disabled:j},H,P),o.default.createElement(r.default,Object.assign({text:N},L)),_&&u!==n.HorizontalPositions.Right?o.default.createElement(f,{loading:k,iconSize:z,iconPosition:u,Icon:m,transitionStatus:X.status,needMargin:S}):null,B||T?o.default.createElement("span",{className:(0,d.tremorTwMerge)(x("text"),"text-tremor-default whitespace-nowrap")},B?w:T):null,_&&u===n.HorizontalPositions.Right?o.default.createElement(f,{loading:k,iconSize:z,iconPosition:u,Icon:m,transitionStatus:X.status,needMargin:S}):null)});p.displayName="Button",e.s(["Button",()=>p],994388)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(480731),a=e.i(95779),l=e.i(444755),s=e.i(673706);let i=(0,s.makeClassName)("Card"),n=r.default.forwardRef((e,n)=>{let{decoration:d="",decorationColor:c,children:m,className:u}=e,g=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:n,className:(0,l.tremorTwMerge)(i("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",c?(0,s.getColorClassNames)(c,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case o.HorizontalPositions.Left:return"border-l-4";case o.VerticalPositions.Top:return"border-t-4";case o.HorizontalPositions.Right:return"border-r-4";case o.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),u)},g),m)});n.displayName="Card",e.s(["Card",()=>n],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),o=e.i(444755),a=e.i(673706),l=e.i(271645);let s=l.default.forwardRef((e,s)=>{let{color:i,children:n,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return l.default.createElement("p",Object.assign({ref:s,className:(0,o.tremorTwMerge)("font-medium text-tremor-title",i?(0,a.getColorClassNames)(i,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},c),n)});s.displayName="Title",e.s(["Title",()=>s],629569)},208075,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(304967),a=e.i(629569),l=e.i(599724),s=e.i(779241),i=e.i(994388),n=e.i(275144),d=e.i(764205),c=e.i(727749);e.s(["default",0,({userID:e,userRole:m,accessToken:u})=>{let{logoUrl:g,setLogoUrl:h,faviconUrl:x,setFaviconUrl:f}=(0,n.useTheme)(),[p,b]=(0,r.useState)(""),[C,v]=(0,r.useState)(""),[k,w]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u&&T()},[u]);let T=async()=>{try{let e=(0,d.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",r=await fetch(t,{method:"GET",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${u}`,"Content-Type":"application/json"}});if(r.ok){let e=await r.json();b(e.values?.logo_url||""),v(e.values?.favicon_url||""),h(e.values?.logo_url||null),f(e.values?.favicon_url||null)}}catch(e){console.error("Error fetching theme settings:",e)}},N=async()=>{w(!0);try{let e=(0,d.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${u}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:p||null,favicon_url:C||null})})).ok)c.default.success("Theme settings updated successfully!"),h(p||null),f(C||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating theme settings:",e),c.default.fromBackend("Failed to update theme settings")}finally{w(!1)}},y=async()=>{b(""),v(""),h(null),f(null),w(!0);try{let e=(0,d.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${u}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:null,favicon_url:null})})).ok)c.default.success("Theme settings reset to default!");else throw Error("Failed to reset")}catch(e){console.error("Error resetting theme settings:",e),c.default.fromBackend("Failed to reset theme settings")}finally{w(!1)}};return u?(0,t.jsxs)("div",{className:"w-full mx-auto max-w-4xl px-6 py-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(a.Title,{className:"text-2xl font-bold mb-2",children:"UI Theme Customization"}),(0,t.jsx)(l.Text,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo and favicon."})]}),(0,t.jsx)(o.Card,{className:"shadow-sm p-6",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,t.jsx)(s.TextInput,{placeholder:"https://example.com/logo.png",value:p,onValueChange:e=>{b(e),h(e||null)},className:"w-full"}),(0,t.jsx)(l.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty for default"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Favicon URL"}),(0,t.jsx)(s.TextInput,{placeholder:"https://example.com/favicon.ico",value:C,onValueChange:e=>{v(e),f(e||null)},className:"w-full"}),(0,t.jsx)(l.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom favicon (.ico, .png, or .svg) or leave empty for default"})]}),(0,t.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,t.jsx)(i.Button,{onClick:N,loading:k,disabled:k,color:"indigo",children:"Save Changes"}),(0,t.jsx)(i.Button,{onClick:y,loading:k,disabled:k,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}])},922049,e=>{"use strict";var t=e.i(843476),r=e.i(208075),o=e.i(135214);e.s(["default",0,()=>{let{userId:e,userRole:a,accessToken:l}=(0,o.default)();return(0,t.jsx)(r.default,{userID:e,userRole:a,accessToken:l})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2d977f15b123350d.js b/litellm/proxy/_experimental/out/_next/static/chunks/2d977f15b123350d.js deleted file mode 100644 index 5b3dc0be31..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/2d977f15b123350d.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,244451,e=>{"use strict";let t;e.i(247167);var o=e.i(271645),r=e.i(343794),n=e.i(242064),i=e.i(763731),l=e.i(174428);let a=80*Math.PI,s=e=>{let{dotClassName:t,style:n,hasCircleCls:i}=e;return o.createElement("circle",{className:(0,r.default)(`${t}-circle`,{[`${t}-circle-bg`]:i}),r:40,cx:50,cy:50,strokeWidth:20,style:n})},c=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,i=`${n}-holder`,c=`${i}-hidden`,[d,u]=o.useState(!1);(0,l.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!d)return null;let p={strokeDashoffset:`${a/4}`,strokeDasharray:`${a*m/100} ${a*(100-m)/100}`};return o.createElement("span",{className:(0,r.default)(i,`${n}-progress`,m<=0&&c)},o.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},o.createElement(s,{dotClassName:n,hasCircleCls:!0}),o.createElement(s,{dotClassName:n,style:p})))};function d(e){let{prefixCls:t,percent:n=0}=e,i=`${t}-dot`,l=`${i}-holder`,a=`${l}-hidden`;return o.createElement(o.Fragment,null,o.createElement("span",{className:(0,r.default)(l,n>0&&a)},o.createElement("span",{className:(0,r.default)(i,`${t}-dot-spin`)},[1,2,3,4].map(e=>o.createElement("i",{className:`${t}-dot-item`,key:e})))),o.createElement(c,{prefixCls:t,percent:n}))}function u(e){var t;let{prefixCls:n,indicator:l,percent:a}=e,s=`${n}-dot`;return l&&o.isValidElement(l)?(0,i.cloneElement)(l,{className:(0,r.default)(null==(t=l.props)?void 0:t.className,s),percent:a}):o.createElement(d,{prefixCls:n,percent:a})}e.i(296059);var m=e.i(694758),p=e.i(183293),g=e.i(246422),f=e.i(838378);let h=new m.Keyframes("antSpinMove",{to:{opacity:1}}),v=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),y=(0,g.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:o}=e;return{[t]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:o(o(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:o(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:o(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:o(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:o(o(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:o(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:o(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:o(o(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:o(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:o(e.dotSize).sub(o(e.marginXXS).div(2)).div(2).equal(),height:o(e.dotSize).sub(o(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:h,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:v,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:o(o(e.dotSizeSM).sub(o(e.marginXXS).div(2))).div(2).equal(),height:o(o(e.dotSizeSM).sub(o(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:o(o(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:o(o(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,f.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:o}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:o}}),b=[[30,.05],[70,.03],[96,.01]];var $=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o};let S=e=>{var i;let{prefixCls:l,spinning:a=!0,delay:s=0,className:c,rootClassName:d,size:m="default",tip:p,wrapperClassName:g,style:f,children:h,fullscreen:v=!1,indicator:S,percent:k}=e,x=$(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:C,direction:w,className:E,style:O,indicator:z}=(0,n.useComponentConfig)("spin"),j=C("spin",l),[I,N,D]=y(j),[M,T]=o.useState(()=>a&&(!a||!s||!!Number.isNaN(Number(s)))),A=function(e,t){let[r,n]=o.useState(0),i=o.useRef(null),l="auto"===t;return o.useEffect(()=>(l&&e&&(n(0),i.current=setInterval(()=>{n(e=>{let t=100-e;for(let o=0;o{i.current&&(clearInterval(i.current),i.current=null)}),[l,e]),l?r:t}(M,k);o.useEffect(()=>{if(a){let e=function(e,t,o){var r,n=o||{},i=n.noTrailing,l=void 0!==i&&i,a=n.noLeading,s=void 0!==a&&a,c=n.debounceMode,d=void 0===c?void 0:c,u=!1,m=0;function p(){r&&clearTimeout(r)}function g(){for(var o=arguments.length,n=Array(o),i=0;ie?s?(m=Date.now(),l||(r=setTimeout(d?f:g,e))):g():!0!==l&&(r=setTimeout(d?f:g,void 0===d?e-c:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},g}(s,()=>{T(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}T(!1)},[s,a]);let P=o.useMemo(()=>void 0!==h&&!v,[h,v]),L=(0,r.default)(j,E,{[`${j}-sm`]:"small"===m,[`${j}-lg`]:"large"===m,[`${j}-spinning`]:M,[`${j}-show-text`]:!!p,[`${j}-rtl`]:"rtl"===w},c,!v&&d,N,D),X=(0,r.default)(`${j}-container`,{[`${j}-blur`]:M}),W=null!=(i=null!=S?S:z)?i:t,R=Object.assign(Object.assign({},O),f),B=o.createElement("div",Object.assign({},x,{style:R,className:L,"aria-live":"polite","aria-busy":M}),o.createElement(u,{prefixCls:j,indicator:W,percent:A}),p&&(P||v)?o.createElement("div",{className:`${j}-text`},p):null);return I(P?o.createElement("div",Object.assign({},x,{className:(0,r.default)(`${j}-nested-loading`,g,N,D)}),M&&o.createElement("div",{key:"loading"},B),o.createElement("div",{className:X,key:"container"},h)):v?o.createElement("div",{className:(0,r.default)(`${j}-fullscreen`,{[`${j}-fullscreen-show`]:M},d,N,D)},B):B)};S.setDefaultIndicator=e=>{t=e},e.s(["default",0,S],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},350967,46757,e=>{"use strict";var t=e.i(290571),o=e.i(444755),r=e.i(673706),n=e.i(271645);let i={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},l={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},a={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},s={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},c={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},d={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},u={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},m={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"};e.s(["colSpan",()=>c,"colSpanLg",()=>m,"colSpanMd",()=>u,"colSpanSm",()=>d,"gridCols",()=>i,"gridColsLg",()=>s,"gridColsMd",()=>a,"gridColsSm",()=>l],46757);let p=(0,r.makeClassName)("Grid"),g=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",f=n.default.forwardRef((e,r)=>{let{numItems:c=1,numItemsSm:d,numItemsMd:u,numItemsLg:m,children:f,className:h}=e,v=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),y=g(c,i),b=g(d,l),$=g(u,a),S=g(m,s),k=(0,o.tremorTwMerge)(y,b,$,S);return n.default.createElement("div",Object.assign({ref:r,className:(0,o.tremorTwMerge)(p("root"),"grid",k,h)},v),f)});f.displayName="Grid",e.s(["Grid",()=>f],350967)},530212,e=>{"use strict";var t=e.i(271645);let o=t.forwardRef(function(e,o){return t.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:o},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,o],530212)},689020,e=>{"use strict";var t=e.i(764205);let o=async e=>{try{let o=await (0,t.modelHubCall)(e);if(console.log("model_info:",o),o?.data.length>0){let e=o.data.map(e=>({model_group:e.model_group,mode: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}};e.s(["fetchAvailableModels",0,o])},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var o=e.i(135551),r=e.i(201072),n=e.i(121229),i=e.i(726289),l=e.i(864517),a=e.i(343794),s=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),m=e.i(703923),p={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},g=function(){var e=(0,t.useRef)([]),o=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),r=!1;e.current.forEach(function(e){if(e){r=!0;var n=e.style;n.transitionDuration=".3s, .3s, .3s, .06s",o.current&&t-o.current<100&&(n.transitionDuration="0s, 0s")}}),r&&(o.current=Date.now())}),e.current},f=e.i(410160),h=e.i(392221),v=e.i(654310),y=0,b=(0,v.default)();let $=function(e){var o=t.useState(),r=(0,h.default)(o,2),n=r[0],i=r[1];return t.useEffect(function(){var e;i("rc_progress_".concat((b?(e=y,y+=1):e="TEST_OR_SSR",e)))},[]),e||n};var S=function(e){var o=e.bg,r=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:o}},r)};function k(e,t){return Object.keys(e).map(function(o){var r=parseFloat(o),n="".concat(Math.floor(r*t),"%");return"".concat(e[o]," ").concat(n)})}var x=t.forwardRef(function(e,o){var r=e.prefixCls,n=e.color,i=e.gradientId,l=e.radius,a=e.style,s=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,m=e.gapDegree,p=n&&"object"===(0,f.default)(n),g=u/2,h=t.createElement("circle",{className:"".concat(r,"-circle-path"),r:l,cx:g,cy:g,stroke:p?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==s),style:a,ref:o});if(!p)return h;var v="".concat(i,"-conic"),y=k(n,(360-m)/360),b=k(n,1),$="conic-gradient(from ".concat(m?"".concat(180+m/2,"deg"):"0deg",", ").concat(y.join(", "),")"),x="linear-gradient(to ".concat(m?"bottom":"top",", ").concat(b.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:v},h),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(v,")")},t.createElement(S,{bg:x},t.createElement(S,{bg:$}))))}),C=function(e,t,o,r,n,i,l,a,s,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-r)/100*t;return"round"===s&&100!==r&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof a?a:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(n+o/100*360*((360-i)/360)+(0===i?0:({bottom:0,top:180,left:90,right:-90})[l]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},w=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function E(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let O=function(e){var o,r,n,i,l=(0,u.default)((0,u.default)({},p),e),s=l.id,c=l.prefixCls,h=l.steps,v=l.strokeWidth,y=l.trailWidth,b=l.gapDegree,S=void 0===b?0:b,k=l.gapPosition,O=l.trailColor,z=l.strokeLinecap,j=l.style,I=l.className,N=l.strokeColor,D=l.percent,M=(0,m.default)(l,w),T=$(s),A="".concat(T,"-gradient"),P=50-v/2,L=2*Math.PI*P,X=S>0?90+S/2:-90,W=(360-S)/360*L,R="object"===(0,f.default)(h)?h:{count:h,gap:2},B=R.count,q=R.gap,F=E(D),H=E(N),_=H.find(function(e){return e&&"object"===(0,f.default)(e)}),G=_&&"object"===(0,f.default)(_)?"butt":z,K=C(L,W,0,100,X,S,k,O,G,v),U=g();return t.createElement("svg",(0,d.default)({className:(0,a.default)("".concat(c,"-circle"),I),viewBox:"0 0 ".concat(100," ").concat(100),style:j,id:s,role:"presentation"},M),!B&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:P,cx:50,cy:50,stroke:O,strokeLinecap:G,strokeWidth:y||v,style:K}),B?(o=Math.round(B*(F[0]/100)),r=100/B,n=0,Array(B).fill(null).map(function(e,i){var l=i<=o-1?H[0]:O,a=l&&"object"===(0,f.default)(l)?"url(#".concat(A,")"):void 0,s=C(L,W,n,r,X,S,k,l,"butt",v,q);return n+=(W-s.strokeDashoffset+q)*100/W,t.createElement("circle",{key:i,className:"".concat(c,"-circle-path"),r:P,cx:50,cy:50,stroke:a,strokeWidth:v,opacity:1,style:s,ref:function(e){U[i]=e}})})):(i=0,F.map(function(e,o){var r=H[o]||H[H.length-1],n=C(L,W,i,e,X,S,k,r,G,v);return i+=e,t.createElement(x,{key:o,color:r,ptg:e,radius:P,prefixCls:c,gradientId:A,style:n,strokeLinecap:G,strokeWidth:v,gapDegree:S,ref:function(e){U[o]=e},size:100})}).reverse()))};var z=e.i(491816);e.i(765846);var j=e.i(896091);function I(e){return!e||e<0?0:e>100?100:e}function N({success:e,successPercent:t}){let o=t;return e&&"progress"in e&&(o=e.progress),e&&"percent"in e&&(o=e.percent),o}let D=(e,t,o)=>{var r,n,i,l;let a=-1,s=-1;if("step"===t){let t=o.steps,r=o.strokeWidth;"string"==typeof e||void 0===e?(a="small"===e?2:14,s=null!=r?r:8):"number"==typeof e?[a,s]=[e,e]:[a=14,s=8]=Array.isArray(e)?e:[e.width,e.height],a*=t}else if("line"===t){let t=null==o?void 0:o.strokeWidth;"string"==typeof e||void 0===e?s=t||("small"===e?6:8):"number"==typeof e?[a,s]=[e,e]:[a=-1,s=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[a,s]="small"===e?[60,60]:[120,120]:"number"==typeof e?[a,s]=[e,e]:Array.isArray(e)&&(a=null!=(n=null!=(r=e[0])?r:e[1])?n:120,s=null!=(l=null!=(i=e[0])?i:e[1])?l:120));return[a,s]},M=e=>{let{prefixCls:o,trailColor:r=null,strokeLinecap:n="round",gapPosition:i,gapDegree:l,width:s=120,type:c,children:d,success:u,size:m=s,steps:p}=e,[g,f]=D(m,"circle"),{strokeWidth:h}=e;void 0===h&&(h=Math.max(3/g*100,6));let v=t.useMemo(()=>l||0===l?l:"dashboard"===c?75:void 0,[l,c]),y=(({percent:e,success:t,successPercent:o})=>{let r=I(N({success:t,successPercent:o}));return[r,I(I(e)-r)]})(e),b="[object Object]"===Object.prototype.toString.call(e.strokeColor),$=(({success:e={},strokeColor:t})=>{let{strokeColor:o}=e;return[o||j.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),S=(0,a.default)(`${o}-inner`,{[`${o}-circle-gradient`]:b}),k=t.createElement(O,{steps:p,percent:p?y[1]:y,strokeWidth:h,trailWidth:h,strokeColor:p?$[1]:$,strokeLinecap:n,trailColor:r,prefixCls:o,gapDegree:v,gapPosition:i||"dashboard"===c&&"bottom"||void 0}),x=g<=20,C=t.createElement("div",{className:S,style:{width:g,height:f,fontSize:.15*g+6}},k,!x&&d);return x?t.createElement(z.default,{title:d},C):C};e.i(296059);var T=e.i(694758),A=e.i(915654),P=e.i(183293),L=e.i(246422),X=e.i(838378);let W="--progress-line-stroke-color",R="--progress-percent",B=e=>{let t=e?"100%":"-100%";return new T.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},q=(0,L.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),o=(0,X.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:o}=e;return{[t]:Object.assign(Object.assign({},(0,P.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${W})`]},height:"100%",width:`calc(1 / var(${R}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[o]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,A.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:B(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:B(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(o),(e=>{let{componentCls:t,iconCls:o}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[o]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(o),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(o),(e=>{let{componentCls:t,iconCls:o}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${o}`]:{fontSize:e.fontSizeSM}}}})(o)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var F=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o};let H=e=>{let{prefixCls:o,direction:r,percent:n,size:i,strokeWidth:l,strokeColor:s,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:m,success:p}=e,{align:g,type:f}=m,h=s&&"string"!=typeof s?((e,t)=>{let{from:o=j.presetPrimaryColors.blue,to:r=j.presetPrimaryColors.blue,direction:n="rtl"===t?"to left":"to right"}=e,i=F(e,["from","to","direction"]);if(0!==Object.keys(i).length){let e,t=(e=[],Object.keys(i).forEach(t=>{let o=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(o)||e.push({key:o,value:i[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),o=`linear-gradient(${n}, ${t})`;return{background:o,[W]:o}}let l=`linear-gradient(${n}, ${o}, ${r})`;return{background:l,[W]:l}})(s,r):{[W]:s,background:s},v="square"===c||"butt"===c?0:void 0,[y,b]=D(null!=i?i:[-1,l||("small"===i?6:8)],"line",{strokeWidth:l}),$=Object.assign(Object.assign({width:`${I(n)}%`,height:b,borderRadius:v},h),{[R]:I(n)/100}),S=N(e),k={width:`${I(S)}%`,height:b,borderRadius:v,backgroundColor:null==p?void 0:p.strokeColor},x=t.createElement("div",{className:`${o}-inner`,style:{backgroundColor:u||void 0,borderRadius:v}},t.createElement("div",{className:(0,a.default)(`${o}-bg`,`${o}-bg-${f}`),style:$},"inner"===f&&d),void 0!==S&&t.createElement("div",{className:`${o}-success-bg`,style:k})),C="outer"===f&&"start"===g,w="outer"===f&&"end"===g;return"outer"===f&&"center"===g?t.createElement("div",{className:`${o}-layout-bottom`},x,d):t.createElement("div",{className:`${o}-outer`,style:{width:y<0?"100%":y}},C&&d,x,w&&d)},_=e=>{let{size:o,steps:r,rounding:n=Math.round,percent:i=0,strokeWidth:l=8,strokeColor:s,trailColor:c=null,prefixCls:d,children:u}=e,m=n(i/100*r),[p,g]=D(null!=o?o:["small"===o?2:14,l],"step",{steps:r,strokeWidth:l}),f=p/r,h=Array.from({length:r});for(let e=0;et.indexOf(r)&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o};let K=["normal","exception","active","success"],U=t.forwardRef((e,d)=>{let u,{prefixCls:m,className:p,rootClassName:g,steps:f,strokeColor:h,percent:v=0,size:y="default",showInfo:b=!0,type:$="line",status:S,format:k,style:x,percentPosition:C={}}=e,w=G(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:E="end",type:O="outer"}=C,z=Array.isArray(h)?h[0]:h,j="string"==typeof h||Array.isArray(h)?h:void 0,T=t.useMemo(()=>{if(z){let e="string"==typeof z?z:Object.values(z)[0];return new o.FastColor(e).isLight()}return!1},[h]),A=t.useMemo(()=>{var t,o;let r=N(e);return Number.parseInt(void 0!==r?null==(t=null!=r?r:0)?void 0:t.toString():null==(o=null!=v?v:0)?void 0:o.toString(),10)},[v,e.success,e.successPercent]),P=t.useMemo(()=>!K.includes(S)&&A>=100?"success":S||"normal",[S,A]),{getPrefixCls:L,direction:X,progress:W}=t.useContext(c.ConfigContext),R=L("progress",m),[B,F,U]=q(R),Q="line"===$,V=Q&&!f,Y=t.useMemo(()=>{let o;if(!b)return null;let s=N(e),c=k||(e=>`${e}%`),d=Q&&T&&"inner"===O;return"inner"===O||k||"exception"!==P&&"success"!==P?o=c(I(v),I(s)):"exception"===P?o=Q?t.createElement(i.default,null):t.createElement(l.default,null):"success"===P&&(o=Q?t.createElement(r.default,null):t.createElement(n.default,null)),t.createElement("span",{className:(0,a.default)(`${R}-text`,{[`${R}-text-bright`]:d,[`${R}-text-${E}`]:V,[`${R}-text-${O}`]:V}),title:"string"==typeof o?o:void 0},o)},[b,v,A,P,$,R,k]);"line"===$?u=f?t.createElement(_,Object.assign({},e,{strokeColor:j,prefixCls:R,steps:"object"==typeof f?f.count:f}),Y):t.createElement(H,Object.assign({},e,{strokeColor:z,prefixCls:R,direction:X,percentPosition:{align:E,type:O}}),Y):("circle"===$||"dashboard"===$)&&(u=t.createElement(M,Object.assign({},e,{strokeColor:z,prefixCls:R,progressStatus:P}),Y));let J=(0,a.default)(R,`${R}-status-${P}`,{[`${R}-${"dashboard"===$&&"circle"||$}`]:"line"!==$,[`${R}-inline-circle`]:"circle"===$&&D(y,"circle")[0]<=20,[`${R}-line`]:V,[`${R}-line-align-${E}`]:V,[`${R}-line-position-${O}`]:V,[`${R}-steps`]:f,[`${R}-show-info`]:b,[`${R}-${y}`]:"string"==typeof y,[`${R}-rtl`]:"rtl"===X},null==W?void 0:W.className,p,g,F,U);return B(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==W?void 0:W.style),x),className:J,role:"progressbar","aria-valuenow":A,"aria-valuemin":0,"aria-valuemax":100},(0,s.default)(w,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,U],309821)},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),o=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var n=e.i(9583),i=o.forwardRef(function(e,i){return o.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["default",0,i],597440)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2e2075aa68530439.js b/litellm/proxy/_experimental/out/_next/static/chunks/2e2075aa68530439.js deleted file mode 100644 index 8925693d47..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/2e2075aa68530439.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,860585,e=>{"use strict";var s=e.i(843476),t=e.i(199133);let{Option:l}=t.Select;e.s(["default",0,({value:e,onChange:a,className:r="",style:i={}})=>(0,s.jsxs)(t.Select,{style:{width:"100%",...i},value:e||void 0,onChange:a,className:r,placeholder:"n/a",allowClear:!0,children:[(0,s.jsx)(l,{value:"24h",children:"daily"}),(0,s.jsx)(l,{value:"7d",children:"weekly"}),(0,s.jsx)(l,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])},355619,e=>{"use strict";var s=e.i(764205);let t=async(e,t,l)=>{try{if(null===e||null===t)return;if(null!==l){let a=(await (0,s.modelAvailableCall)(l,e,t,!0,null,!0)).data.map(e=>e.id),r=[],i=[];return a.forEach(e=>{e.endsWith("/*")?r.push(e):i.push(e)}),[...r,...i]}}catch(e){console.error("Error fetching user models:",e)}};e.s(["fetchAvailableModelsForTeamOrKey",0,t,"getModelDisplayName",0,e=>{if("all-proxy-models"===e)return"All Proxy Models";if(e.endsWith("/*")){let s=e.replace("/*","");return`All ${s} models`}return e},"unfurlWildcardModelsInList",0,(e,s)=>{let t=[],l=[];return console.log("teamModels",e),console.log("allModels",s),e.forEach(e=>{if(e.endsWith("/*")){let a=e.replace("/*",""),r=s.filter(e=>e.startsWith(a+"/"));l.push(...r),t.push(e)}else l.push(e)}),[...t,...l].filter((e,s,t)=>t.indexOf(e)===s)}])},213205,e=>{"use strict";e.i(247167);var s=e.i(931067),t=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-add",theme:"outlined"};var a=e.i(9583),r=t.forwardRef(function(e,r){return t.createElement(a.default,(0,s.default)({},e,{ref:r,icon:l}))});e.s(["UserAddOutlined",0,r],213205)},285027,e=>{"use strict";e.i(247167);var s=e.i(931067),t=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"};var a=e.i(9583),r=t.forwardRef(function(e,r){return t.createElement(a.default,(0,s.default)({},e,{ref:r,icon:l}))});e.s(["WarningOutlined",0,r],285027)},447082,e=>{"use strict";var s=e.i(843476),t=e.i(271645),l=e.i(599724),a=e.i(464571),r=e.i(212931),i=e.i(291542),n=e.i(515831),d=e.i(898586),o=e.i(519756),c=e.i(737434),m=e.i(285027),u=e.i(993914),x=e.i(955135);e.i(247167);var h=e.i(931067);let p={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 42h216v494zM472 744a40 40 0 1080 0 40 40 0 10-80 0zm16-104h48c4.4 0 8-3.6 8-8V448c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8z"}}]},name:"file-exclamation",theme:"outlined"};var f=e.i(9583),g=t.forwardRef(function(e,s){return t.createElement(f.default,(0,h.default)({},e,{ref:s,icon:p}))}),j=e.i(764205),y=e.i(59935),v=e.i(220508),b=e.i(964306);let N=t.forwardRef(function(e,s){return t.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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))});var w=e.i(237016),_=e.i(727749);e.s(["default",0,({accessToken:e,teams:h,possibleUIRoles:p,onUsersCreated:f})=>{let[C,S]=(0,t.useState)(!1),[k,I]=(0,t.useState)([]),[T,U]=(0,t.useState)(!1),[V,B]=(0,t.useState)(null),[O,M]=(0,t.useState)(null),[L,F]=(0,t.useState)(null),[z,E]=(0,t.useState)(null),[P,A]=(0,t.useState)(null),[R,D]=(0,t.useState)("http://localhost:4000");(0,t.useEffect)(()=>{(async()=>{try{let s=await (0,j.getProxyUISettings)(e);A(s)}catch(e){console.error("Error fetching UI settings:",e)}})(),D(new URL("/",window.location.href).toString())},[e]);let $=async()=>{U(!0);let s=k.map(e=>({...e,status:"pending"}));I(s);let t=!1;for(let l=0;le.trim()).filter(Boolean),0===s.teams.length&&delete s.teams),a.models&&"string"==typeof a.models&&""!==a.models.trim()&&(s.models=a.models.split(",").map(e=>e.trim()).filter(Boolean),0===s.models.length&&delete s.models),a.max_budget&&""!==a.max_budget.toString().trim()){let e=parseFloat(a.max_budget.toString());!isNaN(e)&&e>0&&(s.max_budget=e)}a.budget_duration&&""!==a.budget_duration.trim()&&(s.budget_duration=a.budget_duration.trim()),a.metadata&&"string"==typeof a.metadata&&""!==a.metadata.trim()&&(s.metadata=a.metadata.trim()),console.log("Sending user data:",s);let r=await (0,j.userCreateCall)(e,null,s);if(console.log("Full response:",r),r&&(r.key||r.user_id)){t=!0,console.log("Success case triggered");let s=r.data?.user_id||r.user_id;try{if(P?.SSO_ENABLED){let e=new URL("/ui",R).toString();I(s=>s.map((s,t)=>t===l?{...s,status:"success",key:r.key||r.user_id,invitation_link:e}:s))}else{let t=await (0,j.invitationCreateCall)(e,s),a=new URL(`/ui?invitation_id=${t.id}`,R).toString();I(e=>e.map((e,s)=>s===l?{...e,status:"success",key:r.key||r.user_id,invitation_link:a}:e))}}catch(e){console.error("Error creating invitation:",e),I(e=>e.map((e,s)=>s===l?{...e,status:"success",key:r.key||r.user_id,error:"User created but failed to generate invitation link"}:e))}}else{console.log("Error case triggered");let e=r?.error||"Failed to create user";console.log("Error message:",e),I(s=>s.map((s,t)=>t===l?{...s,status:"failed",error:e}:s))}}catch(s){console.error("Caught error:",s);let e=s?.response?.data?.error||s?.message||String(s);I(s=>s.map((s,t)=>t===l?{...s,status:"failed",error:e}:s))}}U(!1),t&&f&&f()},W=[{title:"Row",dataIndex:"rowNumber",key:"rowNumber",width:80},{title:"Email",dataIndex:"user_email",key:"user_email"},{title:"Role",dataIndex:"user_role",key:"user_role"},{title:"Teams",dataIndex:"teams",key:"teams"},{title:"Budget",dataIndex:"max_budget",key:"max_budget"},{title:"Status",key:"status",render:(e,t)=>t.isValid?t.status&&"pending"!==t.status?"success"===t.status?(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(v.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}),(0,s.jsx)("span",{className:"text-green-500",children:"Success"})]}),t.invitation_link&&(0,s.jsx)("div",{className:"mt-1",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"text-xs text-gray-500 truncate max-w-[150px]",children:t.invitation_link}),(0,s.jsx)(w.CopyToClipboard,{text:t.invitation_link,onCopy:()=>_.default.success("Invitation link copied!"),children:(0,s.jsx)("button",{className:"ml-1 text-blue-500 text-xs hover:text-blue-700",children:"Copy"})})]})})]}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(b.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,s.jsx)("span",{className:"text-red-500",children:"Failed"})]}),t.error&&(0,s.jsx)("span",{className:"text-sm text-red-500 ml-7",children:JSON.stringify(t.error)})]}):(0,s.jsx)("span",{className:"text-gray-500",children:"Pending"}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(b.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,s.jsx)("span",{className:"text-red-500",children:"Invalid"})]}),t.error&&(0,s.jsx)("span",{className:"text-sm text-red-500 ml-7",children:t.error})]})}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.Button,{type:"primary",className:"mb-0",onClick:()=>S(!0),children:"+ Bulk Invite Users"}),(0,s.jsx)(r.Modal,{title:"Bulk Invite Users",open:C,width:800,onCancel:()=>S(!1),bodyStyle:{maxHeight:"70vh",overflow:"auto"},footer:null,children:(0,s.jsx)("div",{className:"flex flex-col",children:0===k.length?(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"1"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:"Download and fill the template"})]}),(0,s.jsxs)("div",{className:"ml-11 mb-6",children:[(0,s.jsx)("p",{className:"mb-4",children:"Add multiple users at once by following these steps:"}),(0,s.jsxs)("ol",{className:"list-decimal list-inside space-y-2 ml-2 mb-4",children:[(0,s.jsx)("li",{children:"Download our CSV template"}),(0,s.jsx)("li",{children:"Add your users' information to the spreadsheet"}),(0,s.jsx)("li",{children:"Save the file and upload it here"}),(0,s.jsx)("li",{children:"After creation, download the results file containing the Virtual Keys for each user"})]}),(0,s.jsxs)("div",{className:"bg-gray-50 p-4 rounded-md border border-gray-200 mb-4",children:[(0,s.jsx)("h4",{className:"font-medium mb-2",children:"Template Column Names"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"user_email"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"User's email address (required)"})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"user_role"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'User\'s role (one of: "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"teams"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated team IDs (e.g., "team-1,team-2")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"max_budget"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Maximum budget as a number (e.g., "100")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"budget_duration"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Budget reset period (e.g., "30d", "1mo")'})]})]}),(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"models"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated allowed models (e.g., "gpt-3.5-turbo,gpt-4")'})]})]})]})]}),(0,s.jsx)(a.Button,{type:"primary",size:"large",className:"w-full md:w-auto",icon:(0,s.jsx)(c.DownloadOutlined,{}),children:"Download CSV Template"})]}),(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"2"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:"Upload your completed CSV"})]}),(0,s.jsxs)("div",{className:"ml-11",children:[z?(0,s.jsxs)("div",{className:`mb-4 p-4 rounded-md border ${L?"bg-red-50 border-red-200":"bg-blue-50 border-blue-200"}`,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[L?(0,s.jsx)(g,{className:"text-red-500 text-xl mr-3"}):(0,s.jsx)(u.FileTextOutlined,{className:"text-blue-500 text-xl mr-3"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(d.Typography.Text,{strong:!0,className:L?"text-red-800":"text-blue-800",children:z.name}),(0,s.jsxs)(d.Typography.Text,{className:`block text-xs ${L?"text-red-600":"text-blue-600"}`,children:[(z.size/1024).toFixed(1)," KB • ",new Date().toLocaleDateString()]})]})]}),(0,s.jsx)(a.Button,{size:"small",onClick:()=>{E(null),I([]),B(null),M(null),F(null)},className:"flex items-center",icon:(0,s.jsx)(x.DeleteOutlined,{}),children:"Remove"})]}),L?(0,s.jsxs)("div",{className:"mt-3 text-red-600 text-sm flex items-start",children:[(0,s.jsx)(m.WarningOutlined,{className:"mr-2 mt-0.5"}),(0,s.jsx)("span",{children:L})]}):!O&&(0,s.jsxs)("div",{className:"mt-3 flex items-center",children:[(0,s.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:(0,s.jsx)("div",{className:"bg-blue-500 h-1.5 rounded-full w-full animate-pulse"})}),(0,s.jsx)("span",{className:"ml-2 text-xs text-blue-600",children:"Processing..."})]})]}):(0,s.jsx)(n.Upload,{beforeUpload:e=>((B(null),M(null),F(null),E(e),"text/csv"===e.type||e.name.endsWith(".csv"))?e.size>5242880?F(`File is too large (${(e.size/1048576).toFixed(1)} MB). Please upload a CSV file smaller than 5MB.`):y.default.parse(e,{complete:e=>{if(!e.data||0===e.data.length){M("The CSV file appears to be empty. Please upload a file with data."),I([]);return}if(1===e.data.length){M("The CSV file only contains headers but no user data. Please add user data to your CSV."),I([]);return}let s=e.data[0];if(0===s.length||1===s.length&&""===s[0]){M("The CSV file doesn't contain any column headers. Please make sure your CSV has headers."),I([]);return}let t=["user_email","user_role"].filter(e=>!s.includes(e));if(t.length>0){M(`Your CSV is missing these required columns: ${t.join(", ")}. Please add these columns to your CSV file.`),I([]);return}try{let t=e.data.slice(1).map((e,t)=>{if(0===e.length||1===e.length&&""===e[0])return null;if(e.length=parseFloat(l.max_budget.toString())&&a.push("Max budget must be greater than 0")),l.budget_duration&&!l.budget_duration.match(/^\d+[dhmwy]$|^\d+mo$/)&&a.push(`Invalid budget duration format "${l.budget_duration}". Use format like "30d", "1mo", "2w", "6h"`),l.teams&&"string"==typeof l.teams&&h&&h.length>0){let e=h.map(e=>e.team_id),s=l.teams.split(",").map(e=>e.trim()).filter(s=>!e.includes(s));s.length>0&&a.push(`Unknown team(s): ${s.join(", ")}`)}return a.length>0&&(l.isValid=!1,l.error=a.join(", ")),l}).filter(Boolean),l=t.filter(e=>e.isValid);I(t),0===t.length?M("No valid data rows found in the CSV file. Please check your file format."):0===l.length?B("No valid users found in the CSV. Please check the errors below and fix your CSV file."):l.length{B(`Failed to parse CSV file: ${e.message}`),I([])},header:!1}):(F(`Invalid file type: ${e.name}. Please upload a CSV file (.csv extension).`),_.default.fromBackend("Invalid file type. Please upload a CSV file.")),!1),accept:".csv",maxCount:1,showUploadList:!1,children:(0,s.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-blue-500 transition-colors cursor-pointer",children:[(0,s.jsx)(o.UploadOutlined,{className:"text-3xl text-gray-400 mb-2"}),(0,s.jsx)("p",{className:"mb-1",children:"Drag and drop your CSV file here"}),(0,s.jsx)("p",{className:"text-sm text-gray-500 mb-3",children:"or"}),(0,s.jsx)(a.Button,{size:"small",children:"Browse files"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-4",children:"Only CSV files (.csv) are supported"})]})}),O&&(0,s.jsx)("div",{className:"mb-4 p-4 bg-yellow-50 border border-yellow-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(N,{className:"h-5 w-5 text-yellow-500 mr-2 mt-0.5"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(d.Typography.Text,{strong:!0,className:"text-yellow-800",children:"CSV Structure Error"}),(0,s.jsx)(d.Typography.Paragraph,{className:"text-yellow-700 mt-1 mb-0",children:O}),(0,s.jsx)(d.Typography.Paragraph,{className:"text-yellow-700 mt-2 mb-0",children:"Please download our template and ensure your CSV follows the required format."})]})]})})]})]}):(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"3"}),(0,s.jsx)("h3",{className:"text-lg font-medium",children:k.some(e=>"success"===e.status||"failed"===e.status)?"User Creation Results":"Review and create users"})]}),V&&(0,s.jsx)("div",{className:"ml-11 mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(m.WarningOutlined,{className:"text-red-500 mr-2 mt-1"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(l.Text,{className:"text-red-600 font-medium",children:V}),k.some(e=>!e.isValid)&&(0,s.jsxs)("ul",{className:"mt-2 list-disc list-inside text-red-600 text-sm",children:[(0,s.jsx)("li",{children:"Check the table below for specific errors in each row"}),(0,s.jsx)("li",{children:"Common issues include invalid email formats, missing required fields, or incorrect role values"}),(0,s.jsx)("li",{children:"Fix these issues in your CSV file and upload again"})]})]})]})}),(0,s.jsxs)("div",{className:"ml-11",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,s.jsx)("div",{className:"flex items-center",children:k.some(e=>"success"===e.status||"failed"===e.status)?(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(l.Text,{className:"text-lg font-medium mr-3",children:"Creation Summary"}),(0,s.jsxs)(l.Text,{className:"text-sm bg-green-100 text-green-800 px-2 py-1 rounded mr-2",children:[k.filter(e=>"success"===e.status).length," Successful"]}),k.some(e=>"failed"===e.status)&&(0,s.jsxs)(l.Text,{className:"text-sm bg-red-100 text-red-800 px-2 py-1 rounded",children:[k.filter(e=>"failed"===e.status).length," Failed"]})]}):(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(l.Text,{className:"text-lg font-medium mr-3",children:"User Preview"}),(0,s.jsxs)(l.Text,{className:"text-sm bg-blue-100 text-blue-800 px-2 py-1 rounded",children:[k.filter(e=>e.isValid).length," of ",k.length," users valid"]})]})}),!k.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex space-x-3",children:[(0,s.jsx)(a.Button,{onClick:()=>{I([]),B(null)},children:"Back"}),(0,s.jsx)(a.Button,{type:"primary",onClick:$,disabled:0===k.filter(e=>e.isValid).length||T,children:T?"Creating...":`Create ${k.filter(e=>e.isValid).length} Users`})]})]}),k.some(e=>"success"===e.status)&&(0,s.jsx)("div",{className:"mb-4 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"mr-3 mt-1",children:(0,s.jsx)(v.CheckCircleIcon,{className:"h-5 w-5 text-blue-500"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(l.Text,{className:"font-medium text-blue-800",children:"User creation complete"}),(0,s.jsxs)(l.Text,{className:"block text-sm text-blue-700 mt-1",children:[(0,s.jsx)("span",{className:"font-medium",children:"Next step:"})," Download the credentials file containing Virtual Keys and invitation links. Users will need these Virtual Keys to make LLM requests through LiteLLM."]})]})]})}),(0,s.jsx)(i.Table,{dataSource:k,columns:W,size:"small",pagination:{pageSize:5},scroll:{y:300},rowClassName:e=>e.isValid?"":"bg-red-50"}),!k.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,s.jsx)(a.Button,{onClick:()=>{I([]),B(null)},className:"mr-3",children:"Back"}),(0,s.jsx)(a.Button,{type:"primary",onClick:$,disabled:0===k.filter(e=>e.isValid).length||T,children:T?"Creating...":`Create ${k.filter(e=>e.isValid).length} Users`})]}),k.some(e=>"success"===e.status||"failed"===e.status)&&(0,s.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,s.jsx)(a.Button,{onClick:()=>{I([]),B(null)},className:"mr-3",children:"Start New Bulk Import"}),(0,s.jsx)(a.Button,{type:"primary",onClick:()=>{let e=k.map(e=>({user_email:e.user_email,user_role:e.user_role,status:e.status,key:e.key||"",invitation_link:e.invitation_link||"",error:e.error||""})),s=new Blob([y.default.unparse(e)],{type:"text/csv"}),t=window.URL.createObjectURL(s),l=document.createElement("a");l.href=t,l.download="bulk_users_results.csv",document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(t)},icon:(0,s.jsx)(c.DownloadOutlined,{}),children:"Download User Credentials"})]})]})]})})})]})}],447082)},371455,172372,e=>{"use strict";var s=e.i(843476),t=e.i(827252),l=e.i(213205),a=e.i(912598),r=e.i(109799),i=e.i(677667),n=e.i(130643),d=e.i(898667),o=e.i(35983),c=e.i(779241),m=e.i(560445),u=e.i(464571),x=e.i(808613),h=e.i(311451),p=e.i(212931),f=e.i(199133),g=e.i(770914),j=e.i(592968),y=e.i(898586),v=e.i(271645),b=e.i(447082),N=e.i(663435),w=e.i(355619),_=e.i(727749),C=e.i(764205),S=e.i(237016),k=e.i(599724);function I({isInvitationLinkModalVisible:e,setIsInvitationLinkModalVisible:t,baseUrl:l,invitationLinkData:a,modalType:r="invitation"}){let{Title:i,Paragraph:n}=y.Typography,d=()=>{if(!l)return"";let e=new URL(l).pathname,s=e&&"/"!==e?`${e}/ui`:"ui";if(a?.has_user_setup_sso)return new URL(s,l).toString();let t=`${s}?invitation_id=${a?.id}`;return"resetPassword"===r&&(t+="&action=reset_password"),new URL(t,l).toString()};return(0,s.jsxs)(p.Modal,{title:"invitation"===r?"Invitation Link":"Reset Password Link",open:e,width:800,footer:null,onOk:()=>{t(!1)},onCancel:()=>{t(!1)},children:[(0,s.jsx)(n,{children:"invitation"===r?"Copy and send the generated link to onboard this user to the proxy.":"Copy and send the generated link to the user to reset their password."}),(0,s.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,s.jsx)(k.Text,{className:"text-base",children:"User ID"}),(0,s.jsx)(k.Text,{children:a?.user_id})]}),(0,s.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,s.jsx)(k.Text,{children:"invitation"===r?"Invitation Link":"Reset Password Link"}),(0,s.jsx)(k.Text,{children:(0,s.jsx)(k.Text,{children:d()})})]}),(0,s.jsx)("div",{className:"flex justify-end mt-5",children:(0,s.jsx)(S.CopyToClipboard,{text:d(),onCopy:()=>_.default.success("Copied!"),children:(0,s.jsx)(u.Button,{type:"primary",children:"invitation"===r?"Copy invitation link":"Copy password reset link"})})})]})}e.s(["default",()=>I],172372);let{Option:T}=f.Select,{Text:U,Link:V,Title:B}=y.Typography;e.s(["CreateUserButton",0,({userID:e,accessToken:y,teams:S,possibleUIRoles:k,onUserCreated:B,isEmbedded:O=!1})=>{let M=(0,a.useQueryClient)(),[L,F]=(0,v.useState)(null),[z]=x.Form.useForm(),[E,P]=(0,v.useState)(!1),[A,R]=(0,v.useState)(!1),[D,$]=(0,v.useState)([]),[W,K]=(0,v.useState)(!1),[q,H]=(0,v.useState)(null),[G,J]=(0,v.useState)(null),{data:Q=[]}=(0,r.useOrganizations)();(0,v.useMemo)(()=>{let e=Q.flatMap(e=>e.teams||[]);return e.length>0?e:S||[]},[Q,S]),(0,v.useEffect)(()=>{let s=async()=>{try{let s=await (0,C.modelAvailableCall)(y,e,"any"),t=[];for(let e=0;e{try{_.default.info("Making API Call"),O||P(!0),s.models&&0!==s.models.length||"proxy_admin"===s.user_role||(s.models=["no-default-models"]),s.organization_ids&&(s.organizations=s.organization_ids,delete s.organization_ids);let t=await (0,C.userCreateCall)(y,null,s);await M.invalidateQueries({queryKey:["userList"]}),R(!0);let l=t.data?.user_id||t.user_id;if(B&&O){B(l),z.resetFields();return}if(L?.SSO_ENABLED){let s={id:"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let s=16*Math.random()|0;return("x"==e?s:3&s|8).toString(16)}),user_id:l,is_accepted:!1,accepted_at:null,expires_at:new Date(Date.now()+6048e5),created_at:new Date,created_by:e,updated_at:new Date,updated_by:e,has_user_setup_sso:!0};H(s),K(!0)}else(0,C.invitationCreateCall)(y,l).then(e=>{e.has_user_setup_sso=!1,H(e),K(!0)});_.default.success("API user Created"),z.resetFields(),localStorage.removeItem("userData"+e)}catch(s){let e=s.response?.data?.detail||s?.message||"Error creating the user";_.default.fromBackend(e),console.error("Error creating the user:",s)}};return O?(0,s.jsxs)(x.Form,{form:z,onFinish:X,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer"},children:[(0,s.jsx)(m.Alert,{message:"Email invitations",description:(0,s.jsxs)(s.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,s.jsx)(V,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,s.jsx)(x.Form.Item,{label:"User Email",name:"user_email",children:(0,s.jsx)(c.TextInput,{placeholder:""})}),(0,s.jsx)(x.Form.Item,{label:"User Role",name:"user_role",children:(0,s.jsx)(f.Select,{children:k&&Object.entries(k).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(o.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)(U,{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(x.Form.Item,{label:"Team",name:"team_id",children:(0,s.jsx)(N.default,{})}),(0,s.jsx)(x.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(h.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(u.Button,{htmlType:"submit",children:"Create User"})})]}):(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(u.Button,{type:"primary",className:"mb-0",onClick:()=>P(!0),children:"+ Invite User"}),(0,s.jsx)(b.default,{accessToken:y,teams:S,possibleUIRoles:k}),(0,s.jsxs)(p.Modal,{title:"Invite User",open:E,width:800,footer:null,onOk:()=>{P(!1),z.resetFields()},onCancel:()=>{P(!1),R(!1),z.resetFields()},children:[(0,s.jsxs)(g.Space,{direction:"vertical",size:"middle",children:[(0,s.jsx)(U,{className:"mb-1",children:"Create a User who can own keys"}),(0,s.jsx)(m.Alert,{message:"Email invitations",description:(0,s.jsxs)(s.Fragment,{children:["New users receive an email invite only when an email integration (SMTP, Resend, or SendGrid) is configured."," ",(0,s.jsx)(V,{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",children:"Learn how to set up email notifications"})]}),type:"info",showIcon:!0,className:"mb-4"})]}),(0,s.jsxs)(x.Form,{form:z,onFinish:X,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{user_role:"internal_user_viewer"},children:[(0,s.jsx)(x.Form.Item,{label:"User Email",name:"user_email",children:(0,s.jsx)(h.Input,{})}),(0,s.jsx)(x.Form.Item,{label:(0,s.jsxs)("span",{children:["Global Proxy Role"," ",(0,s.jsx)(j.Tooltip,{title:"This role is independent of any team/org specific roles. Configure Team / Organization Admins in the Settings",children:(0,s.jsx)(t.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,s.jsx)(f.Select,{children:k&&Object.entries(k).map(([e,{ui_label:t,description:l}])=>(0,s.jsxs)(o.SelectItem,{value:e,title:t,children:[(0,s.jsx)(U,{children:t}),(0,s.jsxs)(U,{type:"secondary",children:[" - ",l]})]},e))})}),(0,s.jsx)(x.Form.Item,{label:"Team",className:"gap-2",name:"team_id",help:"If selected, user will be added as a 'user' role to the team.",children:(0,s.jsx)(N.default,{})}),(0,s.jsx)(x.Form.Item,{label:"Organization",name:"organization_ids",help:"The user will be added to the selected organization(s).",children:(0,s.jsx)(f.Select,{mode:"multiple",placeholder:"Select Organization",style:{width:"100%"},children:Q.map(e=>(0,s.jsxs)(T,{value:e.organization_id,children:[e.organization_alias," (",e.organization_id,")"]},e.organization_id))})}),(0,s.jsx)(x.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(h.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsxs)(i.Accordion,{children:[(0,s.jsx)(d.AccordionHeader,{children:(0,s.jsx)(U,{strong:!0,children:"Personal Key Creation"})}),(0,s.jsx)(n.AccordionBody,{children:(0,s.jsx)(x.Form.Item,{className:"gap-2",label:(0,s.jsxs)("span",{children:["Models"," ",(0,s.jsx)(j.Tooltip,{title:"Models user has access to, outside of team scope.",children:(0,s.jsx)(t.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",help:"Models user has access to, outside of team scope.",children:(0,s.jsxs)(f.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,s.jsx)(f.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,s.jsx)(f.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),D.map(e=>(0,s.jsx)(f.Select.Option,{value:e,children:(0,w.getModelDisplayName)(e)},e))]})})})]}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(u.Button,{type:"primary",icon:(0,s.jsx)(l.UserAddOutlined,{}),htmlType:"submit",children:"Invite User"})})]})]}),A&&(0,s.jsx)(I,{isInvitationLinkModalVisible:W,setIsInvitationLinkModalVisible:K,baseUrl:G||"",invitationLinkData:q})]})}],371455)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2f29909dc244a7c0.js b/litellm/proxy/_experimental/out/_next/static/chunks/2f29909dc244a7c0.js new file mode 100644 index 0000000000..1b1f36356d --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/2f29909dc244a7c0.js @@ -0,0 +1,10 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,888288,e=>{"use strict";var t=e.i(271645);let r=(e,r)=>{let n=void 0!==r,[l,a]=(0,t.useState)(e);return[n?r:l,e=>{n||a(e)}]};e.s(["default",()=>r])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(908206),l=e.i(242064),a=e.i(517455),i=e.i(150073);let o={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var d=e.i(876556),c=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r},u=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let m=e=>{let{itemPrefixCls:n,component:l,span:a,className:i,style:o,labelStyle:d,contentStyle:c,bordered:u,label:m,content:g,colon:b,type:f,styles:p}=e,{classNames:h}=t.useContext(s),v=Object.assign(Object.assign({},d),null==p?void 0:p.label),y=Object.assign(Object.assign({},c),null==p?void 0:p.content);if(u)return t.createElement(l,{colSpan:a,style:o,className:(0,r.default)(i,{[`${n}-item-${f}`]:"label"===f||"content"===f,[null==h?void 0:h.label]:(null==h?void 0:h.label)&&"label"===f,[null==h?void 0:h.content]:(null==h?void 0:h.content)&&"content"===f})},null!=m&&t.createElement("span",{style:v},m),null!=g&&t.createElement("span",{style:y},g));return t.createElement(l,{colSpan:a,style:o,className:(0,r.default)(`${n}-item`,i)},t.createElement("div",{className:`${n}-item-container`},null!=m&&t.createElement("span",{style:v,className:(0,r.default)(`${n}-item-label`,null==h?void 0:h.label,{[`${n}-item-no-colon`]:!b})},m),null!=g&&t.createElement("span",{style:y,className:(0,r.default)(`${n}-item-content`,null==h?void 0:h.content)},g)))};function g(e,{colon:r,prefixCls:n,bordered:l},{component:a,type:i,showLabel:o,showContent:s,labelStyle:d,contentStyle:c,styles:u}){return e.map(({label:e,children:g,prefixCls:b=n,className:f,style:p,labelStyle:h,contentStyle:v,span:y=1,key:$,styles:x},O)=>"string"==typeof a?t.createElement(m,{key:`${i}-${$||O}`,className:f,style:p,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),h),null==x?void 0:x.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),v),null==x?void 0:x.content)},span:y,colon:r,component:a,itemPrefixCls:b,bordered:l,label:o?e:null,content:s?g:null,type:i}):[t.createElement(m,{key:`label-${$||O}`,className:f,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),p),h),null==x?void 0:x.label),span:1,colon:r,component:a[0],itemPrefixCls:b,bordered:l,label:e,type:"label"}),t.createElement(m,{key:`content-${$||O}`,className:f,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),p),v),null==x?void 0:x.content),span:2*y-1,component:a[1],itemPrefixCls:b,bordered:l,content:g,type:"content"})])}let b=e=>{let r=t.useContext(s),{prefixCls:n,vertical:l,row:a,index:i,bordered:o}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${n}-row`},g(a,e,Object.assign({component:"th",type:"label",showLabel:!0},r))),t.createElement("tr",{key:`content-${i}`,className:`${n}-row`},g(a,e,Object.assign({component:"td",type:"content",showContent:!0},r)))):t.createElement("tr",{key:i,className:`${n}-row`},g(a,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},r)))};e.i(296059);var f=e.i(915654),p=e.i(183293),h=e.i(246422),v=e.i(838378);let y=(0,h.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:r,itemPaddingBottom:n,itemPaddingEnd:l,colonMarginRight:a,colonMarginLeft:i,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,p.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:r}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.padding)} ${(0,f.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:r,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.paddingSM)} ${(0,f.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.paddingXS)} ${(0,f.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:o},[`${t}-title`]:Object.assign(Object.assign({},p.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:r,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:n,paddingInlineEnd:l},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,f.unit)(i)} ${(0,f.unit)(a)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,v.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var $=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let x=e=>{let m,{prefixCls:g,title:f,extra:p,column:h,colon:v=!0,bordered:x,layout:O,children:S,className:j,rootClassName:w,style:E,size:C,labelStyle:T,contentStyle:k,styles:N,items:L,classNames:M}=e,P=$(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:R,direction:B,className:z,style:I,classNames:H,styles:F}=(0,l.useComponentConfig)("descriptions"),W=R("descriptions",g),A=(0,i.default)(),G=t.useMemo(()=>{var e;return"number"==typeof h?h:null!=(e=(0,n.matchScreen)(A,Object.assign(Object.assign({},o),h)))?e:3},[A,h]),D=(m=t.useMemo(()=>L||(0,d.default)(S).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[L,S]),t.useMemo(()=>m.map(e=>{var{span:t}=e,r=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},r),{filled:!0}):Object.assign(Object.assign({},r),{span:"number"==typeof t?t:(0,n.matchScreen)(A,t)})}),[m,A])),X=(0,a.default)(C),V=((e,r)=>{let[n,l]=(0,t.useMemo)(()=>{let t,n,l,a;return t=[],n=[],l=!1,a=0,r.filter(e=>e).forEach(r=>{let{filled:i}=r,o=u(r,["filled"]);if(i){n.push(o),t.push(n),n=[],a=0;return}let s=e-a;(a+=r.span||1)>=e?(a>e?(l=!0,n.push(Object.assign(Object.assign({},o),{span:s}))):n.push(o),t.push(n),n=[],a=0):n.push(o)}),n.length>0&&t.push(n),[t=t.map(t=>{let r=t.reduce((e,t)=>e+(t.span||1),0);if(r({labelStyle:T,contentStyle:k,styles:{content:Object.assign(Object.assign({},F.content),null==N?void 0:N.content),label:Object.assign(Object.assign({},F.label),null==N?void 0:N.label)},classNames:{label:(0,r.default)(H.label,null==M?void 0:M.label),content:(0,r.default)(H.content,null==M?void 0:M.content)}}),[T,k,N,M,H,F]);return q(t.createElement(s.Provider,{value:U},t.createElement("div",Object.assign({className:(0,r.default)(W,z,H.root,null==M?void 0:M.root,{[`${W}-${X}`]:X&&"default"!==X,[`${W}-bordered`]:!!x,[`${W}-rtl`]:"rtl"===B},j,w,_,K),style:Object.assign(Object.assign(Object.assign(Object.assign({},I),F.root),null==N?void 0:N.root),E)},P),(f||p)&&t.createElement("div",{className:(0,r.default)(`${W}-header`,H.header,null==M?void 0:M.header),style:Object.assign(Object.assign({},F.header),null==N?void 0:N.header)},f&&t.createElement("div",{className:(0,r.default)(`${W}-title`,H.title,null==M?void 0:M.title),style:Object.assign(Object.assign({},F.title),null==N?void 0:N.title)},f),p&&t.createElement("div",{className:(0,r.default)(`${W}-extra`,H.extra,null==M?void 0:M.extra),style:Object.assign(Object.assign({},F.extra),null==N?void 0:N.extra)},p)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,V.map((e,r)=>t.createElement(b,{key:r,index:r,colon:v,prefixCls:W,vertical:"vertical"===O,bordered:x,row:e}))))))))};x.Item=({children:e})=>e,e.s(["Descriptions",0,x],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var l=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(l.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["ExclamationCircleOutlined",0,a],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(529681),l=e.i(242064),a=e.i(517455),i=e.i(185793),o=e.i(721369),s=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let d=e=>{var{prefixCls:n,className:a,hoverable:i=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("card",n),u=(0,r.default)(`${c}-grid`,a,{[`${c}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},o,{className:u}))};e.i(296059);var c=e.i(915654),u=e.i(183293),m=e.i(246422),g=e.i(838378);let b=(0,m.genStyleHooks)("Card",e=>{let t=(0,g.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:r,cardHeadPadding:n,colorBorderSecondary:l,boxShadowTertiary:a,bodyPadding:i,extraColor:o}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:n,headerPadding:l,tabsMarginBottom:a}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,marginBottom:-1,padding:`0 ${(0,c.unit)(l)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[` + > ${r}-typography, + > ${r}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:a,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:i,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:n,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${(0,c.unit)(l)} 0 0 0 ${r}, + 0 ${(0,c.unit)(l)} 0 0 ${r}, + ${(0,c.unit)(l)} ${(0,c.unit)(l)} 0 0 ${r}, + ${(0,c.unit)(l)} 0 0 0 ${r} inset, + 0 ${(0,c.unit)(l)} 0 0 ${r} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:n}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:r,actionsLiMargin:n,cardActionsIconSize:l,colorBorderSecondary:a,actionsBg:i}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:i,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${a}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:n,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:l,lineHeight:(0,c.unit)(e.calc(l).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${a}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${l}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:r}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:n}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:r,headerPadding:n,bodyPadding:l}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(n)}`,background:r,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(l)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:r,headerPaddingSM:n,headerHeightSM:l,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:l,padding:`0 ${(0,c.unit)(n)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:r}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,r;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(r=e.headerPadding)?r:e.paddingLG}});var f=e.i(792812),p=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let h=e=>{let{actionClasses:r,actions:n=[],actionStyle:l}=e;return t.createElement("ul",{className:r,style:l},n.map((e,r)=>{let l=`action-${r}`;return t.createElement("li",{style:{width:`${100/n.length}%`},key:l},t.createElement("span",null,e))}))},v=t.forwardRef((e,s)=>{let c,{prefixCls:u,className:m,rootClassName:g,style:v,extra:y,headStyle:$={},bodyStyle:x={},title:O,loading:S,bordered:j,variant:w,size:E,type:C,cover:T,actions:k,tabList:N,children:L,activeTabKey:M,defaultActiveTabKey:P,tabBarExtraContent:R,hoverable:B,tabProps:z={},classNames:I,styles:H}=e,F=p(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:W,direction:A,card:G}=t.useContext(l.ConfigContext),[D]=(0,f.default)("card",w,j),X=e=>{var t;return(0,r.default)(null==(t=null==G?void 0:G.classNames)?void 0:t[e],null==I?void 0:I[e])},V=e=>{var t;return Object.assign(Object.assign({},null==(t=null==G?void 0:G.styles)?void 0:t[e]),null==H?void 0:H[e])},q=t.useMemo(()=>{let e=!1;return t.Children.forEach(L,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[L]),_=W("card",u),[K,U,Z]=b(_),Q=t.createElement(i.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},L),J=void 0!==M,Y=Object.assign(Object.assign({},z),{[J?"activeKey":"defaultActiveKey"]:J?M:P,tabBarExtraContent:R}),ee=(0,a.default)(E),et=ee&&"default"!==ee?ee:"large",er=N?t.createElement(o.default,Object.assign({size:et},Y,{className:`${_}-head-tabs`,onChange:t=>{var r;null==(r=e.onTabChange)||r.call(e,t)},items:N.map(e=>{var{tab:t}=e;return Object.assign({label:t},p(e,["tab"]))})})):null;if(O||y||er){let e=(0,r.default)(`${_}-head`,X("header")),n=(0,r.default)(`${_}-head-title`,X("title")),l=(0,r.default)(`${_}-extra`,X("extra")),a=Object.assign(Object.assign({},$),V("header"));c=t.createElement("div",{className:e,style:a},t.createElement("div",{className:`${_}-head-wrapper`},O&&t.createElement("div",{className:n,style:V("title")},O),y&&t.createElement("div",{className:l,style:V("extra")},y)),er)}let en=(0,r.default)(`${_}-cover`,X("cover")),el=T?t.createElement("div",{className:en,style:V("cover")},T):null,ea=(0,r.default)(`${_}-body`,X("body")),ei=Object.assign(Object.assign({},x),V("body")),eo=t.createElement("div",{className:ea,style:ei},S?Q:L),es=(0,r.default)(`${_}-actions`,X("actions")),ed=(null==k?void 0:k.length)?t.createElement(h,{actionClasses:es,actionStyle:V("actions"),actions:k}):null,ec=(0,n.default)(F,["onTabChange"]),eu=(0,r.default)(_,null==G?void 0:G.className,{[`${_}-loading`]:S,[`${_}-bordered`]:"borderless"!==D,[`${_}-hoverable`]:B,[`${_}-contain-grid`]:q,[`${_}-contain-tabs`]:null==N?void 0:N.length,[`${_}-${ee}`]:ee,[`${_}-type-${C}`]:!!C,[`${_}-rtl`]:"rtl"===A},m,g,U,Z),em=Object.assign(Object.assign({},null==G?void 0:G.style),v);return K(t.createElement("div",Object.assign({ref:s},ec,{className:eu,style:em}),c,el,eo,ed))});var 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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};v.Grid=d,v.Meta=e=>{let{prefixCls:n,className:a,avatar:i,title:o,description:s}=e,d=y(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(l.ConfigContext),u=c("card",n),m=(0,r.default)(`${u}-meta`,a),g=i?t.createElement("div",{className:`${u}-meta-avatar`},i):null,b=o?t.createElement("div",{className:`${u}-meta-title`},o):null,f=s?t.createElement("div",{className:`${u}-meta-description`},s):null,p=b||f?t.createElement("div",{className:`${u}-meta-detail`},b,f):null;return t.createElement("div",Object.assign({},d,{className:m}),g,p)},e.s(["Card",0,v],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),r=e.i(560445),n=e.i(175712),l=e.i(869216),a=e.i(311451),i=e.i(212931),o=e.i(898586);e.i(296059);var s=e.i(868297),d=e.i(732961),c=e.i(289882),u=e.i(170517),m=e.i(628882),g=e.i(320890),b=e.i(104458),f=e.i(722319),p=e.i(8398),h=e.i(279728);e.i(765846);var v=e.i(602716),y=e.i(328052);e.i(262370);var $=e.i(135551);let x=(e,t)=>new $.FastColor(e).setA(t).toRgbString(),O=(e,t)=>new $.FastColor(e).lighten(t).toHexString(),S=e=>{let t=(0,v.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},j=(e,t)=>{let r=e||"#000",n=t||"#fff";return{colorBgBase:r,colorTextBase:n,colorText:x(n,.85),colorTextSecondary:x(n,.65),colorTextTertiary:x(n,.45),colorTextQuaternary:x(n,.25),colorFill:x(n,.18),colorFillSecondary:x(n,.12),colorFillTertiary:x(n,.08),colorFillQuaternary:x(n,.04),colorBgSolid:x(n,.95),colorBgSolidHover:x(n,1),colorBgSolidActive:x(n,.9),colorBgElevated:O(r,12),colorBgContainer:O(r,8),colorBgLayout:O(r,0),colorBgSpotlight:O(r,26),colorBgBlur:x(n,.04),colorBorder:O(r,26),colorBorderSecondary:O(r,19)}},w={defaultSeed:g.defaultConfig.token,useToken:function(){let[e,t,r]=(0,b.useToken)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:f.default,darkAlgorithm:(e,t)=>{let r=Object.keys(u.defaultPresetColors).map(t=>{let r=(0,v.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,n,l)=>(e[`${t}-${l+1}`]=r[l],e[`${t}${l+1}`]=r[l],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),n=null!=t?t:(0,f.default)(e),l=(0,y.default)(e,{generateColorPalettes:S,generateNeutralColorPalettes:j});return Object.assign(Object.assign(Object.assign(Object.assign({},n),r),l),{colorPrimaryBg:l.colorPrimaryBorder,colorPrimaryBgHover:l.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,f.default)(e),n=r.fontSizeSM,l=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,n=r-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}(null!=t?t:e)),(0,h.default)(n)),{controlHeight:l}),(0,p.default)(Object.assign(Object.assign({},r),{controlHeight:l})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):c.default,r=Object.assign(Object.assign({},u.default),null==e?void 0:e.token);return(0,d.getComputedToken)(r,{override:null==e?void 0:e.token},t,m.default)},defaultConfig:g.defaultConfig,_internalContext:g.DesignTokenContext};e.s(["theme",0,w],368869);var E=e.i(270377),C=e.i(271645);function T({isOpen:e,title:s,alertMessage:d,message:c,resourceInformationTitle:u,resourceInformation:m,onCancel:g,onOk:b,confirmLoading:f,requiredConfirmation:p}){let{Title:h,Text:v}=o.Typography,{token:y}=w.useToken(),[$,x]=(0,C.useState)("");return(0,C.useEffect)(()=>{e&&x("")},[e]),(0,t.jsx)(i.Modal,{title:s,open:e,onOk:b,onCancel:g,confirmLoading:f,okText:f?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!p&&$!==p||f},cancelButtonProps:{disabled:f},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(r.Alert,{message:d,type:"warning"}),(0,t.jsx)(n.Card,{title:u,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:y.colorErrorBg,borderColor:y.colorErrorBorder}},style:{backgroundColor:y.colorErrorBg,borderColor:y.colorErrorBorder},children:(0,t.jsx)(l.Descriptions,{column:1,size:"small",children:m&&m.map(({label:e,value:r,...n})=>(0,t.jsx)(l.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(v,{...n,children:r??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(v,{children:c})}),p&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(v,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(v,{children:"Type "}),(0,t.jsx)(v,{strong:!0,type:"danger",children:p}),(0,t.jsx)(v,{children:" to confirm deletion:"})]}),(0,t.jsx)(a.Input,{value:$,onChange:e=>x(e.target.value),placeholder:p,className:"rounded-md",prefix:(0,t.jsx)(E.ExclamationCircleOutlined,{style:{color:y.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>T],127952)},530212,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,r],530212)},214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),n=e.i(270345);e.s(["default",0,()=>{let[e,l]=(0,t.useState)([]),{accessToken:a,userId:i,userRole:o}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{l(await (0,n.fetchTeams)(a,i,o,null))})()},[a,i,o]),{teams:e,setTeams:l}}])},757440,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let n=e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>n])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),n=e.i(271645);let l=e=>{var t=(0,r.__rest)(e,[]);return n.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),n.default.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))};e.s(["default",()=>l],446428);var a=e.i(746725),i=e.i(914189),o=e.i(553521),s=e.i(835696),d=e.i(941444),c=e.i(178677),u=e.i(294316),m=e.i(83733),g=e.i(233137),b=e.i(732607),f=e.i(397701),p=e.i(700020);function h(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:S)!==n.Fragment||1===n.default.Children.count(e.children)}let v=(0,n.createContext)(null);v.displayName="TransitionContext";var y=((t=y||{}).Visible="visible",t.Hidden="hidden",t);let $=(0,n.createContext)(null);function x(e){return"children"in e?x(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function O(e,t){let r=(0,d.useLatestValue)(e),l=(0,n.useRef)([]),s=(0,o.useIsMounted)(),c=(0,a.useDisposables)(),u=(0,i.useEvent)((e,t=p.RenderStrategy.Hidden)=>{let n=l.current.findIndex(({el:t})=>t===e);-1!==n&&((0,f.match)(t,{[p.RenderStrategy.Unmount](){l.current.splice(n,1)},[p.RenderStrategy.Hidden](){l.current[n].state="hidden"}}),c.microTask(()=>{var e;!x(l)&&s.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,i.useEvent)(e=>{let t=l.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):l.current.push({el:e,state:"visible"}),()=>u(e,p.RenderStrategy.Unmount)}),g=(0,n.useRef)([]),b=(0,n.useRef)(Promise.resolve()),h=(0,n.useRef)({enter:[],leave:[]}),v=(0,i.useEvent)((e,r,n)=>{g.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter(([t])=>t!==e)),null==t||t.chains.current[r].push([e,new Promise(e=>{g.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(h.current[r].map(([e,t])=>t)).then(()=>e())})]),"enter"===r?b.current=b.current.then(()=>null==t?void 0:t.wait.current).then(()=>n(r)):n(r)}),y=(0,i.useEvent)((e,t,r)=>{Promise.all(h.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=g.current.shift())||e()}).then(()=>r(t))});return(0,n.useMemo)(()=>({children:l,register:m,unregister:u,onStart:v,onStop:y,wait:b,chains:h}),[m,u,l,v,y,h,b])}$.displayName="NestingContext";let S=n.Fragment,j=p.RenderFeatures.RenderStrategy,w=(0,p.forwardRefWithAs)(function(e,t){let{show:r,appear:l=!1,unmount:a=!0,...o}=e,d=(0,n.useRef)(null),m=h(e),b=(0,u.useSyncRefs)(...m?[d,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let f=(0,g.useOpenClosed)();if(void 0===r&&null!==f&&(r=(f&g.State.Open)===g.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[y,S]=(0,n.useState)(r?"visible":"hidden"),w=O(()=>{r||S("hidden")}),[C,T]=(0,n.useState)(!0),k=(0,n.useRef)([r]);(0,s.useIsoMorphicEffect)(()=>{!1!==C&&k.current[k.current.length-1]!==r&&(k.current.push(r),T(!1))},[k,r]);let N=(0,n.useMemo)(()=>({show:r,appear:l,initial:C}),[r,l,C]);(0,s.useIsoMorphicEffect)(()=>{r?S("visible"):x(w)||null===d.current||S("hidden")},[r,w]);let L={unmount:a},M=(0,i.useEvent)(()=>{var t;C&&T(!1),null==(t=e.beforeEnter)||t.call(e)}),P=(0,i.useEvent)(()=>{var t;C&&T(!1),null==(t=e.beforeLeave)||t.call(e)}),R=(0,p.useRender)();return n.default.createElement($.Provider,{value:w},n.default.createElement(v.Provider,{value:N},R({ourProps:{...L,as:n.Fragment,children:n.default.createElement(E,{ref:b,...L,...o,beforeEnter:M,beforeLeave:P})},theirProps:{},defaultTag:n.Fragment,features:j,visible:"visible"===y,name:"Transition"})))}),E=(0,p.forwardRefWithAs)(function(e,t){var r,l;let{transition:a=!0,beforeEnter:o,afterEnter:d,beforeLeave:y,afterLeave:w,enter:E,enterFrom:C,enterTo:T,entered:k,leave:N,leaveFrom:L,leaveTo:M,...P}=e,[R,B]=(0,n.useState)(null),z=(0,n.useRef)(null),I=h(e),H=(0,u.useSyncRefs)(...I?[z,t,B]:null===t?[]:[t]),F=null==(r=P.unmount)||r?p.RenderStrategy.Unmount:p.RenderStrategy.Hidden,{show:W,appear:A,initial:G}=function(){let e=(0,n.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[D,X]=(0,n.useState)(W?"visible":"hidden"),V=function(){let e=(0,n.useContext)($);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:q,unregister:_}=V;(0,s.useIsoMorphicEffect)(()=>q(z),[q,z]),(0,s.useIsoMorphicEffect)(()=>{if(F===p.RenderStrategy.Hidden&&z.current)return W&&"visible"!==D?void X("visible"):(0,f.match)(D,{hidden:()=>_(z),visible:()=>q(z)})},[D,z,q,_,W,F]);let K=(0,c.useServerHandoffComplete)();(0,s.useIsoMorphicEffect)(()=>{if(I&&K&&"visible"===D&&null===z.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[z,D,K,I]);let U=G&&!A,Z=A&&W&&G,Q=(0,n.useRef)(!1),J=O(()=>{Q.current||(X("hidden"),_(z))},V),Y=(0,i.useEvent)(e=>{Q.current=!0,J.onStart(z,e?"enter":"leave",e=>{"enter"===e?null==o||o():"leave"===e&&(null==y||y())})}),ee=(0,i.useEvent)(e=>{let t=e?"enter":"leave";Q.current=!1,J.onStop(z,t,e=>{"enter"===e?null==d||d():"leave"===e&&(null==w||w())}),"leave"!==t||x(J)||(X("hidden"),_(z))});(0,n.useEffect)(()=>{I&&a||(Y(W),ee(W))},[W,I,a]);let et=!(!a||!I||!K||U),[,er]=(0,m.useTransition)(et,R,W,{start:Y,end:ee}),en=(0,p.compact)({ref:H,className:(null==(l=(0,b.classNames)(P.className,Z&&E,Z&&C,er.enter&&E,er.enter&&er.closed&&C,er.enter&&!er.closed&&T,er.leave&&N,er.leave&&!er.closed&&L,er.leave&&er.closed&&M,!er.transition&&W&&k))?void 0:l.trim())||void 0,...(0,m.transitionDataAttributes)(er)}),el=0;"visible"===D&&(el|=g.State.Open),"hidden"===D&&(el|=g.State.Closed),er.enter&&(el|=g.State.Opening),er.leave&&(el|=g.State.Closing);let ea=(0,p.useRender)();return n.default.createElement($.Provider,{value:J},n.default.createElement(g.OpenClosedProvider,{value:el},ea({ourProps:en,theirProps:P,defaultTag:S,features:j,visible:"visible"===D,name:"Transition.Child"})))}),C=(0,p.forwardRefWithAs)(function(e,t){let r=null!==(0,n.useContext)(v),l=null!==(0,g.useOpenClosed)();return n.default.createElement(n.default.Fragment,null,!r&&l?n.default.createElement(w,{ref:t,...e}):n.default.createElement(E,{ref:t,...e}))}),T=Object.assign(w,{Child:C,Root:w});e.s(["Transition",()=>T],854056)},206929,e=>{"use strict";var t=e.i(290571),r=e.i(757440),n=e.i(271645),l=e.i(446428),a=e.i(444755),i=e.i(673706),o=e.i(103471),s=e.i(495470),d=e.i(854056),c=e.i(888288);let u=(0,i.makeClassName)("Select"),m=n.default.forwardRef((e,i)=>{let{defaultValue:m="",value:g,onValueChange:b,placeholder:f="Select...",disabled:p=!1,icon:h,enableClear:v=!1,required:y,children:$,name:x,error:O=!1,errorMessage:S,className:j,id:w}=e,E=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),C=(0,n.useRef)(null),T=n.Children.toArray($),[k,N]=(0,c.default)(m,g),L=(0,n.useMemo)(()=>{let e=n.default.Children.toArray($).filter(n.isValidElement);return(0,o.constructValueToNameMapping)(e)},[$]);return n.default.createElement("div",{className:(0,a.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",j)},n.default.createElement("div",{className:"relative"},n.default.createElement("select",{title:"select-hidden",required:y,className:(0,a.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:k,onChange:e=>{e.preventDefault()},name:x,disabled:p,id:w,onFocus:()=>{let e=C.current;e&&e.focus()}},n.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},f),T.map(e=>{let t=e.props.value,r=e.props.children;return n.default.createElement("option",{className:"hidden",key:t,value:t},r)})),n.default.createElement(s.Listbox,Object.assign({as:"div",ref:i,defaultValue:k,value:k,onChange:e=>{null==b||b(e),N(e)},disabled:p,id:w},E),({value:e})=>{var t;return n.default.createElement(n.default.Fragment,null,n.default.createElement(s.ListboxButton,{ref:C,className:(0,a.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",h?"pl-10":"pl-3",(0,o.getSelectButtonColors)((0,o.hasValue)(e),p,O))},h&&n.default.createElement("span",{className:(0,a.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},n.default.createElement(h,{className:(0,a.tremorTwMerge)(u("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),n.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=L.get(e))?t:f),n.default.createElement("span",{className:(0,a.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},n.default.createElement(r.default,{className:(0,a.tremorTwMerge)(u("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),v&&k?n.default.createElement("button",{type:"button",className:(0,a.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),N(""),null==b||b("")}},n.default.createElement(l.default,{className:(0,a.tremorTwMerge)(u("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,n.default.createElement(d.Transition,{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.default.createElement(s.ListboxOptions,{anchor:"bottom start",className:(0,a.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},$)))})),O&&S?n.default.createElement("p",{className:(0,a.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},S):null)});m.displayName="Select",e.s(["Select",()=>m],206929)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2f5024e5325fd185.css b/litellm/proxy/_experimental/out/_next/static/chunks/2f5024e5325fd185.css deleted file mode 100644 index 3746cb6b77..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/2f5024e5325fd185.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}input:where([type=text]),input:where(:not([type])),input:where([type=email]),input:where([type=url]),input:where([type=password]),input:where([type=number]),input:where([type=date]),input:where([type=datetime-local]),input:where([type=month]),input:where([type=search]),input:where([type=tel]),input:where([type=time]),input:where([type=week]),select:where([multiple]),textarea,select{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:#6b7280;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}input:where([type=text]):focus,input:where(:not([type])):focus,input:where([type=email]):focus,input:where([type=url]):focus,input:where([type=password]):focus,input:where([type=number]):focus,input:where([type=date]):focus,input:where([type=datetime-local]):focus,input:where([type=month]):focus,input:where([type=search]):focus,input:where([type=tel]):focus,input:where([type=time]):focus,input:where([type=week]):focus,select:where([multiple]):focus,textarea:focus,select:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb;outline:2px solid #0000}input::-moz-placeholder{color:#6b7280;opacity:1}textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{-webkit-print-color-adjust:exact;print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}select:where([multiple]),select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;-webkit-print-color-adjust:unset;print-color-adjust:unset;padding-right:.75rem}input:where([type=checkbox]),input:where([type=radio]){appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:#2563eb;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:#6b7280;flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}input:where([type=checkbox]){border-radius:0}input:where([type=radio]){border-radius:100%}input:where([type=checkbox]):focus,input:where([type=radio]):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}input:where([type=checkbox]):checked,input:where([type=radio]):checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}input:where([type=checkbox]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors:active){input:where([type=checkbox]):checked{appearance:auto}}input:where([type=radio]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors:active){input:where([type=radio]):checked{appearance:auto}}input:where([type=checkbox]):checked:hover,input:where([type=checkbox]):checked:focus,input:where([type=radio]):checked:hover,input:where([type=radio]):checked:focus{background-color:currentColor;border-color:#0000}input:where([type=checkbox]):indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media (forced-colors:active){input:where([type=checkbox]):indeterminate{appearance:auto}}input:where([type=checkbox]):indeterminate:hover,input:where([type=checkbox]):indeterminate:focus{background-color:currentColor;border-color:#0000}input:where([type=file]){background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}input:where([type=file]):focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip:auto;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-inset-1{inset:-.25rem}.inset-0{inset:0}.inset-x-\[-1\.5rem\]{left:-1.5rem;right:-1.5rem}.inset-y-0{top:0;bottom:0}.-left-2{left:-.5rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.bottom-4{bottom:1rem}.bottom-6{bottom:1.5rem}.bottom-\[-1\.5rem\]{bottom:-1.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-4{left:1rem}.right-0{right:0}.right-1{right:.25rem}.right-1\/2{right:50%}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-4{top:1rem}.top-8{top:2rem}.top-full{top:100%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-1{grid-column:span 1/span 1}.col-span-10{grid-column:span 10/span 10}.col-span-11{grid-column:span 11/span 11}.col-span-12{grid-column:span 12/span 12}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-5{grid-column:span 5/span 5}.col-span-6{grid-column:span 6/span 6}.col-span-7{grid-column:span 7/span 7}.col-span-8{grid-column:span 8/span 8}.col-span-9{grid-column:span 9/span 9}.\!m-0{margin:0!important}.m-0{margin:0}.m-2{margin:.5rem}.m-8{margin:2rem}.-my-4{margin-top:-1rem;margin-bottom:-1rem}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-2\.5{margin-left:.625rem;margin-right:.625rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-mb-px{margin-bottom:-1px}.-ml-0{margin-left:0}.-ml-0\.5{margin-left:-.125rem}.-ml-1{margin-left:-.25rem}.-ml-1\.5{margin-left:-.375rem}.-ml-px{margin-left:-1px}.-mr-1{margin-right:-.25rem}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-11{margin-left:2.75rem}.ml-12{margin-left:3rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.ml-7{margin-left:1.75rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-10{margin-right:2.5rem}.mr-2{margin-right:.5rem}.mr-2\.5{margin-right:.625rem}.mr-20{margin-right:5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.box-border{box-sizing:border-box}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.inline{display:inline}.\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.size-12{width:3rem;height:3rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.\!h-8{height:2rem!important}.h-0{height:0}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-\[100vh\]{height:100vh}.h-\[1px\]{height:1px}.h-\[22\.4px\]{height:22.4px}.h-\[350px\]{height:350px}.h-\[600px\]{height:600px}.h-\[75vh\]{height:75vh}.h-\[80vh\]{height:80vh}.h-\[calc\(100vh-200px\)\]{height:calc(100vh - 200px)}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-28{max-height:7rem}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-8{max-height:2rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[228px\]{max-height:228px}.max-h-\[234px\]{max-height:234px}.max-h-\[400px\]{max-height:400px}.max-h-\[500px\]{max-height:500px}.max-h-\[50vh\]{max-height:50vh}.max-h-\[520px\]{max-height:520px}.max-h-\[600px\]{max-height:600px}.max-h-\[65vh\]{max-height:65vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(100vh-385px\)\]{max-height:calc(100vh - 385px)}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-8{min-height:2rem}.min-h-\[100px\]{min-height:100px}.min-h-\[120px\]{min-height:120px}.min-h-\[280px\]{min-height:280px}.min-h-\[380px\]{min-height:380px}.min-h-\[400px\]{min-height:400px}.min-h-\[44px\]{min-height:44px}.min-h-\[500px\]{min-height:500px}.min-h-\[750px\]{min-height:750px}.min-h-\[calc\(100vh-160px\)\]{min-height:calc(100vh - 160px)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.\!w-8{width:2rem!important}.w-0{width:0}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-1\/4{width:25%}.w-10{width:2.5rem}.w-11\/12{width:91.6667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[120px\]{width:120px}.w-\[180px\]{width:180px}.w-\[280px\]{width:280px}.w-\[300px\]{width:300px}.w-\[340px\]{width:340px}.w-\[400px\]{width:400px}.w-\[90\%\]{width:90%}.w-\[var\(--button-width\)\]{width:var(--button-width)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.w-screen{width:100vw}.\!min-w-8{min-width:2rem!important}.min-w-0{min-width:0}.min-w-44{min-width:11rem}.min-w-\[100px\]{min-width:100px}.min-w-\[10rem\]{min-width:10rem}.min-w-\[150px\]{min-width:150px}.min-w-\[200px\]{min-width:200px}.min-w-\[220px\]{min-width:220px}.min-w-\[600px\]{min-width:600px}.min-w-\[88px\]{min-width:88px}.min-w-\[90px\]{min-width:90px}.min-w-full{min-width:100%}.min-w-min{min-width:min-content}.max-w-2xl{max-width:42rem}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-40{max-width:10rem}.max-w-48{max-width:12rem}.max-w-4xl{max-width:56rem}.max-w-64{max-width:16rem}.max-w-6xl{max-width:72rem}.max-w-\[100px\]{max-width:100px}.max-w-\[140px\]{max-width:140px}.max-w-\[150px\]{max-width:150px}.max-w-\[15ch\]{max-width:15ch}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[20ch\]{max-width:20ch}.max-w-\[240px\]{max-width:240px}.max-w-\[250px\]{max-width:250px}.max-w-\[300px\]{max-width:300px}.max-w-\[40ch\]{max-width:40ch}.max-w-\[75\%\]{max-width:75%}.max-w-\[80\%\]{max-width:80%}.max-w-\[85\%\]{max-width:85%}.max-w-\[88\%\]{max-width:88%}.max-w-\[95\%\]{max-width:95%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1}.flex-\[2\]{flex:2}.flex-auto{flex:auto}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-translate-y-4{--tw-translate-y:-1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-0\.5{--tw-translate-x:.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-4{--tw-translate-x:1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x:1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y:1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate:-180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.animate-bounce{animation:1s infinite bounce}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x)var(--tw-pan-y)var(--tw-pinch-zoom)}.select-none{-webkit-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.snap-mandatory{--tw-scroll-snap-strictness:mandatory}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.auto-rows-\[minmax\(0\,1fr\)\]{grid-auto-rows:minmax(0,1fr)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.grid-cols-\[auto\]{grid-template-columns:auto}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-none{grid-template-columns:none}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.\!items-center{align-items:center!important}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.\!justify-center{justify-content:center!important}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-1{row-gap:.25rem}.gap-y-4{row-gap:1rem}.gap-y-5{row-gap:1.25rem}.space-x-0\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.125rem*var(--tw-space-x-reverse));margin-left:calc(.125rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.375rem*var(--tw-space-x-reverse));margin-left:calc(.375rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2.5rem*var(--tw-space-x-reverse));margin-left:calc(2.5rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.625rem*var(--tw-space-x-reverse));margin-left:calc(.625rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem*var(--tw-space-x-reverse));margin-left:calc(1.25rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.5rem*var(--tw-space-x-reverse));margin-left:calc(1.5rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem*var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse:1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-right-width:calc(1px*var(--tw-divide-x-reverse));border-left-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:1}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity,1))}.divide-gray-50>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(249 250 251/var(--tw-divide-opacity,1))}.divide-tremor-border>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity,1))}.self-start{align-self:flex-start}.self-center{align-self:center}.justify-self-end{justify-self:end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-x-clip{overflow-x:clip}.overflow-x-scroll{overflow-x:scroll}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.\!rounded-md{border-radius:.375rem!important}.\!rounded-none{border-radius:0!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\[1px\]{border-radius:1px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-tremor-default{border-radius:.5rem}.rounded-tremor-full{border-radius:9999px}.rounded-tremor-small{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-2xl{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.rounded-b-lg,.rounded-b-tremor-default{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-l-tremor-default{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-tremor-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-l-tremor-small{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-r-tremor-default{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-r-tremor-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-r-tremor-small{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg,.rounded-t-tremor-default{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-br-md{border-bottom-right-radius:.375rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.\!border{border-width:1px!important}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-4{border-bottom-width:4px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-4{border-right-width:4px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-t-\[1px\]{border-top-width:1px}.border-dashed{border-style:dashed}.\!border-none{border-style:none!important}.border-none{border-style:none}.\!border-slate-200{--tw-border-opacity:1!important;border-color:rgb(226 232 240/var(--tw-border-opacity,1))!important}.border-\[\#6366f1\]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-amber-100{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.border-amber-400{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.border-amber-50{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}.border-amber-500{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.border-amber-600{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}.border-amber-700{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}.border-amber-800{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}.border-amber-900{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}.border-amber-950{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}.border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.border-blue-50{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.border-blue-700{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}.border-blue-800{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.border-blue-900{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}.border-blue-950{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}.border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.border-cyan-300{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.border-cyan-400{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.border-cyan-50{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}.border-cyan-500{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.border-cyan-600{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}.border-cyan-700{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}.border-cyan-800{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}.border-cyan-900{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}.border-cyan-950{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}.border-dark-tremor-background{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.border-dark-tremor-border{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.border-dark-tremor-brand{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-dark-tremor-brand-emphasis{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.border-dark-tremor-brand-inverted{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.border-dark-tremor-brand-subtle{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.border-emerald-100{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}.border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.border-emerald-300{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.border-emerald-400{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}.border-emerald-50{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}.border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.border-emerald-600{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}.border-emerald-700{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}.border-emerald-800{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}.border-emerald-900{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}.border-emerald-950{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}.border-fuchsia-100{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}.border-fuchsia-200{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}.border-fuchsia-300{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.border-fuchsia-400{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}.border-fuchsia-50{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}.border-fuchsia-500{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}.border-fuchsia-600{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}.border-fuchsia-700{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}.border-fuchsia-800{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}.border-fuchsia-900{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}.border-fuchsia-950{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-200\/60{border-color:#e5e7eb99}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.border-gray-50{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}.border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.border-gray-900{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.border-gray-950{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}.border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.border-green-50{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-green-600{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}.border-green-700{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}.border-green-800{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.border-green-900{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}.border-green-950{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}.border-indigo-100{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}.border-indigo-200{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}.border-indigo-300{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.border-indigo-400{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.border-indigo-50{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}.border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-indigo-600{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}.border-indigo-700{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.border-indigo-800{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.border-indigo-900{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}.border-indigo-950{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.border-lime-100{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}.border-lime-200{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}.border-lime-300{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.border-lime-400{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}.border-lime-50{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}.border-lime-500{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}.border-lime-600{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}.border-lime-700{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}.border-lime-800{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}.border-lime-900{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}.border-lime-950{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}.border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.border-neutral-300{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.border-neutral-400{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.border-neutral-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.border-neutral-500{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}.border-neutral-600{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}.border-neutral-700{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.border-neutral-800{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}.border-neutral-900{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.border-neutral-950{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}.border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.border-orange-300{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.border-orange-400{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}.border-orange-50{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}.border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.border-orange-600{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}.border-orange-700{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}.border-orange-800{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}.border-orange-900{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}.border-orange-950{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}.border-pink-100{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}.border-pink-200{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}.border-pink-300{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.border-pink-400{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}.border-pink-50{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}.border-pink-500{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}.border-pink-600{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}.border-pink-700{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}.border-pink-800{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}.border-pink-900{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.border-pink-950{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}.border-purple-100{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}.border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.border-purple-300{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.border-purple-400{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}.border-purple-50{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}.border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.border-purple-600{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}.border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}.border-purple-800{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}.border-purple-900{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}.border-purple-950{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}.border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.border-red-50{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.border-red-900{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}.border-red-950{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}.border-rose-100{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}.border-rose-200{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}.border-rose-300{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.border-rose-400{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}.border-rose-50{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}.border-rose-500{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.border-rose-600{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}.border-rose-700{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}.border-rose-800{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}.border-rose-900{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}.border-rose-950{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}.border-sky-100{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.border-sky-400{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.border-sky-50{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}.border-sky-500{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}.border-sky-600{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}.border-sky-700{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}.border-sky-800{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}.border-sky-900{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}.border-sky-950{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}.border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}.border-slate-50{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.border-slate-900{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}.border-slate-950{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}.border-stone-100{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}.border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.border-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.border-stone-50{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}.border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.border-stone-700{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}.border-stone-800{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}.border-stone-900{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}.border-stone-950{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}.border-teal-100{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}.border-teal-200{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}.border-teal-300{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.border-teal-400{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}.border-teal-50{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}.border-teal-500{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}.border-teal-600{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}.border-teal-700{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}.border-teal-800{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}.border-teal-900{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}.border-teal-950{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}.border-transparent{border-color:#0000}.border-tremor-background{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-tremor-border{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-tremor-brand{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-tremor-brand-emphasis{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.border-tremor-brand-inverted{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-tremor-brand-subtle{--tw-border-opacity:1;border-color:rgb(142 145 235/var(--tw-border-opacity,1))}.border-violet-100{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}.border-violet-200{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}.border-violet-300{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.border-violet-400{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}.border-violet-50{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}.border-violet-500{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}.border-violet-600{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}.border-violet-700{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}.border-violet-800{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}.border-violet-900{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}.border-violet-950{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}.border-yellow-100{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.border-yellow-300{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}.border-yellow-50{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.border-yellow-600{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}.border-yellow-700{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}.border-yellow-800{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.border-yellow-900{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}.border-yellow-950{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}.border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.border-zinc-400{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.border-zinc-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.border-zinc-500{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.border-zinc-600{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}.border-zinc-700{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.border-zinc-950{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}.border-l-blue-500{--tw-border-opacity:1;border-left-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-l-transparent{border-left-color:#0000}.border-r-gray-200{--tw-border-opacity:1;border-right-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-t-transparent{border-top-color:#0000}.\!bg-blue-600{--tw-bg-opacity:1!important;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))!important}.\!bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-\[\#1e1e1e\]{--tw-bg-opacity:1;background-color:rgb(30 30 30/var(--tw-bg-opacity,1))}.bg-\[\#6366f1\]{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-amber-200{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}.bg-amber-300{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}.bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.bg-amber-700{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.bg-amber-800{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}.bg-amber-900{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}.bg-amber-950{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/90{background-color:#000000e6}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-50\/30{background-color:#eff6ff4d}.bg-blue-50\/60{background-color:#eff6ff99}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-blue-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.bg-blue-800{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}.bg-blue-900{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.bg-blue-950{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-cyan-200{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}.bg-cyan-300{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}.bg-cyan-400{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.bg-cyan-700{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}.bg-cyan-800{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}.bg-cyan-900{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}.bg-cyan-950{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}.bg-dark-tremor-background{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.bg-dark-tremor-background-subtle{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand-emphasis{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand-faint{--tw-bg-opacity:1;background-color:rgb(11 18 41/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand-muted{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.bg-dark-tremor-content-subtle{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.bg-emerald-200{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}.bg-emerald-300{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.bg-emerald-700{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.bg-emerald-800{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}.bg-emerald-900{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}.bg-emerald-950{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}.bg-fuchsia-100{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.bg-fuchsia-200{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}.bg-fuchsia-300{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}.bg-fuchsia-400{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}.bg-fuchsia-50{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}.bg-fuchsia-500{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.bg-fuchsia-600{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}.bg-fuchsia-700{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}.bg-fuchsia-800{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}.bg-fuchsia-900{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}.bg-fuchsia-950{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-100\/50{background-color:#f3f4f680}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-50\/50{background-color:#f9fafb80}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.bg-gray-950{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}.bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.bg-green-800{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}.bg-green-900{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.bg-green-950{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}.bg-indigo-300{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}.bg-indigo-400{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}.bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}.bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}.bg-indigo-950{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.bg-lime-100{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.bg-lime-200{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}.bg-lime-300{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}.bg-lime-400{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}.bg-lime-50{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}.bg-lime-500{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.bg-lime-600{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}.bg-lime-700{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}.bg-lime-800{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}.bg-lime-900{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}.bg-lime-950{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-neutral-200{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.bg-neutral-400{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-neutral-500{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}.bg-neutral-600{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}.bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.bg-neutral-950{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}.bg-orange-300{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}.bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}.bg-orange-700{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}.bg-orange-800{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}.bg-orange-900{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}.bg-orange-950{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}.bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}.bg-pink-300{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}.bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.bg-pink-500{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.bg-pink-600{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}.bg-pink-700{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}.bg-pink-800{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}.bg-pink-900{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}.bg-pink-950{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.bg-purple-200{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}.bg-purple-300{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}.bg-purple-400{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}.bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.bg-purple-800{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}.bg-purple-900{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.bg-purple-950{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.bg-red-300{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-50\/30{background-color:#fef2f24d}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.bg-red-800{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}.bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.bg-rose-100{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.bg-rose-200{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}.bg-rose-300{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}.bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}.bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.bg-rose-700{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}.bg-rose-800{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}.bg-rose-900{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}.bg-rose-950{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}.bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-sky-200{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}.bg-sky-300{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}.bg-sky-400{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.bg-sky-700{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}.bg-sky-800{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}.bg-sky-900{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}.bg-sky-950{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.bg-slate-500{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}.bg-slate-600{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.bg-slate-950{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.bg-slate-950\/30{background-color:#0206174d}.bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.bg-stone-200{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.bg-stone-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}.bg-stone-50{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.bg-stone-700{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}.bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.bg-stone-950{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}.bg-teal-100{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.bg-teal-200{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}.bg-teal-300{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}.bg-teal-400{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}.bg-teal-50{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}.bg-teal-500{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.bg-teal-600{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}.bg-teal-700{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}.bg-teal-800{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}.bg-teal-900{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}.bg-teal-950{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}.bg-transparent{background-color:#0000}.bg-tremor-background{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-tremor-background-emphasis{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-tremor-background-muted{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-tremor-background-subtle{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-tremor-border{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-tremor-brand{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-tremor-brand-muted{--tw-bg-opacity:1;background-color:rgb(134 136 239/var(--tw-bg-opacity,1))}.bg-tremor-brand-muted\/50{background-color:#8688ef80}.bg-tremor-brand-subtle{--tw-bg-opacity:1;background-color:rgb(142 145 235/var(--tw-bg-opacity,1))}.bg-tremor-content-subtle{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-violet-200{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}.bg-violet-300{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}.bg-violet-400{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}.bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.bg-violet-700{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}.bg-violet-800{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}.bg-violet-900{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}.bg-violet-950{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/80{background-color:#fffc}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}.bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}.bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.bg-yellow-700{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}.bg-yellow-800{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}.bg-yellow-900{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}.bg-yellow-950{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.bg-zinc-400{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-zinc-500{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.bg-zinc-600{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.bg-zinc-700{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.bg-opacity-10{--tw-bg-opacity:.1}.bg-opacity-20{--tw-bg-opacity:.2}.bg-opacity-30{--tw-bg-opacity:.3}.bg-opacity-40{--tw-bg-opacity:.4}.bg-opacity-50{--tw-bg-opacity:.5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:#eff6ff var(--tw-gradient-from-position);--tw-gradient-to:#eff6ff00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-blue-600{--tw-gradient-from:#2563eb var(--tw-gradient-from-position);--tw-gradient-to:#2563eb00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-50{--tw-gradient-from:#ecfdf5 var(--tw-gradient-from-position);--tw-gradient-to:#ecfdf500 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-green-50{--tw-gradient-from:#f0fdf4 var(--tw-gradient-from-position);--tw-gradient-to:#f0fdf400 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-purple-50{--tw-gradient-from:#faf5ff var(--tw-gradient-from-position);--tw-gradient-to:#faf5ff00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-slate-50{--tw-gradient-from:#f8fafc var(--tw-gradient-from-position);--tw-gradient-to:#f8fafc00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-teal-400{--tw-gradient-from:#2dd4bf var(--tw-gradient-from-position);--tw-gradient-to:#2dd4bf00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-blue-50{--tw-gradient-to:#eff6ff var(--tw-gradient-to-position)}.to-cyan-600{--tw-gradient-to:#0891b2 var(--tw-gradient-to-position)}.to-green-50{--tw-gradient-to:#f0fdf4 var(--tw-gradient-to-position)}.to-indigo-50{--tw-gradient-to:#eef2ff var(--tw-gradient-to-position)}.to-indigo-800{--tw-gradient-to:#3730a3 var(--tw-gradient-to-position)}.to-purple-50{--tw-gradient-to:#faf5ff var(--tw-gradient-to-position)}.to-teal-50{--tw-gradient-to:#f0fdfa var(--tw-gradient-to-position)}.bg-repeat{background-repeat:repeat}.fill-amber-100{fill:#fef3c7}.fill-amber-200{fill:#fde68a}.fill-amber-300{fill:#fcd34d}.fill-amber-400{fill:#fbbf24}.fill-amber-50{fill:#fffbeb}.fill-amber-500{fill:#f59e0b}.fill-amber-600{fill:#d97706}.fill-amber-700{fill:#b45309}.fill-amber-800{fill:#92400e}.fill-amber-900{fill:#78350f}.fill-amber-950{fill:#451a03}.fill-blue-100{fill:#dbeafe}.fill-blue-200{fill:#bfdbfe}.fill-blue-300{fill:#93c5fd}.fill-blue-400{fill:#60a5fa}.fill-blue-50{fill:#eff6ff}.fill-blue-500{fill:#3b82f6}.fill-blue-600{fill:#2563eb}.fill-blue-700{fill:#1d4ed8}.fill-blue-800{fill:#1e40af}.fill-blue-900{fill:#1e3a8a}.fill-blue-950{fill:#172554}.fill-cyan-100{fill:#cffafe}.fill-cyan-200{fill:#a5f3fc}.fill-cyan-300{fill:#67e8f9}.fill-cyan-400{fill:#22d3ee}.fill-cyan-50{fill:#ecfeff}.fill-cyan-500{fill:#06b6d4}.fill-cyan-600{fill:#0891b2}.fill-cyan-700{fill:#0e7490}.fill-cyan-800{fill:#155e75}.fill-cyan-900{fill:#164e63}.fill-cyan-950{fill:#083344}.fill-dark-tremor-content{fill:#6b7280}.fill-dark-tremor-content-emphasis{fill:#e5e7eb}.fill-emerald-100{fill:#d1fae5}.fill-emerald-200{fill:#a7f3d0}.fill-emerald-300{fill:#6ee7b7}.fill-emerald-400{fill:#34d399}.fill-emerald-50{fill:#ecfdf5}.fill-emerald-500{fill:#10b981}.fill-emerald-600{fill:#059669}.fill-emerald-700{fill:#047857}.fill-emerald-800{fill:#065f46}.fill-emerald-900{fill:#064e3b}.fill-emerald-950{fill:#022c22}.fill-fuchsia-100{fill:#fae8ff}.fill-fuchsia-200{fill:#f5d0fe}.fill-fuchsia-300{fill:#f0abfc}.fill-fuchsia-400{fill:#e879f9}.fill-fuchsia-50{fill:#fdf4ff}.fill-fuchsia-500{fill:#d946ef}.fill-fuchsia-600{fill:#c026d3}.fill-fuchsia-700{fill:#a21caf}.fill-fuchsia-800{fill:#86198f}.fill-fuchsia-900{fill:#701a75}.fill-fuchsia-950{fill:#4a044e}.fill-gray-100{fill:#f3f4f6}.fill-gray-200{fill:#e5e7eb}.fill-gray-300{fill:#d1d5db}.fill-gray-400{fill:#9ca3af}.fill-gray-50{fill:#f9fafb}.fill-gray-500{fill:#6b7280}.fill-gray-600{fill:#4b5563}.fill-gray-700{fill:#374151}.fill-gray-800{fill:#1f2937}.fill-gray-900{fill:#111827}.fill-gray-950{fill:#030712}.fill-green-100{fill:#dcfce7}.fill-green-200{fill:#bbf7d0}.fill-green-300{fill:#86efac}.fill-green-400{fill:#4ade80}.fill-green-50{fill:#f0fdf4}.fill-green-500{fill:#22c55e}.fill-green-600{fill:#16a34a}.fill-green-700{fill:#15803d}.fill-green-800{fill:#166534}.fill-green-900{fill:#14532d}.fill-green-950{fill:#052e16}.fill-indigo-100{fill:#e0e7ff}.fill-indigo-200{fill:#c7d2fe}.fill-indigo-300{fill:#a5b4fc}.fill-indigo-400{fill:#818cf8}.fill-indigo-50{fill:#eef2ff}.fill-indigo-500{fill:#6366f1}.fill-indigo-600{fill:#4f46e5}.fill-indigo-700{fill:#4338ca}.fill-indigo-800{fill:#3730a3}.fill-indigo-900{fill:#312e81}.fill-indigo-950{fill:#1e1b4b}.fill-lime-100{fill:#ecfccb}.fill-lime-200{fill:#d9f99d}.fill-lime-300{fill:#bef264}.fill-lime-400{fill:#a3e635}.fill-lime-50{fill:#f7fee7}.fill-lime-500{fill:#84cc16}.fill-lime-600{fill:#65a30d}.fill-lime-700{fill:#4d7c0f}.fill-lime-800{fill:#3f6212}.fill-lime-900{fill:#365314}.fill-lime-950{fill:#1a2e05}.fill-neutral-100{fill:#f5f5f5}.fill-neutral-200{fill:#e5e5e5}.fill-neutral-300{fill:#d4d4d4}.fill-neutral-400{fill:#a3a3a3}.fill-neutral-50{fill:#fafafa}.fill-neutral-500{fill:#737373}.fill-neutral-600{fill:#525252}.fill-neutral-700{fill:#404040}.fill-neutral-800{fill:#262626}.fill-neutral-900{fill:#171717}.fill-neutral-950{fill:#0a0a0a}.fill-orange-100{fill:#ffedd5}.fill-orange-200{fill:#fed7aa}.fill-orange-300{fill:#fdba74}.fill-orange-400{fill:#fb923c}.fill-orange-50{fill:#fff7ed}.fill-orange-500{fill:#f97316}.fill-orange-600{fill:#ea580c}.fill-orange-700{fill:#c2410c}.fill-orange-800{fill:#9a3412}.fill-orange-900{fill:#7c2d12}.fill-orange-950{fill:#431407}.fill-pink-100{fill:#fce7f3}.fill-pink-200{fill:#fbcfe8}.fill-pink-300{fill:#f9a8d4}.fill-pink-400{fill:#f472b6}.fill-pink-50{fill:#fdf2f8}.fill-pink-500{fill:#ec4899}.fill-pink-600{fill:#db2777}.fill-pink-700{fill:#be185d}.fill-pink-800{fill:#9d174d}.fill-pink-900{fill:#831843}.fill-pink-950{fill:#500724}.fill-purple-100{fill:#f3e8ff}.fill-purple-200{fill:#e9d5ff}.fill-purple-300{fill:#d8b4fe}.fill-purple-400{fill:#c084fc}.fill-purple-50{fill:#faf5ff}.fill-purple-500{fill:#a855f7}.fill-purple-600{fill:#9333ea}.fill-purple-700{fill:#7e22ce}.fill-purple-800{fill:#6b21a8}.fill-purple-900{fill:#581c87}.fill-purple-950{fill:#3b0764}.fill-red-100{fill:#fee2e2}.fill-red-200{fill:#fecaca}.fill-red-300{fill:#fca5a5}.fill-red-400{fill:#f87171}.fill-red-50{fill:#fef2f2}.fill-red-500{fill:#ef4444}.fill-red-600{fill:#dc2626}.fill-red-700{fill:#b91c1c}.fill-red-800{fill:#991b1b}.fill-red-900{fill:#7f1d1d}.fill-red-950{fill:#450a0a}.fill-rose-100{fill:#ffe4e6}.fill-rose-200{fill:#fecdd3}.fill-rose-300{fill:#fda4af}.fill-rose-400{fill:#fb7185}.fill-rose-50{fill:#fff1f2}.fill-rose-500{fill:#f43f5e}.fill-rose-600{fill:#e11d48}.fill-rose-700{fill:#be123c}.fill-rose-800{fill:#9f1239}.fill-rose-900{fill:#881337}.fill-rose-950{fill:#4c0519}.fill-sky-100{fill:#e0f2fe}.fill-sky-200{fill:#bae6fd}.fill-sky-300{fill:#7dd3fc}.fill-sky-400{fill:#38bdf8}.fill-sky-50{fill:#f0f9ff}.fill-sky-500{fill:#0ea5e9}.fill-sky-600{fill:#0284c7}.fill-sky-700{fill:#0369a1}.fill-sky-800{fill:#075985}.fill-sky-900{fill:#0c4a6e}.fill-sky-950{fill:#082f49}.fill-slate-100{fill:#f1f5f9}.fill-slate-200{fill:#e2e8f0}.fill-slate-300{fill:#cbd5e1}.fill-slate-400{fill:#94a3b8}.fill-slate-50{fill:#f8fafc}.fill-slate-500{fill:#64748b}.fill-slate-600{fill:#475569}.fill-slate-700{fill:#334155}.fill-slate-800{fill:#1e293b}.fill-slate-900{fill:#0f172a}.fill-slate-950{fill:#020617}.fill-stone-100{fill:#f5f5f4}.fill-stone-200{fill:#e7e5e4}.fill-stone-300{fill:#d6d3d1}.fill-stone-400{fill:#a8a29e}.fill-stone-50{fill:#fafaf9}.fill-stone-500{fill:#78716c}.fill-stone-600{fill:#57534e}.fill-stone-700{fill:#44403c}.fill-stone-800{fill:#292524}.fill-stone-900{fill:#1c1917}.fill-stone-950{fill:#0c0a09}.fill-teal-100{fill:#ccfbf1}.fill-teal-200{fill:#99f6e4}.fill-teal-300{fill:#5eead4}.fill-teal-400{fill:#2dd4bf}.fill-teal-50{fill:#f0fdfa}.fill-teal-500{fill:#14b8a6}.fill-teal-600{fill:#0d9488}.fill-teal-700{fill:#0f766e}.fill-teal-800{fill:#115e59}.fill-teal-900{fill:#134e4a}.fill-teal-950{fill:#042f2e}.fill-tremor-content{fill:#6b7280}.fill-tremor-content-emphasis{fill:#374151}.fill-violet-100{fill:#ede9fe}.fill-violet-200{fill:#ddd6fe}.fill-violet-300{fill:#c4b5fd}.fill-violet-400{fill:#a78bfa}.fill-violet-50{fill:#f5f3ff}.fill-violet-500{fill:#8b5cf6}.fill-violet-600{fill:#7c3aed}.fill-violet-700{fill:#6d28d9}.fill-violet-800{fill:#5b21b6}.fill-violet-900{fill:#4c1d95}.fill-violet-950{fill:#2e1065}.fill-yellow-100{fill:#fef9c3}.fill-yellow-200{fill:#fef08a}.fill-yellow-300{fill:#fde047}.fill-yellow-400{fill:#facc15}.fill-yellow-50{fill:#fefce8}.fill-yellow-500{fill:#eab308}.fill-yellow-600{fill:#ca8a04}.fill-yellow-700{fill:#a16207}.fill-yellow-800{fill:#854d0e}.fill-yellow-900{fill:#713f12}.fill-yellow-950{fill:#422006}.fill-zinc-100{fill:#f4f4f5}.fill-zinc-200{fill:#e4e4e7}.fill-zinc-300{fill:#d4d4d8}.fill-zinc-400{fill:#a1a1aa}.fill-zinc-50{fill:#fafafa}.fill-zinc-500{fill:#71717a}.fill-zinc-600{fill:#52525b}.fill-zinc-700{fill:#3f3f46}.fill-zinc-800{fill:#27272a}.fill-zinc-900{fill:#18181b}.fill-zinc-950{fill:#09090b}.stroke-amber-100{stroke:#fef3c7}.stroke-amber-200{stroke:#fde68a}.stroke-amber-300{stroke:#fcd34d}.stroke-amber-400{stroke:#fbbf24}.stroke-amber-50{stroke:#fffbeb}.stroke-amber-500{stroke:#f59e0b}.stroke-amber-600{stroke:#d97706}.stroke-amber-700{stroke:#b45309}.stroke-amber-800{stroke:#92400e}.stroke-amber-900{stroke:#78350f}.stroke-amber-950{stroke:#451a03}.stroke-blue-100{stroke:#dbeafe}.stroke-blue-200{stroke:#bfdbfe}.stroke-blue-300{stroke:#93c5fd}.stroke-blue-400{stroke:#60a5fa}.stroke-blue-50{stroke:#eff6ff}.stroke-blue-500{stroke:#3b82f6}.stroke-blue-600{stroke:#2563eb}.stroke-blue-700{stroke:#1d4ed8}.stroke-blue-800{stroke:#1e40af}.stroke-blue-900{stroke:#1e3a8a}.stroke-blue-950{stroke:#172554}.stroke-cyan-100{stroke:#cffafe}.stroke-cyan-200{stroke:#a5f3fc}.stroke-cyan-300{stroke:#67e8f9}.stroke-cyan-400{stroke:#22d3ee}.stroke-cyan-50{stroke:#ecfeff}.stroke-cyan-500{stroke:#06b6d4}.stroke-cyan-600{stroke:#0891b2}.stroke-cyan-700{stroke:#0e7490}.stroke-cyan-800{stroke:#155e75}.stroke-cyan-900{stroke:#164e63}.stroke-cyan-950{stroke:#083344}.stroke-dark-tremor-background{stroke:#111827}.stroke-dark-tremor-border{stroke:#374151}.stroke-emerald-100{stroke:#d1fae5}.stroke-emerald-200{stroke:#a7f3d0}.stroke-emerald-300{stroke:#6ee7b7}.stroke-emerald-400{stroke:#34d399}.stroke-emerald-50{stroke:#ecfdf5}.stroke-emerald-500{stroke:#10b981}.stroke-emerald-600{stroke:#059669}.stroke-emerald-700{stroke:#047857}.stroke-emerald-800{stroke:#065f46}.stroke-emerald-900{stroke:#064e3b}.stroke-emerald-950{stroke:#022c22}.stroke-fuchsia-100{stroke:#fae8ff}.stroke-fuchsia-200{stroke:#f5d0fe}.stroke-fuchsia-300{stroke:#f0abfc}.stroke-fuchsia-400{stroke:#e879f9}.stroke-fuchsia-50{stroke:#fdf4ff}.stroke-fuchsia-500{stroke:#d946ef}.stroke-fuchsia-600{stroke:#c026d3}.stroke-fuchsia-700{stroke:#a21caf}.stroke-fuchsia-800{stroke:#86198f}.stroke-fuchsia-900{stroke:#701a75}.stroke-fuchsia-950{stroke:#4a044e}.stroke-gray-100{stroke:#f3f4f6}.stroke-gray-200{stroke:#e5e7eb}.stroke-gray-300{stroke:#d1d5db}.stroke-gray-400{stroke:#9ca3af}.stroke-gray-50{stroke:#f9fafb}.stroke-gray-500{stroke:#6b7280}.stroke-gray-600{stroke:#4b5563}.stroke-gray-700{stroke:#374151}.stroke-gray-800{stroke:#1f2937}.stroke-gray-900{stroke:#111827}.stroke-gray-950{stroke:#030712}.stroke-green-100{stroke:#dcfce7}.stroke-green-200{stroke:#bbf7d0}.stroke-green-300{stroke:#86efac}.stroke-green-400{stroke:#4ade80}.stroke-green-50{stroke:#f0fdf4}.stroke-green-500{stroke:#22c55e}.stroke-green-600{stroke:#16a34a}.stroke-green-700{stroke:#15803d}.stroke-green-800{stroke:#166534}.stroke-green-900{stroke:#14532d}.stroke-green-950{stroke:#052e16}.stroke-indigo-100{stroke:#e0e7ff}.stroke-indigo-200{stroke:#c7d2fe}.stroke-indigo-300{stroke:#a5b4fc}.stroke-indigo-400{stroke:#818cf8}.stroke-indigo-50{stroke:#eef2ff}.stroke-indigo-500{stroke:#6366f1}.stroke-indigo-600{stroke:#4f46e5}.stroke-indigo-700{stroke:#4338ca}.stroke-indigo-800{stroke:#3730a3}.stroke-indigo-900{stroke:#312e81}.stroke-indigo-950{stroke:#1e1b4b}.stroke-lime-100{stroke:#ecfccb}.stroke-lime-200{stroke:#d9f99d}.stroke-lime-300{stroke:#bef264}.stroke-lime-400{stroke:#a3e635}.stroke-lime-50{stroke:#f7fee7}.stroke-lime-500{stroke:#84cc16}.stroke-lime-600{stroke:#65a30d}.stroke-lime-700{stroke:#4d7c0f}.stroke-lime-800{stroke:#3f6212}.stroke-lime-900{stroke:#365314}.stroke-lime-950{stroke:#1a2e05}.stroke-neutral-100{stroke:#f5f5f5}.stroke-neutral-200{stroke:#e5e5e5}.stroke-neutral-300{stroke:#d4d4d4}.stroke-neutral-400{stroke:#a3a3a3}.stroke-neutral-50{stroke:#fafafa}.stroke-neutral-500{stroke:#737373}.stroke-neutral-600{stroke:#525252}.stroke-neutral-700{stroke:#404040}.stroke-neutral-800{stroke:#262626}.stroke-neutral-900{stroke:#171717}.stroke-neutral-950{stroke:#0a0a0a}.stroke-orange-100{stroke:#ffedd5}.stroke-orange-200{stroke:#fed7aa}.stroke-orange-300{stroke:#fdba74}.stroke-orange-400{stroke:#fb923c}.stroke-orange-50{stroke:#fff7ed}.stroke-orange-500{stroke:#f97316}.stroke-orange-600{stroke:#ea580c}.stroke-orange-700{stroke:#c2410c}.stroke-orange-800{stroke:#9a3412}.stroke-orange-900{stroke:#7c2d12}.stroke-orange-950{stroke:#431407}.stroke-pink-100{stroke:#fce7f3}.stroke-pink-200{stroke:#fbcfe8}.stroke-pink-300{stroke:#f9a8d4}.stroke-pink-400{stroke:#f472b6}.stroke-pink-50{stroke:#fdf2f8}.stroke-pink-500{stroke:#ec4899}.stroke-pink-600{stroke:#db2777}.stroke-pink-700{stroke:#be185d}.stroke-pink-800{stroke:#9d174d}.stroke-pink-900{stroke:#831843}.stroke-pink-950{stroke:#500724}.stroke-purple-100{stroke:#f3e8ff}.stroke-purple-200{stroke:#e9d5ff}.stroke-purple-300{stroke:#d8b4fe}.stroke-purple-400{stroke:#c084fc}.stroke-purple-50{stroke:#faf5ff}.stroke-purple-500{stroke:#a855f7}.stroke-purple-600{stroke:#9333ea}.stroke-purple-700{stroke:#7e22ce}.stroke-purple-800{stroke:#6b21a8}.stroke-purple-900{stroke:#581c87}.stroke-purple-950{stroke:#3b0764}.stroke-red-100{stroke:#fee2e2}.stroke-red-200{stroke:#fecaca}.stroke-red-300{stroke:#fca5a5}.stroke-red-400{stroke:#f87171}.stroke-red-50{stroke:#fef2f2}.stroke-red-500{stroke:#ef4444}.stroke-red-600{stroke:#dc2626}.stroke-red-700{stroke:#b91c1c}.stroke-red-800{stroke:#991b1b}.stroke-red-900{stroke:#7f1d1d}.stroke-red-950{stroke:#450a0a}.stroke-rose-100{stroke:#ffe4e6}.stroke-rose-200{stroke:#fecdd3}.stroke-rose-300{stroke:#fda4af}.stroke-rose-400{stroke:#fb7185}.stroke-rose-50{stroke:#fff1f2}.stroke-rose-500{stroke:#f43f5e}.stroke-rose-600{stroke:#e11d48}.stroke-rose-700{stroke:#be123c}.stroke-rose-800{stroke:#9f1239}.stroke-rose-900{stroke:#881337}.stroke-rose-950{stroke:#4c0519}.stroke-sky-100{stroke:#e0f2fe}.stroke-sky-200{stroke:#bae6fd}.stroke-sky-300{stroke:#7dd3fc}.stroke-sky-400{stroke:#38bdf8}.stroke-sky-50{stroke:#f0f9ff}.stroke-sky-500{stroke:#0ea5e9}.stroke-sky-600{stroke:#0284c7}.stroke-sky-700{stroke:#0369a1}.stroke-sky-800{stroke:#075985}.stroke-sky-900{stroke:#0c4a6e}.stroke-sky-950{stroke:#082f49}.stroke-slate-100{stroke:#f1f5f9}.stroke-slate-200{stroke:#e2e8f0}.stroke-slate-300{stroke:#cbd5e1}.stroke-slate-400{stroke:#94a3b8}.stroke-slate-50{stroke:#f8fafc}.stroke-slate-500{stroke:#64748b}.stroke-slate-600{stroke:#475569}.stroke-slate-700{stroke:#334155}.stroke-slate-800{stroke:#1e293b}.stroke-slate-900{stroke:#0f172a}.stroke-slate-950{stroke:#020617}.stroke-stone-100{stroke:#f5f5f4}.stroke-stone-200{stroke:#e7e5e4}.stroke-stone-300{stroke:#d6d3d1}.stroke-stone-400{stroke:#a8a29e}.stroke-stone-50{stroke:#fafaf9}.stroke-stone-500{stroke:#78716c}.stroke-stone-600{stroke:#57534e}.stroke-stone-700{stroke:#44403c}.stroke-stone-800{stroke:#292524}.stroke-stone-900{stroke:#1c1917}.stroke-stone-950{stroke:#0c0a09}.stroke-teal-100{stroke:#ccfbf1}.stroke-teal-200{stroke:#99f6e4}.stroke-teal-300{stroke:#5eead4}.stroke-teal-400{stroke:#2dd4bf}.stroke-teal-50{stroke:#f0fdfa}.stroke-teal-500{stroke:#14b8a6}.stroke-teal-600{stroke:#0d9488}.stroke-teal-700{stroke:#0f766e}.stroke-teal-800{stroke:#115e59}.stroke-teal-900{stroke:#134e4a}.stroke-teal-950{stroke:#042f2e}.stroke-tremor-background{stroke:#fff}.stroke-tremor-border{stroke:#e5e7eb}.stroke-tremor-brand{stroke:#6366f1}.stroke-tremor-brand-muted\/50{stroke:#8688ef80}.stroke-violet-100{stroke:#ede9fe}.stroke-violet-200{stroke:#ddd6fe}.stroke-violet-300{stroke:#c4b5fd}.stroke-violet-400{stroke:#a78bfa}.stroke-violet-50{stroke:#f5f3ff}.stroke-violet-500{stroke:#8b5cf6}.stroke-violet-600{stroke:#7c3aed}.stroke-violet-700{stroke:#6d28d9}.stroke-violet-800{stroke:#5b21b6}.stroke-violet-900{stroke:#4c1d95}.stroke-violet-950{stroke:#2e1065}.stroke-yellow-100{stroke:#fef9c3}.stroke-yellow-200{stroke:#fef08a}.stroke-yellow-300{stroke:#fde047}.stroke-yellow-400{stroke:#facc15}.stroke-yellow-50{stroke:#fefce8}.stroke-yellow-500{stroke:#eab308}.stroke-yellow-600{stroke:#ca8a04}.stroke-yellow-700{stroke:#a16207}.stroke-yellow-800{stroke:#854d0e}.stroke-yellow-900{stroke:#713f12}.stroke-yellow-950{stroke:#422006}.stroke-zinc-100{stroke:#f4f4f5}.stroke-zinc-200{stroke:#e4e4e7}.stroke-zinc-300{stroke:#d4d4d8}.stroke-zinc-400{stroke:#a1a1aa}.stroke-zinc-50{stroke:#fafafa}.stroke-zinc-500{stroke:#71717a}.stroke-zinc-600{stroke:#52525b}.stroke-zinc-700{stroke:#3f3f46}.stroke-zinc-800{stroke:#27272a}.stroke-zinc-900{stroke:#18181b}.stroke-zinc-950{stroke:#09090b}.stroke-1{stroke-width:1px}.stroke-\[2\.5\]{stroke-width:2.5px}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.\!p-3{padding:.75rem!important}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[10px\]{padding-top:10px;padding-bottom:10px}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-0{padding-left:0}.pl-10{padding-left:2.5rem}.pl-11{padding-left:2.75rem}.pl-12{padding-left:3rem}.pl-14{padding-left:3.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-7{padding-left:1.75rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-0{padding-right:0}.pr-1{padding-right:.25rem}.pr-1\.5{padding-right:.375rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-14{padding-right:3.5rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.\!text-tremor-label{font-size:.75rem!important;line-height:.3rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-tremor-default{font-size:.775rem;line-height:1.15rem}.text-tremor-label{font-size:.75rem;line-height:.3rem}.text-tremor-metric{font-size:1.675rem;line-height:2.15rem}.text-tremor-title{font-size:1.025rem;line-height:1.65rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.\!text-tremor-content-subtle{--tw-text-opacity:1!important;color:rgb(156 163 175/var(--tw-text-opacity,1))!important}.\!text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.text-\[\#6366f1\]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-\[\#d1d5db\]\/15{color:#d1d5db26}.text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-amber-50{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-amber-900{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}.text-amber-950{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-blue-100{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.text-blue-200{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.text-blue-300{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-blue-50{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.text-blue-950{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}.text-current{color:currentColor}.text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.text-cyan-500{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.text-dark-tremor-brand{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-dark-tremor-brand-emphasis{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.text-dark-tremor-brand-inverted{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.text-dark-tremor-content{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-dark-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-dark-tremor-content-subtle{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-emerald-900{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}.text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.text-fuchsia-200{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}.text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.text-fuchsia-50{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}.text-fuchsia-500{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}.text-fuchsia-600{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}.text-fuchsia-700{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.text-fuchsia-800{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}.text-fuchsia-900{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}.text-fuchsia-950{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-gray-950{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.text-green-100{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.text-green-200{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.text-green-300{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-50{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.text-green-950{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}.text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.text-indigo-400{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.text-indigo-50{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}.text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.text-indigo-900{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}.text-indigo-950{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.text-inherit{color:inherit}.text-lime-100{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}.text-lime-200{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}.text-lime-300{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}.text-lime-400{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.text-lime-50{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}.text-lime-500{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}.text-lime-600{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}.text-lime-700{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}.text-lime-800{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}.text-lime-900{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.text-lime-950{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}.text-neutral-100{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}.text-neutral-200{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.text-neutral-300{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.text-orange-100{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}.text-orange-200{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}.text-orange-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.text-orange-50{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}.text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.text-orange-900{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}.text-orange-950{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}.text-pink-100{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}.text-pink-200{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}.text-pink-300{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}.text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.text-pink-50{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}.text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.text-pink-800{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.text-pink-900{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}.text-pink-950{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}.text-purple-100{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}.text-purple-200{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}.text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.text-purple-50{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}.text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.text-purple-900{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}.text-purple-950{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}.text-red-100{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-50{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.text-red-950{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}.text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.text-rose-50{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}.text-rose-500{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}.text-rose-700{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.text-rose-800{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}.text-rose-900{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}.text-rose-950{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}.text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.text-sky-50{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}.text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-sky-800{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}.text-sky-900{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}.text-sky-950{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.text-stone-500{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}.text-stone-600{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}.text-stone-700{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.text-stone-950{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}.text-teal-100{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}.text-teal-200{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}.text-teal-300{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}.text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.text-teal-50{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}.text-teal-500{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}.text-teal-600{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}.text-teal-700{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}.text-teal-800{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}.text-teal-900{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.text-teal-950{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}.text-transparent{color:#0000}.text-tremor-brand{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-tremor-brand-emphasis{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-tremor-brand-inverted{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-tremor-content{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-tremor-content-strong{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-tremor-content-subtle{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.text-violet-50{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}.text-violet-500{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}.text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.text-violet-900{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}.text-violet-950{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-100{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.text-yellow-200{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}.text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.text-yellow-50{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.text-yellow-950{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}.text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.placeholder-gray-400::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}.accent-dark-tremor-brand,.accent-tremor-brand{accent-color:#6366f1}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px #00000040;--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[-4px_0_4px_-4px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:-4px 0 4px -4px #0000001a;--tw-shadow-colored:-4px 0 4px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[-4px_0_8px_-6px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:-4px 0 8px -6px #0000001a;--tw-shadow-colored:-4px 0 8px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-dark-tremor-card{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-dark-tremor-input{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-tremor-card{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-tremor-dropdown{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-tremor-input{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-indigo-500\/20{--tw-shadow-color:#6366f133;--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline-offset:2px;outline:2px solid #0000}.outline{outline-style:solid}.outline-tremor-brand{outline-color:#6366f1}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-amber-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 243 199/var(--tw-ring-opacity,1))}.ring-amber-200{--tw-ring-opacity:1;--tw-ring-color:rgb(253 230 138/var(--tw-ring-opacity,1))}.ring-amber-300{--tw-ring-opacity:1;--tw-ring-color:rgb(252 211 77/var(--tw-ring-opacity,1))}.ring-amber-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 191 36/var(--tw-ring-opacity,1))}.ring-amber-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 251 235/var(--tw-ring-opacity,1))}.ring-amber-500{--tw-ring-opacity:1;--tw-ring-color:rgb(245 158 11/var(--tw-ring-opacity,1))}.ring-amber-600{--tw-ring-opacity:1;--tw-ring-color:rgb(217 119 6/var(--tw-ring-opacity,1))}.ring-amber-700{--tw-ring-opacity:1;--tw-ring-color:rgb(180 83 9/var(--tw-ring-opacity,1))}.ring-amber-800{--tw-ring-opacity:1;--tw-ring-color:rgb(146 64 14/var(--tw-ring-opacity,1))}.ring-amber-900{--tw-ring-opacity:1;--tw-ring-color:rgb(120 53 15/var(--tw-ring-opacity,1))}.ring-amber-950{--tw-ring-opacity:1;--tw-ring-color:rgb(69 26 3/var(--tw-ring-opacity,1))}.ring-blue-100{--tw-ring-opacity:1;--tw-ring-color:rgb(219 234 254/var(--tw-ring-opacity,1))}.ring-blue-200{--tw-ring-opacity:1;--tw-ring-color:rgb(191 219 254/var(--tw-ring-opacity,1))}.ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}.ring-blue-400{--tw-ring-opacity:1;--tw-ring-color:rgb(96 165 250/var(--tw-ring-opacity,1))}.ring-blue-50{--tw-ring-opacity:1;--tw-ring-color:rgb(239 246 255/var(--tw-ring-opacity,1))}.ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.ring-blue-600{--tw-ring-opacity:1;--tw-ring-color:rgb(37 99 235/var(--tw-ring-opacity,1))}.ring-blue-700{--tw-ring-opacity:1;--tw-ring-color:rgb(29 78 216/var(--tw-ring-opacity,1))}.ring-blue-800{--tw-ring-opacity:1;--tw-ring-color:rgb(30 64 175/var(--tw-ring-opacity,1))}.ring-blue-900{--tw-ring-opacity:1;--tw-ring-color:rgb(30 58 138/var(--tw-ring-opacity,1))}.ring-blue-950{--tw-ring-opacity:1;--tw-ring-color:rgb(23 37 84/var(--tw-ring-opacity,1))}.ring-cyan-100{--tw-ring-opacity:1;--tw-ring-color:rgb(207 250 254/var(--tw-ring-opacity,1))}.ring-cyan-200{--tw-ring-opacity:1;--tw-ring-color:rgb(165 243 252/var(--tw-ring-opacity,1))}.ring-cyan-300{--tw-ring-opacity:1;--tw-ring-color:rgb(103 232 249/var(--tw-ring-opacity,1))}.ring-cyan-400{--tw-ring-opacity:1;--tw-ring-color:rgb(34 211 238/var(--tw-ring-opacity,1))}.ring-cyan-50{--tw-ring-opacity:1;--tw-ring-color:rgb(236 254 255/var(--tw-ring-opacity,1))}.ring-cyan-500{--tw-ring-opacity:1;--tw-ring-color:rgb(6 182 212/var(--tw-ring-opacity,1))}.ring-cyan-600{--tw-ring-opacity:1;--tw-ring-color:rgb(8 145 178/var(--tw-ring-opacity,1))}.ring-cyan-700{--tw-ring-opacity:1;--tw-ring-color:rgb(14 116 144/var(--tw-ring-opacity,1))}.ring-cyan-800{--tw-ring-opacity:1;--tw-ring-color:rgb(21 94 117/var(--tw-ring-opacity,1))}.ring-cyan-900{--tw-ring-opacity:1;--tw-ring-color:rgb(22 78 99/var(--tw-ring-opacity,1))}.ring-cyan-950{--tw-ring-opacity:1;--tw-ring-color:rgb(8 51 68/var(--tw-ring-opacity,1))}.ring-dark-tremor-ring{--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity,1))}.ring-emerald-100{--tw-ring-opacity:1;--tw-ring-color:rgb(209 250 229/var(--tw-ring-opacity,1))}.ring-emerald-200{--tw-ring-opacity:1;--tw-ring-color:rgb(167 243 208/var(--tw-ring-opacity,1))}.ring-emerald-300{--tw-ring-opacity:1;--tw-ring-color:rgb(110 231 183/var(--tw-ring-opacity,1))}.ring-emerald-400{--tw-ring-opacity:1;--tw-ring-color:rgb(52 211 153/var(--tw-ring-opacity,1))}.ring-emerald-50{--tw-ring-opacity:1;--tw-ring-color:rgb(236 253 245/var(--tw-ring-opacity,1))}.ring-emerald-500{--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity,1))}.ring-emerald-600{--tw-ring-opacity:1;--tw-ring-color:rgb(5 150 105/var(--tw-ring-opacity,1))}.ring-emerald-700{--tw-ring-opacity:1;--tw-ring-color:rgb(4 120 87/var(--tw-ring-opacity,1))}.ring-emerald-800{--tw-ring-opacity:1;--tw-ring-color:rgb(6 95 70/var(--tw-ring-opacity,1))}.ring-emerald-900{--tw-ring-opacity:1;--tw-ring-color:rgb(6 78 59/var(--tw-ring-opacity,1))}.ring-emerald-950{--tw-ring-opacity:1;--tw-ring-color:rgb(2 44 34/var(--tw-ring-opacity,1))}.ring-fuchsia-100{--tw-ring-opacity:1;--tw-ring-color:rgb(250 232 255/var(--tw-ring-opacity,1))}.ring-fuchsia-200{--tw-ring-opacity:1;--tw-ring-color:rgb(245 208 254/var(--tw-ring-opacity,1))}.ring-fuchsia-300{--tw-ring-opacity:1;--tw-ring-color:rgb(240 171 252/var(--tw-ring-opacity,1))}.ring-fuchsia-400{--tw-ring-opacity:1;--tw-ring-color:rgb(232 121 249/var(--tw-ring-opacity,1))}.ring-fuchsia-50{--tw-ring-opacity:1;--tw-ring-color:rgb(253 244 255/var(--tw-ring-opacity,1))}.ring-fuchsia-500{--tw-ring-opacity:1;--tw-ring-color:rgb(217 70 239/var(--tw-ring-opacity,1))}.ring-fuchsia-600{--tw-ring-opacity:1;--tw-ring-color:rgb(192 38 211/var(--tw-ring-opacity,1))}.ring-fuchsia-700{--tw-ring-opacity:1;--tw-ring-color:rgb(162 28 175/var(--tw-ring-opacity,1))}.ring-fuchsia-800{--tw-ring-opacity:1;--tw-ring-color:rgb(134 25 143/var(--tw-ring-opacity,1))}.ring-fuchsia-900{--tw-ring-opacity:1;--tw-ring-color:rgb(112 26 117/var(--tw-ring-opacity,1))}.ring-fuchsia-950{--tw-ring-opacity:1;--tw-ring-color:rgb(74 4 78/var(--tw-ring-opacity,1))}.ring-gray-100{--tw-ring-opacity:1;--tw-ring-color:rgb(243 244 246/var(--tw-ring-opacity,1))}.ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity,1))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity,1))}.ring-gray-400{--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity,1))}.ring-gray-50{--tw-ring-opacity:1;--tw-ring-color:rgb(249 250 251/var(--tw-ring-opacity,1))}.ring-gray-500{--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity,1))}.ring-gray-600{--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity,1))}.ring-gray-700{--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity,1))}.ring-gray-800{--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity,1))}.ring-gray-900{--tw-ring-opacity:1;--tw-ring-color:rgb(17 24 39/var(--tw-ring-opacity,1))}.ring-gray-950{--tw-ring-opacity:1;--tw-ring-color:rgb(3 7 18/var(--tw-ring-opacity,1))}.ring-green-100{--tw-ring-opacity:1;--tw-ring-color:rgb(220 252 231/var(--tw-ring-opacity,1))}.ring-green-200{--tw-ring-opacity:1;--tw-ring-color:rgb(187 247 208/var(--tw-ring-opacity,1))}.ring-green-300{--tw-ring-opacity:1;--tw-ring-color:rgb(134 239 172/var(--tw-ring-opacity,1))}.ring-green-400{--tw-ring-opacity:1;--tw-ring-color:rgb(74 222 128/var(--tw-ring-opacity,1))}.ring-green-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 253 244/var(--tw-ring-opacity,1))}.ring-green-500{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity,1))}.ring-green-600{--tw-ring-opacity:1;--tw-ring-color:rgb(22 163 74/var(--tw-ring-opacity,1))}.ring-green-700{--tw-ring-opacity:1;--tw-ring-color:rgb(21 128 61/var(--tw-ring-opacity,1))}.ring-green-800{--tw-ring-opacity:1;--tw-ring-color:rgb(22 101 52/var(--tw-ring-opacity,1))}.ring-green-900{--tw-ring-opacity:1;--tw-ring-color:rgb(20 83 45/var(--tw-ring-opacity,1))}.ring-green-950{--tw-ring-opacity:1;--tw-ring-color:rgb(5 46 22/var(--tw-ring-opacity,1))}.ring-indigo-100{--tw-ring-opacity:1;--tw-ring-color:rgb(224 231 255/var(--tw-ring-opacity,1))}.ring-indigo-200{--tw-ring-opacity:1;--tw-ring-color:rgb(199 210 254/var(--tw-ring-opacity,1))}.ring-indigo-300{--tw-ring-opacity:1;--tw-ring-color:rgb(165 180 252/var(--tw-ring-opacity,1))}.ring-indigo-400{--tw-ring-opacity:1;--tw-ring-color:rgb(129 140 248/var(--tw-ring-opacity,1))}.ring-indigo-50{--tw-ring-opacity:1;--tw-ring-color:rgb(238 242 255/var(--tw-ring-opacity,1))}.ring-indigo-500{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity,1))}.ring-indigo-600{--tw-ring-opacity:1;--tw-ring-color:rgb(79 70 229/var(--tw-ring-opacity,1))}.ring-indigo-700{--tw-ring-opacity:1;--tw-ring-color:rgb(67 56 202/var(--tw-ring-opacity,1))}.ring-indigo-800{--tw-ring-opacity:1;--tw-ring-color:rgb(55 48 163/var(--tw-ring-opacity,1))}.ring-indigo-900{--tw-ring-opacity:1;--tw-ring-color:rgb(49 46 129/var(--tw-ring-opacity,1))}.ring-indigo-950{--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity,1))}.ring-lime-100{--tw-ring-opacity:1;--tw-ring-color:rgb(236 252 203/var(--tw-ring-opacity,1))}.ring-lime-200{--tw-ring-opacity:1;--tw-ring-color:rgb(217 249 157/var(--tw-ring-opacity,1))}.ring-lime-300{--tw-ring-opacity:1;--tw-ring-color:rgb(190 242 100/var(--tw-ring-opacity,1))}.ring-lime-400{--tw-ring-opacity:1;--tw-ring-color:rgb(163 230 53/var(--tw-ring-opacity,1))}.ring-lime-50{--tw-ring-opacity:1;--tw-ring-color:rgb(247 254 231/var(--tw-ring-opacity,1))}.ring-lime-500{--tw-ring-opacity:1;--tw-ring-color:rgb(132 204 22/var(--tw-ring-opacity,1))}.ring-lime-600{--tw-ring-opacity:1;--tw-ring-color:rgb(101 163 13/var(--tw-ring-opacity,1))}.ring-lime-700{--tw-ring-opacity:1;--tw-ring-color:rgb(77 124 15/var(--tw-ring-opacity,1))}.ring-lime-800{--tw-ring-opacity:1;--tw-ring-color:rgb(63 98 18/var(--tw-ring-opacity,1))}.ring-lime-900{--tw-ring-opacity:1;--tw-ring-color:rgb(54 83 20/var(--tw-ring-opacity,1))}.ring-lime-950{--tw-ring-opacity:1;--tw-ring-color:rgb(26 46 5/var(--tw-ring-opacity,1))}.ring-neutral-100{--tw-ring-opacity:1;--tw-ring-color:rgb(245 245 245/var(--tw-ring-opacity,1))}.ring-neutral-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 229 229/var(--tw-ring-opacity,1))}.ring-neutral-300{--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 212/var(--tw-ring-opacity,1))}.ring-neutral-400{--tw-ring-opacity:1;--tw-ring-color:rgb(163 163 163/var(--tw-ring-opacity,1))}.ring-neutral-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 250/var(--tw-ring-opacity,1))}.ring-neutral-500{--tw-ring-opacity:1;--tw-ring-color:rgb(115 115 115/var(--tw-ring-opacity,1))}.ring-neutral-600{--tw-ring-opacity:1;--tw-ring-color:rgb(82 82 82/var(--tw-ring-opacity,1))}.ring-neutral-700{--tw-ring-opacity:1;--tw-ring-color:rgb(64 64 64/var(--tw-ring-opacity,1))}.ring-neutral-800{--tw-ring-opacity:1;--tw-ring-color:rgb(38 38 38/var(--tw-ring-opacity,1))}.ring-neutral-900{--tw-ring-opacity:1;--tw-ring-color:rgb(23 23 23/var(--tw-ring-opacity,1))}.ring-neutral-950{--tw-ring-opacity:1;--tw-ring-color:rgb(10 10 10/var(--tw-ring-opacity,1))}.ring-orange-100{--tw-ring-opacity:1;--tw-ring-color:rgb(255 237 213/var(--tw-ring-opacity,1))}.ring-orange-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 215 170/var(--tw-ring-opacity,1))}.ring-orange-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 186 116/var(--tw-ring-opacity,1))}.ring-orange-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 146 60/var(--tw-ring-opacity,1))}.ring-orange-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 247 237/var(--tw-ring-opacity,1))}.ring-orange-500{--tw-ring-opacity:1;--tw-ring-color:rgb(249 115 22/var(--tw-ring-opacity,1))}.ring-orange-600{--tw-ring-opacity:1;--tw-ring-color:rgb(234 88 12/var(--tw-ring-opacity,1))}.ring-orange-700{--tw-ring-opacity:1;--tw-ring-color:rgb(194 65 12/var(--tw-ring-opacity,1))}.ring-orange-800{--tw-ring-opacity:1;--tw-ring-color:rgb(154 52 18/var(--tw-ring-opacity,1))}.ring-orange-900{--tw-ring-opacity:1;--tw-ring-color:rgb(124 45 18/var(--tw-ring-opacity,1))}.ring-orange-950{--tw-ring-opacity:1;--tw-ring-color:rgb(67 20 7/var(--tw-ring-opacity,1))}.ring-pink-100{--tw-ring-opacity:1;--tw-ring-color:rgb(252 231 243/var(--tw-ring-opacity,1))}.ring-pink-200{--tw-ring-opacity:1;--tw-ring-color:rgb(251 207 232/var(--tw-ring-opacity,1))}.ring-pink-300{--tw-ring-opacity:1;--tw-ring-color:rgb(249 168 212/var(--tw-ring-opacity,1))}.ring-pink-400{--tw-ring-opacity:1;--tw-ring-color:rgb(244 114 182/var(--tw-ring-opacity,1))}.ring-pink-50{--tw-ring-opacity:1;--tw-ring-color:rgb(253 242 248/var(--tw-ring-opacity,1))}.ring-pink-500{--tw-ring-opacity:1;--tw-ring-color:rgb(236 72 153/var(--tw-ring-opacity,1))}.ring-pink-600{--tw-ring-opacity:1;--tw-ring-color:rgb(219 39 119/var(--tw-ring-opacity,1))}.ring-pink-700{--tw-ring-opacity:1;--tw-ring-color:rgb(190 24 93/var(--tw-ring-opacity,1))}.ring-pink-800{--tw-ring-opacity:1;--tw-ring-color:rgb(157 23 77/var(--tw-ring-opacity,1))}.ring-pink-900{--tw-ring-opacity:1;--tw-ring-color:rgb(131 24 67/var(--tw-ring-opacity,1))}.ring-pink-950{--tw-ring-opacity:1;--tw-ring-color:rgb(80 7 36/var(--tw-ring-opacity,1))}.ring-purple-100{--tw-ring-opacity:1;--tw-ring-color:rgb(243 232 255/var(--tw-ring-opacity,1))}.ring-purple-200{--tw-ring-opacity:1;--tw-ring-color:rgb(233 213 255/var(--tw-ring-opacity,1))}.ring-purple-300{--tw-ring-opacity:1;--tw-ring-color:rgb(216 180 254/var(--tw-ring-opacity,1))}.ring-purple-400{--tw-ring-opacity:1;--tw-ring-color:rgb(192 132 252/var(--tw-ring-opacity,1))}.ring-purple-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 245 255/var(--tw-ring-opacity,1))}.ring-purple-500{--tw-ring-opacity:1;--tw-ring-color:rgb(168 85 247/var(--tw-ring-opacity,1))}.ring-purple-600{--tw-ring-opacity:1;--tw-ring-color:rgb(147 51 234/var(--tw-ring-opacity,1))}.ring-purple-700{--tw-ring-opacity:1;--tw-ring-color:rgb(126 34 206/var(--tw-ring-opacity,1))}.ring-purple-800{--tw-ring-opacity:1;--tw-ring-color:rgb(107 33 168/var(--tw-ring-opacity,1))}.ring-purple-900{--tw-ring-opacity:1;--tw-ring-color:rgb(88 28 135/var(--tw-ring-opacity,1))}.ring-purple-950{--tw-ring-opacity:1;--tw-ring-color:rgb(59 7 100/var(--tw-ring-opacity,1))}.ring-red-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 226 226/var(--tw-ring-opacity,1))}.ring-red-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 202 202/var(--tw-ring-opacity,1))}.ring-red-300{--tw-ring-opacity:1;--tw-ring-color:rgb(252 165 165/var(--tw-ring-opacity,1))}.ring-red-400{--tw-ring-opacity:1;--tw-ring-color:rgb(248 113 113/var(--tw-ring-opacity,1))}.ring-red-50{--tw-ring-opacity:1;--tw-ring-color:rgb(254 242 242/var(--tw-ring-opacity,1))}.ring-red-500{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.ring-red-600{--tw-ring-opacity:1;--tw-ring-color:rgb(220 38 38/var(--tw-ring-opacity,1))}.ring-red-700{--tw-ring-opacity:1;--tw-ring-color:rgb(185 28 28/var(--tw-ring-opacity,1))}.ring-red-800{--tw-ring-opacity:1;--tw-ring-color:rgb(153 27 27/var(--tw-ring-opacity,1))}.ring-red-900{--tw-ring-opacity:1;--tw-ring-color:rgb(127 29 29/var(--tw-ring-opacity,1))}.ring-red-950{--tw-ring-opacity:1;--tw-ring-color:rgb(69 10 10/var(--tw-ring-opacity,1))}.ring-rose-100{--tw-ring-opacity:1;--tw-ring-color:rgb(255 228 230/var(--tw-ring-opacity,1))}.ring-rose-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 205 211/var(--tw-ring-opacity,1))}.ring-rose-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 164 175/var(--tw-ring-opacity,1))}.ring-rose-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 113 133/var(--tw-ring-opacity,1))}.ring-rose-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 241 242/var(--tw-ring-opacity,1))}.ring-rose-500{--tw-ring-opacity:1;--tw-ring-color:rgb(244 63 94/var(--tw-ring-opacity,1))}.ring-rose-600{--tw-ring-opacity:1;--tw-ring-color:rgb(225 29 72/var(--tw-ring-opacity,1))}.ring-rose-700{--tw-ring-opacity:1;--tw-ring-color:rgb(190 18 60/var(--tw-ring-opacity,1))}.ring-rose-800{--tw-ring-opacity:1;--tw-ring-color:rgb(159 18 57/var(--tw-ring-opacity,1))}.ring-rose-900{--tw-ring-opacity:1;--tw-ring-color:rgb(136 19 55/var(--tw-ring-opacity,1))}.ring-rose-950{--tw-ring-opacity:1;--tw-ring-color:rgb(76 5 25/var(--tw-ring-opacity,1))}.ring-sky-100{--tw-ring-opacity:1;--tw-ring-color:rgb(224 242 254/var(--tw-ring-opacity,1))}.ring-sky-200{--tw-ring-opacity:1;--tw-ring-color:rgb(186 230 253/var(--tw-ring-opacity,1))}.ring-sky-300{--tw-ring-opacity:1;--tw-ring-color:rgb(125 211 252/var(--tw-ring-opacity,1))}.ring-sky-400{--tw-ring-opacity:1;--tw-ring-color:rgb(56 189 248/var(--tw-ring-opacity,1))}.ring-sky-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 249 255/var(--tw-ring-opacity,1))}.ring-sky-500{--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity,1))}.ring-sky-600{--tw-ring-opacity:1;--tw-ring-color:rgb(2 132 199/var(--tw-ring-opacity,1))}.ring-sky-700{--tw-ring-opacity:1;--tw-ring-color:rgb(3 105 161/var(--tw-ring-opacity,1))}.ring-sky-800{--tw-ring-opacity:1;--tw-ring-color:rgb(7 89 133/var(--tw-ring-opacity,1))}.ring-sky-900{--tw-ring-opacity:1;--tw-ring-color:rgb(12 74 110/var(--tw-ring-opacity,1))}.ring-sky-950{--tw-ring-opacity:1;--tw-ring-color:rgb(8 47 73/var(--tw-ring-opacity,1))}.ring-slate-100{--tw-ring-opacity:1;--tw-ring-color:rgb(241 245 249/var(--tw-ring-opacity,1))}.ring-slate-200{--tw-ring-opacity:1;--tw-ring-color:rgb(226 232 240/var(--tw-ring-opacity,1))}.ring-slate-300{--tw-ring-opacity:1;--tw-ring-color:rgb(203 213 225/var(--tw-ring-opacity,1))}.ring-slate-400{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.ring-slate-50{--tw-ring-opacity:1;--tw-ring-color:rgb(248 250 252/var(--tw-ring-opacity,1))}.ring-slate-500{--tw-ring-opacity:1;--tw-ring-color:rgb(100 116 139/var(--tw-ring-opacity,1))}.ring-slate-600{--tw-ring-opacity:1;--tw-ring-color:rgb(71 85 105/var(--tw-ring-opacity,1))}.ring-slate-700{--tw-ring-opacity:1;--tw-ring-color:rgb(51 65 85/var(--tw-ring-opacity,1))}.ring-slate-800{--tw-ring-opacity:1;--tw-ring-color:rgb(30 41 59/var(--tw-ring-opacity,1))}.ring-slate-900{--tw-ring-opacity:1;--tw-ring-color:rgb(15 23 42/var(--tw-ring-opacity,1))}.ring-slate-950{--tw-ring-opacity:1;--tw-ring-color:rgb(2 6 23/var(--tw-ring-opacity,1))}.ring-stone-100{--tw-ring-opacity:1;--tw-ring-color:rgb(245 245 244/var(--tw-ring-opacity,1))}.ring-stone-200{--tw-ring-opacity:1;--tw-ring-color:rgb(231 229 228/var(--tw-ring-opacity,1))}.ring-stone-300{--tw-ring-opacity:1;--tw-ring-color:rgb(214 211 209/var(--tw-ring-opacity,1))}.ring-stone-400{--tw-ring-opacity:1;--tw-ring-color:rgb(168 162 158/var(--tw-ring-opacity,1))}.ring-stone-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 249/var(--tw-ring-opacity,1))}.ring-stone-500{--tw-ring-opacity:1;--tw-ring-color:rgb(120 113 108/var(--tw-ring-opacity,1))}.ring-stone-600{--tw-ring-opacity:1;--tw-ring-color:rgb(87 83 78/var(--tw-ring-opacity,1))}.ring-stone-700{--tw-ring-opacity:1;--tw-ring-color:rgb(68 64 60/var(--tw-ring-opacity,1))}.ring-stone-800{--tw-ring-opacity:1;--tw-ring-color:rgb(41 37 36/var(--tw-ring-opacity,1))}.ring-stone-900{--tw-ring-opacity:1;--tw-ring-color:rgb(28 25 23/var(--tw-ring-opacity,1))}.ring-stone-950{--tw-ring-opacity:1;--tw-ring-color:rgb(12 10 9/var(--tw-ring-opacity,1))}.ring-teal-100{--tw-ring-opacity:1;--tw-ring-color:rgb(204 251 241/var(--tw-ring-opacity,1))}.ring-teal-200{--tw-ring-opacity:1;--tw-ring-color:rgb(153 246 228/var(--tw-ring-opacity,1))}.ring-teal-300{--tw-ring-opacity:1;--tw-ring-color:rgb(94 234 212/var(--tw-ring-opacity,1))}.ring-teal-400{--tw-ring-opacity:1;--tw-ring-color:rgb(45 212 191/var(--tw-ring-opacity,1))}.ring-teal-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 253 250/var(--tw-ring-opacity,1))}.ring-teal-500{--tw-ring-opacity:1;--tw-ring-color:rgb(20 184 166/var(--tw-ring-opacity,1))}.ring-teal-600{--tw-ring-opacity:1;--tw-ring-color:rgb(13 148 136/var(--tw-ring-opacity,1))}.ring-teal-700{--tw-ring-opacity:1;--tw-ring-color:rgb(15 118 110/var(--tw-ring-opacity,1))}.ring-teal-800{--tw-ring-opacity:1;--tw-ring-color:rgb(17 94 89/var(--tw-ring-opacity,1))}.ring-teal-900{--tw-ring-opacity:1;--tw-ring-color:rgb(19 78 74/var(--tw-ring-opacity,1))}.ring-teal-950{--tw-ring-opacity:1;--tw-ring-color:rgb(4 47 46/var(--tw-ring-opacity,1))}.ring-tremor-brand-inverted{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.ring-tremor-brand-muted{--tw-ring-opacity:1;--tw-ring-color:rgb(134 136 239/var(--tw-ring-opacity,1))}.ring-tremor-brand\/20{--tw-ring-color:#6366f133}.ring-tremor-ring{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity,1))}.ring-violet-100{--tw-ring-opacity:1;--tw-ring-color:rgb(237 233 254/var(--tw-ring-opacity,1))}.ring-violet-200{--tw-ring-opacity:1;--tw-ring-color:rgb(221 214 254/var(--tw-ring-opacity,1))}.ring-violet-300{--tw-ring-opacity:1;--tw-ring-color:rgb(196 181 253/var(--tw-ring-opacity,1))}.ring-violet-400{--tw-ring-opacity:1;--tw-ring-color:rgb(167 139 250/var(--tw-ring-opacity,1))}.ring-violet-50{--tw-ring-opacity:1;--tw-ring-color:rgb(245 243 255/var(--tw-ring-opacity,1))}.ring-violet-500{--tw-ring-opacity:1;--tw-ring-color:rgb(139 92 246/var(--tw-ring-opacity,1))}.ring-violet-600{--tw-ring-opacity:1;--tw-ring-color:rgb(124 58 237/var(--tw-ring-opacity,1))}.ring-violet-700{--tw-ring-opacity:1;--tw-ring-color:rgb(109 40 217/var(--tw-ring-opacity,1))}.ring-violet-800{--tw-ring-opacity:1;--tw-ring-color:rgb(91 33 182/var(--tw-ring-opacity,1))}.ring-violet-900{--tw-ring-opacity:1;--tw-ring-color:rgb(76 29 149/var(--tw-ring-opacity,1))}.ring-violet-950{--tw-ring-opacity:1;--tw-ring-color:rgb(46 16 101/var(--tw-ring-opacity,1))}.ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.ring-yellow-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 249 195/var(--tw-ring-opacity,1))}.ring-yellow-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 240 138/var(--tw-ring-opacity,1))}.ring-yellow-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 224 71/var(--tw-ring-opacity,1))}.ring-yellow-400{--tw-ring-opacity:1;--tw-ring-color:rgb(250 204 21/var(--tw-ring-opacity,1))}.ring-yellow-50{--tw-ring-opacity:1;--tw-ring-color:rgb(254 252 232/var(--tw-ring-opacity,1))}.ring-yellow-500{--tw-ring-opacity:1;--tw-ring-color:rgb(234 179 8/var(--tw-ring-opacity,1))}.ring-yellow-600{--tw-ring-opacity:1;--tw-ring-color:rgb(202 138 4/var(--tw-ring-opacity,1))}.ring-yellow-700{--tw-ring-opacity:1;--tw-ring-color:rgb(161 98 7/var(--tw-ring-opacity,1))}.ring-yellow-800{--tw-ring-opacity:1;--tw-ring-color:rgb(133 77 14/var(--tw-ring-opacity,1))}.ring-yellow-900{--tw-ring-opacity:1;--tw-ring-color:rgb(113 63 18/var(--tw-ring-opacity,1))}.ring-yellow-950{--tw-ring-opacity:1;--tw-ring-color:rgb(66 32 6/var(--tw-ring-opacity,1))}.ring-zinc-100{--tw-ring-opacity:1;--tw-ring-color:rgb(244 244 245/var(--tw-ring-opacity,1))}.ring-zinc-200{--tw-ring-opacity:1;--tw-ring-color:rgb(228 228 231/var(--tw-ring-opacity,1))}.ring-zinc-300{--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.ring-zinc-400{--tw-ring-opacity:1;--tw-ring-color:rgb(161 161 170/var(--tw-ring-opacity,1))}.ring-zinc-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 250/var(--tw-ring-opacity,1))}.ring-zinc-500{--tw-ring-opacity:1;--tw-ring-color:rgb(113 113 122/var(--tw-ring-opacity,1))}.ring-zinc-600{--tw-ring-opacity:1;--tw-ring-color:rgb(82 82 91/var(--tw-ring-opacity,1))}.ring-zinc-700{--tw-ring-opacity:1;--tw-ring-color:rgb(63 63 70/var(--tw-ring-opacity,1))}.ring-zinc-800{--tw-ring-opacity:1;--tw-ring-color:rgb(39 39 42/var(--tw-ring-opacity,1))}.ring-zinc-900{--tw-ring-opacity:1;--tw-ring-color:rgb(24 24 27/var(--tw-ring-opacity,1))}.ring-zinc-950{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.ring-opacity-20{--tw-ring-opacity:.2}.ring-opacity-40{--tw-ring-opacity:.4}.blur{--tw-blur:blur(8px);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px #00000012)drop-shadow(0 2px 2px #0000000f);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.filter{filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-property:box-shadow;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[--anchor-gap\:4px\]{--anchor-gap:4px}.\[appearance\:textfield\]{appearance:textfield}.\[scrollbar-width\:none\]{scrollbar-width:none}:root{--foreground-rgb:0,0,0;--background-start-rgb:255,255,255;--background-end-rgb:255,255,255;--neutral-border:#dcddeb}body{color:rgb(var(--foreground-rgb));background:linear-gradient(to bottom,transparent,rgb(var(--background-end-rgb)))rgb(var(--background-start-rgb))}.table-wrapper{margin:0 24px;overflow-x:scroll}.custom-border{border:1px solid var(--neutral-border)}.placeholder\:text-gray-400::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.placeholder\:text-red-500::placeholder{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.placeholder\:text-tremor-content::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.placeholder\:text-tremor-content-subtle::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.first\:rounded-l-\[4px\]:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.first\:border-l-0:first-child{border-left-width:0}.last\:mb-0:last-child{margin-bottom:0}.last\:rounded-r-\[4px\]:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.last\:border-0:last-child{border-width:0}.last\:border-b-0:last-child{border-bottom-width:0}.focus-within\:relative:focus-within{position:relative}.focus-within\:border-blue-400:focus-within{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.focus-within\:ring-2:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\:ring-blue-500\/20:focus-within{--tw-ring-color:#3b82f633}.hover\:border-b-2:hover{border-bottom-width:2px}.hover\:border-\[\#5558e3\]:hover{--tw-border-opacity:1;border-color:rgb(85 88 227/var(--tw-border-opacity,1))}.hover\:border-amber-100:hover{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}.hover\:border-amber-200:hover{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.hover\:border-amber-300:hover{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.hover\:border-amber-400:hover{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.hover\:border-amber-50:hover{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}.hover\:border-amber-500:hover{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.hover\:border-amber-600:hover{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}.hover\:border-amber-700:hover{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}.hover\:border-amber-800:hover{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}.hover\:border-amber-900:hover{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}.hover\:border-amber-950:hover{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}.hover\:border-blue-100:hover{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.hover\:border-blue-200:hover{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.hover\:border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.hover\:border-blue-50:hover{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}.hover\:border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.hover\:border-blue-600:hover{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.hover\:border-blue-700:hover{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}.hover\:border-blue-800:hover{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.hover\:border-blue-900:hover{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}.hover\:border-blue-950:hover{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}.hover\:border-cyan-100:hover{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.hover\:border-cyan-200:hover{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.hover\:border-cyan-300:hover{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.hover\:border-cyan-400:hover{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.hover\:border-cyan-50:hover{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}.hover\:border-cyan-500:hover{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.hover\:border-cyan-600:hover{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}.hover\:border-cyan-700:hover{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}.hover\:border-cyan-800:hover{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}.hover\:border-cyan-900:hover{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}.hover\:border-cyan-950:hover{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}.hover\:border-emerald-100:hover{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}.hover\:border-emerald-200:hover{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.hover\:border-emerald-300:hover{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.hover\:border-emerald-400:hover{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}.hover\:border-emerald-50:hover{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}.hover\:border-emerald-500:hover{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.hover\:border-emerald-600:hover{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}.hover\:border-emerald-700:hover{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}.hover\:border-emerald-800:hover{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}.hover\:border-emerald-900:hover{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}.hover\:border-emerald-950:hover{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}.hover\:border-fuchsia-100:hover{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}.hover\:border-fuchsia-200:hover{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}.hover\:border-fuchsia-300:hover{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.hover\:border-fuchsia-400:hover{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}.hover\:border-fuchsia-50:hover{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}.hover\:border-fuchsia-500:hover{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}.hover\:border-fuchsia-600:hover{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}.hover\:border-fuchsia-700:hover{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}.hover\:border-fuchsia-800:hover{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}.hover\:border-fuchsia-900:hover{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}.hover\:border-fuchsia-950:hover{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}.hover\:border-gray-100:hover{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.hover\:border-gray-200:hover{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.hover\:border-gray-400:hover{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.hover\:border-gray-50:hover{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}.hover\:border-gray-500:hover{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.hover\:border-gray-600:hover{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.hover\:border-gray-700:hover{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.hover\:border-gray-800:hover{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.hover\:border-gray-900:hover{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.hover\:border-gray-950:hover{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}.hover\:border-green-100:hover{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.hover\:border-green-200:hover{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.hover\:border-green-300:hover{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.hover\:border-green-400:hover{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.hover\:border-green-50:hover{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}.hover\:border-green-500:hover{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.hover\:border-green-600:hover{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}.hover\:border-green-700:hover{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}.hover\:border-green-800:hover{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.hover\:border-green-900:hover{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}.hover\:border-green-950:hover{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}.hover\:border-indigo-100:hover{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}.hover\:border-indigo-200:hover{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}.hover\:border-indigo-300:hover{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.hover\:border-indigo-400:hover{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.hover\:border-indigo-50:hover{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}.hover\:border-indigo-500:hover{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.hover\:border-indigo-600:hover{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}.hover\:border-indigo-700:hover{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.hover\:border-indigo-800:hover{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.hover\:border-indigo-900:hover{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}.hover\:border-indigo-950:hover{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.hover\:border-lime-100:hover{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}.hover\:border-lime-200:hover{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}.hover\:border-lime-300:hover{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.hover\:border-lime-400:hover{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}.hover\:border-lime-50:hover{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}.hover\:border-lime-500:hover{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}.hover\:border-lime-600:hover{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}.hover\:border-lime-700:hover{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}.hover\:border-lime-800:hover{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}.hover\:border-lime-900:hover{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}.hover\:border-lime-950:hover{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}.hover\:border-neutral-100:hover{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.hover\:border-neutral-200:hover{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.hover\:border-neutral-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.hover\:border-neutral-400:hover{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.hover\:border-neutral-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.hover\:border-neutral-500:hover{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}.hover\:border-neutral-600:hover{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}.hover\:border-neutral-700:hover{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.hover\:border-neutral-800:hover{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}.hover\:border-neutral-900:hover{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.hover\:border-neutral-950:hover{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}.hover\:border-orange-100:hover{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.hover\:border-orange-200:hover{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.hover\:border-orange-300:hover{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.hover\:border-orange-400:hover{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}.hover\:border-orange-50:hover{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}.hover\:border-orange-500:hover{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.hover\:border-orange-600:hover{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}.hover\:border-orange-700:hover{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}.hover\:border-orange-800:hover{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}.hover\:border-orange-900:hover{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}.hover\:border-orange-950:hover{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}.hover\:border-pink-100:hover{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}.hover\:border-pink-200:hover{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}.hover\:border-pink-300:hover{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.hover\:border-pink-400:hover{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}.hover\:border-pink-50:hover{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}.hover\:border-pink-500:hover{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}.hover\:border-pink-600:hover{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}.hover\:border-pink-700:hover{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}.hover\:border-pink-800:hover{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}.hover\:border-pink-900:hover{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.hover\:border-pink-950:hover{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}.hover\:border-purple-100:hover{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}.hover\:border-purple-200:hover{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.hover\:border-purple-300:hover{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.hover\:border-purple-400:hover{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}.hover\:border-purple-50:hover{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}.hover\:border-purple-500:hover{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.hover\:border-purple-600:hover{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}.hover\:border-purple-700:hover{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}.hover\:border-purple-800:hover{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}.hover\:border-purple-900:hover{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}.hover\:border-purple-950:hover{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}.hover\:border-red-100:hover{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.hover\:border-red-200:hover{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.hover\:border-red-300:hover{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.hover\:border-red-400:hover{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.hover\:border-red-50:hover{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}.hover\:border-red-500:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.hover\:border-red-600:hover{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.hover\:border-red-700:hover{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.hover\:border-red-800:hover{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.hover\:border-red-900:hover{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}.hover\:border-red-950:hover{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}.hover\:border-rose-100:hover{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}.hover\:border-rose-200:hover{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}.hover\:border-rose-300:hover{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.hover\:border-rose-400:hover{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}.hover\:border-rose-50:hover{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}.hover\:border-rose-500:hover{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.hover\:border-rose-600:hover{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}.hover\:border-rose-700:hover{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}.hover\:border-rose-800:hover{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}.hover\:border-rose-900:hover{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}.hover\:border-rose-950:hover{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}.hover\:border-sky-100:hover{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}.hover\:border-sky-200:hover{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.hover\:border-sky-300:hover{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.hover\:border-sky-400:hover{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.hover\:border-sky-50:hover{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}.hover\:border-sky-500:hover{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}.hover\:border-sky-600:hover{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}.hover\:border-sky-700:hover{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}.hover\:border-sky-800:hover{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}.hover\:border-sky-900:hover{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}.hover\:border-sky-950:hover{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}.hover\:border-slate-100:hover{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.hover\:border-slate-200:hover{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.hover\:border-slate-300:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.hover\:border-slate-400:hover{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}.hover\:border-slate-50:hover{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.hover\:border-slate-500:hover{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.hover\:border-slate-600:hover{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.hover\:border-slate-700:hover{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.hover\:border-slate-800:hover{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.hover\:border-slate-900:hover{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}.hover\:border-slate-950:hover{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}.hover\:border-stone-100:hover{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}.hover\:border-stone-200:hover{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.hover\:border-stone-300:hover{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.hover\:border-stone-400:hover{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.hover\:border-stone-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}.hover\:border-stone-500:hover{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.hover\:border-stone-600:hover{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.hover\:border-stone-700:hover{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}.hover\:border-stone-800:hover{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}.hover\:border-stone-900:hover{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}.hover\:border-stone-950:hover{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}.hover\:border-teal-100:hover{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}.hover\:border-teal-200:hover{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}.hover\:border-teal-300:hover{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.hover\:border-teal-400:hover{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}.hover\:border-teal-50:hover{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}.hover\:border-teal-500:hover{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}.hover\:border-teal-600:hover{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}.hover\:border-teal-700:hover{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}.hover\:border-teal-800:hover{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}.hover\:border-teal-900:hover{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}.hover\:border-teal-950:hover{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}.hover\:border-tremor-brand-emphasis:hover{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.hover\:border-tremor-content:hover{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.hover\:border-violet-100:hover{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}.hover\:border-violet-200:hover{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}.hover\:border-violet-300:hover{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.hover\:border-violet-400:hover{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}.hover\:border-violet-50:hover{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}.hover\:border-violet-500:hover{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}.hover\:border-violet-600:hover{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}.hover\:border-violet-700:hover{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}.hover\:border-violet-800:hover{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}.hover\:border-violet-900:hover{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}.hover\:border-violet-950:hover{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}.hover\:border-yellow-100:hover{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}.hover\:border-yellow-200:hover{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.hover\:border-yellow-300:hover{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.hover\:border-yellow-400:hover{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}.hover\:border-yellow-50:hover{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}.hover\:border-yellow-500:hover{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.hover\:border-yellow-600:hover{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}.hover\:border-yellow-700:hover{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}.hover\:border-yellow-800:hover{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.hover\:border-yellow-900:hover{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}.hover\:border-yellow-950:hover{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}.hover\:border-zinc-100:hover{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.hover\:border-zinc-200:hover{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.hover\:border-zinc-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.hover\:border-zinc-400:hover{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.hover\:border-zinc-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.hover\:border-zinc-500:hover{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.hover\:border-zinc-600:hover{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}.hover\:border-zinc-700:hover{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.hover\:border-zinc-800:hover{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.hover\:border-zinc-900:hover{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.hover\:border-zinc-950:hover{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}.hover\:\!bg-blue-500:hover{--tw-bg-opacity:1!important;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))!important}.hover\:\!bg-blue-700:hover{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))!important}.hover\:bg-\[\#5558e3\]:hover{--tw-bg-opacity:1;background-color:rgb(85 88 227/var(--tw-bg-opacity,1))}.hover\:bg-amber-100:hover{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.hover\:bg-amber-200:hover{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}.hover\:bg-amber-300:hover{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}.hover\:bg-amber-400:hover{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.hover\:bg-amber-50:hover{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.hover\:bg-amber-500:hover{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.hover\:bg-amber-600:hover{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.hover\:bg-amber-700:hover{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.hover\:bg-amber-800:hover{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}.hover\:bg-amber-900:hover{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}.hover\:bg-amber-950:hover{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.hover\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.hover\:bg-blue-300:hover{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}.hover\:bg-blue-400:hover{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.hover\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.hover\:bg-blue-50\/50:hover{background-color:#eff6ff80}.hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.hover\:bg-blue-600:hover{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-blue-800:hover{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}.hover\:bg-blue-900:hover{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.hover\:bg-blue-950:hover{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.hover\:bg-cyan-100:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.hover\:bg-cyan-200:hover{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}.hover\:bg-cyan-300:hover{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}.hover\:bg-cyan-400:hover{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}.hover\:bg-cyan-50:hover{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.hover\:bg-cyan-500:hover{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.hover\:bg-cyan-600:hover{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.hover\:bg-cyan-700:hover{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}.hover\:bg-cyan-800:hover{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}.hover\:bg-cyan-900:hover{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}.hover\:bg-cyan-950:hover{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}.hover\:bg-emerald-100:hover{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.hover\:bg-emerald-200:hover{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}.hover\:bg-emerald-300:hover{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}.hover\:bg-emerald-400:hover{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.hover\:bg-emerald-50:hover{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.hover\:bg-emerald-500:hover{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.hover\:bg-emerald-600:hover{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.hover\:bg-emerald-700:hover{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.hover\:bg-emerald-800:hover{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}.hover\:bg-emerald-900:hover{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}.hover\:bg-emerald-950:hover{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-100:hover{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-200:hover{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-300:hover{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-400:hover{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-50:hover{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-500:hover{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-600:hover{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-700:hover{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-800:hover{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-900:hover{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-950:hover{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.hover\:bg-gray-400:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.hover\:bg-gray-950:hover{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}.hover\:bg-green-100:hover{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.hover\:bg-green-200:hover{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}.hover\:bg-green-300:hover{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.hover\:bg-green-400:hover{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.hover\:bg-green-50:hover{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.hover\:bg-green-500:hover{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.hover\:bg-green-600:hover{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.hover\:bg-green-800:hover{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}.hover\:bg-green-900:hover{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.hover\:bg-green-950:hover{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.hover\:bg-indigo-100:hover{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.hover\:bg-indigo-200:hover{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}.hover\:bg-indigo-300:hover{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}.hover\:bg-indigo-400:hover{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.hover\:bg-indigo-50:hover{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.hover\:bg-indigo-500:hover{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.hover\:bg-indigo-600:hover{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.hover\:bg-indigo-800:hover{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}.hover\:bg-indigo-900:hover{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}.hover\:bg-indigo-950:hover{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.hover\:bg-lime-100:hover{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.hover\:bg-lime-200:hover{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}.hover\:bg-lime-300:hover{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}.hover\:bg-lime-400:hover{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}.hover\:bg-lime-50:hover{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}.hover\:bg-lime-500:hover{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.hover\:bg-lime-600:hover{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}.hover\:bg-lime-700:hover{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}.hover\:bg-lime-800:hover{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}.hover\:bg-lime-900:hover{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}.hover\:bg-lime-950:hover{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}.hover\:bg-neutral-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.hover\:bg-neutral-200:hover{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.hover\:bg-neutral-300:hover{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.hover\:bg-neutral-400:hover{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.hover\:bg-neutral-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\:bg-neutral-500:hover{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}.hover\:bg-neutral-600:hover{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}.hover\:bg-neutral-700:hover{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.hover\:bg-neutral-800:hover{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.hover\:bg-neutral-900:hover{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.hover\:bg-neutral-950:hover{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}.hover\:bg-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\:bg-orange-200:hover{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}.hover\:bg-orange-300:hover{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}.hover\:bg-orange-400:hover{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.hover\:bg-orange-50:hover{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.hover\:bg-orange-500:hover{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.hover\:bg-orange-600:hover{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}.hover\:bg-orange-700:hover{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}.hover\:bg-orange-800:hover{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}.hover\:bg-orange-900:hover{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}.hover\:bg-orange-950:hover{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}.hover\:bg-pink-100:hover{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.hover\:bg-pink-200:hover{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}.hover\:bg-pink-300:hover{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}.hover\:bg-pink-400:hover{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}.hover\:bg-pink-50:hover{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.hover\:bg-pink-500:hover{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.hover\:bg-pink-600:hover{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}.hover\:bg-pink-700:hover{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}.hover\:bg-pink-800:hover{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}.hover\:bg-pink-900:hover{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}.hover\:bg-pink-950:hover{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}.hover\:bg-purple-100:hover{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.hover\:bg-purple-200:hover{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}.hover\:bg-purple-300:hover{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}.hover\:bg-purple-400:hover{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}.hover\:bg-purple-50:hover{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.hover\:bg-purple-500:hover{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.hover\:bg-purple-600:hover{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}.hover\:bg-purple-700:hover{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.hover\:bg-purple-800:hover{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}.hover\:bg-purple-900:hover{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.hover\:bg-purple-950:hover{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}.hover\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.hover\:bg-red-300:hover{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}.hover\:bg-red-400:hover{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-red-500:hover{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.hover\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.hover\:bg-red-800:hover{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}.hover\:bg-red-900:hover{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.hover\:bg-red-950:hover{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.hover\:bg-rose-100:hover{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.hover\:bg-rose-200:hover{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}.hover\:bg-rose-300:hover{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}.hover\:bg-rose-400:hover{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.hover\:bg-rose-50:hover{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}.hover\:bg-rose-500:hover{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.hover\:bg-rose-600:hover{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.hover\:bg-rose-700:hover{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}.hover\:bg-rose-800:hover{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}.hover\:bg-rose-900:hover{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}.hover\:bg-rose-950:hover{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}.hover\:bg-sky-100:hover{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.hover\:bg-sky-200:hover{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}.hover\:bg-sky-300:hover{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}.hover\:bg-sky-400:hover{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}.hover\:bg-sky-50:hover{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.hover\:bg-sky-500:hover{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.hover\:bg-sky-600:hover{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.hover\:bg-sky-700:hover{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}.hover\:bg-sky-800:hover{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}.hover\:bg-sky-900:hover{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}.hover\:bg-sky-950:hover{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\:bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\:bg-slate-300:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.hover\:bg-slate-400:hover{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.hover\:bg-slate-500:hover{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}.hover\:bg-slate-600:hover{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.hover\:bg-slate-700:hover{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.hover\:bg-slate-900:hover{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.hover\:bg-slate-950:hover{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.hover\:bg-stone-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.hover\:bg-stone-200:hover{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.hover\:bg-stone-300:hover{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.hover\:bg-stone-400:hover{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}.hover\:bg-stone-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.hover\:bg-stone-500:hover{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.hover\:bg-stone-600:hover{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.hover\:bg-stone-700:hover{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}.hover\:bg-stone-800:hover{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.hover\:bg-stone-900:hover{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.hover\:bg-stone-950:hover{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}.hover\:bg-teal-100:hover{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.hover\:bg-teal-200:hover{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}.hover\:bg-teal-300:hover{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}.hover\:bg-teal-400:hover{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}.hover\:bg-teal-50:hover{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}.hover\:bg-teal-500:hover{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.hover\:bg-teal-600:hover{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}.hover\:bg-teal-700:hover{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}.hover\:bg-teal-800:hover{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}.hover\:bg-teal-900:hover{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}.hover\:bg-teal-950:hover{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}.hover\:bg-tremor-background-muted:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-tremor-background-subtle:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-tremor-brand-emphasis:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.hover\:bg-violet-100:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.hover\:bg-violet-200:hover{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}.hover\:bg-violet-300:hover{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}.hover\:bg-violet-400:hover{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}.hover\:bg-violet-50:hover{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.hover\:bg-violet-500:hover{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.hover\:bg-violet-600:hover{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.hover\:bg-violet-700:hover{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}.hover\:bg-violet-800:hover{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}.hover\:bg-violet-900:hover{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}.hover\:bg-violet-950:hover{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}.hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.hover\:bg-yellow-100:hover{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.hover\:bg-yellow-200:hover{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}.hover\:bg-yellow-300:hover{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}.hover\:bg-yellow-400:hover{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.hover\:bg-yellow-50:hover{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.hover\:bg-yellow-500:hover{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.hover\:bg-yellow-600:hover{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.hover\:bg-yellow-700:hover{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}.hover\:bg-yellow-800:hover{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}.hover\:bg-yellow-900:hover{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}.hover\:bg-yellow-950:hover{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.hover\:bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\:bg-zinc-200:hover{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.hover\:bg-zinc-300:hover{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.hover\:bg-zinc-400:hover{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.hover\:bg-zinc-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\:bg-zinc-500:hover{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.hover\:bg-zinc-600:hover{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.hover\:bg-zinc-700:hover{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.hover\:bg-zinc-800:hover{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.hover\:bg-zinc-900:hover{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.hover\:bg-zinc-950:hover{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.hover\:bg-opacity-20:hover{--tw-bg-opacity:.2}.hover\:text-\[\#5558e3\]:hover{--tw-text-opacity:1;color:rgb(85 88 227/var(--tw-text-opacity,1))}.hover\:text-amber-100:hover{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.hover\:text-amber-200:hover{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.hover\:text-amber-300:hover{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.hover\:text-amber-400:hover{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.hover\:text-amber-50:hover{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}.hover\:text-amber-500:hover{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.hover\:text-amber-600:hover{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.hover\:text-amber-700:hover{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.hover\:text-amber-800:hover{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.hover\:text-amber-900:hover{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}.hover\:text-amber-950:hover{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}.hover\:text-blue-100:hover{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.hover\:text-blue-200:hover{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.hover\:text-blue-300:hover{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.hover\:text-blue-400:hover{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.hover\:text-blue-50:hover{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}.hover\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-blue-900:hover{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.hover\:text-blue-950:hover{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}.hover\:text-cyan-100:hover{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.hover\:text-cyan-200:hover{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.hover\:text-cyan-300:hover{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.hover\:text-cyan-400:hover{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.hover\:text-cyan-50:hover{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.hover\:text-cyan-500:hover{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.hover\:text-cyan-600:hover{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.hover\:text-cyan-700:hover{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.hover\:text-cyan-800:hover{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.hover\:text-cyan-900:hover{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.hover\:text-cyan-950:hover{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.hover\:text-emerald-100:hover{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.hover\:text-emerald-200:hover{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.hover\:text-emerald-300:hover{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.hover\:text-emerald-400:hover{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.hover\:text-emerald-50:hover{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.hover\:text-emerald-500:hover{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.hover\:text-emerald-600:hover{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.hover\:text-emerald-700:hover{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.hover\:text-emerald-800:hover{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.hover\:text-emerald-900:hover{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}.hover\:text-emerald-950:hover{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.hover\:text-fuchsia-100:hover{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.hover\:text-fuchsia-200:hover{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}.hover\:text-fuchsia-300:hover{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.hover\:text-fuchsia-400:hover{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.hover\:text-fuchsia-50:hover{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}.hover\:text-fuchsia-500:hover{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}.hover\:text-fuchsia-600:hover{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}.hover\:text-fuchsia-700:hover{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.hover\:text-fuchsia-800:hover{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}.hover\:text-fuchsia-900:hover{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}.hover\:text-fuchsia-950:hover{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}.hover\:text-gray-100:hover{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.hover\:text-gray-200:hover{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.hover\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.hover\:text-gray-400:hover{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.hover\:text-gray-50:hover{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.hover\:text-gray-950:hover{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.hover\:text-green-100:hover{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.hover\:text-green-200:hover{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.hover\:text-green-300:hover{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}.hover\:text-green-400:hover{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.hover\:text-green-50:hover{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}.hover\:text-green-500:hover{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.hover\:text-green-600:hover{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.hover\:text-green-800:hover{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.hover\:text-green-900:hover{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.hover\:text-green-950:hover{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}.hover\:text-indigo-100:hover{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.hover\:text-indigo-200:hover{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.hover\:text-indigo-300:hover{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.hover\:text-indigo-400:hover{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.hover\:text-indigo-50:hover{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.hover\:text-indigo-600:hover{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}.hover\:text-indigo-700:hover{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.hover\:text-indigo-800:hover{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.hover\:text-indigo-900:hover{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}.hover\:text-indigo-950:hover{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.hover\:text-lime-100:hover{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}.hover\:text-lime-200:hover{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}.hover\:text-lime-300:hover{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}.hover\:text-lime-400:hover{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.hover\:text-lime-50:hover{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}.hover\:text-lime-500:hover{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}.hover\:text-lime-600:hover{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}.hover\:text-lime-700:hover{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}.hover\:text-lime-800:hover{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}.hover\:text-lime-900:hover{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.hover\:text-lime-950:hover{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}.hover\:text-neutral-100:hover{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}.hover\:text-neutral-200:hover{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.hover\:text-neutral-300:hover{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.hover\:text-neutral-400:hover{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.hover\:text-neutral-50:hover{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.hover\:text-neutral-500:hover{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.hover\:text-neutral-600:hover{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.hover\:text-neutral-700:hover{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.hover\:text-neutral-800:hover{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.hover\:text-neutral-900:hover{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.hover\:text-neutral-950:hover{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.hover\:text-orange-100:hover{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}.hover\:text-orange-200:hover{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}.hover\:text-orange-300:hover{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.hover\:text-orange-400:hover{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.hover\:text-orange-50:hover{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}.hover\:text-orange-500:hover{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.hover\:text-orange-600:hover{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.hover\:text-orange-700:hover{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.hover\:text-orange-800:hover{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.hover\:text-orange-900:hover{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}.hover\:text-orange-950:hover{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}.hover\:text-pink-100:hover{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}.hover\:text-pink-200:hover{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}.hover\:text-pink-300:hover{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}.hover\:text-pink-400:hover{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.hover\:text-pink-50:hover{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}.hover\:text-pink-500:hover{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.hover\:text-pink-600:hover{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.hover\:text-pink-700:hover{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.hover\:text-pink-800:hover{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.hover\:text-pink-900:hover{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}.hover\:text-pink-950:hover{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}.hover\:text-purple-100:hover{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}.hover\:text-purple-200:hover{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.hover\:text-purple-300:hover{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}.hover\:text-purple-400:hover{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.hover\:text-purple-50:hover{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}.hover\:text-purple-500:hover{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.hover\:text-purple-600:hover{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.hover\:text-purple-700:hover{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.hover\:text-purple-800:hover{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.hover\:text-purple-900:hover{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}.hover\:text-purple-950:hover{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}.hover\:text-red-100:hover{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.hover\:text-red-200:hover{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.hover\:text-red-300:hover{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.hover\:text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\:text-red-50:hover{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.hover\:text-red-600:hover{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.hover\:text-red-800:hover{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.hover\:text-red-900:hover{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.hover\:text-red-950:hover{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}.hover\:text-rose-100:hover{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.hover\:text-rose-200:hover{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.hover\:text-rose-300:hover{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.hover\:text-rose-400:hover{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.hover\:text-rose-50:hover{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}.hover\:text-rose-500:hover{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.hover\:text-rose-600:hover{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}.hover\:text-rose-700:hover{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.hover\:text-rose-800:hover{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}.hover\:text-rose-900:hover{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}.hover\:text-rose-950:hover{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}.hover\:text-sky-100:hover{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.hover\:text-sky-200:hover{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.hover\:text-sky-300:hover{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.hover\:text-sky-400:hover{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.hover\:text-sky-50:hover{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}.hover\:text-sky-500:hover{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}.hover\:text-sky-600:hover{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.hover\:text-sky-700:hover{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.hover\:text-sky-800:hover{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}.hover\:text-sky-900:hover{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}.hover\:text-sky-950:hover{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}.hover\:text-slate-100:hover{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.hover\:text-slate-200:hover{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.hover\:text-slate-300:hover{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.hover\:text-slate-400:hover{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.hover\:text-slate-50:hover{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.hover\:text-slate-500:hover{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.hover\:text-slate-600:hover{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.hover\:text-slate-700:hover{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.hover\:text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\:text-slate-950:hover{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.hover\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.hover\:text-stone-200:hover{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.hover\:text-stone-300:hover{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.hover\:text-stone-400:hover{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.hover\:text-stone-50:hover{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.hover\:text-stone-500:hover{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}.hover\:text-stone-600:hover{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}.hover\:text-stone-700:hover{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.hover\:text-stone-800:hover{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.hover\:text-stone-900:hover{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.hover\:text-stone-950:hover{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}.hover\:text-teal-100:hover{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}.hover\:text-teal-200:hover{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}.hover\:text-teal-300:hover{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}.hover\:text-teal-400:hover{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.hover\:text-teal-50:hover{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}.hover\:text-teal-500:hover{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}.hover\:text-teal-600:hover{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}.hover\:text-teal-700:hover{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}.hover\:text-teal-800:hover{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}.hover\:text-teal-900:hover{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.hover\:text-teal-950:hover{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}.hover\:text-tremor-brand-emphasis:hover{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.hover\:text-tremor-content:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.hover\:text-tremor-content-emphasis:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-violet-100:hover{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.hover\:text-violet-200:hover{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.hover\:text-violet-300:hover{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.hover\:text-violet-400:hover{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.hover\:text-violet-50:hover{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}.hover\:text-violet-500:hover{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}.hover\:text-violet-600:hover{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.hover\:text-violet-700:hover{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.hover\:text-violet-800:hover{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.hover\:text-violet-900:hover{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}.hover\:text-violet-950:hover{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}.hover\:text-yellow-100:hover{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.hover\:text-yellow-200:hover{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}.hover\:text-yellow-300:hover{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.hover\:text-yellow-400:hover{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.hover\:text-yellow-50:hover{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}.hover\:text-yellow-500:hover{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.hover\:text-yellow-600:hover{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.hover\:text-yellow-700:hover{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.hover\:text-yellow-800:hover{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.hover\:text-yellow-900:hover{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.hover\:text-yellow-950:hover{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}.hover\:text-zinc-100:hover{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.hover\:text-zinc-200:hover{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.hover\:text-zinc-300:hover{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.hover\:text-zinc-400:hover{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.hover\:text-zinc-50:hover{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.hover\:text-zinc-500:hover{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\:text-zinc-600:hover{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.hover\:text-zinc-700:hover{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.hover\:text-zinc-800:hover{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.hover\:text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\:text-zinc-950:hover{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-indigo-500\/50:hover{--tw-shadow-color:#6366f180;--tw-shadow:var(--tw-shadow-colored)}.focus\:border-blue-400:focus{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.focus\:border-indigo-500:focus{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.focus\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.focus\:border-transparent:focus{border-color:#0000}.focus\:border-tremor-brand-subtle:focus{--tw-border-opacity:1;border-color:rgb(142 145 235/var(--tw-border-opacity,1))}.focus\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\:ring-blue-500\/20:focus{--tw-ring-color:#3b82f633}.focus\:ring-indigo-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity,1))}.focus\:ring-red-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(254 202 202/var(--tw-ring-opacity,1))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.focus\:ring-tremor-brand-muted:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(134 136 239/var(--tw-ring-opacity,1))}.focus\:ring-offset-1:focus{--tw-ring-offset-width:1px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:outline-none:focus-visible{outline-offset:2px;outline:2px solid #0000}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-blue-500:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.active\:translate-y-\[0\.5px\]:active{--tw-translate-y:.5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:\!bg-gray-300:disabled{--tw-bg-opacity:1!important;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))!important}.disabled\:bg-indigo-400:disabled{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.disabled\:\!text-gray-500:disabled{--tw-text-opacity:1!important;color:rgb(107 114 128/var(--tw-text-opacity,1))!important}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:hover\:bg-transparent:hover:disabled{background-color:#0000}.group:hover .group-hover\:bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.group:hover .group-hover\:bg-tremor-brand-subtle\/30{background-color:#8e91eb4d}.group:hover .group-hover\:bg-opacity-30{--tw-bg-opacity:.3}.group:hover .group-hover\:text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.group:hover .group-hover\:opacity-100{opacity:1}.group:active .group-active\:scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.aria-selected\:\!bg-tremor-background-subtle[aria-selected=true]{--tw-bg-opacity:1!important;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))!important}.aria-selected\:bg-tremor-background-emphasis[aria-selected=true]{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.aria-selected\:\!text-tremor-content[aria-selected=true]{--tw-text-opacity:1!important;color:rgb(107 114 128/var(--tw-text-opacity,1))!important}.aria-selected\:text-dark-tremor-brand-inverted[aria-selected=true]{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.aria-selected\:text-tremor-brand-inverted[aria-selected=true],.aria-selected\:text-tremor-content-inverted[aria-selected=true]{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.data-\[selected\]\:border-b-2[data-selected]{border-bottom-width:2px}.data-\[selected\]\:border-tremor-border[data-selected]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.data-\[selected\]\:border-tremor-brand[data-selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.data-\[focus\]\:bg-tremor-background-muted[data-focus]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.data-\[selected\]\:bg-tremor-background[data-selected]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\[selected\]\:bg-tremor-background-muted[data-selected]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.data-\[focus\]\:text-tremor-content-strong[data-focus]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.data-\[selected\]\:text-tremor-brand[data-selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.data-\[selected\]\:text-tremor-content-strong[data-selected]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.data-\[closed\]\:opacity-0[data-closed]{opacity:0}.data-\[selected\]\:shadow-tremor-input[data-selected]{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\[enter\]\:duration-300[data-enter]{transition-duration:.3s}.data-\[leave\]\:duration-200[data-leave]{transition-duration:.2s}.data-\[enter\]\:ease-out[data-enter]{transition-timing-function:cubic-bezier(0,0,.2,1)}.data-\[leave\]\:ease-in[data-leave]{transition-timing-function:cubic-bezier(.4,0,1,1)}.ui-selected\:border-amber-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}.ui-selected\:border-amber-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.ui-selected\:border-amber-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.ui-selected\:border-amber-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.ui-selected\:border-amber-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}.ui-selected\:border-amber-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.ui-selected\:border-amber-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}.ui-selected\:border-amber-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}.ui-selected\:border-amber-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}.ui-selected\:border-amber-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}.ui-selected\:border-amber-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}.ui-selected\:border-blue-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.ui-selected\:border-blue-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.ui-selected\:border-blue-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.ui-selected\:border-blue-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.ui-selected\:border-blue-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}.ui-selected\:border-blue-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.ui-selected\:border-blue-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.ui-selected\:border-blue-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}.ui-selected\:border-blue-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.ui-selected\:border-blue-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}.ui-selected\:border-blue-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}.ui-selected\:border-gray-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.ui-selected\:border-gray-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.ui-selected\:border-gray-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.ui-selected\:border-gray-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.ui-selected\:border-gray-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}.ui-selected\:border-gray-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.ui-selected\:border-gray-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.ui-selected\:border-gray-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.ui-selected\:border-gray-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.ui-selected\:border-gray-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.ui-selected\:border-gray-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}.ui-selected\:border-green-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.ui-selected\:border-green-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.ui-selected\:border-green-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.ui-selected\:border-green-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.ui-selected\:border-green-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}.ui-selected\:border-green-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.ui-selected\:border-green-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}.ui-selected\:border-green-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}.ui-selected\:border-green-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.ui-selected\:border-green-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}.ui-selected\:border-green-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.ui-selected\:border-lime-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}.ui-selected\:border-lime-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}.ui-selected\:border-lime-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.ui-selected\:border-lime-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}.ui-selected\:border-lime-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}.ui-selected\:border-lime-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}.ui-selected\:border-lime-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}.ui-selected\:border-lime-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}.ui-selected\:border-lime-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}.ui-selected\:border-lime-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}.ui-selected\:border-lime-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}.ui-selected\:border-orange-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.ui-selected\:border-orange-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.ui-selected\:border-orange-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.ui-selected\:border-orange-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}.ui-selected\:border-orange-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}.ui-selected\:border-orange-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.ui-selected\:border-orange-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}.ui-selected\:border-orange-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}.ui-selected\:border-orange-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}.ui-selected\:border-orange-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}.ui-selected\:border-orange-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}.ui-selected\:border-pink-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}.ui-selected\:border-pink-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}.ui-selected\:border-pink-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.ui-selected\:border-pink-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}.ui-selected\:border-pink-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}.ui-selected\:border-pink-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}.ui-selected\:border-pink-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}.ui-selected\:border-pink-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}.ui-selected\:border-pink-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}.ui-selected\:border-pink-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.ui-selected\:border-pink-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}.ui-selected\:border-purple-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}.ui-selected\:border-purple-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.ui-selected\:border-purple-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.ui-selected\:border-purple-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}.ui-selected\:border-purple-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}.ui-selected\:border-purple-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.ui-selected\:border-purple-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}.ui-selected\:border-purple-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}.ui-selected\:border-purple-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}.ui-selected\:border-purple-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}.ui-selected\:border-purple-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}.ui-selected\:border-red-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.ui-selected\:border-red-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.ui-selected\:border-red-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.ui-selected\:border-red-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.ui-selected\:border-red-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}.ui-selected\:border-red-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.ui-selected\:border-red-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.ui-selected\:border-red-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.ui-selected\:border-red-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.ui-selected\:border-red-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}.ui-selected\:border-red-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}.ui-selected\:border-rose-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}.ui-selected\:border-rose-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}.ui-selected\:border-rose-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.ui-selected\:border-rose-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}.ui-selected\:border-rose-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}.ui-selected\:border-rose-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.ui-selected\:border-rose-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}.ui-selected\:border-rose-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}.ui-selected\:border-rose-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}.ui-selected\:border-rose-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}.ui-selected\:border-rose-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}.ui-selected\:border-sky-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}.ui-selected\:border-sky-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.ui-selected\:border-sky-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.ui-selected\:border-sky-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.ui-selected\:border-sky-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}.ui-selected\:border-sky-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}.ui-selected\:border-sky-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}.ui-selected\:border-sky-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}.ui-selected\:border-sky-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}.ui-selected\:border-sky-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}.ui-selected\:border-sky-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}.ui-selected\:border-slate-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.ui-selected\:border-slate-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.ui-selected\:border-slate-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ui-selected\:border-slate-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}.ui-selected\:border-slate-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.ui-selected\:border-slate-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.ui-selected\:border-slate-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.ui-selected\:border-slate-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.ui-selected\:border-slate-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.ui-selected\:border-slate-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}.ui-selected\:border-slate-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}.ui-selected\:border-stone-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}.ui-selected\:border-stone-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.ui-selected\:border-stone-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.ui-selected\:border-stone-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.ui-selected\:border-stone-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}.ui-selected\:border-stone-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.ui-selected\:border-stone-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.ui-selected\:border-stone-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}.ui-selected\:border-stone-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}.ui-selected\:border-stone-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}.ui-selected\:border-stone-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}.ui-selected\:border-teal-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}.ui-selected\:border-teal-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}.ui-selected\:border-teal-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.ui-selected\:border-teal-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}.ui-selected\:border-teal-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}.ui-selected\:border-teal-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}.ui-selected\:border-teal-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}.ui-selected\:border-teal-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}.ui-selected\:border-teal-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}.ui-selected\:border-teal-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}.ui-selected\:border-teal-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}.ui-selected\:border-violet-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}.ui-selected\:border-violet-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}.ui-selected\:border-violet-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.ui-selected\:border-violet-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}.ui-selected\:border-violet-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}.ui-selected\:border-violet-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}.ui-selected\:border-violet-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}.ui-selected\:border-violet-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}.ui-selected\:border-violet-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}.ui-selected\:border-violet-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}.ui-selected\:border-violet-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}.ui-selected\:bg-amber-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.ui-selected\:text-amber-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.ui-selected\:text-amber-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.ui-selected\:text-amber-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.ui-selected\:text-amber-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.ui-selected\:text-amber-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}.ui-selected\:text-amber-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.ui-selected\:text-amber-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.ui-selected\:text-amber-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.ui-selected\:text-amber-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.ui-selected\:text-amber-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}.ui-selected\:text-amber-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}.ui-selected\:text-blue-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.ui-selected\:text-blue-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.ui-selected\:text-blue-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.ui-selected\:text-blue-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.ui-selected\:text-blue-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}.ui-selected\:text-blue-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.ui-selected\:text-blue-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.ui-selected\:text-blue-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.ui-selected\:text-blue-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.ui-selected\:text-blue-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.ui-selected\:text-blue-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}.ui-selected\:text-gray-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.ui-selected\:text-gray-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.ui-selected\:text-gray-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.ui-selected\:text-gray-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.ui-selected\:text-gray-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.ui-selected\:text-gray-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.ui-selected\:text-gray-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.ui-selected\:text-gray-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.ui-selected\:text-gray-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.ui-selected\:text-gray-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.ui-selected\:text-gray-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.ui-selected\:text-green-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.ui-selected\:text-green-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.ui-selected\:text-green-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}.ui-selected\:text-green-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.ui-selected\:text-green-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}.ui-selected\:text-green-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.ui-selected\:text-green-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.ui-selected\:text-green-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.ui-selected\:text-green-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.ui-selected\:text-green-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.ui-selected\:text-green-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.ui-selected\:text-lime-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}.ui-selected\:text-lime-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}.ui-selected\:text-lime-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}.ui-selected\:text-lime-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.ui-selected\:text-lime-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}.ui-selected\:text-lime-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}.ui-selected\:text-lime-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}.ui-selected\:text-lime-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}.ui-selected\:text-lime-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}.ui-selected\:text-lime-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.ui-selected\:text-lime-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.ui-selected\:text-orange-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}.ui-selected\:text-orange-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}.ui-selected\:text-orange-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.ui-selected\:text-orange-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.ui-selected\:text-orange-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}.ui-selected\:text-orange-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.ui-selected\:text-orange-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.ui-selected\:text-orange-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.ui-selected\:text-orange-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.ui-selected\:text-orange-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}.ui-selected\:text-orange-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}.ui-selected\:text-pink-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}.ui-selected\:text-pink-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}.ui-selected\:text-pink-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}.ui-selected\:text-pink-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.ui-selected\:text-pink-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}.ui-selected\:text-pink-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.ui-selected\:text-pink-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.ui-selected\:text-pink-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.ui-selected\:text-pink-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.ui-selected\:text-pink-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}.ui-selected\:text-pink-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}.ui-selected\:text-purple-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}.ui-selected\:text-purple-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.ui-selected\:text-purple-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}.ui-selected\:text-purple-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.ui-selected\:text-purple-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}.ui-selected\:text-purple-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.ui-selected\:text-purple-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.ui-selected\:text-purple-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.ui-selected\:text-purple-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.ui-selected\:text-purple-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}.ui-selected\:text-purple-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}.ui-selected\:text-red-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.ui-selected\:text-red-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.ui-selected\:text-red-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.ui-selected\:text-red-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.ui-selected\:text-red-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.ui-selected\:text-red-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.ui-selected\:text-red-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.ui-selected\:text-red-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.ui-selected\:text-red-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.ui-selected\:text-red-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.ui-selected\:text-red-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}.ui-selected\:text-rose-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.ui-selected\:text-rose-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.ui-selected\:text-rose-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.ui-selected\:text-rose-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.ui-selected\:text-rose-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}.ui-selected\:text-rose-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.ui-selected\:text-rose-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}.ui-selected\:text-rose-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.ui-selected\:text-rose-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}.ui-selected\:text-rose-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}.ui-selected\:text-rose-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}.ui-selected\:text-sky-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.ui-selected\:text-sky-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.ui-selected\:text-sky-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.ui-selected\:text-sky-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.ui-selected\:text-sky-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}.ui-selected\:text-sky-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}.ui-selected\:text-sky-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.ui-selected\:text-sky-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.ui-selected\:text-sky-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}.ui-selected\:text-sky-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}.ui-selected\:text-sky-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}.ui-selected\:text-slate-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.ui-selected\:text-slate-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.ui-selected\:text-slate-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.ui-selected\:text-slate-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.ui-selected\:text-slate-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.ui-selected\:text-slate-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.ui-selected\:text-slate-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.ui-selected\:text-slate-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.ui-selected\:text-slate-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.ui-selected\:text-slate-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.ui-selected\:text-slate-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.ui-selected\:text-stone-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.ui-selected\:text-stone-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.ui-selected\:text-stone-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.ui-selected\:text-stone-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.ui-selected\:text-stone-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.ui-selected\:text-stone-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}.ui-selected\:text-stone-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}.ui-selected\:text-stone-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.ui-selected\:text-stone-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.ui-selected\:text-stone-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.ui-selected\:text-stone-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}.ui-selected\:text-teal-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}.ui-selected\:text-teal-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}.ui-selected\:text-teal-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}.ui-selected\:text-teal-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.ui-selected\:text-teal-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}.ui-selected\:text-teal-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}.ui-selected\:text-teal-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}.ui-selected\:text-teal-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}.ui-selected\:text-teal-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}.ui-selected\:text-teal-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.ui-selected\:text-teal-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}.ui-selected\:text-violet-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.ui-selected\:text-violet-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.ui-selected\:text-violet-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.ui-selected\:text-violet-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.ui-selected\:text-violet-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}.ui-selected\:text-violet-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}.ui-selected\:text-violet-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.ui-selected\:text-violet-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.ui-selected\:text-violet-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.ui-selected\:text-violet-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}.ui-selected\:text-violet-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-100{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-400{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-50{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-500{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-600{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-700{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-800{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-900{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-950{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-50{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-700{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-800{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-900{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-950{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-300{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-400{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-50{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-500{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-600{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-700{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-800{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-900{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-950{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-100{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-300{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-400{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-50{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-600{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-700{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-800{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-900{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-950{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-100{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-200{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-300{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-400{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-50{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-500{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-600{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-700{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-800{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-900{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-950{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-50{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-900{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-950{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-50{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-600{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-700{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-800{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-900{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-950{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-100{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-200{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-300{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-400{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-50{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-600{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-700{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-800{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-900{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-950{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-100{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-200{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-300{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-400{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-50{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-500{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-600{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-700{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-800{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-900{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-950{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-300{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-400{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-500{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-600{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-700{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-800{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-900{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-950{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-300{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-400{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-50{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-600{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-700{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-800{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-900{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-950{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-100{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-200{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-300{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-400{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-50{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-500{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-600{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-700{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-800{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-900{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-950{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-100{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-300{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-400{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-50{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-600{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-800{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-900{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-950{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-50{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-900{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-950{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-100{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-200{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-300{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-400{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-50{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-500{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-600{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-700{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-800{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-900{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-950{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-100{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-400{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-50{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-500{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-600{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-700{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-800{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-900{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-950{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-50{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-900{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-950{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-100{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-50{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-700{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-800{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-900{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-950{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-100{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-200{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-300{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-400{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-50{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-500{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-600{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-700{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-800{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-900{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-950{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-100{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-200{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-300{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-400{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-50{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-500{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-600{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-700{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-800{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-900{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-950{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-100{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-300{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-50{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-600{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-700{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-800{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-900{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-950{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-400{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-500{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-600{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-700{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-950{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-200{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-300{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-700{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-800{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-900{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-950{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-800{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-900{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-950{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-200{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-300{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-400{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-700{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-800{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-900{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-950{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-200{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-300{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-700{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-800{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-900{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-950{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-100{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-200{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-300{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-400{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-50{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-500{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-600{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-700{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-800{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-900{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-950{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-950{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-800{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-900{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-950{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-300{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-400{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-950{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-100{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-200{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-300{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-400{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-50{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-500{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-600{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-700{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-800{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-900{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-950{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-200{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-400{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-500{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-600{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-950{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-300{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-700{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-800{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-900{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-950{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-300{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-500{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-600{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-700{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-800{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-900{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-950{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-200{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-300{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-400{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-800{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-900{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-950{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-300{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-800{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-100{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-200{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-300{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-700{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-800{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-900{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-950{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-200{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-300{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-400{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-700{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-800{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-900{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-950{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-500{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-600{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-950{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-200{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-50{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-700{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-950{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-100{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-200{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-300{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-400{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-50{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-500{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-600{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-700{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-800{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-900{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-950{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-200{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-300{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-400{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-700{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-800{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-900{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-950{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-700{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-800{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-900{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-950{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-400{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-500{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-600{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-700{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-50{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-900{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-950{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-100{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-200{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-300{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-50{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-950{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-500{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-900{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-200{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-50{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-500{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-600{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-700{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-800{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-900{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-950{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-950{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-100{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-200{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-300{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-50{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-950{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-400{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-50{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-900{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-950{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-100{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-200{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-300{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-400{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-50{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-500{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-600{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-700{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-800{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-900{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-950{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-100{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-200{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-300{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-100{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-200{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-50{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-900{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-950{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-100{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-200{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-300{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-50{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-800{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-900{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-950{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-100{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-200{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-50{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-900{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-950{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-100{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-50{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-950{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-50{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-500{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-700{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-800{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-900{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-950{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-50{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-800{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-900{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-950{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-500{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-600{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-700{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-950{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-100{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-200{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-300{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-50{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-500{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-600{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-700{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-800{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-900{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-950{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-50{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-500{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-900{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-950{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-100{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-200{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-50{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-950{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.dark\:divide-dark-tremor-border:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity,1))}.dark\:border-dark-tremor-background:is(.dark *){--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-border:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand:is(.dark *){--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand-emphasis:is(.dark *){--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand-inverted:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand-subtle:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.dark\:border-red-500:is(.dark *){--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.dark\:bg-dark-tremor-background:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-background-emphasis:is(.dark *){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-background-muted:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-background-subtle:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-border:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-brand:is(.dark *){--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-brand-muted:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-brand-muted\/50:is(.dark *){background-color:#1e1b4b80}.dark\:bg-dark-tremor-brand-muted\/70:is(.dark *){background-color:#1e1b4bb3}.dark\:bg-dark-tremor-brand-subtle\/60:is(.dark *){background-color:#3730a399}.dark\:bg-dark-tremor-content-subtle:is(.dark *){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.dark\:bg-slate-950\/50:is(.dark *){background-color:#02061780}.dark\:bg-white:is(.dark *){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.dark\:bg-opacity-10:is(.dark *){--tw-bg-opacity:.1}.dark\:bg-opacity-5:is(.dark *){--tw-bg-opacity:.05}.dark\:fill-dark-tremor-content:is(.dark *){fill:#6b7280}.dark\:fill-dark-tremor-content-emphasis:is(.dark *){fill:#e5e7eb}.dark\:stroke-dark-tremor-background:is(.dark *){stroke:#111827}.dark\:stroke-dark-tremor-border:is(.dark *){stroke:#374151}.dark\:stroke-dark-tremor-brand:is(.dark *){stroke:#6366f1}.dark\:stroke-dark-tremor-brand-muted:is(.dark *){stroke:#1e1b4b}.dark\:text-dark-tremor-brand:is(.dark *){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-brand-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-brand-inverted:is(.dark *){--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content-strong:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content-subtle:is(.dark *){--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.dark\:text-red-500:is(.dark *){--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.dark\:text-tremor-content-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.dark\:accent-dark-tremor-brand:is(.dark *){accent-color:#6366f1}.dark\:opacity-25:is(.dark *){opacity:.25}.dark\:shadow-dark-tremor-card:is(.dark *){--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:shadow-dark-tremor-dropdown:is(.dark *){--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:shadow-dark-tremor-input:is(.dark *){--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:outline-dark-tremor-brand:is(.dark *){outline-color:#6366f1}.dark\:ring-dark-tremor-brand-inverted:is(.dark *),.dark\:ring-dark-tremor-brand-muted:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity,1))}.dark\:ring-dark-tremor-ring:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity,1))}.dark\:ring-opacity-60:is(.dark *){--tw-ring-opacity:.6}.dark\:placeholder\:text-dark-tremor-content:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-dark-tremor-content:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-dark-tremor-content-subtle:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.dark\:placeholder\:text-dark-tremor-content-subtle:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.dark\:placeholder\:text-red-500:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.dark\:placeholder\:text-red-500:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content-subtle:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content-subtle:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.dark\:hover\:border-dark-tremor-brand-emphasis:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.dark\:hover\:bg-dark-tremor-background-muted:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:hover\:bg-dark-tremor-background-subtle:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\:hover\:bg-dark-tremor-background-subtle\/40:hover:is(.dark *){background-color:#1f293766}.dark\:hover\:bg-dark-tremor-brand-emphasis:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.dark\:hover\:bg-dark-tremor-brand-faint:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(11 18 41/var(--tw-bg-opacity,1))}.hover\:dark\:\!bg-gray-100:is(.dark *):hover{--tw-bg-opacity:1!important;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))!important}.hover\:dark\:bg-gray-100:is(.dark *):hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.dark\:hover\:bg-opacity-20:hover:is(.dark *){--tw-bg-opacity:.2}.dark\:hover\:text-dark-tremor-brand-emphasis:hover:is(.dark *){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.dark\:hover\:text-dark-tremor-content:hover:is(.dark *),.dark\:hover\:text-tremor-content:hover:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:hover\:text-tremor-content-emphasis:hover:is(.dark *){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:dark\:text-dark-tremor-content:is(.dark *):hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:focus\:border-dark-tremor-brand-subtle:focus:is(.dark *),.focus\:dark\:border-dark-tremor-brand-subtle:is(.dark *):focus{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.dark\:focus\:ring-dark-tremor-brand-muted:focus:is(.dark *),.focus\:dark\:ring-dark-tremor-brand-muted:is(.dark *):focus{--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity,1))}.group:hover .group-hover\:dark\:bg-dark-tremor-brand-subtle\/70:is(.dark *){background-color:#3730a3b3}.group:hover .dark\:group-hover\:text-dark-tremor-content-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.aria-selected\:dark\:\!bg-dark-tremor-background-subtle:is(.dark *)[aria-selected=true]{--tw-bg-opacity:1!important;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))!important}.dark\:aria-selected\:bg-dark-tremor-background-emphasis[aria-selected=true]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.dark\:aria-selected\:text-dark-tremor-brand-inverted[aria-selected=true]:is(.dark *){--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.dark\:aria-selected\:text-dark-tremor-content-inverted[aria-selected=true]:is(.dark *){--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:border-dark-tremor-border[data-selected]:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.data-\[selected\]\:dark\:border-dark-tremor-brand:is(.dark *)[data-selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.dark\:data-\[focus\]\:bg-dark-tremor-background-muted[data-focus]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:data-\[selected\]\:bg-dark-tremor-background[data-selected]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.dark\:data-\[selected\]\:bg-dark-tremor-background-muted[data-selected]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:data-\[focus\]\:text-dark-tremor-content-strong[data-focus]:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:text-dark-tremor-brand[data-selected]:is(.dark *){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:text-dark-tremor-content-strong[data-selected]:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.data-\[selected\]\:dark\:text-dark-tremor-brand:is(.dark *)[data-selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:shadow-dark-tremor-input[data-selected]:is(.dark *){--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:640px){.sm\:col-span-1{grid-column:span 1/span 1}.sm\:col-span-10{grid-column:span 10/span 10}.sm\:col-span-11{grid-column:span 11/span 11}.sm\:col-span-12{grid-column:span 12/span 12}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:col-span-4{grid-column:span 4/span 4}.sm\:col-span-5{grid-column:span 5/span 5}.sm\:col-span-6{grid-column:span 6/span 6}.sm\:col-span-7{grid-column:span 7/span 7}.sm\:col-span-8{grid-column:span 8/span 8}.sm\:col-span-9{grid-column:span 9/span 9}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:mb-0{margin-bottom:0}.sm\:ml-4{margin-left:1rem}.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:flex{display:flex}.sm\:h-screen{height:100vh}.sm\:w-64{width:16rem}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.sm\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.sm\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.sm\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.sm\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.sm\:grid-cols-none{grid-template-columns:none}.sm\:flex-row{flex-direction:row}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pb-4{padding-bottom:1rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}}@media (min-width:768px){.md\:col-span-1{grid-column:span 1/span 1}.md\:col-span-10{grid-column:span 10/span 10}.md\:col-span-11{grid-column:span 11/span 11}.md\:col-span-12{grid-column:span 12/span 12}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-span-3{grid-column:span 3/span 3}.md\:col-span-4{grid-column:span 4/span 4}.md\:col-span-5{grid-column:span 5/span 5}.md\:col-span-6{grid-column:span 6/span 6}.md\:col-span-7{grid-column:span 7/span 7}.md\:col-span-8{grid-column:span 8/span 8}.md\:col-span-9{grid-column:span 9/span 9}.md\:table-cell{display:table-cell}.md\:hidden{display:none}.md\:w-64{width:16rem}.md\:w-72{width:18rem}.md\:w-auto{width:auto}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.md\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.md\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.md\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.md\:grid-cols-none{grid-template-columns:none}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}}@media (min-width:1024px){.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-10{grid-column:span 10/span 10}.lg\:col-span-11{grid-column:span 11/span 11}.lg\:col-span-12{grid-column:span 12/span 12}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:col-span-4{grid-column:span 4/span 4}.lg\:col-span-5{grid-column:span 5/span 5}.lg\:col-span-6{grid-column:span 6/span 6}.lg\:col-span-7{grid-column:span 7/span 7}.lg\:col-span-8{grid-column:span 8/span 8}.lg\:col-span-9{grid-column:span 9/span 9}.lg\:inline{display:inline}.lg\:table-cell{display:table-cell}.lg\:hidden{display:none}.lg\:w-72{width:18rem}.lg\:max-w-\[200px\]{max-width:200px}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.lg\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.lg\:grid-cols-none{grid-template-columns:none}}@media (min-width:1280px){.xl\:table-cell{display:table-cell}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{appearance:none}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:not\(\[data-selected\]\)\]\:text-tremor-content:not([data-selected]){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:hover\:text-tremor-content-emphasis:hover:not([data-selected]){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:dark\:text-dark-tremor-content:is(.dark *):not([data-selected]),.dark\:\[\&\:not\(\[data-selected\]\)\]\:text-dark-tremor-content:not([data-selected]):is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:dark\:hover\:border-dark-tremor-content-emphasis:hover:is(.dark *):not([data-selected]){--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:dark\:hover\:text-dark-tremor-content-emphasis:hover:is(.dark *):not([data-selected]),.dark\:\[\&\:not\(\[data-selected\]\)\]\:hover\:text-dark-tremor-content-emphasis:hover:not([data-selected]):is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.\[\&_\.ant-tabs-content\]\:h-full .ant-tabs-content{height:100%}.\[\&_\.ant-tabs-nav\]\:pl-4 .ant-tabs-nav{padding-left:1rem}.\[\&_\.ant-tabs-tabpane\]\:h-full .ant-tabs-tabpane{height:100%}.\[\&_\[role\=\'tree\'\]\]\:bg-white [role=tree]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\[\&_\[role\=\'tree\'\]\]\:text-slate-900 [role=tree]{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.\[\&_td\]\:py-0\.5 td{padding-top:.125rem;padding-bottom:.125rem}.\[\&_td\]\:py-2 td{padding-top:.5rem;padding-bottom:.5rem}.\[\&_th\]\:py-1 th{padding-top:.25rem;padding-bottom:.25rem}.\[\&_th\]\:py-2 th{padding-top:.5rem;padding-bottom:.5rem} diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/30c33cea8541a2f1.js b/litellm/proxy/_experimental/out/_next/static/chunks/30c33cea8541a2f1.js deleted file mode 100644 index 7543f1a525..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/30c33cea8541a2f1.js +++ /dev/null @@ -1,17 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,869216,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),l=e.i(908206),n=e.i(242064),r=e.i(517455),i=e.i(150073);let o={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var d=e.i(876556),c=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,l=Object.getOwnPropertySymbols(e);nt.indexOf(l[n])&&Object.prototype.propertyIsEnumerable.call(e,l[n])&&(a[l[n]]=e[l[n]]);return a},u=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,l=Object.getOwnPropertySymbols(e);nt.indexOf(l[n])&&Object.prototype.propertyIsEnumerable.call(e,l[n])&&(a[l[n]]=e[l[n]]);return a};let g=e=>{let{itemPrefixCls:l,component:n,span:r,className:i,style:o,labelStyle:d,contentStyle:c,bordered:u,label:g,content:m,colon:b,type:f,styles:p}=e,{classNames:h}=t.useContext(s),$=Object.assign(Object.assign({},d),null==p?void 0:p.label),v=Object.assign(Object.assign({},c),null==p?void 0:p.content);if(u)return t.createElement(n,{colSpan:r,style:o,className:(0,a.default)(i,{[`${l}-item-${f}`]:"label"===f||"content"===f,[null==h?void 0:h.label]:(null==h?void 0:h.label)&&"label"===f,[null==h?void 0:h.content]:(null==h?void 0:h.content)&&"content"===f})},null!=g&&t.createElement("span",{style:$},g),null!=m&&t.createElement("span",{style:v},m));return t.createElement(n,{colSpan:r,style:o,className:(0,a.default)(`${l}-item`,i)},t.createElement("div",{className:`${l}-item-container`},null!=g&&t.createElement("span",{style:$,className:(0,a.default)(`${l}-item-label`,null==h?void 0:h.label,{[`${l}-item-no-colon`]:!b})},g),null!=m&&t.createElement("span",{style:v,className:(0,a.default)(`${l}-item-content`,null==h?void 0:h.content)},m)))};function m(e,{colon:a,prefixCls:l,bordered:n},{component:r,type:i,showLabel:o,showContent:s,labelStyle:d,contentStyle:c,styles:u}){return e.map(({label:e,children:m,prefixCls:b=l,className:f,style:p,labelStyle:h,contentStyle:$,span:v=1,key:y,styles:O},j)=>"string"==typeof r?t.createElement(g,{key:`${i}-${y||j}`,className:f,style:p,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),h),null==O?void 0:O.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),$),null==O?void 0:O.content)},span:v,colon:a,component:r,itemPrefixCls:b,bordered:n,label:o?e:null,content:s?m:null,type:i}):[t.createElement(g,{key:`label-${y||j}`,className:f,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),p),h),null==O?void 0:O.label),span:1,colon:a,component:r[0],itemPrefixCls:b,bordered:n,label:e,type:"label"}),t.createElement(g,{key:`content-${y||j}`,className:f,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),p),$),null==O?void 0:O.content),span:2*v-1,component:r[1],itemPrefixCls:b,bordered:n,content:m,type:"content"})])}let b=e=>{let a=t.useContext(s),{prefixCls:l,vertical:n,row:r,index:i,bordered:o}=e;return n?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${l}-row`},m(r,e,Object.assign({component:"th",type:"label",showLabel:!0},a))),t.createElement("tr",{key:`content-${i}`,className:`${l}-row`},m(r,e,Object.assign({component:"td",type:"content",showContent:!0},a)))):t.createElement("tr",{key:i,className:`${l}-row`},m(r,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},a)))};e.i(296059);var f=e.i(915654),p=e.i(183293),h=e.i(246422),$=e.i(838378);let v=(0,h.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:a,itemPaddingBottom:l,itemPaddingEnd:n,colonMarginRight:r,colonMarginLeft:i,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,p.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:a}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.padding)} ${(0,f.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:a,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.paddingSM)} ${(0,f.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.paddingXS)} ${(0,f.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:o},[`${t}-title`]:Object.assign(Object.assign({},p.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:a,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:l,paddingInlineEnd:n},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,f.unit)(i)} ${(0,f.unit)(r)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,$.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var y=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,l=Object.getOwnPropertySymbols(e);nt.indexOf(l[n])&&Object.prototype.propertyIsEnumerable.call(e,l[n])&&(a[l[n]]=e[l[n]]);return a};let O=e=>{let g,{prefixCls:m,title:f,extra:p,column:h,colon:$=!0,bordered:O,layout:j,children:x,className:w,rootClassName:C,style:S,size:k,labelStyle:E,contentStyle:N,styles:T,items:B,classNames:z}=e,R=y(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:M,direction:L,className:H,style:P,classNames:I,styles:q}=(0,n.useComponentConfig)("descriptions"),W=M("descriptions",m),A=(0,i.default)(),G=t.useMemo(()=>{var e;return"number"==typeof h?h:null!=(e=(0,l.matchScreen)(A,Object.assign(Object.assign({},o),h)))?e:3},[A,h]),F=(g=t.useMemo(()=>B||(0,d.default)(x).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[B,x]),t.useMemo(()=>g.map(e=>{var{span:t}=e,a=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},a),{filled:!0}):Object.assign(Object.assign({},a),{span:"number"==typeof t?t:(0,l.matchScreen)(A,t)})}),[g,A])),D=(0,r.default)(k),X=((e,a)=>{let[l,n]=(0,t.useMemo)(()=>{let t,l,n,r;return t=[],l=[],n=!1,r=0,a.filter(e=>e).forEach(a=>{let{filled:i}=a,o=u(a,["filled"]);if(i){l.push(o),t.push(l),l=[],r=0;return}let s=e-r;(r+=a.span||1)>=e?(r>e?(n=!0,l.push(Object.assign(Object.assign({},o),{span:s}))):l.push(o),t.push(l),l=[],r=0):l.push(o)}),l.length>0&&t.push(l),[t=t.map(t=>{let a=t.reduce((e,t)=>e+(t.span||1),0);if(a({labelStyle:E,contentStyle:N,styles:{content:Object.assign(Object.assign({},q.content),null==T?void 0:T.content),label:Object.assign(Object.assign({},q.label),null==T?void 0:T.label)},classNames:{label:(0,a.default)(I.label,null==z?void 0:z.label),content:(0,a.default)(I.content,null==z?void 0:z.content)}}),[E,N,T,z,I,q]);return _(t.createElement(s.Provider,{value:V},t.createElement("div",Object.assign({className:(0,a.default)(W,H,I.root,null==z?void 0:z.root,{[`${W}-${D}`]:D&&"default"!==D,[`${W}-bordered`]:!!O,[`${W}-rtl`]:"rtl"===L},w,C,K,U),style:Object.assign(Object.assign(Object.assign(Object.assign({},P),q.root),null==T?void 0:T.root),S)},R),(f||p)&&t.createElement("div",{className:(0,a.default)(`${W}-header`,I.header,null==z?void 0:z.header),style:Object.assign(Object.assign({},q.header),null==T?void 0:T.header)},f&&t.createElement("div",{className:(0,a.default)(`${W}-title`,I.title,null==z?void 0:z.title),style:Object.assign(Object.assign({},q.title),null==T?void 0:T.title)},f),p&&t.createElement("div",{className:(0,a.default)(`${W}-extra`,I.extra,null==z?void 0:z.extra),style:Object.assign(Object.assign({},q.extra),null==T?void 0:T.extra)},p)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,X.map((e,a)=>t.createElement(b,{key:a,index:a,colon:$,prefixCls:W,vertical:"vertical"===j,bordered:O,row:e}))))))))};O.Item=({children:e})=>e,e.s(["Descriptions",0,O],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var n=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["ExclamationCircleOutlined",0,r],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),l=e.i(529681),n=e.i(242064),r=e.i(517455),i=e.i(185793),o=e.i(721369),s=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,l=Object.getOwnPropertySymbols(e);nt.indexOf(l[n])&&Object.prototype.propertyIsEnumerable.call(e,l[n])&&(a[l[n]]=e[l[n]]);return a};let d=e=>{var{prefixCls:l,className:r,hoverable:i=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(n.ConfigContext),c=d("card",l),u=(0,a.default)(`${c}-grid`,r,{[`${c}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},o,{className:u}))};e.i(296059);var c=e.i(915654),u=e.i(183293),g=e.i(246422),m=e.i(838378);let b=(0,g.genStyleHooks)("Card",e=>{let t=(0,m.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:a,cardHeadPadding:l,colorBorderSecondary:n,boxShadowTertiary:r,bodyPadding:i,extraColor:o}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:r},[`${t}-head`]:(e=>{let{antCls:t,componentCls:a,headerHeight:l,headerPadding:n,tabsMarginBottom:r}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:l,marginBottom:-1,padding:`0 ${(0,c.unit)(n)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[` - > ${a}-typography, - > ${a}-typography-edit-content - `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:r,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:i,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:a,cardShadow:l,lineWidth:n}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` - ${(0,c.unit)(n)} 0 0 0 ${a}, - 0 ${(0,c.unit)(n)} 0 0 ${a}, - ${(0,c.unit)(n)} ${(0,c.unit)(n)} 0 0 ${a}, - ${(0,c.unit)(n)} 0 0 0 ${a} inset, - 0 ${(0,c.unit)(n)} 0 0 ${a} inset; - `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:l}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:a,actionsLiMargin:l,cardActionsIconSize:n,colorBorderSecondary:r,actionsBg:i}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:i,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:l,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${a}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${a}`]:{fontSize:n,lineHeight:(0,c.unit)(e.calc(n).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${n}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:a}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:l}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:a,headerPadding:l,bodyPadding:n}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(l)}`,background:a,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(n)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:a,headerPaddingSM:l,headerHeightSM:n,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:n,padding:`0 ${(0,c.unit)(l)}`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:a}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,a;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(a=e.headerPadding)?a:e.paddingLG}});var f=e.i(792812),p=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,l=Object.getOwnPropertySymbols(e);nt.indexOf(l[n])&&Object.prototype.propertyIsEnumerable.call(e,l[n])&&(a[l[n]]=e[l[n]]);return a};let h=e=>{let{actionClasses:a,actions:l=[],actionStyle:n}=e;return t.createElement("ul",{className:a,style:n},l.map((e,a)=>{let n=`action-${a}`;return t.createElement("li",{style:{width:`${100/l.length}%`},key:n},t.createElement("span",null,e))}))},$=t.forwardRef((e,s)=>{let c,{prefixCls:u,className:g,rootClassName:m,style:$,extra:v,headStyle:y={},bodyStyle:O={},title:j,loading:x,bordered:w,variant:C,size:S,type:k,cover:E,actions:N,tabList:T,children:B,activeTabKey:z,defaultActiveTabKey:R,tabBarExtraContent:M,hoverable:L,tabProps:H={},classNames:P,styles:I}=e,q=p(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:W,direction:A,card:G}=t.useContext(n.ConfigContext),[F]=(0,f.default)("card",C,w),D=e=>{var t;return(0,a.default)(null==(t=null==G?void 0:G.classNames)?void 0:t[e],null==P?void 0:P[e])},X=e=>{var t;return Object.assign(Object.assign({},null==(t=null==G?void 0:G.styles)?void 0:t[e]),null==I?void 0:I[e])},_=t.useMemo(()=>{let e=!1;return t.Children.forEach(B,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[B]),K=W("card",u),[U,V,Q]=b(K),J=t.createElement(i.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},B),Y=void 0!==z,Z=Object.assign(Object.assign({},H),{[Y?"activeKey":"defaultActiveKey"]:Y?z:R,tabBarExtraContent:M}),ee=(0,r.default)(S),et=ee&&"default"!==ee?ee:"large",ea=T?t.createElement(o.default,Object.assign({size:et},Z,{className:`${K}-head-tabs`,onChange:t=>{var a;null==(a=e.onTabChange)||a.call(e,t)},items:T.map(e=>{var{tab:t}=e;return Object.assign({label:t},p(e,["tab"]))})})):null;if(j||v||ea){let e=(0,a.default)(`${K}-head`,D("header")),l=(0,a.default)(`${K}-head-title`,D("title")),n=(0,a.default)(`${K}-extra`,D("extra")),r=Object.assign(Object.assign({},y),X("header"));c=t.createElement("div",{className:e,style:r},t.createElement("div",{className:`${K}-head-wrapper`},j&&t.createElement("div",{className:l,style:X("title")},j),v&&t.createElement("div",{className:n,style:X("extra")},v)),ea)}let el=(0,a.default)(`${K}-cover`,D("cover")),en=E?t.createElement("div",{className:el,style:X("cover")},E):null,er=(0,a.default)(`${K}-body`,D("body")),ei=Object.assign(Object.assign({},O),X("body")),eo=t.createElement("div",{className:er,style:ei},x?J:B),es=(0,a.default)(`${K}-actions`,D("actions")),ed=(null==N?void 0:N.length)?t.createElement(h,{actionClasses:es,actionStyle:X("actions"),actions:N}):null,ec=(0,l.default)(q,["onTabChange"]),eu=(0,a.default)(K,null==G?void 0:G.className,{[`${K}-loading`]:x,[`${K}-bordered`]:"borderless"!==F,[`${K}-hoverable`]:L,[`${K}-contain-grid`]:_,[`${K}-contain-tabs`]:null==T?void 0:T.length,[`${K}-${ee}`]:ee,[`${K}-type-${k}`]:!!k,[`${K}-rtl`]:"rtl"===A},g,m,V,Q),eg=Object.assign(Object.assign({},null==G?void 0:G.style),$);return U(t.createElement("div",Object.assign({ref:s},ec,{className:eu,style:eg}),c,en,eo,ed))});var v=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,l=Object.getOwnPropertySymbols(e);nt.indexOf(l[n])&&Object.prototype.propertyIsEnumerable.call(e,l[n])&&(a[l[n]]=e[l[n]]);return a};$.Grid=d,$.Meta=e=>{let{prefixCls:l,className:r,avatar:i,title:o,description:s}=e,d=v(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(n.ConfigContext),u=c("card",l),g=(0,a.default)(`${u}-meta`,r),m=i?t.createElement("div",{className:`${u}-meta-avatar`},i):null,b=o?t.createElement("div",{className:`${u}-meta-title`},o):null,f=s?t.createElement("div",{className:`${u}-meta-description`},s):null,p=b||f?t.createElement("div",{className:`${u}-meta-detail`},b,f):null;return t.createElement("div",Object.assign({},d,{className:g}),m,p)},e.s(["Card",0,$],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),a=e.i(560445),l=e.i(175712),n=e.i(869216),r=e.i(311451),i=e.i(212931),o=e.i(898586);e.i(296059);var s=e.i(868297),d=e.i(732961),c=e.i(289882),u=e.i(170517),g=e.i(628882),m=e.i(320890),b=e.i(104458),f=e.i(722319),p=e.i(8398),h=e.i(279728);e.i(765846);var $=e.i(602716),v=e.i(328052);e.i(262370);var y=e.i(135551);let O=(e,t)=>new y.FastColor(e).setA(t).toRgbString(),j=(e,t)=>new y.FastColor(e).lighten(t).toHexString(),x=e=>{let t=(0,$.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},w=(e,t)=>{let a=e||"#000",l=t||"#fff";return{colorBgBase:a,colorTextBase:l,colorText:O(l,.85),colorTextSecondary:O(l,.65),colorTextTertiary:O(l,.45),colorTextQuaternary:O(l,.25),colorFill:O(l,.18),colorFillSecondary:O(l,.12),colorFillTertiary:O(l,.08),colorFillQuaternary:O(l,.04),colorBgSolid:O(l,.95),colorBgSolidHover:O(l,1),colorBgSolidActive:O(l,.9),colorBgElevated:j(a,12),colorBgContainer:j(a,8),colorBgLayout:j(a,0),colorBgSpotlight:j(a,26),colorBgBlur:O(l,.04),colorBorder:j(a,26),colorBorderSecondary:j(a,19)}},C={defaultSeed:m.defaultConfig.token,useToken:function(){let[e,t,a]=(0,b.useToken)();return{theme:e,token:t,hashId:a}},defaultAlgorithm:f.default,darkAlgorithm:(e,t)=>{let a=Object.keys(u.defaultPresetColors).map(t=>{let a=(0,$.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,l,n)=>(e[`${t}-${n+1}`]=a[n],e[`${t}${n+1}`]=a[n],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),l=null!=t?t:(0,f.default)(e),n=(0,v.default)(e,{generateColorPalettes:x,generateNeutralColorPalettes:w});return Object.assign(Object.assign(Object.assign(Object.assign({},l),a),n),{colorPrimaryBg:n.colorPrimaryBorder,colorPrimaryBgHover:n.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let a=null!=t?t:(0,f.default)(e),l=a.fontSizeSM,n=a.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),function(e){let{sizeUnit:t,sizeStep:a}=e,l=a-2;return{sizeXXL:t*(l+10),sizeXL:t*(l+6),sizeLG:t*(l+2),sizeMD:t*(l+2),sizeMS:t*(l+1),size:t*l,sizeSM:t*l,sizeXS:t*(l-1),sizeXXS:t*(l-1)}}(null!=t?t:e)),(0,h.default)(l)),{controlHeight:n}),(0,p.default)(Object.assign(Object.assign({},a),{controlHeight:n})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):c.default,a=Object.assign(Object.assign({},u.default),null==e?void 0:e.token);return(0,d.getComputedToken)(a,{override:null==e?void 0:e.token},t,g.default)},defaultConfig:m.defaultConfig,_internalContext:m.DesignTokenContext};e.s(["theme",0,C],368869);var S=e.i(270377),k=e.i(271645);function E({isOpen:e,title:s,alertMessage:d,message:c,resourceInformationTitle:u,resourceInformation:g,onCancel:m,onOk:b,confirmLoading:f,requiredConfirmation:p}){let{Title:h,Text:$}=o.Typography,{token:v}=C.useToken(),[y,O]=(0,k.useState)("");return(0,k.useEffect)(()=>{e&&O("")},[e]),(0,t.jsx)(i.Modal,{title:s,open:e,onOk:b,onCancel:m,confirmLoading:f,okText:f?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!p&&y!==p||f},cancelButtonProps:{disabled:f},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(a.Alert,{message:d,type:"warning"}),(0,t.jsx)(l.Card,{title:u,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:v.colorErrorBg,borderColor:v.colorErrorBorder}},style:{backgroundColor:v.colorErrorBg,borderColor:v.colorErrorBorder},children:(0,t.jsx)(n.Descriptions,{column:1,size:"small",children:g&&g.map(({label:e,value:a,...l})=>(0,t.jsx)(n.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)($,{...l,children:a??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)($,{children:c})}),p&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)($,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)($,{children:"Type "}),(0,t.jsx)($,{strong:!0,type:"danger",children:p}),(0,t.jsx)($,{children:" to confirm deletion:"})]}),(0,t.jsx)(r.Input,{value:y,onChange:e=>O(e.target.value),placeholder:p,className:"rounded-md",prefix:(0,t.jsx)(S.ExclamationCircleOutlined,{style:{color:v.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>E],127952)},871943,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.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:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,a],871943)},360820,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.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:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,a],360820)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),l=e.i(242064),n=e.i(529681);let r=e=>{let{prefixCls:l,className:n,style:r,size:i,shape:o}=e,s=(0,a.default)({[`${l}-lg`]:"large"===i,[`${l}-sm`]:"small"===i}),d=(0,a.default)({[`${l}-circle`]:"circle"===o,[`${l}-square`]:"square"===o,[`${l}-round`]:"round"===o}),c=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,a.default)(l,s,d,n),style:Object.assign(Object.assign({},c),r)})};e.i(296059);var i=e.i(694758),o=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,o.unit)(e)}),g=e=>Object.assign({width:e},u(e)),m=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),b=e=>Object.assign({width:e},u(e)),f=(e,t,a)=>{let{skeletonButtonCls:l}=e;return{[`${a}${l}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${a}${l}-round`]:{borderRadius:t}}},p=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),h=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:a}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:a,skeletonTitleCls:l,skeletonParagraphCls:n,skeletonButtonCls:r,skeletonInputCls:i,skeletonImageCls:o,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:h,padding:$,marginSM:v,borderRadius:y,titleHeight:O,blockRadius:j,paragraphLiHeight:x,controlHeightXS:w,paragraphMarginTop:C}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:$,verticalAlign:"top",[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:h},g(s)),[`${a}-circle`]:{borderRadius:"50%"},[`${a}-lg`]:Object.assign({},g(d)),[`${a}-sm`]:Object.assign({},g(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[l]:{width:"100%",height:O,background:h,borderRadius:j,[`+ ${n}`]:{marginBlockStart:u}},[n]:{padding:0,"> li":{width:"100%",height:x,listStyle:"none",background:h,borderRadius:j,"+ li":{marginBlockStart:w}}},[`${n}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${l}, ${n} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-content`]:{[l]:{marginBlockStart:v,[`+ ${n}`]:{marginBlockStart:C}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:a,controlHeight:l,controlHeightLG:n,controlHeightSM:r,gradientFromColor:i,calc:o}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:o(l).mul(2).equal(),minWidth:o(l).mul(2).equal()},p(l,o))},f(e,l,a)),{[`${a}-lg`]:Object.assign({},p(n,o))}),f(e,n,`${a}-lg`)),{[`${a}-sm`]:Object.assign({},p(r,o))}),f(e,r,`${a}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:a,controlHeight:l,controlHeightLG:n,controlHeightSM:r}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:a},g(l)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},g(n)),[`${t}${t}-sm`]:Object.assign({},g(r))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:a,skeletonInputCls:l,controlHeightLG:n,controlHeightSM:r,gradientFromColor:i,calc:o}=e;return{[l]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:a},m(t,o)),[`${l}-lg`]:Object.assign({},m(n,o)),[`${l}-sm`]:Object.assign({},m(r,o))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:a,gradientFromColor:l,borderRadiusSM:n,calc:r}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:l,borderRadius:n},b(r(a).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},b(a)),{maxWidth:r(a).mul(4).equal(),maxHeight:r(a).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[r]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${l}, - ${n} > li, - ${a}, - ${r}, - ${i}, - ${o} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,d.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:a(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:a}=e;return{color:t,colorGradientEnd:a,gradientFromColor:t,gradientToColor:a,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),$=e=>{let{prefixCls:l,className:n,style:r,rows:i=0}=e,o=Array.from({length:i}).map((a,l)=>t.createElement("li",{key:l,style:{width:((e,t)=>{let{width:a,rows:l=2}=t;return Array.isArray(a)?a[e]:l-1===e?a:void 0})(l,e)}}));return t.createElement("ul",{className:(0,a.default)(l,n),style:r},o)},v=({prefixCls:e,className:l,width:n,style:r})=>t.createElement("h3",{className:(0,a.default)(e,l),style:Object.assign({width:n},r)});function y(e){return e&&"object"==typeof e?e:{}}let O=e=>{let{prefixCls:n,loading:i,className:o,rootClassName:s,style:d,children:c,avatar:u=!1,title:g=!0,paragraph:m=!0,active:b,round:f}=e,{getPrefixCls:p,direction:O,className:j,style:x}=(0,l.useComponentConfig)("skeleton"),w=p("skeleton",n),[C,S,k]=h(w);if(i||!("loading"in e)){let e,l,n=!!u,i=!!g,c=!!m;if(n){let a=Object.assign(Object.assign({prefixCls:`${w}-avatar`},i&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),y(u));e=t.createElement("div",{className:`${w}-header`},t.createElement(r,Object.assign({},a)))}if(i||c){let e,a;if(i){let a=Object.assign(Object.assign({prefixCls:`${w}-title`},!n&&c?{width:"38%"}:n&&c?{width:"50%"}:{}),y(g));e=t.createElement(v,Object.assign({},a))}if(c){let e,l=Object.assign(Object.assign({prefixCls:`${w}-paragraph`},(e={},n&&i||(e.width="61%"),!n&&i?e.rows=3:e.rows=2,e)),y(m));a=t.createElement($,Object.assign({},l))}l=t.createElement("div",{className:`${w}-content`},e,a)}let p=(0,a.default)(w,{[`${w}-with-avatar`]:n,[`${w}-active`]:b,[`${w}-rtl`]:"rtl"===O,[`${w}-round`]:f},j,o,s,S,k);return C(t.createElement("div",{className:p,style:Object.assign(Object.assign({},x),d)},e,l))}return null!=c?c:null};O.Button=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:g}=t.useContext(l.ConfigContext),m=g("skeleton",i),[b,f,p]=h(m),$=(0,n.default)(e,["prefixCls"]),v=(0,a.default)(m,`${m}-element`,{[`${m}-active`]:d,[`${m}-block`]:c},o,s,f,p);return b(t.createElement("div",{className:v},t.createElement(r,Object.assign({prefixCls:`${m}-button`,size:u},$))))},O.Avatar=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:g}=t.useContext(l.ConfigContext),m=g("skeleton",i),[b,f,p]=h(m),$=(0,n.default)(e,["prefixCls","className"]),v=(0,a.default)(m,`${m}-element`,{[`${m}-active`]:d},o,s,f,p);return b(t.createElement("div",{className:v},t.createElement(r,Object.assign({prefixCls:`${m}-avatar`,shape:c,size:u},$))))},O.Input=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:g}=t.useContext(l.ConfigContext),m=g("skeleton",i),[b,f,p]=h(m),$=(0,n.default)(e,["prefixCls"]),v=(0,a.default)(m,`${m}-element`,{[`${m}-active`]:d,[`${m}-block`]:c},o,s,f,p);return b(t.createElement("div",{className:v},t.createElement(r,Object.assign({prefixCls:`${m}-input`,size:u},$))))},O.Image=e=>{let{prefixCls:n,className:r,rootClassName:i,style:o,active:s}=e,{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("skeleton",n),[u,g,m]=h(c),b=(0,a.default)(c,`${c}-element`,{[`${c}-active`]:s},r,i,g,m);return u(t.createElement("div",{className:b},t.createElement("div",{className:(0,a.default)(`${c}-image`,r),style:o},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${c}-image-path`})))))},O.Node=e=>{let{prefixCls:n,className:r,rootClassName:i,style:o,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(l.ConfigContext),u=c("skeleton",n),[g,m,b]=h(u),f=(0,a.default)(u,`${u}-element`,{[`${u}-active`]:s},m,r,i,b);return g(t.createElement("div",{className:f},t.createElement("div",{className:(0,a.default)(`${u}-image`,r),style:o},d)))},e.s(["default",0,O],185793)},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={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"};var n=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["default",0,r],959013)},269200,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let n=(0,e.i(673706).makeClassName)("Table"),r=a.default.forwardRef((e,r)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return a.default.createElement("div",{className:(0,l.tremorTwMerge)(n("root"),"overflow-auto",o)},a.default.createElement("table",Object.assign({ref:r,className:(0,l.tremorTwMerge)(n("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});r.displayName="Table",e.s(["Table",()=>r],269200)},427612,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let n=(0,e.i(673706).makeClassName)("TableHead"),r=a.default.forwardRef((e,r)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("thead",Object.assign({ref:r,className:(0,l.tremorTwMerge)(n("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",o)},s),i))});r.displayName="TableHead",e.s(["TableHead",()=>r],427612)},64848,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let n=(0,e.i(673706).makeClassName)("TableHeaderCell"),r=a.default.forwardRef((e,r)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("th",Object.assign({ref:r,className:(0,l.tremorTwMerge)(n("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",o)},s),i))});r.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>r],64848)},942232,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let n=(0,e.i(673706).makeClassName)("TableBody"),r=a.default.forwardRef((e,r)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("tbody",Object.assign({ref:r,className:(0,l.tremorTwMerge)(n("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",o)},s),i))});r.displayName="TableBody",e.s(["TableBody",()=>r],942232)},496020,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let n=(0,e.i(673706).makeClassName)("TableRow"),r=a.default.forwardRef((e,r)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("tr",Object.assign({ref:r,className:(0,l.tremorTwMerge)(n("row"),o)},s),i))});r.displayName="TableRow",e.s(["TableRow",()=>r],496020)},977572,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let n=(0,e.i(673706).makeClassName)("TableCell"),r=a.default.forwardRef((e,r)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("td",Object.assign({ref:r,className:(0,l.tremorTwMerge)(n("root"),"align-middle whitespace-nowrap text-left p-4",o)},s),i))});r.displayName="TableCell",e.s(["TableCell",()=>r],977572)},68155,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.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:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,a],68155)},278587,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.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:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,a],278587)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/310235aee9719cda.js b/litellm/proxy/_experimental/out/_next/static/chunks/310235aee9719cda.js deleted file mode 100644 index ee8163f466..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/310235aee9719cda.js +++ /dev/null @@ -1,420 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,755151,e=>{"use strict";var t=e.i(247153);e.s(["DownOutlined",()=>t.default])},916925,e=>{"use strict";var t,a=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",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.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t);let i={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},o="../ui/assets/logos/",r={"A2A Agent":`${o}a2a_agent.png`,Ai21:`${o}ai21.svg`,"Ai21 Chat":`${o}ai21.svg`,"AI/ML API":`${o}aiml_api.svg`,"Aiohttp Openai":`${o}openai_small.svg`,Anthropic:`${o}anthropic.svg`,"Anthropic Text":`${o}anthropic.svg`,AssemblyAI:`${o}assemblyai_small.png`,Azure:`${o}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${o}microsoft_azure.svg`,"Azure Text":`${o}microsoft_azure.svg`,Baseten:`${o}baseten.svg`,"Amazon Bedrock":`${o}bedrock.svg`,"Amazon Bedrock Mantle":`${o}bedrock.svg`,"AWS SageMaker":`${o}bedrock.svg`,Cerebras:`${o}cerebras.svg`,Cloudflare:`${o}cloudflare.svg`,Codestral:`${o}mistral.svg`,Cohere:`${o}cohere.svg`,"Cohere Chat":`${o}cohere.svg`,Cometapi:`${o}cometapi.svg`,Cursor:`${o}cursor.svg`,"Databricks (Qwen API)":`${o}databricks.svg`,Dashscope:`${o}dashscope.svg`,Deepseek:`${o}deepseek.svg`,Deepgram:`${o}deepgram.png`,DeepInfra:`${o}deepinfra.png`,ElevenLabs:`${o}elevenlabs.png`,"Fal AI":`${o}fal_ai.jpg`,"Featherless Ai":`${o}featherless.svg`,"Fireworks AI":`${o}fireworks.svg`,Friendliai:`${o}friendli.svg`,"Github Copilot":`${o}github_copilot.svg`,"Google AI Studio":`${o}google.svg`,GradientAI:`${o}gradientai.svg`,Groq:`${o}groq.svg`,vllm:`${o}vllm.png`,Huggingface:`${o}huggingface.svg`,Hyperbolic:`${o}hyperbolic.svg`,Infinity:`${o}infinity.png`,"Jina AI":`${o}jina.png`,"Lambda Ai":`${o}lambda.svg`,"Lm Studio":`${o}lmstudio.svg`,"Meta Llama":`${o}meta_llama.svg`,MiniMax:`${o}minimax.svg`,"Mistral AI":`${o}mistral.svg`,Moonshot:`${o}moonshot.svg`,Morph:`${o}morph.svg`,Nebius:`${o}nebius.svg`,Novita:`${o}novita.svg`,"Nvidia Nim":`${o}nvidia_nim.svg`,Ollama:`${o}ollama.svg`,"Ollama Chat":`${o}ollama.svg`,Oobabooga:`${o}openai_small.svg`,OpenAI:`${o}openai_small.svg`,"Openai Like":`${o}openai_small.svg`,"OpenAI Text Completion":`${o}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${o}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${o}openai_small.svg`,Openrouter:`${o}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${o}oracle.svg`,Perplexity:`${o}perplexity-ai.svg`,Recraft:`${o}recraft.svg`,Replicate:`${o}replicate.svg`,RunwayML:`${o}runwayml.png`,Sagemaker:`${o}bedrock.svg`,Sambanova:`${o}sambanova.svg`,"SAP Generative AI Hub":`${o}sap.png`,Snowflake:`${o}snowflake.svg`,"Text-Completion-Codestral":`${o}mistral.svg`,TogetherAI:`${o}togetherai.svg`,Topaz:`${o}topaz.svg`,Triton:`${o}nvidia_triton.png`,V0:`${o}v0.svg`,"Vercel Ai Gateway":`${o}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${o}google.svg`,"Vertex Ai Beta":`${o}google.svg`,Vllm:`${o}vllm.png`,VolcEngine:`${o}volcengine.png`,"Voyage AI":`${o}voyage.webp`,Watsonx:`${o}watsonx.svg`,"Watsonx Text":`${o}watsonx.svg`,xAI:`${o}xai.svg`,Xinference:`${o}xinference.svg`};e.s(["Providers",()=>a,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"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 if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:r[e],displayName:e}}let t=Object.keys(i).find(t=>i[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let o=a[t];return{logo:r[o],displayName:o}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let a=i[e];console.log(`Provider mapped to: ${a}`);let o=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let i=t.litellm_provider;(i===a||"string"==typeof i&&i.includes(a))&&o.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&o.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&o.push(e)}))),o},"providerLogoMap",0,r,"provider_map",0,i])},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",()=>t])},115571,e=>{"use strict";let t="local-storage-change";function a(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))}function i(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}}function o(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}function r(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}}e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",()=>a,"getLocalStorageItem",()=>i,"removeLocalStorageItem",()=>r,"setLocalStorageItem",()=>o])},371401,e=>{"use strict";var t=e.i(115571),a=e.i(271645);function i(e){let a=t=>{"disableUsageIndicator"===t.key&&e()},i=t=>{let{key:a}=t.detail;"disableUsageIndicator"===a&&e()};return window.addEventListener("storage",a),window.addEventListener(t.LOCAL_STORAGE_EVENT,i),()=>{window.removeEventListener("storage",a),window.removeEventListener(t.LOCAL_STORAGE_EVENT,i)}}function o(){return"true"===(0,t.getLocalStorageItem)("disableUsageIndicator")}function r(){return(0,a.useSyncExternalStore)(i,o)}e.s(["useDisableUsageIndicator",()=>r])},275144,e=>{"use strict";var t=e.i(843476),a=e.i(271645),i=e.i(764205);let o=(0,a.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:r})=>{let[n,s]=(0,a.useState)(null),[l,c]=(0,a.useState)(null);return(0,a.useEffect)(()=>{(async()=>{try{let e=(0,i.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",a=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(a.ok){let e=await a.json();e.values?.logo_url&&s(e.values.logo_url),e.values?.favicon_url&&c(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,a.useEffect)(()=>{if(l){let e=document.querySelectorAll("link[rel*='icon']");if(e.length>0)e.forEach(e=>{e.href=l});else{let e=document.createElement("link");e.rel="icon",e.href=l,document.head.appendChild(e)}}},[l]),(0,t.jsx)(o.Provider,{value:{logoUrl:n,setLogoUrl:s,faviconUrl:l,setFaviconUrl:c},children:e})},"useTheme",0,()=>{let e=(0,a.useContext)(o);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},295320,283713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var o=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(o.default,(0,t.default)({},e,{ref:r,icon:i}))});e.s(["CloudServerOutlined",0,r],295320);var n=e.i(764205),s=e.i(612256);let l="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,s.useUIConfig)(),t=e?.is_control_plane??!1,i=e?.workers??[],[o,r]=(0,a.useState)(()=>localStorage.getItem(l));(0,a.useEffect)(()=>{if(!o||0===i.length)return;let e=i.find(e=>e.worker_id===o);e&&(0,n.switchToWorkerUrl)(e.url)},[o,i]);let c=i.find(e=>e.worker_id===o)??null,p=(0,a.useCallback)(e=>{let t=i.find(t=>t.worker_id===e);t&&(r(e),localStorage.setItem(l,e),(0,n.switchToWorkerUrl)(t.url))},[i]);return{isControlPlane:t,workers:i,selectedWorkerId:o,selectedWorker:c,selectWorker:p,disconnectFromWorker:(0,a.useCallback)(()=>{r(null),localStorage.removeItem(l),(0,n.switchToWorkerUrl)(null)},[])}}],283713)},44121,186515,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var o=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(o.default,(0,t.default)({},e,{ref:r,icon:i}))});e.s(["MenuFoldOutlined",0,r],44121);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var s=a.forwardRef(function(e,i){return a.createElement(o.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["MenuUnfoldOutlined",0,s],186515)},818581,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useMergedRef",{enumerable:!0,get:function(){return o}});let i=e.r(271645);function o(e,t){let a=(0,i.useRef)(null),o=(0,i.useRef)(null);return(0,i.useCallback)(i=>{if(null===i){let e=a.current;e&&(a.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(a.current=r(e,i)),t&&(o.current=r(t,i))},[e,t])}function r(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let a=e(t);return"function"==typeof a?a:()=>e(null)}}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},62478,e=>{"use strict";var t=e.i(764205);let a=async e=>{if(!e)return null;try{return await (0,t.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};e.s(["fetchProxySettings",0,a])},602073,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"};var o=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(o.default,(0,t.default)({},e,{ref:r,icon:i}))});e.s(["SafetyOutlined",0,r],602073)},190272,785913,e=>{"use strict";var t,a,i=((t={}).AUDIO_SPEECH="audio_speech",t.AUDIO_TRANSCRIPTION="audio_transcription",t.IMAGE_GENERATION="image_generation",t.VIDEO_GENERATION="video_generation",t.CHAT="chat",t.RESPONSES="responses",t.IMAGE_EDITS="image_edits",t.ANTHROPIC_MESSAGES="anthropic_messages",t.EMBEDDING="embedding",t),o=((a={}).IMAGE="image",a.VIDEO="video",a.CHAT="chat",a.RESPONSES="responses",a.IMAGE_EDITS="image_edits",a.ANTHROPIC_MESSAGES="anthropic_messages",a.EMBEDDINGS="embeddings",a.SPEECH="speech",a.TRANSCRIPTION="transcription",a.A2A_AGENTS="a2a_agents",a.MCP="mcp",a.REALTIME="realtime",a);let r={image_generation:"image",video_generation:"video",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages",audio_speech:"speech",audio_transcription:"transcription",embedding:"embeddings"};e.s(["EndpointType",()=>o,"getEndpointType",0,e=>{if(console.log("getEndpointType:",e),Object.values(i).includes(e)){let t=r[e];return console.log("endpointType:",t),t}return"chat"}],785913),e.s(["generateCodeSnippet",0,e=>{let t,{apiKeySource:a,accessToken:i,apiKey:r,inputMessage:n,chatHistory:s,selectedTags:l,selectedVectorStores:c,selectedGuardrails:p,selectedPolicies:m,selectedMCPServers:g,mcpServers:u,mcpServerToolRestrictions:d,selectedVoice:_,endpointType:f,selectedModel:h,selectedSdk:A,proxySettings:v}=e,b="session"===a?i:r,I=window.location.origin,E=v?.LITELLM_UI_API_DOC_BASE_URL;E&&E.trim()?I=E:v?.PROXY_BASE_URL&&(I=v.PROXY_BASE_URL);let x=n||"Your prompt here",O=x.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),T=s.filter(e=>!e.isImage).map(({role:e,content:t})=>({role:e,content:t})),w={};l.length>0&&(w.tags=l),c.length>0&&(w.vector_stores=c),p.length>0&&(w.guardrails=p),m.length>0&&(w.policies=m);let y=h||"your-model-name",C="azure"===A?`import openai - -client = openai.AzureOpenAI( - api_key="${b||"YOUR_LITELLM_API_KEY"}", - azure_endpoint="${I}", - api_version="2024-02-01" -)`:`import openai - -client = openai.OpenAI( - api_key="${b||"YOUR_LITELLM_API_KEY"}", - base_url="${I}" -)`;switch(f){case o.CHAT:{let e=Object.keys(w).length>0,a="";if(e){let e=JSON.stringify({metadata:w},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();a=`, - extra_body=${e}`}let i=T.length>0?T:[{role:"user",content:x}];t=` -import base64 - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Example with text only -response = client.chat.completions.create( - model="${y}", - messages=${JSON.stringify(i,null,4)}${a} -) - -print(response) - -# Example with image or PDF (uncomment and provide file path to use) -# base64_file = encode_image("path/to/your/file.jpg") # or .pdf -# response_with_file = client.chat.completions.create( -# model="${y}", -# messages=[ -# { -# "role": "user", -# "content": [ -# { -# "type": "text", -# "text": "${O}" -# }, -# { -# "type": "image_url", -# "image_url": { -# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file} -# } -# } -# ] -# } -# ]${a} -# ) -# print(response_with_file) -`;break}case o.RESPONSES:{let e=Object.keys(w).length>0,a="";if(e){let e=JSON.stringify({metadata:w},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();a=`, - extra_body=${e}`}let i=T.length>0?T:[{role:"user",content:x}];t=` -import base64 - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Example with text only -response = client.responses.create( - model="${y}", - input=${JSON.stringify(i,null,4)}${a} -) - -print(response.output_text) - -# Example with image or PDF (uncomment and provide file path to use) -# base64_file = encode_image("path/to/your/file.jpg") # or .pdf -# response_with_file = client.responses.create( -# model="${y}", -# input=[ -# { -# "role": "user", -# "content": [ -# {"type": "input_text", "text": "${O}"}, -# { -# "type": "input_image", -# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file} -# }, -# ], -# } -# ]${a} -# ) -# print(response_with_file.output_text) -`;break}case o.IMAGE:t="azure"===A?` -# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI. -# This snippet uses 'client.images.generate' and will create a new image based on your prompt. -# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context. -import os -import requests -import json -import time -from PIL import Image - -result = client.images.generate( - model="${y}", - prompt="${n}", - n=1 -) - -json_response = json.loads(result.model_dump_json()) - -# Set the directory for the stored image -image_dir = os.path.join(os.curdir, 'images') - -# If the directory doesn't exist, create it -if not os.path.isdir(image_dir): - os.mkdir(image_dir) - -# Initialize the image path -image_filename = f"generated_image_{int(time.time())}.png" -image_path = os.path.join(image_dir, image_filename) - -try: - # Retrieve the generated image - if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"): - image_url = json_response["data"][0]["url"] - generated_image = requests.get(image_url).content - with open(image_path, "wb") as image_file: - image_file.write(generated_image) - - print(f"Image saved to {image_path}") - # Display the image - image = Image.open(image_path) - image.show() - else: - print("Could not find image URL in response.") - print("Full response:", json_response) -except Exception as e: - print(f"An error occurred: {e}") - print("Full response:", json_response) -`:` -import base64 -import os -import time -import json -from PIL import Image -import requests - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Helper function to create a file (simplified for this example) -def create_file(image_path): - # In a real implementation, this would upload the file to OpenAI - # For this example, we'll just return a placeholder ID - return f"file_{os.path.basename(image_path).replace('.', '_')}" - -# The prompt entered by the user -prompt = "${O}" - -# Encode images to base64 -base64_image1 = encode_image("body-lotion.png") -base64_image2 = encode_image("soap.png") - -# Create file IDs -file_id1 = create_file("body-lotion.png") -file_id2 = create_file("incense-kit.png") - -response = client.responses.create( - model="${y}", - input=[ - { - "role": "user", - "content": [ - {"type": "input_text", "text": prompt}, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image1}", - }, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image2}", - }, - { - "type": "input_image", - "file_id": file_id1, - }, - { - "type": "input_image", - "file_id": file_id2, - } - ], - } - ], - tools=[{"type": "image_generation"}], -) - -# Process the response -image_generation_calls = [ - output - for output in response.output - if output.type == "image_generation_call" -] - -image_data = [output.result for output in image_generation_calls] - -if image_data: - image_base64 = image_data[0] - image_filename = f"edited_image_{int(time.time())}.png" - with open(image_filename, "wb") as f: - f.write(base64.b64decode(image_base64)) - print(f"Image saved to {image_filename}") -else: - # If no image is generated, there might be a text response with an explanation - text_response = [output.text for output in response.output if hasattr(output, 'text')] - if text_response: - print("No image generated. Model response:") - print("\\n".join(text_response)) - else: - print("No image data found in response.") - print("Full response for debugging:") - print(response) -`;break;case o.IMAGE_EDITS:t="azure"===A?` -import base64 -import os -import time -import json -from PIL import Image -import requests - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# The prompt entered by the user -prompt = "${O}" - -# Encode images to base64 -base64_image1 = encode_image("body-lotion.png") -base64_image2 = encode_image("soap.png") - -# Create file IDs -file_id1 = create_file("body-lotion.png") -file_id2 = create_file("incense-kit.png") - -response = client.responses.create( - model="${y}", - input=[ - { - "role": "user", - "content": [ - {"type": "input_text", "text": prompt}, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image1}", - }, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image2}", - }, - { - "type": "input_image", - "file_id": file_id1, - }, - { - "type": "input_image", - "file_id": file_id2, - } - ], - } - ], - tools=[{"type": "image_generation"}], -) - -# Process the response -image_generation_calls = [ - output - for output in response.output - if output.type == "image_generation_call" -] - -image_data = [output.result for output in image_generation_calls] - -if image_data: - image_base64 = image_data[0] - image_filename = f"edited_image_{int(time.time())}.png" - with open(image_filename, "wb") as f: - f.write(base64.b64decode(image_base64)) - print(f"Image saved to {image_filename}") -else: - # If no image is generated, there might be a text response with an explanation - text_response = [output.text for output in response.output if hasattr(output, 'text')] - if text_response: - print("No image generated. Model response:") - print("\\n".join(text_response)) - else: - print("No image data found in response.") - print("Full response for debugging:") - print(response) -`:` -import base64 -import os -import time - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Helper function to create a file (simplified for this example) -def create_file(image_path): - # In a real implementation, this would upload the file to OpenAI - # For this example, we'll just return a placeholder ID - return f"file_{os.path.basename(image_path).replace('.', '_')}" - -# The prompt entered by the user -prompt = "${O}" - -# Encode images to base64 -base64_image1 = encode_image("body-lotion.png") -base64_image2 = encode_image("soap.png") - -# Create file IDs -file_id1 = create_file("body-lotion.png") -file_id2 = create_file("incense-kit.png") - -response = client.responses.create( - model="${y}", - input=[ - { - "role": "user", - "content": [ - {"type": "input_text", "text": prompt}, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image1}", - }, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image2}", - }, - { - "type": "input_image", - "file_id": file_id1, - }, - { - "type": "input_image", - "file_id": file_id2, - } - ], - } - ], - tools=[{"type": "image_generation"}], -) - -# Process the response -image_generation_calls = [ - output - for output in response.output - if output.type == "image_generation_call" -] - -image_data = [output.result for output in image_generation_calls] - -if image_data: - image_base64 = image_data[0] - image_filename = f"edited_image_{int(time.time())}.png" - with open(image_filename, "wb") as f: - f.write(base64.b64decode(image_base64)) - print(f"Image saved to {image_filename}") -else: - # If no image is generated, there might be a text response with an explanation - text_response = [output.text for output in response.output if hasattr(output, 'text')] - if text_response: - print("No image generated. Model response:") - print("\\n".join(text_response)) - else: - print("No image data found in response.") - print("Full response for debugging:") - print(response) -`;break;case o.EMBEDDINGS:t=` -response = client.embeddings.create( - input="${n||"Your string here"}", - model="${y}", - encoding_format="base64" # or "float" -) - -print(response.data[0].embedding) -`;break;case o.TRANSCRIPTION:t=` -# Open the audio file -audio_file = open("path/to/your/audio/file.mp3", "rb") - -# Make the transcription request -response = client.audio.transcriptions.create( - model="${y}", - file=audio_file${n?`, - prompt="${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} -) - -print(response.text) -`;break;case o.SPEECH:t=` -# Make the text-to-speech request -response = client.audio.speech.create( - model="${y}", - input="${n||"Your text to convert to speech here"}", - voice="${_}" # Options: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer -) - -# Save the audio to a file -output_filename = "output_speech.mp3" -response.stream_to_file(output_filename) -print(f"Audio saved to {output_filename}") - -# Optional: Customize response format and speed -# response = client.audio.speech.create( -# model="${y}", -# input="${n||"Your text to convert to speech here"}", -# voice="alloy", -# response_format="mp3", # Options: mp3, opus, aac, flac, wav, pcm -# speed=1.0 # Range: 0.25 to 4.0 -# ) -# response.stream_to_file("output_speech.mp3") -`;break;default:t="\n# Code generation for this endpoint is not implemented yet."}return`${C} -${t}`}],190272)},798496,e=>{"use strict";var t=e.i(843476),a=e.i(152990),i=e.i(682830),o=e.i(271645),r=e.i(269200),n=e.i(427612),s=e.i(64848),l=e.i(942232),c=e.i(496020),p=e.i(977572),m=e.i(94629),g=e.i(360820),u=e.i(871943);function d({data:e=[],columns:d,isLoading:_=!1,defaultSorting:f=[],pagination:h,onPaginationChange:A,enablePagination:v=!1,onRowClick:b}){let[I,E]=o.default.useState(f),[x]=o.default.useState("onChange"),[O,T]=o.default.useState({}),[w,y]=o.default.useState({}),C=(0,a.useReactTable)({data:e,columns:d,state:{sorting:I,columnSizing:O,columnVisibility:w,...v&&h?{pagination:h}:{}},columnResizeMode:x,onSortingChange:E,onColumnSizingChange:T,onColumnVisibilityChange:y,...v&&A?{onPaginationChange:A}:{},getCoreRowModel:(0,i.getCoreRowModel)(),getSortedRowModel:(0,i.getSortedRowModel)(),...v?{getPaginationRowModel:(0,i.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(r.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:C.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(n.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(s.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.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,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,a.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(g.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(u.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(m.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.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 ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(l.TableBody,{children:_?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):C.getRowModel().rows.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(c.TableRow,{onClick:()=>b?.(e.original),className:b?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.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,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>d])},771674,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var o=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(o.default,(0,t.default)({},e,{ref:r,icon:i}))});e.s(["UserOutlined",0,r],771674)},948401,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var o=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(o.default,(0,t.default)({},e,{ref:r,icon:i}))});e.s(["MailOutlined",0,r],948401)},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},94629,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.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:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,a],94629)},991124,e=>{"use strict";let t=(0,e.i(475254).default)("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"}]]);e.s(["default",()=>t])},434626,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.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:a},e),t.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"}))});e.s(["ExternalLinkIcon",0,a],434626)},100486,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"};var o=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(o.default,(0,t.default)({},e,{ref:r,icon:i}))});e.s(["CrownOutlined",0,r],100486)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/321168be6521c38b.js b/litellm/proxy/_experimental/out/_next/static/chunks/321168be6521c38b.js deleted file mode 100644 index 738b6b9dcc..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/321168be6521c38b.js +++ /dev/null @@ -1,7 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),o=e.i(673706),n=e.i(271645);let a=n.default.forwardRef((e,a)=>{let{color:i,className:l,children:s}=e;return n.default.createElement("p",{ref:a,className:(0,r.tremorTwMerge)("text-tremor-default",i?(0,o.getColorClassNames)(i,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),l)},s)});a.displayName="Text",e.s(["default",()=>a],936325),e.s(["Text",()=>a],599724)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),o=e.i(271645);let n=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],a=e=>({_s:e,status:n[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,l=(e,t,r,o,n)=>{clearTimeout(o.current);let i=a(e);t(i),r.current=i,n&&n({current:i})};var s=e.i(480731),c=e.i(444755),d=e.i(673706);let u=e=>{var r=(0,t.__rest)(e,[]);return o.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),o.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),o.default.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 m=e.i(95779);let g={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"}},p=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,d.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,d.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,d.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,d.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,d.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,d.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,d.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,d.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,d.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,c.tremorTwMerge)((0,d.getColorClassNames)(t,m.colorPalette.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,d.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,d.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,d.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,d.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},f=(0,d.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:n,needMargin:a,transitionStatus:i})=>{let l=a?r===s.HorizontalPositions.Left?(0,c.tremorTwMerge)("-ml-1","mr-1.5"):(0,c.tremorTwMerge)("-mr-1","ml-1.5"):"",d=(0,c.tremorTwMerge)("w-0 h-0"),m={default:d,entering:d,entered:t,exiting:t,exited:d};return e?o.default.createElement(u,{className:(0,c.tremorTwMerge)(f("icon"),"animate-spin shrink-0",l,m.default,m[i]),style:{transition:"width 150ms"}}):o.default.createElement(n,{className:(0,c.tremorTwMerge)(f("icon"),"shrink-0",t,l)})},h=o.default.forwardRef((e,n)=>{let{icon:u,iconPosition:m=s.HorizontalPositions.Left,size:h=s.Sizes.SM,color:C,variant:v="primary",disabled:x,loading:k=!1,loadingText:y,children:$,tooltip:w,className:S}=e,E=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),N=k||x,O=void 0!==u||k,P=k&&y,j=!(!$&&!P),T=(0,c.tremorTwMerge)(g[h].height,g[h].width),z="light"!==v?(0,c.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",M=p(v,C),I=("light"!==v?{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"}})[h],{tooltipProps:R,getReferenceProps:B}=(0,r.useTooltip)(300),[D,A]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:n,timeout:s,initialEntered:c,mountOnEnter:d,unmountOnExit:u,onStateChange:m}={})=>{let[g,p]=(0,o.useState)(()=>a(c?2:i(d))),f=(0,o.useRef)(g),b=(0,o.useRef)(0),[h,C]="object"==typeof s?[s.enter,s.exit]:[s,s],v=(0,o.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(f.current._s,u);e&&l(e,p,f,b,m)},[m,u]);return[g,(0,o.useCallback)(o=>{let a=e=>{switch(l(e,p,f,b,m),e){case 1:h>=0&&(b.current=((...e)=>setTimeout(...e))(v,h));break;case 4:C>=0&&(b.current=((...e)=>setTimeout(...e))(v,C));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||a(e+1)},0)}},s=f.current.isEnter;"boolean"!=typeof o&&(o=!s),o?s||a(e?+!r:2):s&&a(t?n?3:4:i(u))},[v,m,e,t,r,n,h,C,u]),v]})({timeout:50});return(0,o.useEffect)(()=>{A(k)},[k]),o.default.createElement("button",Object.assign({ref:(0,d.mergeRefs)([n,R.refs.setReference]),className:(0,c.tremorTwMerge)(f("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",z,I.paddingX,I.paddingY,I.fontSize,M.textColor,M.bgColor,M.borderColor,M.hoverBorderColor,N?"opacity-50 cursor-not-allowed":(0,c.tremorTwMerge)(p(v,C).hoverTextColor,p(v,C).hoverBgColor,p(v,C).hoverBorderColor),S),disabled:N},B,E),o.default.createElement(r.default,Object.assign({text:w},R)),O&&m!==s.HorizontalPositions.Right?o.default.createElement(b,{loading:k,iconSize:T,iconPosition:m,Icon:u,transitionStatus:D.status,needMargin:j}):null,P||$?o.default.createElement("span",{className:(0,c.tremorTwMerge)(f("text"),"text-tremor-default whitespace-nowrap")},P?y:$):null,O&&m===s.HorizontalPositions.Right?o.default.createElement(b,{loading:k,iconSize:T,iconPosition:m,Icon:u,transitionStatus:D.status,needMargin:j}):null)});h.displayName="Button",e.s(["Button",()=>h],994388)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(480731),n=e.i(95779),a=e.i(444755),i=e.i(673706);let l=(0,i.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:c="",decorationColor:d,children:u,className:m}=e,g=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,className:(0,a.tremorTwMerge)(l("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",d?(0,i.getColorClassNames)(d,n.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case o.HorizontalPositions.Left:return"border-l-4";case o.VerticalPositions.Top:return"border-t-4";case o.HorizontalPositions.Right:return"border-r-4";case o.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),m)},g),u)});s.displayName="Card",e.s(["Card",()=>s],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),o=e.i(444755),n=e.i(673706),a=e.i(271645);let i=a.default.forwardRef((e,i)=>{let{color:l,children:s,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return a.default.createElement("p",Object.assign({ref:i,className:(0,o.tremorTwMerge)("font-medium text-tremor-title",l?(0,n.getColorClassNames)(l,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},d),s)});i.displayName="Title",e.s(["Title",()=>i],629569)},91874,e=>{"use strict";var t=e.i(931067),r=e.i(209428),o=e.i(211577),n=e.i(392221),a=e.i(703923),i=e.i(343794),l=e.i(914949),s=e.i(271645),c=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],d=(0,s.forwardRef)(function(e,d){var u=e.prefixCls,m=void 0===u?"rc-checkbox":u,g=e.className,p=e.style,f=e.checked,b=e.disabled,h=e.defaultChecked,C=e.type,v=void 0===C?"checkbox":C,x=e.title,k=e.onChange,y=(0,a.default)(e,c),$=(0,s.useRef)(null),w=(0,s.useRef)(null),S=(0,l.default)(void 0!==h&&h,{value:f}),E=(0,n.default)(S,2),N=E[0],O=E[1];(0,s.useImperativeHandle)(d,function(){return{focus:function(e){var t;null==(t=$.current)||t.focus(e)},blur:function(){var e;null==(e=$.current)||e.blur()},input:$.current,nativeElement:w.current}});var P=(0,i.default)(m,g,(0,o.default)((0,o.default)({},"".concat(m,"-checked"),N),"".concat(m,"-disabled"),b));return s.createElement("span",{className:P,title:x,style:p,ref:w},s.createElement("input",(0,t.default)({},y,{className:"".concat(m,"-input"),ref:$,onChange:function(t){b||("checked"in e||O(t.target.checked),null==k||k({target:(0,r.default)((0,r.default)({},e),{},{type:v,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:b,checked:!!N,type:v})),s.createElement("span",{className:"".concat(m,"-inner")}))});e.s(["default",0,d])},421512,236836,e=>{"use strict";let t=e.i(271645).default.createContext(null);e.s(["default",0,t],421512),e.i(296059);var r=e.i(915654),o=e.i(183293),n=e.i(246422),a=e.i(838378);function i(e,t){return(e=>{let{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,o.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},(0,o.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,o.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,o.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,r.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,r.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[` - ${n}:not(${n}-disabled), - ${t}:not(${t}-disabled) - `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[` - ${n}-checked:not(${n}-disabled), - ${t}-checked:not(${t}-disabled) - `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,a.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let l=(0,n.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[i(t,e)]);e.s(["default",0,l,"getStyle",()=>i],236836)},681216,e=>{"use strict";var t=e.i(271645),r=e.i(963188);function o(e){let o=t.default.useRef(null),n=()=>{r.default.cancel(o.current),o.current=null};return[()=>{n(),o.current=(0,r.default)(()=>{o.current=null})},t=>{o.current&&(t.stopPropagation(),n()),null==e||e(t)}]}e.s(["default",()=>o])},374276,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(91874),n=e.i(611935),a=e.i(121872),i=e.i(26905),l=e.i(242064),s=e.i(937328),c=e.i(321883),d=e.i(62139),u=e.i(421512),m=e.i(236836),g=e.i(681216),p=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let f=t.forwardRef((e,f)=>{var b;let{prefixCls:h,className:C,rootClassName:v,children:x,indeterminate:k=!1,style:y,onMouseEnter:$,onMouseLeave:w,skipGroup:S=!1,disabled:E}=e,N=p(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:O,direction:P,checkbox:j}=t.useContext(l.ConfigContext),T=t.useContext(u.default),{isFormItemInput:z}=t.useContext(d.FormItemInputContext),M=t.useContext(s.default),I=null!=(b=(null==T?void 0:T.disabled)||E)?b:M,R=t.useRef(N.value),B=t.useRef(null),D=(0,n.composeRef)(f,B);t.useEffect(()=>{null==T||T.registerValue(N.value)},[]),t.useEffect(()=>{if(!S)return N.value!==R.current&&(null==T||T.cancelValue(R.current),null==T||T.registerValue(N.value),R.current=N.value),()=>null==T?void 0:T.cancelValue(N.value)},[N.value]),t.useEffect(()=>{var e;(null==(e=B.current)?void 0:e.input)&&(B.current.input.indeterminate=k)},[k]);let A=O("checkbox",h),X=(0,c.default)(A),[W,L,_]=(0,m.default)(A,X),H=Object.assign({},N);T&&!S&&(H.onChange=(...e)=>{N.onChange&&N.onChange.apply(N,e),T.toggleOption&&T.toggleOption({label:x,value:N.value})},H.name=T.name,H.checked=T.value.includes(N.value));let F=(0,r.default)(`${A}-wrapper`,{[`${A}-rtl`]:"rtl"===P,[`${A}-wrapper-checked`]:H.checked,[`${A}-wrapper-disabled`]:I,[`${A}-wrapper-in-form-item`]:z},null==j?void 0:j.className,C,v,_,X,L),Y=(0,r.default)({[`${A}-indeterminate`]:k},i.TARGET_CLS,L),[q,V]=(0,g.default)(H.onClick);return W(t.createElement(a.default,{component:"Checkbox",disabled:I},t.createElement("label",{className:F,style:Object.assign(Object.assign({},null==j?void 0:j.style),y),onMouseEnter:$,onMouseLeave:w,onClick:q},t.createElement(o.default,Object.assign({},H,{onClick:V,prefixCls:A,className:Y,disabled:I,ref:D})),null!=x&&t.createElement("span",{className:`${A}-label`},x))))});var b=e.i(8211),h=e.i(529681),C=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let v=t.forwardRef((e,o)=>{let{defaultValue:n,children:a,options:i=[],prefixCls:s,className:d,rootClassName:g,style:p,onChange:v}=e,x=C(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:k,direction:y}=t.useContext(l.ConfigContext),[$,w]=t.useState(x.value||n||[]),[S,E]=t.useState([]);t.useEffect(()=>{"value"in x&&w(x.value||[])},[x.value]);let N=t.useMemo(()=>i.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[i]),O=e=>{E(t=>t.filter(t=>t!==e))},P=e=>{E(t=>[].concat((0,b.default)(t),[e]))},j=e=>{let t=$.indexOf(e.value),r=(0,b.default)($);-1===t?r.push(e.value):r.splice(t,1),"value"in x||w(r),null==v||v(r.filter(e=>S.includes(e)).sort((e,t)=>N.findIndex(t=>t.value===e)-N.findIndex(e=>e.value===t)))},T=k("checkbox",s),z=`${T}-group`,M=(0,c.default)(T),[I,R,B]=(0,m.default)(T,M),D=(0,h.default)(x,["value","disabled"]),A=i.length?N.map(e=>t.createElement(f,{prefixCls:T,key:e.value.toString(),disabled:"disabled"in e?e.disabled:x.disabled,value:e.value,checked:$.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${z}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):a,X=t.useMemo(()=>({toggleOption:j,value:$,disabled:x.disabled,name:x.name,registerValue:P,cancelValue:O}),[j,$,x.disabled,x.name,P,O]),W=(0,r.default)(z,{[`${z}-rtl`]:"rtl"===y},d,g,B,M,R);return I(t.createElement("div",Object.assign({className:W,style:p},D,{ref:o}),t.createElement(u.default.Provider,{value:X},A)))});f.Group=v,f.__ANT_CHECKBOX=!0,e.s(["default",0,f],374276)},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var r=e.i(135551),o=e.i(201072),n=e.i(121229),a=e.i(726289),i=e.i(864517),l=e.i(343794),s=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),m=e.i(703923),g={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},p=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),o=!1;e.current.forEach(function(e){if(e){o=!0;var n=e.style;n.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(n.transitionDuration="0s, 0s")}}),o&&(r.current=Date.now())}),e.current},f=e.i(410160),b=e.i(392221),h=e.i(654310),C=0,v=(0,h.default)();let x=function(e){var r=t.useState(),o=(0,b.default)(r,2),n=o[0],a=o[1];return t.useEffect(function(){var e;a("rc_progress_".concat((v?(e=C,C+=1):e="TEST_OR_SSR",e)))},[]),e||n};var k=function(e){var r=e.bg,o=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},o)};function y(e,t){return Object.keys(e).map(function(r){var o=parseFloat(r),n="".concat(Math.floor(o*t),"%");return"".concat(e[r]," ").concat(n)})}var $=t.forwardRef(function(e,r){var o=e.prefixCls,n=e.color,a=e.gradientId,i=e.radius,l=e.style,s=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,m=e.gapDegree,g=n&&"object"===(0,f.default)(n),p=u/2,b=t.createElement("circle",{className:"".concat(o,"-circle-path"),r:i,cx:p,cy:p,stroke:g?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==s),style:l,ref:r});if(!g)return b;var h="".concat(a,"-conic"),C=y(n,(360-m)/360),v=y(n,1),x="conic-gradient(from ".concat(m?"".concat(180+m/2,"deg"):"0deg",", ").concat(C.join(", "),")"),$="linear-gradient(to ".concat(m?"bottom":"top",", ").concat(v.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:h},b),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(h,")")},t.createElement(k,{bg:$},t.createElement(k,{bg:x}))))}),w=function(e,t,r,o,n,a,i,l,s,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-o)/100*t;return"round"===s&&100!==o&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof l?l:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(n+r/100*360*((360-a)/360)+(0===a?0:({bottom:0,top:180,left:90,right:-90})[i]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},S=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function E(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let N=function(e){var r,o,n,a,i=(0,u.default)((0,u.default)({},g),e),s=i.id,c=i.prefixCls,b=i.steps,h=i.strokeWidth,C=i.trailWidth,v=i.gapDegree,k=void 0===v?0:v,y=i.gapPosition,N=i.trailColor,O=i.strokeLinecap,P=i.style,j=i.className,T=i.strokeColor,z=i.percent,M=(0,m.default)(i,S),I=x(s),R="".concat(I,"-gradient"),B=50-h/2,D=2*Math.PI*B,A=k>0?90+k/2:-90,X=(360-k)/360*D,W="object"===(0,f.default)(b)?b:{count:b,gap:2},L=W.count,_=W.gap,H=E(z),F=E(T),Y=F.find(function(e){return e&&"object"===(0,f.default)(e)}),q=Y&&"object"===(0,f.default)(Y)?"butt":O,V=w(D,X,0,100,A,k,y,N,q,h),G=p();return t.createElement("svg",(0,d.default)({className:(0,l.default)("".concat(c,"-circle"),j),viewBox:"0 0 ".concat(100," ").concat(100),style:P,id:s,role:"presentation"},M),!L&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:B,cx:50,cy:50,stroke:N,strokeLinecap:q,strokeWidth:C||h,style:V}),L?(r=Math.round(L*(H[0]/100)),o=100/L,n=0,Array(L).fill(null).map(function(e,a){var i=a<=r-1?F[0]:N,l=i&&"object"===(0,f.default)(i)?"url(#".concat(R,")"):void 0,s=w(D,X,n,o,A,k,y,i,"butt",h,_);return n+=(X-s.strokeDashoffset+_)*100/X,t.createElement("circle",{key:a,className:"".concat(c,"-circle-path"),r:B,cx:50,cy:50,stroke:l,strokeWidth:h,opacity:1,style:s,ref:function(e){G[a]=e}})})):(a=0,H.map(function(e,r){var o=F[r]||F[F.length-1],n=w(D,X,a,e,A,k,y,o,q,h);return a+=e,t.createElement($,{key:r,color:o,ptg:e,radius:B,prefixCls:c,gradientId:R,style:n,strokeLinecap:q,strokeWidth:h,gapDegree:k,ref:function(e){G[r]=e},size:100})}).reverse()))};var O=e.i(491816);e.i(765846);var P=e.i(896091);function j(e){return!e||e<0?0:e>100?100:e}function T({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let z=(e,t,r)=>{var o,n,a,i;let l=-1,s=-1;if("step"===t){let t=r.steps,o=r.strokeWidth;"string"==typeof e||void 0===e?(l="small"===e?2:14,s=null!=o?o:8):"number"==typeof e?[l,s]=[e,e]:[l=14,s=8]=Array.isArray(e)?e:[e.width,e.height],l*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?s=t||("small"===e?6:8):"number"==typeof e?[l,s]=[e,e]:[l=-1,s=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[l,s]="small"===e?[60,60]:[120,120]:"number"==typeof e?[l,s]=[e,e]:Array.isArray(e)&&(l=null!=(n=null!=(o=e[0])?o:e[1])?n:120,s=null!=(i=null!=(a=e[0])?a:e[1])?i:120));return[l,s]},M=e=>{let{prefixCls:r,trailColor:o=null,strokeLinecap:n="round",gapPosition:a,gapDegree:i,width:s=120,type:c,children:d,success:u,size:m=s,steps:g}=e,[p,f]=z(m,"circle"),{strokeWidth:b}=e;void 0===b&&(b=Math.max(3/p*100,6));let h=t.useMemo(()=>i||0===i?i:"dashboard"===c?75:void 0,[i,c]),C=(({percent:e,success:t,successPercent:r})=>{let o=j(T({success:t,successPercent:r}));return[o,j(j(e)-o)]})(e),v="[object Object]"===Object.prototype.toString.call(e.strokeColor),x=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||P.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),k=(0,l.default)(`${r}-inner`,{[`${r}-circle-gradient`]:v}),y=t.createElement(N,{steps:g,percent:g?C[1]:C,strokeWidth:b,trailWidth:b,strokeColor:g?x[1]:x,strokeLinecap:n,trailColor:o,prefixCls:r,gapDegree:h,gapPosition:a||"dashboard"===c&&"bottom"||void 0}),$=p<=20,w=t.createElement("div",{className:k,style:{width:p,height:f,fontSize:.15*p+6}},y,!$&&d);return $?t.createElement(O.default,{title:d},w):w};e.i(296059);var I=e.i(694758),R=e.i(915654),B=e.i(183293),D=e.i(246422),A=e.i(838378);let X="--progress-line-stroke-color",W="--progress-percent",L=e=>{let t=e?"100%":"-100%";return new I.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},_=(0,D.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,A.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,B.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${X})`]},height:"100%",width:`calc(1 / var(${W}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,R.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:L(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:L(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var H=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let F=e=>{let{prefixCls:r,direction:o,percent:n,size:a,strokeWidth:i,strokeColor:s,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:m,success:g}=e,{align:p,type:f}=m,b=s&&"string"!=typeof s?((e,t)=>{let{from:r=P.presetPrimaryColors.blue,to:o=P.presetPrimaryColors.blue,direction:n="rtl"===t?"to left":"to right"}=e,a=H(e,["from","to","direction"]);if(0!==Object.keys(a).length){let e,t=(e=[],Object.keys(a).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:a[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${n}, ${t})`;return{background:r,[X]:r}}let i=`linear-gradient(${n}, ${r}, ${o})`;return{background:i,[X]:i}})(s,o):{[X]:s,background:s},h="square"===c||"butt"===c?0:void 0,[C,v]=z(null!=a?a:[-1,i||("small"===a?6:8)],"line",{strokeWidth:i}),x=Object.assign(Object.assign({width:`${j(n)}%`,height:v,borderRadius:h},b),{[W]:j(n)/100}),k=T(e),y={width:`${j(k)}%`,height:v,borderRadius:h,backgroundColor:null==g?void 0:g.strokeColor},$=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:h}},t.createElement("div",{className:(0,l.default)(`${r}-bg`,`${r}-bg-${f}`),style:x},"inner"===f&&d),void 0!==k&&t.createElement("div",{className:`${r}-success-bg`,style:y})),w="outer"===f&&"start"===p,S="outer"===f&&"end"===p;return"outer"===f&&"center"===p?t.createElement("div",{className:`${r}-layout-bottom`},$,d):t.createElement("div",{className:`${r}-outer`,style:{width:C<0?"100%":C}},w&&d,$,S&&d)},Y=e=>{let{size:r,steps:o,rounding:n=Math.round,percent:a=0,strokeWidth:i=8,strokeColor:s,trailColor:c=null,prefixCls:d,children:u}=e,m=n(a/100*o),[g,p]=z(null!=r?r:["small"===r?2:14,i],"step",{steps:o,strokeWidth:i}),f=g/o,b=Array.from({length:o});for(let e=0;et.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let V=["normal","exception","active","success"],G=t.forwardRef((e,d)=>{let u,{prefixCls:m,className:g,rootClassName:p,steps:f,strokeColor:b,percent:h=0,size:C="default",showInfo:v=!0,type:x="line",status:k,format:y,style:$,percentPosition:w={}}=e,S=q(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:E="end",type:N="outer"}=w,O=Array.isArray(b)?b[0]:b,P="string"==typeof b||Array.isArray(b)?b:void 0,I=t.useMemo(()=>{if(O){let e="string"==typeof O?O:Object.values(O)[0];return new r.FastColor(e).isLight()}return!1},[b]),R=t.useMemo(()=>{var t,r;let o=T(e);return Number.parseInt(void 0!==o?null==(t=null!=o?o:0)?void 0:t.toString():null==(r=null!=h?h:0)?void 0:r.toString(),10)},[h,e.success,e.successPercent]),B=t.useMemo(()=>!V.includes(k)&&R>=100?"success":k||"normal",[k,R]),{getPrefixCls:D,direction:A,progress:X}=t.useContext(c.ConfigContext),W=D("progress",m),[L,H,G]=_(W),K="line"===x,U=K&&!f,Q=t.useMemo(()=>{let r;if(!v)return null;let s=T(e),c=y||(e=>`${e}%`),d=K&&I&&"inner"===N;return"inner"===N||y||"exception"!==B&&"success"!==B?r=c(j(h),j(s)):"exception"===B?r=K?t.createElement(a.default,null):t.createElement(i.default,null):"success"===B&&(r=K?t.createElement(o.default,null):t.createElement(n.default,null)),t.createElement("span",{className:(0,l.default)(`${W}-text`,{[`${W}-text-bright`]:d,[`${W}-text-${E}`]:U,[`${W}-text-${N}`]:U}),title:"string"==typeof r?r:void 0},r)},[v,h,R,B,x,W,y]);"line"===x?u=f?t.createElement(Y,Object.assign({},e,{strokeColor:P,prefixCls:W,steps:"object"==typeof f?f.count:f}),Q):t.createElement(F,Object.assign({},e,{strokeColor:O,prefixCls:W,direction:A,percentPosition:{align:E,type:N}}),Q):("circle"===x||"dashboard"===x)&&(u=t.createElement(M,Object.assign({},e,{strokeColor:O,prefixCls:W,progressStatus:B}),Q));let J=(0,l.default)(W,`${W}-status-${B}`,{[`${W}-${"dashboard"===x&&"circle"||x}`]:"line"!==x,[`${W}-inline-circle`]:"circle"===x&&z(C,"circle")[0]<=20,[`${W}-line`]:U,[`${W}-line-align-${E}`]:U,[`${W}-line-position-${N}`]:U,[`${W}-steps`]:f,[`${W}-show-info`]:v,[`${W}-${C}`]:"string"==typeof C,[`${W}-rtl`]:"rtl"===A},null==X?void 0:X.className,g,p,H,G);return L(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==X?void 0:X.style),$),className:J,role:"progressbar","aria-valuenow":R,"aria-valuemin":0,"aria-valuemax":100},(0,s.default)(S,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,G],309821)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/341e7c75250f4f40.js b/litellm/proxy/_experimental/out/_next/static/chunks/341e7c75250f4f40.js new file mode 100644 index 0000000000..80bb268310 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/341e7c75250f4f40.js @@ -0,0 +1,598 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,818581,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useMergedRef",{enumerable:!0,get:function(){return r}});let s=e.r(271645);function r(e,t){let a=(0,s.useRef)(null),r=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=a.current;e&&(a.current=null,e());let t=r.current;t&&(r.current=null,t())}else e&&(a.current=i(e,s)),t&&(r.current=i(t,s))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let a=e(t);return"function"==typeof a?a:()=>e(null)}}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},62478,e=>{"use strict";var t=e.i(764205);let a=async e=>{if(!e)return null;try{return await (0,t.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};e.s(["fetchProxySettings",0,a])},602073,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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"};var r=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(r.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["SafetyOutlined",0,i],602073)},190272,785913,e=>{"use strict";var t,a,s=((t={}).AUDIO_SPEECH="audio_speech",t.AUDIO_TRANSCRIPTION="audio_transcription",t.IMAGE_GENERATION="image_generation",t.VIDEO_GENERATION="video_generation",t.CHAT="chat",t.RESPONSES="responses",t.IMAGE_EDITS="image_edits",t.ANTHROPIC_MESSAGES="anthropic_messages",t.EMBEDDING="embedding",t),r=((a={}).IMAGE="image",a.VIDEO="video",a.CHAT="chat",a.RESPONSES="responses",a.IMAGE_EDITS="image_edits",a.ANTHROPIC_MESSAGES="anthropic_messages",a.EMBEDDINGS="embeddings",a.SPEECH="speech",a.TRANSCRIPTION="transcription",a.A2A_AGENTS="a2a_agents",a.MCP="mcp",a.REALTIME="realtime",a);let i={image_generation:"image",video_generation:"video",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages",audio_speech:"speech",audio_transcription:"transcription",embedding:"embeddings"};e.s(["EndpointType",()=>r,"getEndpointType",0,e=>{if(console.log("getEndpointType:",e),Object.values(s).includes(e)){let t=i[e];return console.log("endpointType:",t),t}return"chat"}],785913),e.s(["generateCodeSnippet",0,e=>{let t,{apiKeySource:a,accessToken:s,apiKey:i,inputMessage:l,chatHistory:n,selectedTags:o,selectedVectorStores:c,selectedGuardrails:d,selectedPolicies:m,selectedMCPServers:p,mcpServers:u,mcpServerToolRestrictions:g,selectedVoice:x,endpointType:h,selectedModel:f,selectedSdk:_,proxySettings:b}=e,y="session"===a?s:i,v=window.location.origin,j=b?.LITELLM_UI_API_DOC_BASE_URL;j&&j.trim()?v=j:b?.PROXY_BASE_URL&&(v=b.PROXY_BASE_URL);let A=l||"Your prompt here",N=A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),T=n.filter(e=>!e.isImage).map(({role:e,content:t})=>({role:e,content:t})),S={};o.length>0&&(S.tags=o),c.length>0&&(S.vector_stores=c),d.length>0&&(S.guardrails=d),m.length>0&&(S.policies=m);let C=f||"your-model-name",w="azure"===_?`import openai + +client = openai.AzureOpenAI( + api_key="${y||"YOUR_LITELLM_API_KEY"}", + azure_endpoint="${v}", + api_version="2024-02-01" +)`:`import openai + +client = openai.OpenAI( + api_key="${y||"YOUR_LITELLM_API_KEY"}", + base_url="${v}" +)`;switch(h){case r.CHAT:{let e=Object.keys(S).length>0,a="";if(e){let e=JSON.stringify({metadata:S},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();a=`, + extra_body=${e}`}let s=T.length>0?T:[{role:"user",content:A}];t=` +import base64 + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Example with text only +response = client.chat.completions.create( + model="${C}", + messages=${JSON.stringify(s,null,4)}${a} +) + +print(response) + +# Example with image or PDF (uncomment and provide file path to use) +# base64_file = encode_image("path/to/your/file.jpg") # or .pdf +# response_with_file = client.chat.completions.create( +# model="${C}", +# messages=[ +# { +# "role": "user", +# "content": [ +# { +# "type": "text", +# "text": "${N}" +# }, +# { +# "type": "image_url", +# "image_url": { +# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file} +# } +# } +# ] +# } +# ]${a} +# ) +# print(response_with_file) +`;break}case r.RESPONSES:{let e=Object.keys(S).length>0,a="";if(e){let e=JSON.stringify({metadata:S},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();a=`, + extra_body=${e}`}let s=T.length>0?T:[{role:"user",content:A}];t=` +import base64 + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Example with text only +response = client.responses.create( + model="${C}", + input=${JSON.stringify(s,null,4)}${a} +) + +print(response.output_text) + +# Example with image or PDF (uncomment and provide file path to use) +# base64_file = encode_image("path/to/your/file.jpg") # or .pdf +# response_with_file = client.responses.create( +# model="${C}", +# input=[ +# { +# "role": "user", +# "content": [ +# {"type": "input_text", "text": "${N}"}, +# { +# "type": "input_image", +# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file} +# }, +# ], +# } +# ]${a} +# ) +# print(response_with_file.output_text) +`;break}case r.IMAGE:t="azure"===_?` +# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI. +# This snippet uses 'client.images.generate' and will create a new image based on your prompt. +# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context. +import os +import requests +import json +import time +from PIL import Image + +result = client.images.generate( + model="${C}", + prompt="${l}", + n=1 +) + +json_response = json.loads(result.model_dump_json()) + +# Set the directory for the stored image +image_dir = os.path.join(os.curdir, 'images') + +# If the directory doesn't exist, create it +if not os.path.isdir(image_dir): + os.mkdir(image_dir) + +# Initialize the image path +image_filename = f"generated_image_{int(time.time())}.png" +image_path = os.path.join(image_dir, image_filename) + +try: + # Retrieve the generated image + if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"): + image_url = json_response["data"][0]["url"] + generated_image = requests.get(image_url).content + with open(image_path, "wb") as image_file: + image_file.write(generated_image) + + print(f"Image saved to {image_path}") + # Display the image + image = Image.open(image_path) + image.show() + else: + print("Could not find image URL in response.") + print("Full response:", json_response) +except Exception as e: + print(f"An error occurred: {e}") + print("Full response:", json_response) +`:` +import base64 +import os +import time +import json +from PIL import Image +import requests + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Helper function to create a file (simplified for this example) +def create_file(image_path): + # In a real implementation, this would upload the file to OpenAI + # For this example, we'll just return a placeholder ID + return f"file_{os.path.basename(image_path).replace('.', '_')}" + +# The prompt entered by the user +prompt = "${N}" + +# Encode images to base64 +base64_image1 = encode_image("body-lotion.png") +base64_image2 = encode_image("soap.png") + +# Create file IDs +file_id1 = create_file("body-lotion.png") +file_id2 = create_file("incense-kit.png") + +response = client.responses.create( + model="${C}", + input=[ + { + "role": "user", + "content": [ + {"type": "input_text", "text": prompt}, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image1}", + }, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image2}", + }, + { + "type": "input_image", + "file_id": file_id1, + }, + { + "type": "input_image", + "file_id": file_id2, + } + ], + } + ], + tools=[{"type": "image_generation"}], +) + +# Process the response +image_generation_calls = [ + output + for output in response.output + if output.type == "image_generation_call" +] + +image_data = [output.result for output in image_generation_calls] + +if image_data: + image_base64 = image_data[0] + image_filename = f"edited_image_{int(time.time())}.png" + with open(image_filename, "wb") as f: + f.write(base64.b64decode(image_base64)) + print(f"Image saved to {image_filename}") +else: + # If no image is generated, there might be a text response with an explanation + text_response = [output.text for output in response.output if hasattr(output, 'text')] + if text_response: + print("No image generated. Model response:") + print("\\n".join(text_response)) + else: + print("No image data found in response.") + print("Full response for debugging:") + print(response) +`;break;case r.IMAGE_EDITS:t="azure"===_?` +import base64 +import os +import time +import json +from PIL import Image +import requests + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# The prompt entered by the user +prompt = "${N}" + +# Encode images to base64 +base64_image1 = encode_image("body-lotion.png") +base64_image2 = encode_image("soap.png") + +# Create file IDs +file_id1 = create_file("body-lotion.png") +file_id2 = create_file("incense-kit.png") + +response = client.responses.create( + model="${C}", + input=[ + { + "role": "user", + "content": [ + {"type": "input_text", "text": prompt}, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image1}", + }, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image2}", + }, + { + "type": "input_image", + "file_id": file_id1, + }, + { + "type": "input_image", + "file_id": file_id2, + } + ], + } + ], + tools=[{"type": "image_generation"}], +) + +# Process the response +image_generation_calls = [ + output + for output in response.output + if output.type == "image_generation_call" +] + +image_data = [output.result for output in image_generation_calls] + +if image_data: + image_base64 = image_data[0] + image_filename = f"edited_image_{int(time.time())}.png" + with open(image_filename, "wb") as f: + f.write(base64.b64decode(image_base64)) + print(f"Image saved to {image_filename}") +else: + # If no image is generated, there might be a text response with an explanation + text_response = [output.text for output in response.output if hasattr(output, 'text')] + if text_response: + print("No image generated. Model response:") + print("\\n".join(text_response)) + else: + print("No image data found in response.") + print("Full response for debugging:") + print(response) +`:` +import base64 +import os +import time + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Helper function to create a file (simplified for this example) +def create_file(image_path): + # In a real implementation, this would upload the file to OpenAI + # For this example, we'll just return a placeholder ID + return f"file_{os.path.basename(image_path).replace('.', '_')}" + +# The prompt entered by the user +prompt = "${N}" + +# Encode images to base64 +base64_image1 = encode_image("body-lotion.png") +base64_image2 = encode_image("soap.png") + +# Create file IDs +file_id1 = create_file("body-lotion.png") +file_id2 = create_file("incense-kit.png") + +response = client.responses.create( + model="${C}", + input=[ + { + "role": "user", + "content": [ + {"type": "input_text", "text": prompt}, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image1}", + }, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image2}", + }, + { + "type": "input_image", + "file_id": file_id1, + }, + { + "type": "input_image", + "file_id": file_id2, + } + ], + } + ], + tools=[{"type": "image_generation"}], +) + +# Process the response +image_generation_calls = [ + output + for output in response.output + if output.type == "image_generation_call" +] + +image_data = [output.result for output in image_generation_calls] + +if image_data: + image_base64 = image_data[0] + image_filename = f"edited_image_{int(time.time())}.png" + with open(image_filename, "wb") as f: + f.write(base64.b64decode(image_base64)) + print(f"Image saved to {image_filename}") +else: + # If no image is generated, there might be a text response with an explanation + text_response = [output.text for output in response.output if hasattr(output, 'text')] + if text_response: + print("No image generated. Model response:") + print("\\n".join(text_response)) + else: + print("No image data found in response.") + print("Full response for debugging:") + print(response) +`;break;case r.EMBEDDINGS:t=` +response = client.embeddings.create( + input="${l||"Your string here"}", + model="${C}", + encoding_format="base64" # or "float" +) + +print(response.data[0].embedding) +`;break;case r.TRANSCRIPTION:t=` +# Open the audio file +audio_file = open("path/to/your/audio/file.mp3", "rb") + +# Make the transcription request +response = client.audio.transcriptions.create( + model="${C}", + file=audio_file${l?`, + prompt="${l.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} +) + +print(response.text) +`;break;case r.SPEECH:t=` +# Make the text-to-speech request +response = client.audio.speech.create( + model="${C}", + input="${l||"Your text to convert to speech here"}", + voice="${x}" # Options: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer +) + +# Save the audio to a file +output_filename = "output_speech.mp3" +response.stream_to_file(output_filename) +print(f"Audio saved to {output_filename}") + +# Optional: Customize response format and speed +# response = client.audio.speech.create( +# model="${C}", +# input="${l||"Your text to convert to speech here"}", +# voice="alloy", +# response_format="mp3", # Options: mp3, opus, aac, flac, wav, pcm +# speed=1.0 # Range: 0.25 to 4.0 +# ) +# response.stream_to_file("output_speech.mp3") +`;break;default:t="\n# Code generation for this endpoint is not implemented yet."}return`${w} +${t}`}],190272)},652272,209261,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(447566),r=e.i(166406),i=e.i(492030),l=e.i(596239);let n=e=>"github"===e.source.source&&e.source.repo?`/plugin marketplace add ${e.source.repo}`:"url"===e.source.source&&e.source.url?`/plugin marketplace add ${e.source.url}`:`/plugin marketplace add ${e.name}`;e.s(["formatInstallCommand",0,n,"getCategoryBadgeColor",0,e=>{if(!e)return"gray";let t=e.toLowerCase();if(t.includes("development")||t.includes("dev"))return"blue";if(t.includes("productivity")||t.includes("workflow"))return"green";if(t.includes("learning")||t.includes("education"))return"purple";if(t.includes("security")||t.includes("safety"))return"red";if(t.includes("data")||t.includes("analytics"))return"orange";else if(t.includes("integration")||t.includes("api"))return"yellow";return"gray"},"isValidEmail",0,e=>!e||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),"isValidSemanticVersion",0,e=>!e||/^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?$/.test(e),"isValidUrl",0,e=>{if(!e)return!0;try{return new URL(e),!0}catch{return!1}},"parseKeywords",0,e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>""!==e):[],"validatePluginName",0,e=>!!e&&""!==e.trim()&&/^[a-z0-9-]+$/.test(e)],209261),e.s(["default",0,({skill:e,onBack:o})=>{let c,[d,m]=(0,a.useState)("overview"),[p,u]=(0,a.useState)(null),g=(e,t)=>{navigator.clipboard.writeText(e),u(t),setTimeout(()=>u(null),2e3)},x="github"===(c=e.source).source&&c.repo?`https://github.com/${c.repo}`:"git-subdir"===c.source&&c.url?c.path?`${c.url}/tree/main/${c.path}`:c.url:"url"===c.source&&c.url?c.url:null,h=n(e),f=[...e.category?[{property:"Category",value:e.category}]:[],...e.domain?[{property:"Domain",value:e.domain}]:[],...e.namespace?[{property:"Namespace",value:e.namespace}]:[],...e.version?[{property:"Version",value:e.version}]:[],...e.author?.name?[{property:"Author",value:e.author.name}]:[],...e.created_at?[{property:"Added",value:new Date(e.created_at).toLocaleDateString()}]:[]];return(0,t.jsxs)("div",{style:{padding:"24px 32px 24px 0"},children:[(0,t.jsxs)("div",{onClick:o,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(s.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:"Skills"})]}),(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name}),e.description&&(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"8px 0 0 0",lineHeight:1.6},children:e.description})]}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28,marginTop:24},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:[{key:"overview",label:"Overview"},{key:"usage",label:"How to Use"}].map(e=>(0,t.jsx)("div",{onClick:()=>m(e.key),style:{padding:"12px 20px",fontSize:14,color:d===e.key?"#1a73e8":"#5f6368",borderBottom:d===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:d===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===d&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Skill Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Metadata registered with this skill"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:160},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:f.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Status"}),(0,t.jsx)("span",{style:{fontSize:12,padding:"3px 10px",borderRadius:12,backgroundColor:e.enabled?"#e6f4ea":"#f1f3f4",color:e.enabled?"#137333":"#5f6368",fontWeight:500},children:e.enabled?"Public":"Draft"})]}),x&&(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Source"}),(0,t.jsxs)("a",{href:x,target:"_blank",rel:"noopener noreferrer",style:{fontSize:13,color:"#1a73e8",wordBreak:"break-all",display:"flex",alignItems:"center",gap:4},children:[x.replace("https://",""),(0,t.jsx)(l.LinkOutlined,{style:{fontSize:11,flexShrink:0}})]})]}),e.keywords&&e.keywords.length>0&&(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.keywords.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Skill ID"}),(0,t.jsx)("div",{style:{fontSize:12,fontFamily:"monospace",color:"#3c4043",wordBreak:"break-all"},children:e.id})]})]})]}),"usage"===d&&(0,t.jsxs)("div",{style:{maxWidth:640},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 8px 0"},children:"Using this skill"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 24px 0",lineHeight:1.6},children:"Once your proxy is set as a marketplace, enable this skill in Claude Code with one command:"}),(0,t.jsxs)("div",{style:{border:"1px solid #dadce0",borderRadius:8,overflow:"hidden",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#3c4043",fontWeight:500},children:"Run in Claude Code"}),(0,t.jsxs)("button",{onClick:()=>g(h,"install"),style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"install"===p?"#137333":"#1a73e8",background:"none",border:"none",cursor:"pointer",padding:0},children:["install"===p?(0,t.jsx)(i.CheckOutlined,{}):(0,t.jsx)(r.CopyOutlined,{}),"install"===p?"Copied":"Copy"]})]}),(0,t.jsx)("pre",{style:{margin:0,padding:"14px 16px",fontSize:14,fontFamily:"monospace",color:"#202124",backgroundColor:"#fff"},children:h})]}),(0,t.jsxs)("p",{style:{fontSize:13,color:"#5f6368",lineHeight:1.6,margin:0},children:["Don't have the marketplace configured yet?"," ",(0,t.jsx)("span",{onClick:()=>m("setup"),style:{color:"#1a73e8",cursor:"pointer"},children:"See one-time setup →"})]})]}),"setup"===d&&(0,t.jsxs)("div",{style:{maxWidth:640},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 8px 0"},children:"One-time marketplace setup"}),(0,t.jsxs)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 24px 0",lineHeight:1.6},children:["Add this to ",(0,t.jsx)("code",{style:{fontSize:13,backgroundColor:"#f1f3f4",padding:"1px 6px",borderRadius:4},children:"~/.claude/settings.json"})," to point Claude Code at your proxy:"]}),(0,t.jsxs)("div",{style:{border:"1px solid #dadce0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#3c4043",fontWeight:500},children:"~/.claude/settings.json"}),(0,t.jsxs)("button",{onClick:()=>{g(JSON.stringify({extraKnownMarketplaces:{"my-org":{source:"url",url:`${window.location.origin}/claude-code/marketplace.json`}}},null,2),"settings")},style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"settings"===p?"#137333":"#1a73e8",background:"none",border:"none",cursor:"pointer",padding:0},children:["settings"===p?(0,t.jsx)(i.CheckOutlined,{}):(0,t.jsx)(r.CopyOutlined,{}),"settings"===p?"Copied":"Copy"]})]}),(0,t.jsx)("pre",{style:{margin:0,padding:"14px 16px",fontSize:13,fontFamily:"monospace",color:"#202124",backgroundColor:"#fff"},children:JSON.stringify({extraKnownMarketplaces:{"my-org":{source:"url",url:`${window.location.origin}/claude-code/marketplace.json`}}},null,2)})]})]})]})}],652272)},115571,e=>{"use strict";let t="local-storage-change";function a(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))}function s(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}}function r(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}function i(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}}e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",()=>a,"getLocalStorageItem",()=>s,"removeLocalStorageItem",()=>i,"setLocalStorageItem",()=>r])},596239,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};var r=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(r.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["LinkOutlined",0,i],596239)},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",()=>t])},916925,e=>{"use strict";var t,a=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",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.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t);let s={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},r="../ui/assets/logos/",i={"A2A Agent":`${r}a2a_agent.png`,Ai21:`${r}ai21.svg`,"Ai21 Chat":`${r}ai21.svg`,"AI/ML API":`${r}aiml_api.svg`,"Aiohttp Openai":`${r}openai_small.svg`,Anthropic:`${r}anthropic.svg`,"Anthropic Text":`${r}anthropic.svg`,AssemblyAI:`${r}assemblyai_small.png`,Azure:`${r}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${r}microsoft_azure.svg`,"Azure Text":`${r}microsoft_azure.svg`,Baseten:`${r}baseten.svg`,"Amazon Bedrock":`${r}bedrock.svg`,"Amazon Bedrock Mantle":`${r}bedrock.svg`,"AWS SageMaker":`${r}bedrock.svg`,Cerebras:`${r}cerebras.svg`,Cloudflare:`${r}cloudflare.svg`,Codestral:`${r}mistral.svg`,Cohere:`${r}cohere.svg`,"Cohere Chat":`${r}cohere.svg`,Cometapi:`${r}cometapi.svg`,Cursor:`${r}cursor.svg`,"Databricks (Qwen API)":`${r}databricks.svg`,Dashscope:`${r}dashscope.svg`,Deepseek:`${r}deepseek.svg`,Deepgram:`${r}deepgram.png`,DeepInfra:`${r}deepinfra.png`,ElevenLabs:`${r}elevenlabs.png`,"Fal AI":`${r}fal_ai.jpg`,"Featherless Ai":`${r}featherless.svg`,"Fireworks AI":`${r}fireworks.svg`,Friendliai:`${r}friendli.svg`,"Github Copilot":`${r}github_copilot.svg`,"Google AI Studio":`${r}google.svg`,GradientAI:`${r}gradientai.svg`,Groq:`${r}groq.svg`,vllm:`${r}vllm.png`,Huggingface:`${r}huggingface.svg`,Hyperbolic:`${r}hyperbolic.svg`,Infinity:`${r}infinity.png`,"Jina AI":`${r}jina.png`,"Lambda Ai":`${r}lambda.svg`,"Lm Studio":`${r}lmstudio.svg`,"Meta Llama":`${r}meta_llama.svg`,MiniMax:`${r}minimax.svg`,"Mistral AI":`${r}mistral.svg`,Moonshot:`${r}moonshot.svg`,Morph:`${r}morph.svg`,Nebius:`${r}nebius.svg`,Novita:`${r}novita.svg`,"Nvidia Nim":`${r}nvidia_nim.svg`,Ollama:`${r}ollama.svg`,"Ollama Chat":`${r}ollama.svg`,Oobabooga:`${r}openai_small.svg`,OpenAI:`${r}openai_small.svg`,"Openai Like":`${r}openai_small.svg`,"OpenAI Text Completion":`${r}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${r}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${r}openai_small.svg`,Openrouter:`${r}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${r}oracle.svg`,Perplexity:`${r}perplexity-ai.svg`,Recraft:`${r}recraft.svg`,Replicate:`${r}replicate.svg`,RunwayML:`${r}runwayml.png`,Sagemaker:`${r}bedrock.svg`,Sambanova:`${r}sambanova.svg`,"SAP Generative AI Hub":`${r}sap.png`,Snowflake:`${r}snowflake.svg`,"Text-Completion-Codestral":`${r}mistral.svg`,TogetherAI:`${r}togetherai.svg`,Topaz:`${r}topaz.svg`,Triton:`${r}nvidia_triton.png`,V0:`${r}v0.svg`,"Vercel Ai Gateway":`${r}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${r}google.svg`,"Vertex Ai Beta":`${r}google.svg`,Vllm:`${r}vllm.png`,VolcEngine:`${r}volcengine.png`,"Voyage AI":`${r}voyage.webp`,Watsonx:`${r}watsonx.svg`,"Watsonx Text":`${r}watsonx.svg`,xAI:`${r}xai.svg`,Xinference:`${r}xinference.svg`};e.s(["Providers",()=>a,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"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 if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let t=Object.keys(s).find(t=>s[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let r=a[t];return{logo:i[r],displayName:r}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let a=s[e];console.log(`Provider mapped to: ${a}`);let r=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let s=t.litellm_provider;(s===a||"string"==typeof s&&s.includes(a))&&r.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&r.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&r.push(e)}))),r},"providerLogoMap",0,i,"provider_map",0,s])},798496,e=>{"use strict";var t=e.i(843476),a=e.i(152990),s=e.i(682830),r=e.i(271645),i=e.i(269200),l=e.i(427612),n=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572),m=e.i(94629),p=e.i(360820),u=e.i(871943);function g({data:e=[],columns:g,isLoading:x=!1,defaultSorting:h=[],pagination:f,onPaginationChange:_,enablePagination:b=!1,onRowClick:y}){let[v,j]=r.default.useState(h),[A]=r.default.useState("onChange"),[N,T]=r.default.useState({}),[S,C]=r.default.useState({}),w=(0,a.useReactTable)({data:e,columns:g,state:{sorting:v,columnSizing:N,columnVisibility:S,...b&&f?{pagination:f}:{}},columnResizeMode:A,onSortingChange:j,onColumnSizingChange:T,onColumnVisibilityChange:C,...b&&_?{onPaginationChange:_}:{},getCoreRowModel:(0,s.getCoreRowModel)(),getSortedRowModel:(0,s.getSortedRowModel)(),...b?{getPaginationRowModel:(0,s.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(i.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:w.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(l.TableHead,{children:w.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(n.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.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,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,a.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(p.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(u.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(m.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.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 ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(o.TableBody,{children:x?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:g.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):w.getRowModel().rows.length>0?w.getRowModel().rows.map(e=>(0,t.jsx)(c.TableRow,{onClick:()=>y?.(e.original),className:y?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.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,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:g.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>g])},737033,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(599724),r=e.i(928685),i=e.i(311451),l=e.i(199133),n=e.i(798496),o=e.i(389083),c=e.i(592968),d=e.i(166406),m=e.i(596239),p=e.i(652272);e.s(["default",0,({skills:e,isLoading:u,isAdmin:g,accessToken:x,publicPage:h=!1,onPublishSuccess:f})=>{let[_,b]=(0,a.useState)(""),[y,v]=(0,a.useState)(void 0),[j,A]=(0,a.useState)(null),N=e.length,T=(0,a.useMemo)(()=>[...new Set(e.map(e=>e.domain).filter(Boolean))],[e]),S=(0,a.useMemo)(()=>[...new Set(e.map(e=>e.namespace).filter(Boolean))],[e]),C=(0,a.useMemo)(()=>{let t=e;if(y&&(t=t.filter(e=>(e.domain||"General")===y)),_.trim()){let e=_.toLowerCase();t=t.filter(t=>t.name.toLowerCase().includes(e)||t.description?.toLowerCase().includes(e)||t.domain?.toLowerCase().includes(e)||t.namespace?.toLowerCase().includes(e)||t.keywords?.some(t=>t.toLowerCase().includes(e)))}return t},[e,_,y]);return j?(0,t.jsx)(p.default,{skill:j,onBack:()=>A(null),isAdmin:g,accessToken:x,onPublishClick:f}):u?(0,t.jsx)("div",{className:"text-center py-16 text-gray-400",children:"Loading skills..."}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Total Skills"}),(0,t.jsx)("div",{className:"text-2xl font-semibold text-gray-900",children:N})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Namespaces"}),(0,t.jsx)("div",{className:"text-2xl font-semibold text-gray-900",children:S.length})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Domains"}),(0,t.jsx)("div",{className:"text-2xl font-semibold text-gray-900",children:T.length})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)("h3",{className:"text-sm font-semibold text-gray-700",children:["All ",h?"Public ":"","Skills"]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Select,{placeholder:"All Domains",allowClear:!0,value:y,onChange:e=>v(e),style:{width:160},options:T.map(e=>({label:e,value:e}))}),(0,t.jsx)(i.Input,{prefix:(0,t.jsx)(r.SearchOutlined,{className:"text-gray-400"}),placeholder:"Search by name, namespace, or tag…",value:_,onChange:e=>b(e.target.value),style:{width:280},allowClear:!0})]})]}),(0,t.jsx)(n.ModelDataTable,{columns:((e,a,r=!1)=>[{header:"Skill Name",accessorKey:"name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:r})=>{let i=r.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("button",{type:"button",className:"font-medium text-sm cursor-pointer text-blue-600 hover:underline bg-transparent border-none p-0",onClick:()=>e(i),children:i.name}),(0,t.jsx)(c.Tooltip,{title:"Copy skill name",children:(0,t.jsx)(d.CopyOutlined,{onClick:()=>a(i.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),i.description&&(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 line-clamp-1 md:hidden",children:i.description})]})}},{header:"Description",accessorKey:"description",enableSorting:!1,cell:({row:e})=>(0,t.jsx)(s.Text,{className:"text-xs line-clamp-2",children:e.original.description||"-"})},{header:"Category",accessorKey:"category",enableSorting:!0,cell:({row:e})=>{let a=e.original.category;return a?(0,t.jsx)(o.Badge,{color:"blue",size:"xs",children:a}):(0,t.jsx)(s.Text,{className:"text-xs text-gray-400",children:"-"})}},{header:"Domain",accessorKey:"domain",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(s.Text,{className:"text-xs",children:e.original.domain||"-"})},{header:"Source",accessorKey:"source",enableSorting:!1,cell:({row:e})=>{let a=e.original.source,r=null,i="-";return(a?.source==="github"&&a.repo?(r=`https://github.com/${a.repo}`,i=a.repo):a?.source==="git-subdir"&&a.url?i=(r=a.path?`${a.url}/tree/main/${a.path}`:a.url).replace("https://github.com/",""):a?.source==="url"&&a.url&&(r=a.url,i=a.url.replace(/^https?:\/\//,"")),r)?(0,t.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:underline truncate max-w-[180px]",title:i,children:[(0,t.jsx)("span",{className:"truncate",children:i}),(0,t.jsx)(m.LinkOutlined,{className:"shrink-0",style:{fontSize:10}})]}):(0,t.jsx)(s.Text,{className:"text-xs text-gray-400",children:"-"})}},{header:"Status",accessorKey:"enabled",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(o.Badge,{color:e.original.enabled?"green":"gray",size:"xs",children:e.original.enabled?"Public":"Draft"})}])(e=>A(e),e=>{navigator.clipboard.writeText(e)},h),data:C,isLoading:!1,defaultSorting:[{id:"name",desc:!1}]}),(0,t.jsx)("div",{className:"mt-3 text-center",children:(0,t.jsxs)(s.Text,{className:"text-sm text-gray-500",children:["Showing ",C.length," of ",N," skill",1!==N?"s":""]})})]})]})}],737033)},93826,174886,952571,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.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:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});e.s(["SearchIcon",0,a],93826);var s=e.i(991124);e.s(["Copy",()=>s.default],174886);var r=e.i(879664);e.s(["Info",()=>r.default],952571)},976883,e=>{"use strict";var t=e.i(843476),a=e.i(275144),s=e.i(434626),r=e.i(93826),i=e.i(994388),l=e.i(304967),n=e.i(599724),o=e.i(629569),c=e.i(212931),d=e.i(199133),m=e.i(653496),p=e.i(262218),u=e.i(592968),g=e.i(174886),x=e.i(952571),h=e.i(271645),f=e.i(798496),_=e.i(727749),b=e.i(402874),y=e.i(764205),v=e.i(737033),j=e.i(190272),A=e.i(785913),N=e.i(916925);let{TabPane:T}=m.Tabs;e.s(["default",0,({accessToken:e,isEmbedded:S=!1})=>{let C,w,I,k,E,O,M,[L,$]=(0,h.useState)(null),[R,P]=(0,h.useState)(null),[z,D]=(0,h.useState)(null),[H,B]=(0,h.useState)("LiteLLM Gateway"),[G,F]=(0,h.useState)(null),[U,V]=(0,h.useState)(""),[K,W]=(0,h.useState)({}),[X,q]=(0,h.useState)(!0),[Y,J]=(0,h.useState)(!0),[Z,Q]=(0,h.useState)(!0),[ee,et]=(0,h.useState)(""),[ea,es]=(0,h.useState)(""),[er,ei]=(0,h.useState)(""),[el,en]=(0,h.useState)([]),[eo,ec]=(0,h.useState)([]),[ed,em]=(0,h.useState)([]),[ep,eu]=(0,h.useState)([]),[eg,ex]=(0,h.useState)([]),[eh,ef]=(0,h.useState)("I'm alive! ✓"),[e_,eb]=(0,h.useState)(!1),[ey,ev]=(0,h.useState)(!1),[ej,eA]=(0,h.useState)(!1),[eN,eT]=(0,h.useState)(null),[eS,eC]=(0,h.useState)(null),[ew,eI]=(0,h.useState)(null),[ek,eE]=(0,h.useState)({}),[eO,eM]=(0,h.useState)("models"),[eL,e$]=(0,h.useState)([]),[eR,eP]=(0,h.useState)(!1);(0,h.useEffect)(()=>{(async()=>{try{await (0,y.getUiConfig)()}catch(e){console.error("Failed to get UI config:",e)}let e=async()=>{try{q(!0);let e=await (0,y.modelHubPublicModelsCall)();console.log("ModelHubData:",e),$(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public model data",e),ef("Service unavailable")}finally{q(!1)}},t=async()=>{try{J(!0);let e=await (0,y.agentHubPublicModelsCall)();console.log("AgentHubData:",e),P(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public agent data",e)}finally{J(!1)}},a=async()=>{try{Q(!0);let e=await (0,y.mcpHubPublicServersCall)();console.log("MCPHubData:",e),D(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public MCP server data",e)}finally{Q(!1)}},s=async()=>{try{eP(!0);let e=await (0,y.skillHubPublicCall)();e$(e.plugins??[])}catch(e){console.error("There was an error fetching the public skill data",e)}finally{eP(!1)}};(async()=>{let e=await (0,y.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),B(e.docs_title),F(e.custom_docs_description),V(e.litellm_version),W(e.useful_links||{})})(),e(),t(),a(),s()})()},[]),(0,h.useEffect)(()=>{},[ee,el,eo,ed]);let ez=(0,h.useMemo)(()=>{if(!L||!Array.isArray(L))return[];let e=L;if(ee.trim()){let t=ee.toLowerCase(),a=t.split(/\s+/),s=L.filter(e=>{let s=e.model_group.toLowerCase();return!!s.includes(t)||a.every(e=>s.includes(e))});s.length>0&&(e=s.sort((e,a)=>{let s=e.model_group.toLowerCase(),r=a.model_group.toLowerCase(),i=1e3*(s===t),l=1e3*(r===t),n=100*!!s.startsWith(t),o=100*!!r.startsWith(t),c=50*!!t.split(/\s+/).every(e=>s.includes(e)),d=50*!!t.split(/\s+/).every(e=>r.includes(e)),m=s.length;return l+o+d+(1e3-r.length)-(i+n+c+(1e3-m))}))}return e.filter(e=>{let t=0===el.length||el.some(t=>e.providers.includes(t)),a=0===eo.length||eo.includes(e.mode||""),s=0===ed.length||Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).some(([e])=>{let t=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return ed.includes(t)});return t&&a&&s})},[L,ee,el,eo,ed]),eD=(0,h.useMemo)(()=>{if(!R||!Array.isArray(R))return[];let e=R;if(ea.trim()){let t=ea.toLowerCase(),a=t.split(/\s+/);e=(e=R.filter(e=>{let s=e.name.toLowerCase(),r=e.description.toLowerCase();return!!(s.includes(t)||r.includes(t))||a.every(e=>s.includes(e)||r.includes(e))})).sort((e,a)=>{let s=e.name.toLowerCase(),r=a.name.toLowerCase(),i=1e3*(s===t),l=1e3*(r===t),n=100*!!s.startsWith(t),o=100*!!r.startsWith(t),c=i+n+(1e3-s.length);return l+o+(1e3-r.length)-c})}return e.filter(e=>0===ep.length||e.skills?.some(e=>e.tags?.some(e=>ep.includes(e))))},[R,ea,ep]),eH=(0,h.useMemo)(()=>{if(!z||!Array.isArray(z))return[];let e=z;if(er.trim()){let t=er.toLowerCase(),a=t.split(/\s+/);e=(e=z.filter(e=>{let s=e.server_name.toLowerCase(),r=(e.mcp_info?.description||"").toLowerCase();return!!(s.includes(t)||r.includes(t))||a.every(e=>s.includes(e)||r.includes(e))})).sort((e,a)=>{let s=e.server_name.toLowerCase(),r=a.server_name.toLowerCase(),i=1e3*(s===t),l=1e3*(r===t),n=100*!!s.startsWith(t),o=100*!!r.startsWith(t),c=i+n+(1e3-s.length);return l+o+(1e3-r.length)-c})}return e.filter(e=>0===eg.length||eg.includes(e.transport))},[z,er,eg]),eB=e=>{navigator.clipboard.writeText(e),_.default.success("Copied to clipboard!")},eG=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),eF=e=>`$${(1e6*e).toFixed(4)}`,eU=e=>e?e>=1e3?`${(e/1e3).toFixed(0)}K`:e.toString():"N/A";return(0,t.jsx)(a.ThemeProvider,{accessToken:e,children:(0,t.jsxs)("div",{className:S?"w-full":"min-h-screen bg-white",children:[!S&&(0,t.jsx)(b.default,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:eE,proxySettings:ek,accessToken:e||null,isPublicPage:!0,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,t.jsxs)("div",{className:S?"w-full p-6":"w-full px-8 py-12",children:[S&&(0,t.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:(0,t.jsx)("p",{className:"text-sm text-gray-700",children:"These are models, agents, and MCP servers your proxy admin has indicated are available in your company."})}),!S&&(0,t.jsxs)(l.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,t.jsx)(o.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,t.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:G||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,t.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"w-4 h-4 mr-2",children:"🔧"}),"Built with litellm: v",U]})})]}),K&&Object.keys(K).length>0&&(0,t.jsxs)(l.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,t.jsx)(o.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(K||{}).map(([e,t])=>({title:e,url:"string"==typeof t?t:t.url,index:"string"==typeof t?0:t.index??0})).sort((e,t)=>e.index-t.index).map(({title:e,url:a})=>(0,t.jsxs)("button",{onClick:()=>window.open(a,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,t.jsx)(s.ExternalLinkIcon,{className:"w-4 h-4"}),(0,t.jsx)(n.Text,{className:"text-sm font-medium",children:e})]},e))})]}),!S&&(0,t.jsxs)(l.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,t.jsx)(o.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,t.jsxs)(n.Text,{className:"text-green-600 font-medium text-sm",children:["Service status: ",eh]})})]}),(0,t.jsx)(l.Card,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:(0,t.jsxs)(m.Tabs,{activeKey:eO,onChange:eM,size:"large",className:"public-hub-tabs",children:[(0,t.jsxs)(T,{tab:"Model Hub",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,t.jsx)(o.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,t.jsx)(n.Text,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,t.jsx)(u.Tooltip,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,t.jsx)(x.Info,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(r.SearchIcon,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:ee,onChange:e=>et(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,t.jsx)(d.Select,{mode:"multiple",value:el,onChange:e=>en(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:a}=(0,N.getProviderLogoAndName)(e.value);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("span",{className:"capitalize",children:e.label})]})},children:L&&Array.isArray(L)&&(C=new Set,L.forEach(e=>{(e.providers??[]).forEach(e=>C.add(e))}),Array.from(C)).map(e=>(0,t.jsx)(d.Select.Option,{value:e,children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,t.jsx)(d.Select,{mode:"multiple",value:eo,onChange:e=>ec(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:L&&Array.isArray(L)&&(w=new Set,L.forEach(e=>{e.mode&&w.add(e.mode)}),Array.from(w)).map(e=>(0,t.jsx)(d.Select.Option,{value:e,children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,t.jsx)(d.Select,{mode:"multiple",value:ed,onChange:e=>em(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:L&&Array.isArray(L)&&(I=new Set,L.forEach(e=>{Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).forEach(([e])=>{let t=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");I.add(t)})}),Array.from(I).sort()).map(e=>(0,t.jsx)(d.Select.Option,{value:e,children:e},e))})]})]}),(0,t.jsx)(f.ModelDataTable,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(u.Tooltip,{title:e.original.model_group,children:(0,t.jsx)(i.Button,{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",onClick:()=>{eT(e.original),eb(!0)},children:e.original.model_group})})}),size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:({row:e})=>{let a=e.original.providers??[];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:a.map(e=>{let{logo:a}=(0,N.getProviderLogoAndName)(e);return(0,t.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:({row:e})=>{let a=e.original.mode;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{children:(e=>{switch(e?.toLowerCase()){case"chat":return"💬";case"rerank":return"🔄";case"embedding":return"📄";default:return"🤖"}})(a||"")}),(0,t.jsx)(n.Text,{children:a||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(n.Text,{className:"text-center",children:eU(e.original.max_input_tokens)}),size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(n.Text,{className:"text-center",children:eU(e.original.max_output_tokens)}),size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:({row:e})=>{let a=e.original.input_cost_per_token;return(0,t.jsx)(n.Text,{className:"text-center",children:a?eF(a):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:({row:e})=>{let a=e.original.output_cost_per_token;return(0,t.jsx)(n.Text,{className:"text-center",children:a?eF(a):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:({row:e})=>{let a=Object.entries(e.original).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>eG(e));return 0===a.length?(0,t.jsx)(n.Text,{className:"text-gray-400",children:"-"}):1===a.length?(0,t.jsx)("div",{className:"h-6 flex items-center",children:(0,t.jsx)(p.Tag,{color:"blue",className:"text-xs",children:a[0]})}):(0,t.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,t.jsx)(p.Tag,{color:"blue",className:"text-xs",children:a[0]}),(0,t.jsx)(u.Tooltip,{title:(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"font-medium",children:"All Features:"}),a.map((e,a)=>(0,t.jsxs)("div",{className:"text-xs",children:["• ",e]},a))]}),trigger:"click",placement:"topLeft",children:(0,t.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",a.length-1]})})]})},size:120},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,cell:({row:e})=>{let a=e.original,s="healthy"===a.health_status?"green":"unhealthy"===a.health_status?"red":"default",r=a.health_response_time?`Response Time: ${Number(a.health_response_time).toFixed(2)}ms`:"N/A",i=a.health_checked_at?`Last Checked: ${new Date(a.health_checked_at).toLocaleString()}`:"N/A";return(0,t.jsx)(u.Tooltip,{title:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{children:r}),(0,t.jsx)("div",{children:i})]}),children:(0,t.jsx)(p.Tag,{color:s,children:(0,t.jsx)("span",{className:"capitalize",children:a.health_status??"Unknown"})},a.model_group)})},size:100},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:({row:e})=>{var a,s;let r,i=e.original;return(0,t.jsx)(n.Text,{className:"text-xs text-gray-600",children:(a=i.rpm,s=i.tpm,r=[],a&&r.push(`RPM: ${a.toLocaleString()}`),s&&r.push(`TPM: ${s.toLocaleString()}`),r.length>0?r.join(", "):"N/A")})},size:150}],data:ez,isLoading:X,defaultSorting:[{id:"model_group",desc:!1}]}),(0,t.jsx)("div",{className:"mt-8 text-center",children:(0,t.jsxs)(n.Text,{className:"text-sm text-gray-600",children:["Showing ",ez.length," of ",L?.length||0," models"]})})]},"models"),R&&Array.isArray(R)&&R.length>0&&(0,t.jsxs)(T,{tab:"Agent Hub",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,t.jsx)(o.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Agents"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,t.jsx)(n.Text,{className:"text-sm font-medium text-gray-700",children:"Search Agents:"}),(0,t.jsx)(u.Tooltip,{title:"Search agents by name or description",placement:"top",children:(0,t.jsx)(x.Info,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(r.SearchIcon,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,t.jsx)("input",{type:"text",placeholder:"Search agent names or descriptions...",value:ea,onChange:e=>es(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Skills:"}),(0,t.jsx)(d.Select,{mode:"multiple",value:ep,onChange:e=>eu(e),placeholder:"Select skills",className:"w-full",size:"large",allowClear:!0,children:R&&Array.isArray(R)&&(k=new Set,R.forEach(e=>{e.skills?.forEach(e=>{e.tags?.forEach(e=>k.add(e))})}),Array.from(k).sort()).map(e=>(0,t.jsx)(d.Select.Option,{value:e,children:e},e))})]})]}),(0,t.jsx)(f.ModelDataTable,{columns:[{header:"Agent Name",accessorKey:"name",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(u.Tooltip,{title:e.original.name,children:(0,t.jsx)(i.Button,{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",onClick:()=>{eC(e.original),ev(!0)},children:e.original.name})})}),size:150},{header:"Description",accessorKey:"description",enableSorting:!1,cell:({row:e})=>{let a=e.original.description??"",s=a.length>80?a.substring(0,80)+"...":a;return(0,t.jsx)(u.Tooltip,{title:a,children:(0,t.jsx)(n.Text,{className:"text-sm text-gray-700",children:s})})},size:250},{header:"Version",accessorKey:"version",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(n.Text,{className:"text-sm",children:e.original.version}),size:80},{header:"Provider",accessorKey:"provider",enableSorting:!1,cell:({row:e})=>{let a=e.original.provider;return a?(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsx)(n.Text,{className:"font-medium",children:a.organization})}):(0,t.jsx)(n.Text,{className:"text-gray-400",children:"-"})},size:120},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let a=e.original.skills||[];return 0===a.length?(0,t.jsx)(n.Text,{className:"text-gray-400",children:"-"}):1===a.length?(0,t.jsx)("div",{className:"h-6 flex items-center",children:(0,t.jsx)(p.Tag,{color:"purple",className:"text-xs",children:a[0].name})}):(0,t.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,t.jsx)(p.Tag,{color:"purple",className:"text-xs",children:a[0].name}),(0,t.jsx)(u.Tooltip,{title:(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"font-medium",children:"All Skills:"}),a.map((e,a)=>(0,t.jsxs)("div",{className:"text-xs",children:["• ",e.name]},a))]}),trigger:"click",placement:"topLeft",children:(0,t.jsxs)("span",{className:"text-xs text-purple-600 cursor-pointer hover:text-purple-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",a.length-1]})})]})},size:150},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let a=Object.entries(e.original.capabilities||{}).filter(([e,t])=>!0===t).map(([e])=>e);return 0===a.length?(0,t.jsx)(n.Text,{className:"text-gray-400",children:"-"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:a.map(e=>(0,t.jsx)(p.Tag,{color:"green",className:"text-xs capitalize",children:e},e))})},size:150}],data:eD,isLoading:Y,defaultSorting:[{id:"name",desc:!1}]}),(0,t.jsx)("div",{className:"mt-8 text-center",children:(0,t.jsxs)(n.Text,{className:"text-sm text-gray-600",children:["Showing ",eD.length," of ",R?.length||0," agents"]})})]},"agents"),z&&Array.isArray(z)&&z.length>0&&(0,t.jsxs)(T,{tab:"MCP Hub",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,t.jsx)(o.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available MCP Servers"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,t.jsx)(n.Text,{className:"text-sm font-medium text-gray-700",children:"Search MCP Servers:"}),(0,t.jsx)(u.Tooltip,{title:"Search MCP servers by name or description",placement:"top",children:(0,t.jsx)(x.Info,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(r.SearchIcon,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,t.jsx)("input",{type:"text",placeholder:"Search MCP server names or descriptions...",value:er,onChange:e=>ei(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Transport:"}),(0,t.jsx)(d.Select,{mode:"multiple",value:eg,onChange:e=>ex(e),placeholder:"Select transport types",className:"w-full",size:"large",allowClear:!0,children:z&&Array.isArray(z)&&(E=new Set,z.forEach(e=>{e.transport&&E.add(e.transport)}),Array.from(E).sort()).map(e=>(0,t.jsx)(d.Select.Option,{value:e,children:e},e))})]})]}),(0,t.jsx)(f.ModelDataTable,{columns:[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(u.Tooltip,{title:e.original.server_name,children:(0,t.jsx)(i.Button,{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",onClick:()=>{eI(e.original),eA(!0)},children:e.original.server_name})})}),size:150},{header:"Description",accessorKey:"mcp_info.description",enableSorting:!1,cell:({row:e})=>{let a=String(e.original.mcp_info?.description??"-"),s=a.length>80?a.substring(0,80)+"...":a;return(0,t.jsx)(u.Tooltip,{title:a,children:(0,t.jsx)(n.Text,{className:"text-sm text-gray-700",children:s})})},size:250},{header:"URL",accessorKey:"url",enableSorting:!1,cell:({row:e})=>{let a=e.original.url??"",s=a.length>40?a.substring(0,40)+"...":a;return(0,t.jsx)(u.Tooltip,{title:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(n.Text,{className:"text-xs font-mono",children:s}),(0,t.jsx)(g.Copy,{onClick:()=>eB(a),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-3 h-3"})]})})},size:200},{header:"Transport",accessorKey:"transport",enableSorting:!0,cell:({row:e})=>{let a=e.original.transport;return(0,t.jsx)(p.Tag,{color:"blue",className:"text-xs uppercase",children:a})},size:100},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,cell:({row:e})=>{let a=e.original.auth_type;return(0,t.jsx)(p.Tag,{color:"none"===a?"gray":"green",className:"text-xs capitalize",children:a})},size:100}],data:eH,isLoading:Z,defaultSorting:[{id:"server_name",desc:!1}]}),(0,t.jsx)("div",{className:"mt-8 text-center",children:(0,t.jsxs)(n.Text,{className:"text-sm text-gray-600",children:["Showing ",eH.length," of ",z?.length||0," MCP servers"]})})]},"mcp"),(0,t.jsx)(T,{tab:"Skill Hub",children:(0,t.jsx)(v.default,{skills:eL,isLoading:eR,publicPage:!0})},"skills")]})})]}),(0,t.jsx)(c.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{children:eN?.model_group||"Model Details"}),eN&&(0,t.jsx)(u.Tooltip,{title:"Copy model name",children:(0,t.jsx)(g.Copy,{onClick:()=>eB(eN.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:e_,footer:null,onOk:()=>{eb(!1),eT(null)},onCancel:()=>{eb(!1),eT(null)},children:eN&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Model Name:"}),(0,t.jsx)(n.Text,{children:eN.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(n.Text,{children:eN.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(eN.providers??[]).map(e=>{let{logo:a}=(0,N.getProviderLogoAndName)(e);return(0,t.jsx)(p.Tag,{color:"blue",children:(0,t.jsxs)("div",{className:"flex items-center space-x-1",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),eN.model_group.includes("*")&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,t.jsx)(x.Info,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,t.jsxs)(n.Text,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the"," ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,t.jsxs)(n.Text,{className:"text-sm text-blue-800",children:["For example, with"," ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:eN.model_group}),", you can use any string (",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:eN.model_group.replaceAll("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(n.Text,{children:eN.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(n.Text,{children:eN.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(n.Text,{children:eN.input_cost_per_token?eF(eN.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(n.Text,{children:eN.output_cost_per_token?eF(eN.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(O=Object.entries(eN).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),M=["green","blue","purple","orange","red","yellow"],0===O.length?(0,t.jsx)(n.Text,{className:"text-gray-500",children:"No special capabilities listed"}):O.map((e,a)=>(0,t.jsx)(p.Tag,{color:M[a%M.length],children:eG(e)},e)))})]}),(eN.tpm||eN.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[eN.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(n.Text,{children:eN.tpm.toLocaleString()})]}),eN.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(n.Text,{children:eN.rpm.toLocaleString()})]})]})]}),eN.supported_openai_params&&eN.supported_openai_params.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:eN.supported_openai_params.map(e=>(0,t.jsx)(p.Tag,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,t.jsx)("pre",{className:"text-sm",children:(0,j.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,A.getEndpointType)(eN.mode||"chat"),selectedModel:eN.model_group,selectedSdk:"openai"})})}),(0,t.jsx)("div",{className:"mt-2 text-right",children:(0,t.jsx)("button",{onClick:()=>{eB((0,j.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,A.getEndpointType)(eN.mode||"chat"),selectedModel:eN.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})}),(0,t.jsx)(c.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{children:eS?.name||"Agent Details"}),eS&&(0,t.jsx)(u.Tooltip,{title:"Copy agent name",children:(0,t.jsx)(g.Copy,{onClick:()=>eB(eS.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ey,footer:null,onOk:()=>{ev(!1),eC(null)},onCancel:()=>{ev(!1),eC(null)},children:eS&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Name:"}),(0,t.jsx)(n.Text,{children:eS.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Version:"}),(0,t.jsx)(n.Text,{children:eS.version})]}),(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(n.Text,{children:eS.description})]}),eS.url&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"URL:"}),(0,t.jsx)("a",{href:eS.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all",children:eS.url})]})]})]}),eS.capabilities&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(eS.capabilities).filter(([e,t])=>!0===t).map(([e])=>(0,t.jsx)(p.Tag,{color:"green",className:"capitalize",children:e},e))})]}),eS.skills&&eS.skills.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,t.jsx)("div",{className:"space-y-4",children:eS.skills.map((e,a)=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,t.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium text-base",children:e.name}),(0,t.jsx)(n.Text,{className:"text-sm text-gray-600",children:e.description})]})}),e.tags&&e.tags.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(e=>(0,t.jsx)(p.Tag,{color:"purple",className:"text-xs",children:e},e))})]},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Input Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(eS.defaultInputModes??[]).map(e=>(0,t.jsx)(p.Tag,{color:"blue",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Output Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(eS.defaultOutputModes??[]).map(e=>(0,t.jsx)(p.Tag,{color:"blue",children:e},e))})]})]})]}),eS.documentationUrl&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Documentation"}),(0,t.jsxs)("a",{href:eS.documentationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 flex items-center space-x-2",children:[(0,t.jsx)(s.ExternalLinkIcon,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"View Documentation"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example (A2A Protocol)"}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(n.Text,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 1: Retrieve Agent Card"}),(0,t.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,t.jsx)("pre",{className:"text-xs",children:`base_url = '${eS.url}' + +resolver = A2ACardResolver( + httpx_client=httpx_client, + base_url=base_url, + # agent_card_path uses default, extended_agent_card_path also uses default +) + +# Fetch Public Agent Card and Initialize Client +final_agent_card_to_use: AgentCard | None = None +_public_card = ( + await resolver.get_agent_card() +) # Fetches from default public path - \`/agents/{agent_id}/\` +final_agent_card_to_use = _public_card + +if _public_card.supports_authenticated_extended_card: + try: + auth_headers_dict = { + 'Authorization': 'Bearer dummy-token-for-extended-card' + } + _extended_card = await resolver.get_agent_card( + relative_card_path=EXTENDED_AGENT_CARD_PATH, + http_kwargs={'headers': auth_headers_dict}, + ) + final_agent_card_to_use = ( + _extended_card # Update to use the extended card + ) + except Exception as e_extended: + logger.warning( + f'Failed to fetch extended agent card: {e_extended}. Will proceed with public card.', + exc_info=True, + )`})}),(0,t.jsx)("div",{className:"mt-2 text-right",children:(0,t.jsx)("button",{onClick:()=>{eB(`from a2a.client import A2ACardResolver, A2AClient +from a2a.types import ( + AgentCard, + MessageSendParams, + SendMessageRequest, + SendStreamingMessageRequest, +) +from a2a.utils.constants import ( + AGENT_CARD_WELL_KNOWN_PATH, + EXTENDED_AGENT_CARD_PATH, +) + +base_url = '${eS.url}' + +resolver = A2ACardResolver( + httpx_client=httpx_client, + base_url=base_url, + # agent_card_path uses default, extended_agent_card_path also uses default +) + +# Fetch Public Agent Card and Initialize Client +final_agent_card_to_use: AgentCard | None = None +_public_card = ( + await resolver.get_agent_card() +) # Fetches from default public path - \`/agents/{agent_id}/\` +final_agent_card_to_use = _public_card + +if _public_card.supports_authenticated_extended_card: + try: + auth_headers_dict = { + 'Authorization': 'Bearer dummy-token-for-extended-card' + } + _extended_card = await resolver.get_agent_card( + relative_card_path=EXTENDED_AGENT_CARD_PATH, + http_kwargs={'headers': auth_headers_dict}, + ) + final_agent_card_to_use = ( + _extended_card # Update to use the extended card + ) + except Exception as e_extended: + logger.warning( + f'Failed to fetch extended agent card: {e_extended}. Will proceed with public card.', + exc_info=True, + )`)},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 2: Call the Agent"}),(0,t.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,t.jsx)("pre",{className:"text-xs",children:`client = A2AClient( + httpx_client=httpx_client, agent_card=final_agent_card_to_use +) + +send_message_payload: dict[str, Any] = { + 'message': { + 'role': 'user', + 'parts': [ + {'kind': 'text', 'text': 'how much is 10 USD in INR?'} + ], + 'messageId': uuid4().hex, + }, +} +request = SendMessageRequest( + id=str(uuid4()), params=MessageSendParams(**send_message_payload) +) + +response = await client.send_message(request) +print(response.model_dump(mode='json', exclude_none=True))`})}),(0,t.jsx)("div",{className:"mt-2 text-right",children:(0,t.jsx)("button",{onClick:()=>{eB(`client = A2AClient( + httpx_client=httpx_client, agent_card=final_agent_card_to_use +) + +send_message_payload: dict[str, Any] = { + 'message': { + 'role': 'user', + 'parts': [ + {'kind': 'text', 'text': 'how much is 10 USD in INR?'} + ], + 'messageId': uuid4().hex, + }, +} +request = SendMessageRequest( + id=str(uuid4()), params=MessageSendParams(**send_message_payload) +) + +response = await client.send_message(request) +print(response.model_dump(mode='json', exclude_none=True))`)},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})]})}),(0,t.jsx)(c.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{children:ew?.server_name||"MCP Server Details"}),ew&&(0,t.jsx)(u.Tooltip,{title:"Copy server name",children:(0,t.jsx)(g.Copy,{onClick:()=>eB(ew.server_name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ej,footer:null,onOk:()=>{eA(!1),eI(null)},onCancel:()=>{eA(!1),eI(null)},children:ew&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Server Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Server Name:"}),(0,t.jsx)(n.Text,{children:ew.server_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Transport:"}),(0,t.jsx)(p.Tag,{color:"blue",children:ew.transport})]}),ew.alias&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Alias:"}),(0,t.jsx)(n.Text,{children:ew.alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Auth Type:"}),(0,t.jsx)(p.Tag,{color:"none"===ew.auth_type?"gray":"green",children:ew.auth_type})]}),(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(n.Text,{children:ew.mcp_info?.description||"-"})]}),(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"URL:"}),(0,t.jsxs)("a",{href:ew.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all flex items-center space-x-2",children:[(0,t.jsx)("span",{children:ew.url}),(0,t.jsx)(s.ExternalLinkIcon,{className:"w-4 h-4"})]})]})]})]}),ew.mcp_info&&Object.keys(ew.mcp_info).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Additional Information"}),(0,t.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,t.jsx)("pre",{className:"text-xs overflow-x-auto",children:JSON.stringify(ew.mcp_info,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,t.jsx)("pre",{className:"text-sm",children:`# Using MCP Server with Python FastMCP + +from fastmcp import Client +import asyncio + +# Standard MCP configuration +config = { + "mcpServers": { + "${ew.server_name}": { + "url": "http://localhost:4000/${ew.server_name}/mcp", + "headers": { + "x-litellm-api-key": "Bearer sk-1234" + } + } + } +} + +# Create a client that connects to the server +client = Client(config) + +async def main(): + async with client: + # List available tools + tools = await client.list_tools() + print(f"Available tools: {[tool.name for tool in tools]}") + + # Call a tool + response = await client.call_tool( + name="tool_name", + arguments={"arg": "value"} + ) + print(f"Response: {response}") + +if __name__ == "__main__": + asyncio.run(main())`})}),(0,t.jsx)("div",{className:"mt-2 text-right",children:(0,t.jsx)("button",{onClick:()=>{eB(`# Using MCP Server with Python FastMCP + +from fastmcp import Client +import asyncio + +# Standard MCP configuration +config = { + "mcpServers": { + "${ew.server_name}": { + "url": "http://localhost:4000/${ew.server_name}/mcp", + "headers": { + "x-litellm-api-key": "Bearer sk-1234" + } + } + } +} + +# Create a client that connects to the server +client = Client(config) + +async def main(): + async with client: + # List available tools + tools = await client.list_tools() + print(f"Available tools: {[tool.name for tool in tools]}") + + # Call a tool + response = await client.call_tool( + name="tool_name", + arguments={"arg": "value"} + ) + print(f"Response: {response}") + +if __name__ == "__main__": + asyncio.run(main())`)},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/34465d13a9152473.js b/litellm/proxy/_experimental/out/_next/static/chunks/34465d13a9152473.js new file mode 100644 index 0000000000..c43f2b501e --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/34465d13a9152473.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,663435,152473,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(199133),n=e.i(898586),s=e.i(56456);let a={enabled:!0,leading:!1,trailing:!0,wait:0,onExecute:()=>{}};class o{constructor(e,t){this.fn=e,this._canLeadingExecute=!0,this._isPending=!1,this._executionCount=0,this._options={...a,...t}}setOptions(e){return this._options={...this._options,...e},this._options.enabled||(this._isPending=!1),this._options}getOptions(){return this._options}maybeExecute(...e){this._options.leading&&this._canLeadingExecute&&(this.executeFunction(...e),this._canLeadingExecute=!1),(this._options.leading||this._options.trailing)&&(this._isPending=!0),this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=setTimeout(()=>{this._canLeadingExecute=!0,this._isPending=!1,this._options.trailing&&this.executeFunction(...e)},this._options.wait)}executeFunction(...e){this._options.enabled&&(this.fn(...e),this._executionCount++,this._options.onExecute(this))}cancel(){this._timeoutId&&(clearTimeout(this._timeoutId),this._canLeadingExecute=!0,this._isPending=!1)}getExecutionCount(){return this._executionCount}getIsPending(){return this._options.enabled&&this._isPending}}function l(e,t){let[i,n]=(0,r.useState)(e),s=function(e,t){let[i]=(0,r.useState)(()=>{var r;return Object.getOwnPropertyNames(Object.getPrototypeOf(r=new o(e,t))).filter(e=>"function"==typeof r[e]).reduce((e,t)=>{let i=r[t];return"function"==typeof i&&(e[t]=i.bind(r)),e},{})});return i.setOptions(t),i}(n,t);return[i,s.maybeExecute,s]}e.s(["useDebouncedState",()=>l],152473);var d=e.i(785242);let{Text:c}=n.Typography;e.s(["default",0,({value:e,onChange:n,onTeamSelect:a,disabled:o,organizationId:u,pageSize:h=20})=>{let[f,p]=(0,r.useState)(""),[m,g]=l("",{wait:300}),{data:y,fetchNextPage:x,hasNextPage:b,isFetchingNextPage:_,isLoading:v}=(0,d.useInfiniteTeams)(h,m||void 0,u),w=(0,r.useMemo)(()=>{if(!y?.pages)return[];let e=new Set,t=[];for(let r of y.pages)for(let i of r.teams)e.has(i.team_id)||(e.add(i.team_id),t.push(i));return t},[y]);return(0,t.jsx)(i.Select,{showSearch:!0,placeholder:"Search or select a team",value:e||void 0,onChange:e=>{n?.(e??""),a&&a(e?w.find(t=>t.team_id===e)??null:null)},disabled:o,allowClear:!0,filterOption:!1,onSearch:e=>{p(e),g(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&b&&!_&&x()},loading:v,notFoundContent:v?(0,t.jsx)(s.LoadingOutlined,{spin:!0}):"No teams found","data-testid":"team-dropdown",popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(s.LoadingOutlined,{spin:!0})})]}),children:w.map(e=>(0,t.jsxs)(i.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(c,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})}],663435)},743151,(e,t,r)=>{"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var n=o(e.r(271645)),s=o(e.r(844343)),a=["text","onCopy","options","children"];function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function d(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,a),i=n.default.Children.only(t);return n.default.cloneElement(i,d(d({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var i=e.r(743151).CopyToClipboard;i.CopyToClipboard=i,t.exports=i},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},361653,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>t])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},158392,419470,e=>{"use strict";var t=e.i(843476),r=e.i(311451);let i={ttl:3600,lowest_latency_buffer:0},n=({routingStrategyArgs:e})=>{let n={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||i).map(([e,i])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:n[e]||""}),(0,t.jsx)(r.Input,{name:e,defaultValue:"object"==typeof i?JSON.stringify(i,null,2):i?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:i})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,n])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:i[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i[e]?.field_description||""}),(0,t.jsx)(r.Input,{name:e,defaultValue:null==n||"null"===n?"":"object"==typeof n?JSON.stringify(n,null,2):n?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var a=e.i(199133);let o=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:i,routerFieldsMetadata:n,onStrategyChange:s})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:n.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:n.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(a.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(a.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),i[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:i[e]})]})},e))})})]});var l=e.i(790848);let d=({enabled:e,routerFieldsMetadata:r,onToggle:i})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(l.Switch,{checked:e,onChange:i,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:i,availableRoutingStrategies:a,routingStrategyDescriptions:l})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),a.length>0&&(0,t.jsx)(o,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:a,routingStrategyDescriptions:l,routerFieldsMetadata:i,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(d,{enabled:e.enableTagFiltering,routerFieldsMetadata:i,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(n,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:i})]})],158392);var c=e.i(994388),u=e.i(653496),h=e.i(107233),f=e.i(271645),p=e.i(888259),m=e.i(592968),g=e.i(361653),g=g;let y=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var x=e.i(37727);function b({group:e,onChange:r,availableModels:i,maxFallbacks:n}){let s=i.filter(t=>t!==e.primaryModel),o=e.fallbackModels.length{let i=[...e.fallbackModels];i.includes(t)&&(i=i.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:i})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:i.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,t.jsx)(g.default,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-sm",children:[(0,t.jsx)(y,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",n," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:o?"Select fallback models to add...":`Maximum ${n} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let i=t.slice(0,n);r({...e,fallbackModels:i})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(r,i)=>{let n=e.fallbackModels.includes(r.value),s=n?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[n&&null!==s&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(m.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:o?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${n} used)`:`Maximum ${n} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((i,n)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-sm transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:n+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:i})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==n),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(x.X,{className:"w-4 h-4"})})]},`${i}-${n}`))})]})]})]})}function _({groups:e,onGroupsChange:r,availableModels:i,maxFallbacks:n=10,maxGroups:s=5}){let[a,o]=(0,f.useState)(e.length>0?e[0].id:"1");(0,f.useEffect)(()=>{e.length>0?e.some(e=>e.id===a)||o(e[0].id):o("1")},[e]);let l=()=>{if(e.length>=s)return;let t=Date.now().toString();r([...e,{id:t,primaryModel:null,fallbackModels:[]}]),o(t)},d=t=>{r(e.map(e=>e.id===t.id?t:e))},m=e.map((r,s)=>{let a=r.primaryModel?r.primaryModel:`Group ${s+1}`;return{key:r.id,label:a,closable:e.length>1,children:(0,t.jsx)(b,{group:r,onChange:d,availableModels:i,maxFallbacks:n})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(c.Button,{variant:"primary",onClick:l,icon:()=>(0,t.jsx)(h.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:a,onChange:o,onEdit:(t,i)=>{"add"===i?l():"remove"===i&&e.length>1&&(t=>{if(1===e.length)return p.default.warning("At least one group is required");let i=e.filter(e=>e.id!==t);r(i),a===t&&i.length>0&&o(i[i.length-1].id)})(t)},items:m,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>_],419470)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(779241),n=e.i(599724),s=e.i(199133),a=e.i(983561),o=e.i(689020);e.s(["default",0,({accessToken:e,value:l,placeholder:d="Select a Model",onChange:c,disabled:u=!1,style:h,className:f,showLabel:p=!0,labelText:m="Select Model"})=>{let[g,y]=(0,r.useState)(l),[x,b]=(0,r.useState)(!1),[_,v]=(0,r.useState)([]),w=(0,r.useRef)(null);return(0,r.useEffect)(()=>{y(l)},[l]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,o.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&v(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[p&&(0,t.jsxs)(n.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.RobotOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{value:g,placeholder:d,onChange:e=>{"custom"===e?(b(!0),y(void 0)):(b(!1),y(e),c&&c(e))},options:[...Array.from(new Set(_.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...h},showSearch:!0,className:`rounded-md ${f||""}`,disabled:u}),x&&(0,t.jsx)(i.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{y(e),c&&c(e)},500)},disabled:u})]})}])},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var n=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(n.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["UploadOutlined",0,s],519756)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,i]of Object.entries(t))e in r&&(r[e]=i);return r}let i=(e,t=0,r=!1,i=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!i)return"-";let n={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",n);let s=e<0?"-":"",a=Math.abs(e),o=a,l="";return a>=1e6?(o=a/1e6,l="M"):a>=1e3&&(o=a/1e3,l="K"),`${s}${o.toLocaleString("en-US",n)}${l}`},n=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return s(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),s(e,r)}},s=(e,r)=>{try{let i=document.createElement("textarea");i.value=e,i.style.position="fixed",i.style.left="-999999px",i.style.top="-999999px",i.setAttribute("readonly",""),document.body.appendChild(i),i.focus(),i.select();let n=document.execCommand("copy");if(document.body.removeChild(i),n)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,n,"formatNumberWithCommas",0,i,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=i(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.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"}))});e.s(["PencilIcon",0,r],797672)},500727,699857,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),i=e.i(764205),n=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,n.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,i.fetchMCPServers)(r,e),enabled:!!r})}],500727);let a=(0,r.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,n.default)();return(0,t.useQuery)({queryKey:a.list(),queryFn:async()=>await (0,i.fetchMCPToolsets)(e),enabled:!!e})}],699857);var o=e.i(843476),l=e.i(271645),d=e.i(536916),c=e.i(599724),u=e.i(409797),h=e.i(246349),h=h;let f=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,p=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,m=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,g=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function y(e,t=""){let r=e.toLowerCase();if(g.test(r))return"read";if(f.test(r))return"delete";if(m.test(r))return"update";if(p.test(r))return"create";if(t){let e=t.toLowerCase();if(g.test(e))return"read";if(f.test(e))return"delete";if(m.test(e))return"update";if(p.test(e))return"create"}return"unknown"}function x(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[y(r.name,r.description)].push(r);return t}let b={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,b,"classifyToolOp",()=>y,"groupToolsByCrud",()=>x],696609);let _=["read","create","update","delete","unknown"],v={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},w={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},k={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:i=!1,searchFilter:n=""})=>{let[s,a]=(0,l.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),f=(0,l.useMemo)(()=>x(e),[e]),p=(0,l.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),m=e=>{if(i)return;let t=new Set(p);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,o.jsx)("div",{className:"space-y-3",children:_.map(e=>{let t,l=f[e];if(0===l.length)return null;if(n){let e=n.toLowerCase();if(!l.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let g=b[e],y=(t=f[e]).length>0&&t.every(e=>p.has(e.name)),x=(e=>{let t=f[e];if(0===t.length)return!1;let r=t.filter(e=>p.has(e.name)).length;return r>0&&r{a(t=>({...t,[e]:!t[e]}))},children:[_?(0,o.jsx)(h.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,o.jsx)(u.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,o.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:g.label}),(0,o.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${v[g.risk]}`,children:"high"===g.risk?"High Risk":"medium"===g.risk?"Medium Risk":"low"===g.risk?"Safe":"Unclassified"}),(0,o.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[l.filter(e=>p.has(e.name)).length,"/",l.length," allowed"]})]}),!i&&(0,o.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,o.jsx)(c.Text,{className:"text-xs text-gray-500",children:y?"All on":x?"Partial":"All off"}),(0,o.jsx)(d.Checkbox,{checked:y,indeterminate:x,onChange:t=>((e,t)=>{if(i)return;let n=new Set(p);for(let r of f[e])t?n.add(r.name):n.delete(r.name);r(Array.from(n))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!_&&(0,o.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:g.description}),!_&&(0,o.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:l.filter(e=>!n||e.name.toLowerCase().includes(n.toLowerCase())||(e.description??"").toLowerCase().includes(n.toLowerCase())).map(e=>{let t,r=(t=e.name,p.has(t));return(0,o.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!i?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>m(e.name),children:[(0,o.jsx)(d.Checkbox,{checked:r,onChange:()=>m(e.name),disabled:i,onClick:e=>e.stopPropagation()}),(0,o.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,o.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,o.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,o.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},309426,e=>{"use strict";var t=e.i(290571),r=e.i(444755),i=e.i(673706),n=e.i(271645),s=e.i(46757);let a=(0,i.makeClassName)("Col"),o=n.default.forwardRef((e,i)=>{let o,l,d,c,{numColSpan:u=1,numColSpanSm:h,numColSpanMd:f,numColSpanLg:p,children:m,className:g}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),x=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return n.default.createElement("div",Object.assign({ref:i,className:(0,r.tremorTwMerge)(a("root"),(o=x(u,s.colSpan),l=x(h,s.colSpanSm),d=x(f,s.colSpanMd),c=x(p,s.colSpanLg),(0,r.tremorTwMerge)(o,l,d,c)),g)},y),m)});o.displayName="Col",e.s(["Col",()=>o],309426)},59935,(e,t,r)=>{var i;let n;e.e,i=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},i=!r.document&&!!r.postMessage,n=r.IS_PAPA_WORKER||!1,s={},a=0,o={};function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new f(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var i=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,n)r.postMessage({results:s,workerId:o.WORKER_ID,finished:i});else if(v(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!i||!v(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),i||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){v(this._config.error)?this._config.error(e):n&&this._config.error&&r.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function d(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),l.call(this,e),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),i||(t.onload=_(this._chunkLoaded,this),t.onerror=_(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var e,r,n=this._config.downloadRequestHeaders;for(r in n)t.setRequestHeader(r,n[r])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}i&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function c(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),l.call(this,e);var t,r,i="u">typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,i?((t=new FileReader).onload=_(this._chunkLoaded,this),t.onerror=_(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function u(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function h(e){l.call(this,e=e||{});var t=[],r=!0,i=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=_(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=_(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=_(function(){this._streamCleanUp(),i=!0,this._streamData("")},this),this._streamCleanUp=_(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function f(e){var t,r,i,n,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,l=this,d=0,c=0,u=!1,h=!1,f=[],g={data:[],errors:[],meta:{}};function y(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function x(){if(g&&i&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!y(e)})),_()){if(g)if(Array.isArray(g.data[0])){for(var t,r=0;_()&&r(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(s.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):a.test(r)?new Date(r):""===r?null:r):r)(o=e.header?n>=f.length?"__parsed_extra":f[n]:o,l=e.transform?e.transform(l,o):l);"__parsed_extra"===o?(i[o]=i[o]||[],i[o].push(l)):i[o]=l}return e.header&&(n>f.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+f.length+" fields but parsed "+n,c+r):ne.preview?r.abort():(g.data=g.data[0],n(g,l))))}),this.parse=function(n,s,a){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(n,l)),i=!1,e.delimiter?v(e.delimiter)&&(e.delimiter=e.delimiter(n),g.meta.delimiter=e.delimiter):((l=((t,r,i,n,s)=>{var a,l,d,c;s=s||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var u=0;u=r.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,r=e.newline,i=e.comments,n=e.step,s=e.preview,a=e.fastMode,l=null,d=!1,c=null==e.quoteChar?'"':e.quoteChar,u=c;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof t||-1=s)return D(!0);break}j.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:k.length,index:h}),M++}}else if(i&&0===C.length&&o.substring(h,h+_)===i){if(-1===R)return D();h=R+b,R=o.indexOf(r,h),E=o.indexOf(t,h)}else if(-1!==E&&(E=s)return D(!0)}return A();function L(e){k.push(e),S=h}function F(e){return -1!==e&&(e=o.substring(M+1,e))&&""===e.trim()?e.length:0}function A(e){return g||(void 0===e&&(e=o.substring(h)),C.push(e),h=y,L(C),w&&z()),D()}function I(e){h=e,L(C),C=[],R=o.indexOf(r,h)}function D(i){if(e.header&&!m&&k.length&&!d){var n=k[0],s=Object.create(null),a=new Set(n);let t=!1;for(let r=0;r{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(n=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(d=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(i=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,d);if("object"==typeof e[0])return f(c||Object.keys(e[0]),e,d)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||c),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),f(e.fields||[],e.data||[],d);throw Error("Unable to serialize unrecognized input");function f(e,t,r){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var r=0;r{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(199133),n=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:a,accessToken:o,placeholder:l="Select vector stores",disabled:d=!1})=>{let[c,u]=(0,r.useState)([]),[h,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){f(!0);try{let e=await (0,n.vectorStoreListCall)(o);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{f(!1)}}})()},[o]),(0,t.jsx)("div",{children:(0,t.jsx)(i.Select,{mode:"multiple",placeholder:l,onChange:e,value:s,loading:h,className:a,allowClear:!0,options:c.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${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})})}])},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode: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}};e.s(["fetchAvailableModels",0,r])},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),i=e.i(673706),n=e.i(271645);let s=n.default.forwardRef((e,s)=>{let{color:a,className:o,children:l}=e;return n.default.createElement("p",{ref:s,className:(0,r.tremorTwMerge)("text-tremor-default",a?(0,i.getColorClassNames)(a,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),o)},l)});s.displayName="Text",e.s(["default",()=>s],936325),e.s(["Text",()=>s],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),i=e.i(480731),n=e.i(95779),s=e.i(444755),a=e.i(673706);let o=(0,a.makeClassName)("Card"),l=r.default.forwardRef((e,l)=>{let{decoration:d="",decorationColor:c,children:u,className:h}=e,f=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:l,className:(0,s.tremorTwMerge)(o("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",c?(0,a.getColorClassNames)(c,n.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case i.HorizontalPositions.Left:return"border-l-4";case i.VerticalPositions.Top:return"border-t-4";case i.HorizontalPositions.Right:return"border-r-4";case i.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),h)},f),u)});l.displayName="Card",e.s(["Card",()=>l],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),i=e.i(444755),n=e.i(673706),s=e.i(271645);let a=s.default.forwardRef((e,a)=>{let{color:o,children:l,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return s.default.createElement("p",Object.assign({ref:a,className:(0,i.tremorTwMerge)("font-medium text-tremor-title",o?(0,n.getColorClassNames)(o,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},c),l)});a.displayName="Title",e.s(["Title",()=>a],629569)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/35e76c89955c3dd4.js b/litellm/proxy/_experimental/out/_next/static/chunks/35e76c89955c3dd4.js deleted file mode 100644 index 0e7f3030aa..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/35e76c89955c3dd4.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),l=e.i(477386),r=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,l)=>{var i;let n=(i=e.callback_name,Object.entries(r.callback_map).find(([e,t])=>t===i)?.[0]||i),o=r.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=r.reverse_callback_map[e]||e,n=r.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),d]})}])},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),p=e.i(948401),x=e.i(72713),g=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:f}=s.Typography;function b({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(f,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(f,{type:"secondary",children:s}),(0,t.jsx)(f,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:k}=s.Typography;function N({data:e,onBack:s,onCreateNew:y,onRegenerate:f,onDelete:N,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:C=!1,regenerateTooltip:I}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(k,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:I||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:f,disabled:C,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:N,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(b,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(p.MailOutlined,{})}),(0,t.jsx)(b,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(b,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(x.CalendarOutlined,{})}),(0,t.jsx)(b,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(b,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(b,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>N],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),C=e.i(271645);let I=C.forwardRef(function(e,t){return C.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),C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},65932,272753,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(492030),d=e.i(166406),c=e.i(772345),m=e.i(560445),u=e.i(464571),p=e.i(178654),x=e.i(525720),g=e.i(808613),h=e.i(311451),j=e.i(28651),_=e.i(212931),y=e.i(621192),f=e.i(770914),b=e.i(898586),v=e.i(439189),k=e.i(497245),N=e.i(96226),T=e.i(435684);function w(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,T.toDate)(e),c=s||a?(0,k.addMonths)(d,s+12*a):d,m=r||l?(0,v.addDays)(c,r+7*l):c;return(0,N.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var S=e.i(271645),C=e.i(237016),I=e.i(727749);let{Text:A}=b.Typography;function F({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[b]=g.Form.useForm(),[v,k]=(0,S.useState)(null),[N,T]=(0,S.useState)(null),[F,M]=(0,S.useState)(null),[L,R]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1);(0,S.useEffect)(()=>{t&&e&&i&&b.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""})},[t,e,b,i]);let B=e=>{if(!e)return null;try{let t,a=parseInt(e);if(Number.isNaN(a))throw Error("Invalid duration format");let s=new Date;if(e.endsWith("mo"))t=w(s,{months:a});else if(e.endsWith("s"))t=w(s,{seconds:a});else if(e.endsWith("m"))t=w(s,{minutes:a});else if(e.endsWith("h"))t=w(s,{hours:a});else if(e.endsWith("d"))t=w(s,{days:a});else if(e.endsWith("w"))t=w(s,{weeks:a});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,S.useEffect)(()=>{N?.duration?M(B(N.duration)):M(null)},[N?.duration]);let E=async()=>{if(e&&i){R(!0);try{let t=await b.validateFields(),a=await (0,s.regenerateKeyCall)(i,e.token||e.token_id,t);k(a.key),I.default.success("Virtual Key regenerated successfully");let l={...a,token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?B(t.duration)??e.expires:e.expires};r&&r(l),R(!1)}catch(e){console.error("Error regenerating key:",e),I.default.fromBackend(e),R(!1)}}},P=()=>{k(null),R(!1),O(!1),b.resetFields(),a()};return(0,n.jsx)(_.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:P,width:520,maskClosable:!1,footer:v?[(0,n.jsxs)(f.Space,{children:[(0,n.jsx)(u.Button,{onClick:P,children:"Close"}),(0,n.jsx)(C.CopyToClipboard,{text:v,onCopy:()=>{O(!0)},children:(0,n.jsx)(u.Button,{type:"primary",icon:D?(0,n.jsx)(o.CheckOutlined,{}):(0,n.jsx)(d.CopyOutlined,{}),children:D?"Copied":"Copy Key"})})]},"footer-actions")]:[(0,n.jsxs)(f.Space,{children:[(0,n.jsx)(u.Button,{onClick:P,children:"Cancel"}),(0,n.jsx)(u.Button,{type:"primary",icon:(0,n.jsx)(c.SyncOutlined,{}),onClick:E,loading:L,children:"Regenerate"})]},"footer-actions")],children:v?(0,n.jsxs)(x.Flex,{vertical:!0,gap:"middle",children:[(0,n.jsx)(m.Alert,{type:"warning",showIcon:!0,message:"Save it now, you will not see it again"}),(0,n.jsxs)(x.Flex,{vertical:!0,gap:2,children:[(0,n.jsx)(A,{type:"secondary",style:{fontSize:12},children:"Key Alias"}),(0,n.jsx)(A,{children:e?.key_alias||"No alias set"})]}),(0,n.jsxs)(x.Flex,{vertical:!0,gap:6,children:[(0,n.jsx)(A,{type:"secondary",style:{fontSize:12},children:"Virtual Key"}),(0,n.jsx)("div",{style:{background:"#f5f5f5",border:"1px solid #e8e8e8",borderRadius:6,padding:"14px 16px",fontFamily:"SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace",fontSize:16,wordBreak:"break-all",color:"#262626"},children:v})]})]}):(0,n.jsxs)(g.Form,{form:b,layout:"vertical",style:{marginTop:4},onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(g.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(h.Input,{disabled:!0})}),(0,n.jsxs)(y.Row,{gutter:12,children:[(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(j.InputNumber,{step:.01,precision:2,style:{width:"100%"}})})}),(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(j.InputNumber,{style:{width:"100%"}})})}),(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(j.InputNumber,{style:{width:"100%"}})})})]}),(0,n.jsxs)(y.Row,{gutter:12,children:[(0,n.jsx)(p.Col,{span:12,children:(0,n.jsx)(g.Form.Item,{name:"duration",label:"Expire Key",extra:(0,n.jsxs)(x.Flex,{vertical:!0,gap:2,children:[(0,n.jsxs)(A,{type:"secondary",style:{fontSize:12},children:["Current expiry:"," ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),F&&(0,n.jsxs)(A,{type:"success",style:{fontSize:12},children:["New expiry: ",F]})]}),children:(0,n.jsx)(h.Input,{placeholder:"e.g. 30s, 30h, 30d"})})}),(0,n.jsx)(p.Col,{span:12,children:(0,n.jsx)(g.Form.Item,{name:"grace_period",label:"Grace Period",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",extra:(0,n.jsx)(A,{type:"secondary",style:{fontSize:12},children:"Recommended: 24h to 72h for production keys"}),rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(h.Input,{placeholder:"e.g. 24h, 2d"})})})]})]})})}e.s(["RegenerateKeyModal",()=>F],272753)},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),p=e.i(197647),x=e.i(653824),g=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),f=e.i(808613),b=e.i(212931),v=e.i(262218),k=e.i(784647),N=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),C=e.i(127952),I=e.i(721929),A=e.i(643449),F=e.i(727749),M=e.i(764205),L=e.i(65932),R=e.i(384767),D=e.i(272753),O=e.i(190702),B=e.i(891547),E=e.i(109799),P=e.i(921511),z=e.i(827252),K=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[p]=f.Form.useForm(),[x,g]=(0,N.useState)([]),[h,j]=(0,N.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,b]=(0,N.useState)([]),[v,k]=(0,N.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,C]=(0,N.useState)(e.organization_id||null),[A,L]=(0,N.useState)(e.auto_rotate||!1),[R,D]=(0,N.useState)(e.rotation_interval||""),[O,el]=(0,N.useState)(!e.expires),[er,ei]=(0,N.useState)(!1),{data:en,isLoading:eo}=(0,E.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ep=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,N.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,M.modelAvailableCall)(n,o,d)).data.map(e=>e.id);b(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);b(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,M.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,N.useEffect)(()=>{p.setFieldValue("disabled_callbacks",v)},[p,v]);let ex=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...e,token:e.token||e.token_id,budget_duration:ex(e.budget_duration),metadata:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,I.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,N.useEffect)(()=>{p.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:ex(e.budget_duration),metadata:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,I.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,p]),(0,N.useEffect)(()=>{p.setFieldValue("auto_rotate",A)},[A,p]),(0,N.useEffect)(()=>{R&&p.setFieldValue("rotation_interval",R)},[R,p]),(0,N.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,M.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}O&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(f.Form,{form:p,onFinish:eh,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(f.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(f.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(f.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(f.Form.Item,{label:"Key Type",children:(0,t.jsx)(f.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(f.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(f.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(f.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(f.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(f.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(f.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(f.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(f.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(B.default,{onChange:e=>{p.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{p.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(f.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(f.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:x.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(f.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>p.setFieldValue("allowed_passthrough_routes",e),value:p.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(f.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>p.setFieldValue("vector_stores",e),value:p.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(f.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>p.setFieldValue("mcp_servers_and_groups",e),value:p.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(f.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(f.Form.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:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:p.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:p.getFieldValue("mcp_tool_permissions")||{},onChange:e=>p.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(f.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>p.setFieldValue("agents_and_groups",e),value:p.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{C(e||null),p.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(f.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(C(t.organization_id),p.setFieldValue("organization_id",t.organization_id)):e||(C(null),p.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(f.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ep??"",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:p.getFieldValue("logging_settings"),onChange:e=>p.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{k((0,w.mapInternalToDisplayNames)(e)),p.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(f.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:p,autoRotationEnabled:A,onAutoRotationChange:L,rotationInterval:R,onRotationIntervalChange:D,neverExpire:O,onNeverExpireChange:el}),(0,t.jsx)(f.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(f.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(f.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(f.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(f.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:B,teams:E,onKeyDataUpdate:P,onDelete:z,backButtonText:K="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,N.useState)(!1),[ee]=f.Form.useForm(),[et,ea]=(0,N.useState)(!1),[es,er]=(0,N.useState)(!1),[ei,en]=(0,N.useState)(""),[eo,ed]=(0,N.useState)(!1),[ec,em]=(0,N.useState)(!1),{mutate:eu,isPending:ep}=(0,L.useResetKeySpend)(),[ex,eg]=(0,N.useState)(B),[eh,ej]=(0,N.useState)(null),[e_,ey]=(0,N.useState)(!1),[ef,eb]=(0,N.useState)({}),[ev,ek]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{B&&eg(B)},[B]),(0,N.useEffect)(()=>{(async()=>{let e=ex?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;ek(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,M.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),eb(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ek(!1)}})()},[U,ex?.metadata?.policies]),(0,N.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!ex)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:K}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let eN=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ex.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a,toolsets:s}=e.mcp_servers_and_groups||{servers:[],accessGroups:[],toolsets:[]};e.object_permission={...ex.object_permission,mcp_servers:t||[],mcp_access_groups:a||[],mcp_toolsets:s||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,M.keyUpdateCall)(U,e);eg(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,O.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,M.keyDeleteCall)(U,ex.token||ex.token_id),F.default.success("Key deleted successfully"),z&&z(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ex.team_id)[0]?.members_with_roles,$||"")||$===ex.user_id&&"Internal Viewer"!==G,eC=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ex.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(k.KeyInfoHeader,{data:{keyName:ex.key_alias||"Virtual Key",keyId:ex.token_id||ex.token,userId:ex.user_id||"",userEmail:ex.user_email||"",createdBy:ex.user_email||ex.user_id||"",createdAt:ex.created_at?ew(ex.created_at):"",lastUpdated:ex.updated_at?ew(ex.updated_at):"",lastActive:ex.last_active?ew(ex.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eC?()=>em(!0):void 0,canModifyKey:eS,backButtonText:K,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:ex,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{eg(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(C.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:ex?.key_alias||"-"},{label:"Key ID",value:ex?.token_id||ex?.token||"-",code:!0},{label:"Team ID",value:ex?.team_id||"-",code:!0},{label:"Spend",value:ex?.spend?`$${(0,i.formatNumberWithCommas)(ex.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:ex?.key_alias}),(0,t.jsxs)(b.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(ex.token||ex.token_id,{onSuccess:()=>{eg(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,O.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ep,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:ex?.key_alias||ex?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(p.Tab,{children:"Overview"}),(0,t.jsx)(p.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==ex.max_budget?`$${(0,i.formatNumberWithCommas)(ex.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ex.models&&ex.models.length>0?ex.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:ex.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(ex.metadata?.guardrails)&&ex.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ex.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof ex.metadata?.disable_global_guardrails&&!0===ex.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(ex.metadata?.policies)&&ex.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ex.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&ef[e]&&ef[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:ef[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,I.extractLoggingSettings)(ex.metadata),disabledCallbacks:Array.isArray(ex.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ex.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:ex,onCancel:()=>Z(!1),onSubmit:eN,teams:E,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ex.token_id||ex.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:ex.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ex.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:ex.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:ex.project_id?(V=J?.find(e=>e.project_id===ex.project_id),V?.project_alias?`${V.project_alias} (${ex.project_id})`:ex.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(ex.organization_id??ex.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(ex.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:ex.expires?ew(ex.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==ex.max_budget?`$${(0,i.formatNumberWithCommas)(ex.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ex.metadata?.tags)&&ex.metadata.tags.length>0?ex.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(ex.metadata?.prompts)&&ex.metadata.prompts.length>0?ex.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ex.allowed_routes)&&ex.allowed_routes.length>0?ex.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(ex.metadata?.allowed_passthrough_routes)&&ex.metadata.allowed_passthrough_routes.length>0?ex.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:ex.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ex.models&&ex.models.length>0?ex.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==ex.max_parallel_requests?ex.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",ex.metadata?.model_tpm_limit?JSON.stringify(ex.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",ex.metadata?.model_rpm_limit?JSON.stringify(ex.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(ex.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:ex.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,I.extractLoggingSettings)(ex.metadata),disabledCallbacks:Array.isArray(ex.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ex.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/37821c5764fddf43.js b/litellm/proxy/_experimental/out/_next/static/chunks/37821c5764fddf43.js new file mode 100644 index 0000000000..eae366bd7a --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/37821c5764fddf43.js @@ -0,0 +1,231 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,952683,e=>{"use strict";var t=e.i(843476),s=e.i(902739),a=e.i(161059),l=e.i(213970),r=e.i(105278),i=e.i(271645),n=e.i(994388),o=e.i(304967),d=e.i(269200),c=e.i(942232),m=e.i(977572),u=e.i(427612),p=e.i(64848),x=e.i(496020),h=e.i(389083),g=e.i(599724),y=e.i(212931),j=e.i(560445),f=e.i(592968),b=e.i(981339),_=e.i(790848),v=e.i(245704),N=e.i(764205),w=e.i(808613),k=e.i(199133),C=e.i(311451),S=e.i(280898),T=e.i(91739),I=e.i(262218),F=e.i(312361),L=e.i(28651),A=e.i(888259),P=e.i(826910),M=e.i(438957),D=e.i(983561),E=e.i(477189),z=e.i(827252),O=e.i(364769),R=e.i(135214),B=e.i(355619),q=e.i(663435),$=e.i(362024),U=e.i(770914),V=e.i(464571),H=e.i(646563),G=e.i(564897);let K={basic:{key:"basic",title:"Basic Information",defaultExpanded:!0,fields:[{name:"name",label:"Display Name",type:"text",required:!0,placeholder:"e.g., Customer Support Agent"},{name:"description",label:"Description",type:"textarea",required:!0,placeholder:"Describe what this agent does...",rows:3},{name:"url",label:"URL",type:"url",required:!1,placeholder:"http://localhost:9999/",tooltip:"Base URL where the agent is hosted (optional)"},{name:"version",label:"Version",type:"text",placeholder:"1.0.0",defaultValue:"1.0.0"},{name:"protocolVersion",label:"Protocol Version",type:"text",placeholder:"1.0",defaultValue:"1.0"}]},skills:{key:"skills",title:"Skills",fields:[{name:"skills",label:"Skills",type:"list",defaultValue:[]}]},capabilities:{key:"capabilities",title:"Capabilities",fields:[{name:"streaming",label:"Streaming",type:"switch",defaultValue:!1},{name:"pushNotifications",label:"Push Notifications",type:"switch"},{name:"stateTransitionHistory",label:"State Transition History",type:"switch"}]},optional:{key:"optional",title:"Optional Settings",fields:[{name:"iconUrl",label:"Icon URL",type:"url",placeholder:"https://example.com/icon.png"},{name:"documentationUrl",label:"Documentation URL",type:"url",placeholder:"https://docs.example.com"},{name:"supportsAuthenticatedExtendedCard",label:"Supports Authenticated Extended Card",type:"switch"}]},litellm:{key:"litellm",title:"LiteLLM Parameters",fields:[{name:"model",label:"Model (Optional)",type:"text"},{name:"make_public",label:"Make Public",type:"switch"}]},cost:{key:"cost",title:"Cost Configuration",fields:[{name:"cost_per_query",label:"Cost Per Query ($)",type:"text",placeholder:"0.0",tooltip:"Fixed cost per query"},{name:"input_cost_per_token",label:"Input Cost Per Token ($)",type:"text",placeholder:"0.000001",tooltip:"Cost per input token"},{name:"output_cost_per_token",label:"Output Cost Per Token ($)",type:"text",placeholder:"0.000002",tooltip:"Cost per output token"}]},tracing:{key:"tracing",title:"Tracing",fields:[{name:"enable_tracing",label:"Enable Tracing",type:"switch",defaultValue:!1,tooltip:"Enable request tracing for this agent"}]}},W="Skill ID",Q=!0,Y="e.g., hello_world",J="Skill Name",X=!0,Z="e.g., Returns hello world",ee="Description",et=!0,es="What this skill does",ea=2,el="Tags (comma-separated)",er=!0,ei="e.g., hello world, greeting",en="Examples (comma-separated)",eo="e.g., hi, hello world",ed=(e,t)=>{let s={agent_name:e.agent_name,agent_card_params:{protocolVersion:e.protocolVersion||"1.0",name:e.name||e.agent_name,description:e.description||"",url:e.url||"",version:e.version||"1.0.0",defaultInputModes:t?.agent_card_params?.defaultInputModes||["text"],defaultOutputModes:t?.agent_card_params?.defaultOutputModes||["text"],capabilities:{streaming:!0===e.streaming,...void 0!==e.pushNotifications&&{pushNotifications:e.pushNotifications},...void 0!==e.stateTransitionHistory&&{stateTransitionHistory:e.stateTransitionHistory}},skills:e.skills||[],...e.iconUrl&&{iconUrl:e.iconUrl},...e.documentationUrl&&{documentationUrl:e.documentationUrl},...void 0!==e.supportsAuthenticatedExtendedCard&&{supportsAuthenticatedExtendedCard:e.supportsAuthenticatedExtendedCard}}},a={};if(e.model&&(a.model=e.model),void 0!==e.make_public&&(a.make_public=e.make_public),e.cost_per_query&&(a.cost_per_query=parseFloat(e.cost_per_query)),e.input_cost_per_token&&(a.input_cost_per_token=parseFloat(e.input_cost_per_token)),e.output_cost_per_token&&(a.output_cost_per_token=parseFloat(e.output_cost_per_token)),Object.keys(a).length>0&&(s.litellm_params=a),null!=e.tpm_limit&&(s.tpm_limit=e.tpm_limit),null!=e.rpm_limit&&(s.rpm_limit=e.rpm_limit),null!=e.session_tpm_limit&&(s.session_tpm_limit=e.session_tpm_limit),null!=e.session_rpm_limit&&(s.session_rpm_limit=e.session_rpm_limit),Array.isArray(e.static_headers)&&e.static_headers.length>0){let t={};e.static_headers.forEach(e=>{let s=e?.header?.trim();s&&(t[s]=e?.value??"")}),Object.keys(t).length>0&&(s.static_headers=t)}return Array.isArray(e.extra_headers)&&e.extra_headers.length>0&&(s.extra_headers=e.extra_headers),s},ec=e=>{let t=e.agent_card_params?.skills?.map(e=>({...e,tags:e.tags,examples:e.examples||[]}))||[];return{agent_name:e.agent_name,name:e.agent_card_params?.name,description:e.agent_card_params?.description,url:e.agent_card_params?.url,version:e.agent_card_params?.version,protocolVersion:e.agent_card_params?.protocolVersion,streaming:e.agent_card_params?.capabilities?.streaming,pushNotifications:e.agent_card_params?.capabilities?.pushNotifications,stateTransitionHistory:e.agent_card_params?.capabilities?.stateTransitionHistory,skills:t,iconUrl:e.agent_card_params?.iconUrl,documentationUrl:e.agent_card_params?.documentationUrl,supportsAuthenticatedExtendedCard:e.agent_card_params?.supportsAuthenticatedExtendedCard,model:e.litellm_params?.model,make_public:e.litellm_params?.make_public,cost_per_query:e.litellm_params?.cost_per_query,input_cost_per_token:e.litellm_params?.input_cost_per_token,output_cost_per_token:e.litellm_params?.output_cost_per_token,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,session_tpm_limit:e.session_tpm_limit,session_rpm_limit:e.session_rpm_limit,static_headers:e.static_headers?Object.entries(e.static_headers).map(([e,t])=>({header:e,value:t})):[],extra_headers:e.extra_headers??[]}},em=()=>(0,t.jsx)(t.Fragment,{children:K.cost.fields.map(e=>(0,t.jsx)(w.Form.Item,{label:e.label,name:e.name,tooltip:e.tooltip,children:(0,t.jsx)(C.Input,{placeholder:e.placeholder,type:"number",step:"0.000001"})},e.name))}),{Panel:eu}=$.Collapse,ep=({showAgentName:e=!0,visiblePanels:s})=>{let a=e=>!s||s.includes(e);return(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)(w.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter a unique agent name"}],tooltip:"Unique identifier for the agent",children:(0,t.jsx)(C.Input,{placeholder:"e.g., customer-support-agent"})}),(0,t.jsxs)($.Collapse,{defaultActiveKey:["basic"],style:{marginBottom:16},children:[a(K.basic.key)&&(0,t.jsx)(eu,{header:`${K.basic.title} (Required)`,children:K.basic.fields.map(e=>(0,t.jsx)(w.Form.Item,{label:e.label,name:e.name,rules:e.required?[{required:!0,message:`Please enter ${e.label.toLowerCase()}`}]:void 0,tooltip:e.tooltip,children:"textarea"===e.type?(0,t.jsx)(C.Input.TextArea,{rows:e.rows,placeholder:e.placeholder}):(0,t.jsx)(C.Input,{placeholder:e.placeholder})},e.name))},K.basic.key),a(K.skills.key)&&(0,t.jsx)(eu,{header:`${K.skills.title} (Required)`,children:(0,t.jsx)(w.Form.List,{name:"skills",children:(e,{add:s,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(e=>(0,t.jsxs)("div",{style:{marginBottom:16,padding:16,border:"1px solid #d9d9d9",borderRadius:4},children:[(0,t.jsx)(w.Form.Item,{...e,label:W,name:[e.name,"id"],rules:[{required:Q,message:"Required"}],children:(0,t.jsx)(C.Input,{placeholder:Y})}),(0,t.jsx)(w.Form.Item,{...e,label:J,name:[e.name,"name"],rules:[{required:X,message:"Required"}],children:(0,t.jsx)(C.Input,{placeholder:Z})}),(0,t.jsx)(w.Form.Item,{...e,label:ee,name:[e.name,"description"],rules:[{required:et,message:"Required"}],children:(0,t.jsx)(C.Input.TextArea,{rows:ea,placeholder:es})}),(0,t.jsx)(w.Form.Item,{...e,label:el,name:[e.name,"tags"],rules:[{required:er,message:"Required"}],getValueFromEvent:e=>e.target.value.split(",").map(e=>e.trim()),getValueProps:e=>({value:Array.isArray(e)?e.join(", "):e}),children:(0,t.jsx)(C.Input,{placeholder:ei})}),(0,t.jsx)(w.Form.Item,{...e,label:en,name:[e.name,"examples"],getValueFromEvent:e=>e.target.value.split(",").map(e=>e.trim()).filter(e=>e),getValueProps:e=>({value:Array.isArray(e)?e.join(", "):""}),children:(0,t.jsx)(C.Input,{placeholder:eo})}),(0,t.jsx)(V.Button,{type:"link",danger:!0,onClick:()=>a(e.name),icon:(0,t.jsx)(G.MinusCircleOutlined,{}),children:"Remove Skill"})]},e.key)),(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(H.PlusOutlined,{}),style:{width:"100%"},children:"Add Skill"})]})})},K.skills.key),a(K.capabilities.key)&&(0,t.jsx)(eu,{header:K.capabilities.title,children:K.capabilities.fields.map(e=>(0,t.jsx)(w.Form.Item,{label:e.label,name:e.name,valuePropName:"checked",children:(0,t.jsx)(_.Switch,{})},e.name))},K.capabilities.key),a(K.optional.key)&&(0,t.jsx)(eu,{header:K.optional.title,children:K.optional.fields.map(e=>(0,t.jsx)(w.Form.Item,{label:e.label,name:e.name,valuePropName:"switch"===e.type?"checked":void 0,children:"switch"===e.type?(0,t.jsx)(_.Switch,{}):(0,t.jsx)(C.Input,{placeholder:e.placeholder})},e.name))},K.optional.key),a(K.cost.key)&&(0,t.jsx)(eu,{header:K.cost.title,children:(0,t.jsx)(em,{})},K.cost.key),a(K.litellm.key)&&(0,t.jsx)(eu,{header:K.litellm.title,children:K.litellm.fields.map(e=>(0,t.jsx)(w.Form.Item,{label:e.label,name:e.name,valuePropName:"switch"===e.type?"checked":void 0,children:"switch"===e.type?(0,t.jsx)(_.Switch,{}):(0,t.jsx)(C.Input,{placeholder:e.placeholder})},e.name))},K.litellm.key),a("auth_headers")&&(0,t.jsxs)(eu,{header:"Authentication Headers",children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Static Headers"," ",(0,t.jsx)(f.Tooltip,{title:"Headers always sent to the backend agent, regardless of the client request. Admin-configured, static wins on conflict.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(w.Form.List,{name:"static_headers",children:(e,{add:s,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(({key:e,name:s,...l})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(w.Form.Item,{...l,name:[s,"header"],rules:[{required:!0,message:"Header name required"}],children:(0,t.jsx)(C.Input,{placeholder:"Header name (e.g. Authorization)",style:{width:220}})}),(0,t.jsx)(w.Form.Item,{...l,name:[s,"value"],rules:[{required:!0,message:"Value required"}],children:(0,t.jsx)(C.Input,{placeholder:"Value (e.g. Bearer token123)",style:{width:260}})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>a(s),style:{color:"#ff4d4f"}})]},e)),(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(H.PlusOutlined,{}),style:{width:"100%"},children:"Add Static Header"})]})})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Forward Client Headers"," ",(0,t.jsx)(f.Tooltip,{title:"Header names to extract from the client's request and forward to the agent. Type a name and press Enter.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),name:"extra_headers",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"e.g. x-api-key, Authorization",tokenSeparators:[","]})})]},"auth_headers")]})]})},{Panel:ex}=$.Collapse,eh=(e,t)=>{let s={...t.litellm_params_template||{}};for(let a of t.credential_fields){let t=e[a.key];t&&!1!==a.include_in_litellm_params&&(s[a.key]=t)}if(e.cost_per_query&&(s.cost_per_query=parseFloat(e.cost_per_query)),e.input_cost_per_token&&(s.input_cost_per_token=parseFloat(e.input_cost_per_token)),e.output_cost_per_token&&(s.output_cost_per_token=parseFloat(e.output_cost_per_token)),t.model_template){let a=t.model_template;for(let s of t.credential_fields){let t=`{${s.key}}`;a.includes(t)&&e[s.key]&&(a=a.replace(t,e[s.key]))}s.model=a}let a={agent_name:e.agent_name,agent_card_params:{protocolVersion:"1.0",name:e.display_name||e.agent_name,description:e.description||`${t.agent_type_display_name} agent`,url:e.api_base||"",version:"1.0.0",defaultInputModes:["text"],defaultOutputModes:["text"],capabilities:{streaming:!0},skills:[{id:"chat",name:"Chat",description:"General chat capability",tags:["chat","conversation"]}]},litellm_params:s};return null!=e.tpm_limit&&(a.tpm_limit=e.tpm_limit),null!=e.rpm_limit&&(a.rpm_limit=e.rpm_limit),null!=e.session_tpm_limit&&(a.session_tpm_limit=e.session_tpm_limit),null!=e.session_rpm_limit&&(a.session_rpm_limit=e.session_rpm_limit),a},eg=({agentTypeInfo:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter a unique agent name"}],tooltip:"Unique identifier for the agent",children:(0,t.jsx)(C.Input,{placeholder:"e.g., my-langgraph-agent"})}),(0,t.jsx)(w.Form.Item,{label:"Description",name:"description",tooltip:"Brief description of what this agent does",children:(0,t.jsx)(C.Input.TextArea,{rows:2,placeholder:"Describe what this agent does..."})}),e.credential_fields.map(e=>(0,t.jsx)(w.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:`Please enter ${e.label}`}]:void 0,tooltip:e.tooltip,initialValue:e.default_value,children:"password"===e.field_type?(0,t.jsx)(C.Input.Password,{placeholder:e.placeholder||""}):"textarea"===e.field_type?(0,t.jsx)(C.Input.TextArea,{rows:3,placeholder:e.placeholder||""}):"select"===e.field_type&&e.options?(0,t.jsx)(k.Select,{placeholder:e.placeholder||"",children:e.options.map(e=>(0,t.jsx)(k.Select.Option,{value:e,children:e},e))}):(0,t.jsx)(C.Input,{placeholder:e.placeholder||""})},e.key)),(0,t.jsx)($.Collapse,{style:{marginBottom:16},children:(0,t.jsx)(ex,{header:K.cost.title,children:(0,t.jsx)(em,{})},K.cost.key)})]});var ey=e.i(75921),ej=e.i(390605),ef=e.i(891547);let{Step:eb}=S.Steps,e_="custom",ev=({visible:e,onClose:s,accessToken:a,onSuccess:l,teams:r})=>{let o,d,{userId:c,userRole:m}=(0,R.default)(),[u]=w.Form.useForm(),[p,x]=(0,i.useState)(0),[h,g]=(0,i.useState)(!1),[j,f]=(0,i.useState)("a2a"),[b,v]=(0,i.useState)([]),[$,U]=(0,i.useState)(!1),[V,H]=(0,i.useState)("create_new"),[G,W]=(0,i.useState)(""),[Q,Y]=(0,i.useState)([]),[J,X]=(0,i.useState)([]),[Z,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)(!1),[ea,el]=(0,i.useState)([]),[er,ei]=(0,i.useState)(!1),[en,eo]=(0,i.useState)([]),[ec,em]=(0,i.useState)(!1),[eu,ex]=(0,i.useState)(""),[ev,eN]=(0,i.useState)(null),[ew,ek]=(0,i.useState)(null),[eC,eS]=(0,i.useState)(!1),[eT,eI]=(0,i.useState)(!1),[eF,eL]=(0,i.useState)(null),[eA,eP]=(0,i.useState)(null);(0,i.useEffect)(()=>{(async()=>{U(!0);try{let e=await (0,N.getAgentCreateMetadata)();v(e)}catch(e){console.error("Error fetching agent metadata:",e)}finally{U(!1)}})()},[]),(0,i.useEffect)(()=>{3===p&&a&&0===J.length&&(async()=>{es(!0);try{let e=await (0,N.keyListCall)(a,null,null,null,null,null,1,100);X(e?.keys||[])}catch(e){console.error("Error fetching keys:",e)}finally{es(!1)}})()},[p,a]),(0,i.useEffect)(()=>{if(1!==p&&3!==p||!a||!c||!m)return;let e=!1;return ei(!0),(0,N.modelAvailableCall)(a,c,m).then(t=>{e||el((t?.data??(Array.isArray(t)?t:[])).map(e=>e.id??e.model_name).filter(Boolean))}).catch(t=>{e||console.error("Error fetching models:",t)}).finally(()=>{e||ei(!1)}),()=>{e=!0}},[p,a,c,m]),(0,i.useEffect)(()=>{if(1!==p||!a)return;let e=!1;return em(!0),(0,N.getAgentsList)(a).then(t=>{e||eo((t?.agents??[]).map(e=>({agent_id:e.agent_id,agent_name:e.agent_name})))}).catch(t=>{e||console.error("Error fetching agents:",t)}).finally(()=>{e||em(!1)}),()=>{e=!0}},[p,a]);let eM=b.find(e=>e.agent_type===j),eD=async()=>{try{if(0===p){await u.validateFields(["agent_name"]);let e=u.getFieldValue("agent_name");e&&!G&&W(`${e}-key`)}x(e=>e+1)}catch{}},eE=async()=>{if(!a)return void A.default.error("No access token available");g(!0);try{await u.validateFields();let e={...u.getFieldsValue(!0)},t=(e=>{if(j===e_)return{agent_name:e.agent_name,agent_card_params:{protocolVersion:"1.0",name:e.agent_name,description:e.description||"",url:"",version:"1.0.0",defaultInputModes:["text"],defaultOutputModes:["text"],capabilities:{streaming:!1},skills:[]}};if("a2a"===j)return ed(e);if(eM?.use_a2a_form_fields){let t=ed(e);for(let s of(eM.litellm_params_template&&(t.litellm_params={...t.litellm_params,...eM.litellm_params_template}),eM.credential_fields)){let a=e[s.key];a&&!1!==s.include_in_litellm_params&&(t.litellm_params[s.key]=a)}return t}return eM?eh(e,eM):null})(e);if(!t){A.default.error("Failed to build agent data"),g(!1);return}let s=e.allowed_mcp_servers_and_groups,r=e.mcp_tool_permissions||{},i=e.entitlement_models||[],n=e.entitlement_agents||[];(s?.servers?.length>0||s?.accessGroups?.length>0||Object.keys(r).length>0||i.length>0||n.length>0)&&(t.object_permission={},s?.servers?.length>0&&(t.object_permission.mcp_servers=s.servers),s?.accessGroups?.length>0&&(t.object_permission.mcp_access_groups=s.accessGroups),Object.keys(r).length>0&&(t.object_permission.mcp_tool_permissions=r),i.length>0&&(t.object_permission.models=i),n.length>0&&(t.object_permission.agents=n)),(eC||eT)&&(t.litellm_params||(t.litellm_params={}),eC&&(t.litellm_params.require_trace_id_on_calls_to_agent=!0),eT&&(t.litellm_params.require_trace_id_on_calls_by_agent=!0,eF&&(t.litellm_params.max_iterations=eF),eA&&(t.litellm_params.max_budget_per_session=eA)));let o=e.guardrails||[];o.length>0&&(t.litellm_params||(t.litellm_params={}),t.litellm_params.guardrails=o);let d=e.team_id||null;d&&(t.team_id=d);let c=await (0,N.createAgentCall)(a,t),m=c.agent_id,p=c.agent_name||e.agent_name||m;if(ex(p),"create_new"===V&&G){let e=await (0,N.keyCreateForAgentCall)(a,m,G,Q,void 0,d);eN(e.key||null)}else if("existing_key"===V){if(!Z){A.default.error("Please select an existing key to assign"),g(!1);return}await (0,N.keyUpdateCall)(a,{key:Z,agent_id:m});let e=J.find(e=>e.token===Z);ek(e?.key_alias||Z.slice(0,12)+"…")}x(4),l()}catch(t){console.error("Error creating agent:",t);let e=t instanceof Error?t.message:String(t);A.default.error(e?`Failed to create agent: ${e}`:"Failed to create agent")}finally{g(!1)}},ez=()=>{u.resetFields(),f("a2a"),x(0),H("create_new"),W(""),Y([]),ee(null),ex(""),eN(null),ek(null),eS(!1),eI(!1),eL(null),eP(null),s()},eO=e=>{f(e),u.resetFields()},eR=j===e_?null:eM?.logo_url||b.find(e=>"a2a"===e.agent_type)?.logo_url;return(0,t.jsx)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[eR&&p<1&&(0,t.jsx)("img",{src:eR,alt:"Agent",className:"w-6 h-6 object-contain"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Agent"})]}),open:e,onCancel:ez,footer:null,width:900,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)(S.Steps,{current:p,size:"small",className:"mb-8",children:[(0,t.jsx)(eb,{title:"Configure"}),(0,t.jsx)(eb,{title:"Entitlements"}),(0,t.jsx)(eb,{title:"Governance"}),(0,t.jsx)(eb,{title:"Agent Management"}),(0,t.jsx)(eb,{title:"Ready"})]}),(0,t.jsxs)(w.Form,{form:u,layout:"vertical",initialValues:"a2a"===j?{...(o={defaultInputModes:["text"],defaultOutputModes:["text"]},Object.values(K).forEach(e=>{e.fields.forEach(e=>{void 0!==e.defaultValue&&(o[e.name]=e.defaultValue)})}),o),allowed_mcp_servers_and_groups:{servers:[],accessGroups:[]},mcp_tool_permissions:{},entitlement_models:[],entitlement_agents:[],guardrails:[]}:{allowed_mcp_servers_and_groups:{servers:[],accessGroups:[]},mcp_tool_permissions:{},entitlement_models:[],entitlement_agents:[],guardrails:[]},className:"space-y-4",children:[0===p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Agent Type"}),required:!0,tooltip:"Select the type of agent you want to create",children:(0,t.jsx)(k.Select,{value:j,onChange:eO,size:"large",style:{width:"100%"},optionLabelProp:"label",dropdownRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,(0,t.jsx)(F.Divider,{style:{margin:"4px 0"}}),(0,t.jsxs)("div",{className:"px-2 py-1",children:[(0,t.jsx)("div",{className:"text-xs text-gray-400 font-medium mb-1 uppercase tracking-wide px-2",children:"Not listed?"}),(0,t.jsxs)("div",{className:`flex items-center gap-3 px-2 py-2 rounded cursor-pointer transition-colors ${j===e_?"bg-amber-50":"hover:bg-amber-50"}`,onClick:()=>eO(e_),children:[(0,t.jsx)(E.AppstoreOutlined,{className:"text-amber-600 text-lg"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-amber-700",children:"Custom / Other"}),(0,t.jsx)(I.Tag,{color:"orange",style:{fontSize:10,padding:"0 4px"},children:"GENERIC"})]}),(0,t.jsx)("div",{className:"text-xs text-amber-600",children:"For agents that don't follow a standard protocol — just needs a virtual key"})]})]})]})]}),children:b.map(e=>(0,t.jsx)(k.Select.Option,{value:e.agent_type,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("img",{src:e.logo_url||"",alt:"",className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e.agent_type_display_name})]}),children:(0,t.jsxs)("div",{className:"flex items-center gap-3 py-1",children:[(0,t.jsx)("img",{src:e.logo_url||"",alt:e.agent_type_display_name,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium",children:e.agent_type_display_name}),e.description&&(0,t.jsx)("div",{className:"text-xs text-gray-500",children:e.description})]})]})},e.agent_type))})}),(0,t.jsx)("div",{className:"mt-4",children:j===e_?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(w.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter an agent name"}],children:(0,t.jsx)(C.Input,{placeholder:"e.g. my-custom-agent"})}),(0,t.jsx)(w.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(C.Input.TextArea,{placeholder:"Describe what this agent does…",rows:3})})]}):"a2a"===j?(0,t.jsx)(ep,{showAgentName:!0}):eM?.use_a2a_form_fields?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ep,{showAgentName:!0}),eM.credential_fields.length>0&&(0,t.jsxs)("div",{className:"mt-4 p-4 border border-gray-200 rounded-lg",children:[(0,t.jsxs)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:[eM.agent_type_display_name," Settings"]}),eM.credential_fields.map(e=>(0,t.jsx)(w.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:`Please enter ${e.label}`}]:void 0,tooltip:e.tooltip,initialValue:e.default_value,children:"password"===e.field_type?(0,t.jsx)(C.Input.Password,{placeholder:e.placeholder||""}):(0,t.jsx)(C.Input,{placeholder:e.placeholder||""})},e.key))]})]}):eM?(0,t.jsx)(eg,{agentTypeInfo:eM}):null})]}),1===p&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Configure which models, agents, and MCP tools this agent is allowed to use. Leave fields empty to allow all (subject to key/team permissions)."}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allowed Models"}),name:"entitlement_models",tooltip:"Restrict which models this agent can call. Leave empty to allow all.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:er?"Loading models...":"Select models (leave empty for all)",tokenSeparators:[","],loading:er,showSearch:!0,options:ea.map(e=>({label:(0,B.getModelDisplayName)(e),value:e}))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allowed Agents (Sub-Agents)"}),name:"entitlement_agents",tooltip:"Restrict which other agents this agent can invoke as sub-agents. Leave empty to allow all.",children:(0,t.jsx)(k.Select,{mode:"multiple",style:{width:"100%"},placeholder:ec?"Loading agents...":"Select agents (leave empty for all)",loading:ec,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:en.map(e=>({label:e.agent_name,value:e.agent_id}))})}),(0,t.jsx)(F.Divider,{className:"my-2"}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(z.InfoCircleOutlined,{title:"Select which MCP servers or access groups this agent can access",style:{marginLeft:"4px"}})]}),name:"allowed_mcp_servers_and_groups",initialValue:{servers:[],accessGroups:[]},children:(0,t.jsx)(ey.default,{onChange:e=>u.setFieldValue("allowed_mcp_servers_and_groups",e),value:u.getFieldValue("allowed_mcp_servers_and_groups")||{servers:[],accessGroups:[]},accessToken:a??"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(w.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(C.Input,{type:"hidden"})}),(0,t.jsx)(w.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(ej.default,{accessToken:a??"",selectedServers:u.getFieldValue("allowed_mcp_servers_and_groups")?.servers??[],toolPermissions:u.getFieldValue("mcp_tool_permissions")??{},onChange:e=>u.setFieldsValue({mcp_tool_permissions:e})})})})]}),2===p&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Tracing"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Require x-litellm-trace-id on calls TO this agent"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Only accept this agent being invoked with a trace-id (e.g. when used as a sub-agent)."})]}),(0,t.jsx)(_.Switch,{checked:eC,onChange:eS})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Require x-litellm-trace-id on calls BY this agent"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Requires LLM/MCP calls made by this agent to include x-litellm-trace-id for session tracking."})]}),(0,t.jsx)(_.Switch,{checked:eT,onChange:e=>{eI(e),e||(eL(null),eP(null))}})]})]})]}),(0,t.jsx)(F.Divider,{className:"my-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Budgets & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4",children:[!eT&&(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg text-sm text-yellow-800",children:'Enable "Require x-litellm-trace-id on calls BY this agent" in Tracing to configure budgets and rate limits.'}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Session Budgets"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Max Iterations"}),(0,t.jsx)(L.InputNumber,{className:"w-full",min:1,placeholder:"e.g. 25",disabled:!eT,value:eF,onChange:e=>eL(e)}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Hard cap on LLM calls per session"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Max Budget Per Session ($)"}),(0,t.jsx)(L.InputNumber,{className:"w-full",min:.01,step:.5,placeholder:"e.g. 5.00",disabled:!eT,value:eA,onChange:e=>eP(e)}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Max spend per trace before returning 429"})]})]}),(0,t.jsx)(F.Divider,{className:"my-2"}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Agent Rate Limits"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Global rate limits applied across all callers of this agent."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(w.Form.Item,{label:"TPM Limit",name:"tpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 100000",disabled:!eT})}),(0,t.jsx)(w.Form.Item,{label:"RPM Limit",name:"rpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 100",disabled:!eT})})]}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700 mt-4",children:"Per-Session Rate Limits"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Rate limits per session (x-litellm-trace-id). Each session gets its own counters."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(w.Form.Item,{label:"Session TPM Limit",name:"session_tpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 10000",disabled:!eT})}),(0,t.jsx)(w.Form.Item,{label:"Session RPM Limit",name:"session_rpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 20",disabled:!eT})})]})]})]}),(0,t.jsx)(F.Divider,{className:"my-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Guardrails"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Apply guardrails to this agent. Selected guardrails will run on all calls made by this agent."}),(0,t.jsx)(w.Form.Item,{name:"guardrails",initialValue:[],children:(0,t.jsx)(ef.default,{accessToken:a??"",value:u.getFieldValue("guardrails")??[],onChange:e=>u.setFieldsValue({guardrails:e})})})]})]}),3===p&&(d=u.getFieldValue("agent_name")||"your-agent",(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-center mb-6",children:(0,t.jsx)(I.Tag,{icon:(0,t.jsx)(D.RobotOutlined,{}),color:"purple",className:"px-3 py-1 text-sm",children:d})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Assign to Team"}),name:"team_id",tooltip:"Optionally assign this agent to a team. The agent and its key will belong to the selected team.",children:(0,t.jsx)(q.default,{})}),(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:`p-4 border-2 rounded-lg cursor-pointer transition-colors ${"create_new"===V?"border-indigo-600 bg-indigo-50":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>H("create_new"),children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 flex-1",children:[(0,t.jsx)(T.Radio,{value:"create_new",checked:"create_new"===V,onChange:()=>H("create_new")}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.KeyOutlined,{className:"text-indigo-600"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"Create a new key for this agent"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"A dedicated key scoped to this agent."}),"create_new"===V&&(0,t.jsx)("div",{className:"mt-3 space-y-3",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Key Name"}),(0,t.jsx)(C.Input,{value:G,onChange:e=>W(e.target.value),placeholder:"e.g. my-agent-key"})]})})]})]}),(0,t.jsx)(I.Tag,{color:"green",children:"Recommended"})]})}),(0,t.jsx)("div",{className:`p-4 border-2 rounded-lg cursor-pointer transition-colors ${"existing_key"===V?"border-indigo-600 bg-indigo-50":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>H("existing_key"),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(T.Radio,{value:"existing_key",checked:"existing_key"===V,onChange:()=>H("existing_key")}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.KeyOutlined,{className:"text-gray-500"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"Assign an existing key"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Re-assign a key you already have to this agent."}),"existing_key"===V&&(0,t.jsx)("div",{className:"mt-3",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(k.Select,{showSearch:!0,style:{width:"100%"},placeholder:"Search by key name…",loading:et,value:Z,onChange:e=>ee(e),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:J.map(e=>({label:e.key_alias||e.token?.slice(0,12)+"…",value:e.token}))})})]})]})})]}),(0,t.jsx)("div",{className:"text-center mt-4",children:(0,t.jsx)("button",{type:"button",className:"text-sm text-gray-500 underline hover:text-gray-700",onClick:()=>H("skip"),children:"Skip for now — I'll assign a key later"})})]})),4===p&&(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)(P.CheckCircleFilled,{className:"text-5xl text-green-500 mb-4",style:{fontSize:48}}),(0,t.jsx)("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Agent Created!"}),(0,t.jsx)("div",{className:"flex justify-center mb-4",children:(0,t.jsx)(I.Tag,{icon:(0,t.jsx)(D.RobotOutlined,{}),color:"purple",className:"px-3 py-1 text-sm",children:eu})}),ev&&(0,t.jsx)("div",{className:"mt-4 text-left max-w-md mx-auto",children:(0,t.jsx)(O.default,{apiKey:ev})}),ew&&(0,t.jsxs)("p",{className:"text-sm text-gray-600 mt-2",children:["Key ",(0,t.jsx)("span",{className:"font-medium",children:ew})," has been assigned to this agent."]}),!ev&&!ew&&"skip"===V&&(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"No key assigned. You can create one from the Virtual Keys page."})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-6 border-t border-gray-100 mt-6",children:[(0,t.jsx)("div",{children:p>0&&p<4&&(0,t.jsx)("button",{type:"button",onClick:()=>{x(e=>Math.max(0,e-1))},className:"text-sm text-gray-600 border border-gray-300 rounded px-4 py-2 hover:bg-gray-50",children:"← Back"})}),(0,t.jsxs)("div",{className:"flex gap-3",children:[p<4&&(0,t.jsx)(n.Button,{variant:"secondary",onClick:ez,children:"Cancel"}),0===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),1===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),2===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),3===p&&(0,t.jsx)(n.Button,{variant:"primary",loading:h,onClick:eE,children:h?"Creating...":"Create Agent →"}),4===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:ez,children:"Done"})]})]})]})})};var eN=e.i(708347),ew=e.i(629569),ek=e.i(197647),eC=e.i(653824),eS=e.i(881073),eT=e.i(404206),eI=e.i(723731),eF=e.i(482725),eL=e.i(869216),eA=e.i(530212);let eP=({agent:e})=>{let s=e.litellm_params;return s?.cost_per_query===void 0&&s?.input_cost_per_token===void 0&&s?.output_cost_per_token===void 0?null:(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ew.Title,{children:"Cost Configuration"}),(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:[void 0!==s.cost_per_query&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Cost Per Query",children:["$",s.cost_per_query]}),void 0!==s.input_cost_per_token&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Input Cost Per Token",children:["$",s.input_cost_per_token]}),void 0!==s.output_cost_per_token&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Output Cost Per Token",children:["$",s.output_cost_per_token]})]})]})},eM=e=>{let t=e.litellm_params?.model||"",s=e.litellm_params?.custom_llm_provider;return"langgraph"===s?"langgraph":"azure_ai"===s?"azure_ai_foundry":"bedrock"===s?"bedrock_agentcore":t.startsWith("langgraph/")?"langgraph":t.startsWith("azure_ai/agents/")?"azure_ai_foundry":t.startsWith("bedrock/agentcore/")?"bedrock_agentcore":"a2a"},eD=(e,t)=>{let s={agent_name:e.agent_name,description:e.agent_card_params?.description||""};for(let a of t.credential_fields)if(!1!==a.include_in_litellm_params)s[a.key]=e.litellm_params?.[a.key]||a.default_value||"";else if(t.model_template&&e.litellm_params?.model){let l=e.litellm_params.model,r=t.model_template.split("/"),i=l.split("/");r.forEach((e,t)=>{e===`{${a.key}}`&&i[t]&&(s[a.key]=i[t])})}return s.cost_per_query=e.litellm_params?.cost_per_query,s.input_cost_per_token=e.litellm_params?.input_cost_per_token,s.output_cost_per_token=e.litellm_params?.output_cost_per_token,s},eE=({agentId:e,onClose:s,accessToken:a,isAdmin:l})=>{let[r,d]=(0,i.useState)(null),[c,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(!1),[y]=w.Form.useForm(),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)("a2a");(0,i.useEffect)(()=>{(async()=>{try{let e=await (0,N.getAgentCreateMetadata)();f(e)}catch(e){console.error("Error fetching agent metadata:",e)}})()},[]),(0,i.useEffect)(()=>{v()},[e,a]);let v=async()=>{if(a){m(!0);try{let t=await (0,N.getAgentInfo)(a,e);d(t);let s=eM(t);if(_(s),"a2a"===s)y.setFieldsValue(ec(t));else{let e=j.find(e=>e.agent_type===s);e?y.setFieldsValue(eD(t,e)):y.setFieldsValue(ec(t))}}catch(e){console.error("Error fetching agent info:",e),A.default.error("Failed to load agent information")}finally{m(!1)}}};(0,i.useEffect)(()=>{if(r&&j.length>0){let e=eM(r);if("a2a"!==e){let t=j.find(t=>t.agent_type===e);t&&y.setFieldsValue(eD(r,t))}}},[j,r]);let k=j.find(e=>e.agent_type===b),S=async t=>{if(a&&r){h(!0);try{let s;"a2a"===b?s=ed(t,r):k?(s=eh(t,k)).agent_name=t.agent_name:s=ed(t,r),await (0,N.patchAgentCall)(a,e,s),A.default.success("Agent updated successfully"),p(!1),v()}catch(e){console.error("Error updating agent:",e),A.default.error("Failed to update agent")}finally{h(!1)}}};if(c)return(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!r)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"text-center",children:"Agent not found"}),(0,t.jsx)(n.Button,{onClick:s,className:"mt-4",children:"Back to Agents List"})]});let T=e=>e?new Date(e).toLocaleString():"-";return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eA.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Agents"}),(0,t.jsx)(ew.Title,{children:r.agent_name||"Unnamed Agent"}),(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:r.agent_id})]}),(0,t.jsxs)(eC.TabGroup,{children:[(0,t.jsxs)(eS.TabList,{className:"mb-4",children:[(0,t.jsx)(ek.Tab,{children:"Overview"},"overview"),l?(0,t.jsx)(ek.Tab,{children:"Settings"},"settings"):(0,t.jsx)(t.Fragment,{})]}),(0,t.jsxs)(eI.TabPanels,{children:[(0,t.jsxs)(eT.TabPanel,{children:[(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Agent ID",children:r.agent_id}),(0,t.jsx)(eL.Descriptions.Item,{label:"Agent Name",children:r.agent_name}),(0,t.jsx)(eL.Descriptions.Item,{label:"Display Name",children:r.agent_card_params?.name||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:r.agent_card_params?.description||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"URL",children:r.agent_card_params?.url||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Version",children:r.agent_card_params?.version||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Protocol Version",children:r.agent_card_params?.protocolVersion||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Streaming",children:r.agent_card_params?.capabilities?.streaming?"Yes":"No"}),r.agent_card_params?.capabilities?.pushNotifications&&(0,t.jsx)(eL.Descriptions.Item,{label:"Push Notifications",children:"Yes"}),r.agent_card_params?.capabilities?.stateTransitionHistory&&(0,t.jsx)(eL.Descriptions.Item,{label:"State Transition History",children:"Yes"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Skills",children:[r.agent_card_params?.skills?.length||0," configured"]}),r.litellm_params?.model&&(0,t.jsx)(eL.Descriptions.Item,{label:"Model",children:r.litellm_params.model}),r.litellm_params?.make_public!==void 0&&(0,t.jsx)(eL.Descriptions.Item,{label:"Make Public",children:r.litellm_params.make_public?"Yes":"No"}),r.agent_card_params?.iconUrl&&(0,t.jsx)(eL.Descriptions.Item,{label:"Icon URL",children:r.agent_card_params.iconUrl}),r.agent_card_params?.documentationUrl&&(0,t.jsx)(eL.Descriptions.Item,{label:"Documentation URL",children:r.agent_card_params.documentationUrl}),(0,t.jsx)(eL.Descriptions.Item,{label:"TPM Limit",children:r.tpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"RPM Limit",children:r.rpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Session TPM Limit",children:r.session_tpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Session RPM Limit",children:r.session_rpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Created At",children:T(r.created_at)}),(0,t.jsx)(eL.Descriptions.Item,{label:"Updated At",children:T(r.updated_at)})]}),r.object_permission&&(r.object_permission.mcp_servers?.length||r.object_permission.mcp_access_groups?.length||r.object_permission.mcp_tool_permissions&&Object.keys(r.object_permission.mcp_tool_permissions).length>0)&&(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ew.Title,{children:"MCP Tool Permissions"}),(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:[r.object_permission.mcp_servers&&r.object_permission.mcp_servers.length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"MCP Servers",children:r.object_permission.mcp_servers.join(", ")}),r.object_permission.mcp_access_groups&&r.object_permission.mcp_access_groups.length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"MCP Access Groups",children:r.object_permission.mcp_access_groups.join(", ")}),r.object_permission.mcp_tool_permissions&&Object.keys(r.object_permission.mcp_tool_permissions).length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"Tool permissions per server",children:(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(r.object_permission.mcp_tool_permissions).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"font-medium",children:[e,":"]})," ",Array.isArray(s)?s.join(", "):String(s)]},e))})})]})]}),(0,t.jsx)(eP,{agent:r}),r.agent_card_params?.skills&&r.agent_card_params.skills.length>0&&(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ew.Title,{children:"Skills"}),(0,t.jsx)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:r.agent_card_params.skills.map((e,s)=>(0,t.jsx)(eL.Descriptions.Item,{label:e.name||`Skill ${s+1}`,children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"ID:"})," ",e.id]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Description:"})," ",e.description]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Tags:"})," ",Array.isArray(e.tags)?e.tags.join(", "):e.tags]}),e.examples&&e.examples.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Examples:"})," ",Array.isArray(e.examples)?e.examples.join(", "):e.examples]})]})},s))})]})]}),l&&(0,t.jsx)(eT.TabPanel,{children:(0,t.jsxs)(o.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(ew.Title,{children:"Agent Settings"}),!u&&(0,t.jsx)(n.Button,{onClick:()=>p(!0),children:"Edit Settings"})]}),u?(0,t.jsxs)(w.Form,{form:y,layout:"vertical",onFinish:S,children:[(0,t.jsx)(w.Form.Item,{label:"Agent ID",children:(0,t.jsx)(C.Input,{value:r.agent_id,disabled:!0})}),"a2a"===b?(0,t.jsx)(ep,{showAgentName:!0}):k?(0,t.jsx)(eg,{agentTypeInfo:k}):(0,t.jsx)(ep,{showAgentName:!0}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(ew.Title,{className:"mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(w.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})}),(0,t.jsx)(w.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(w.Form.Item,{label:"Session TPM Limit",name:"session_tpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})}),(0,t.jsx)(w.Form.Item,{label:"Session RPM Limit",name:"session_rpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,t.jsx)(V.Button,{onClick:()=>{p(!1),v()},children:"Cancel"}),(0,t.jsx)(n.Button,{loading:x,children:"Save Changes"})]})]}):(0,t.jsx)(g.Text,{children:'Click "Edit Settings" to modify agent configuration.'})]})})]})]})]})};var ez=e.i(727749),eO=e.i(500330),eR=e.i(902555);let eB=({accessToken:e,userRole:s,teams:a})=>{let[l,r]=(0,i.useState)([]),[w,k]=(0,i.useState)({}),[C,S]=(0,i.useState)(!1),[T,I]=(0,i.useState)(!1),[F,L]=(0,i.useState)(!1),[A,P]=(0,i.useState)(null),[M,D]=(0,i.useState)(null),[E,z]=(0,i.useState)(!1),O=!!s&&(0,eN.isAdminRole)(s),R=async t=>{if(e){I(!0);try{let s=await (0,N.getAgentsList)(e,t??E);r(s.agents||[])}catch(e){console.error("Error fetching agents:",e)}finally{I(!1)}}},B=async()=>{if(e)try{let{keys:t=[]}=await (0,N.keyListCall)(e,null,null,null,null,null,1,500),s={};for(let e of t){let t=e.agent_id;t&&!s[t]&&(s[t]={has_key:!0,key_alias:e.key_alias,token_prefix:e.token?`${e.token.slice(0,8)}…`:void 0})}k(s)}catch(e){console.error("Error fetching keys for agents:",e)}};(0,i.useEffect)(()=>{R()},[e]),(0,i.useEffect)(()=>{e&&l.length>0?B():0===l.length&&k({})},[e,l.length]);let q=async()=>{if(A&&e){L(!0);try{await (0,N.deleteAgentCall)(e,A.id),ez.default.success(`Agent "${A.name}" deleted successfully`),R()}catch(e){console.error("Error deleting agent:",e),ez.default.fromBackend("Failed to delete agent")}finally{L(!1),P(null)}}},$=[...l].sort((e,t)=>{let s=e.created_at?new Date(e.created_at).getTime():0;return(t.created_at?new Date(t.created_at).getTime():0)-s}),U=O?7:6;return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Agents"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"List of A2A-spec agents that are available to be used in your organization. Go to AI Hub, to make agents public."}),(0,t.jsx)(j.Alert,{message:"Why do agents need keys?",description:"Keys scope access to an agent and allow it to call MCP tools. Assign a key when creating an agent or from the Virtual Keys page.",type:"info",showIcon:!0,className:"mb-3"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-4",children:[O&&(0,t.jsx)(n.Button,{onClick:()=>{M&&D(null),S(!0)},disabled:!e,children:"+ Add New Agent"}),(0,t.jsx)(f.Tooltip,{title:"When enabled, only agents with reachable URLs are shown",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(v.CheckCircleOutlined,{className:E?"text-green-500":"text-gray-400"}),(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"Health Check"}),(0,t.jsx)(_.Switch,{size:"small",checked:E,onChange:e=>{z(e),R(e)},loading:T&&E})]})})]})]}),M?(0,t.jsx)(eE,{agentId:M,onClose:()=>D(null),accessToken:e,isAdmin:O}):(0,t.jsx)(o.Card,{children:T?(0,t.jsx)(b.Skeleton,{active:!0,paragraph:{rows:3}}):(0,t.jsxs)(d.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Agent Name"}),(0,t.jsx)(p.TableHeaderCell,{children:"Agent ID"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend (USD)"}),(0,t.jsx)(p.TableHeaderCell,{children:"Model"}),(0,t.jsx)(p.TableHeaderCell,{children:"Created"}),(0,t.jsx)(p.TableHeaderCell,{children:"Status"}),O&&(0,t.jsx)(p.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(c.TableBody,{children:0===$.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:U,children:(0,t.jsx)(g.Text,{className:"text-center",children:'No agents found. Click "+ Add New Agent" to create one.'})})}):$.map(e=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:e.agent_name})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(f.Tooltip,{title:e.agent_id,children:(0,t.jsxs)(n.Button,{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:()=>D(e.agent_id),children:[e.agent_id.slice(0,7),"..."]})})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:(0,eO.formatNumberWithCommas)(e.spend,4)})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(h.Badge,{size:"xs",color:"blue",children:e.litellm_params?.model||"N/A"})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"})}),(0,t.jsx)(m.TableCell,{children:w[e.agent_id]?.has_key?(0,t.jsx)(h.Badge,{color:"green",children:"Active"}):(0,t.jsx)(h.Badge,{color:"yellow",children:"Needs Setup"})}),O&&(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(eR.default,{variant:"Delete",onClick:()=>{P({id:e.agent_id,name:e.agent_name})}})})]},e.agent_id))})]})}),(0,t.jsx)(ev,{visible:C,onClose:()=>{S(!1)},accessToken:e,onSuccess:()=>{R()},teams:a}),A&&(0,t.jsxs)(y.Modal,{title:"Delete Agent",open:null!==A,onOk:q,onCancel:()=>{P(null)},confirmLoading:F,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete agent: ",A.name,"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var eq=e.i(646050),e$=e.i(559061),eU=e.i(704308),eV=e.i(785242),eH=e.i(936578),eG=e.i(677667),eK=e.i(898667),eW=e.i(130643),eQ=e.i(779241),eY=e.i(752978),eJ=e.i(68155),eX=e.i(591935);let eZ=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))});var e0=e.i(836991);function e1({data:e,columns:s,isLoading:a=!1,loadingMessage:l="Loading...",emptyMessage:r="No data",getRowKey:i}){return(0,t.jsxs)(d.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsx)(x.TableRow,{children:s.map((e,s)=>(0,t.jsx)(p.TableHeaderCell,{style:{width:e.width},children:e.header},s))})}),(0,t.jsx)(c.TableBody,{children:a?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:s.length,className:"text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:l})})}):e.length>0?e.map((e,a)=>(0,t.jsx)(x.TableRow,{children:s.map((s,a)=>(0,t.jsx)(m.TableCell,{children:s.cell?s.cell(e):String(e[s.accessor]??"")},a))},i?i(e,a):a)):(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:s.length,className:"text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:r})})})})]})}var e2=e.i(916925);let e4=e=>{let t=Object.keys(e2.provider_map).find(t=>e2.provider_map[t]===e);if(t){let e=e2.Providers[t],s=e2.providerLogoMap[e];return{displayName:e,logo:s,enumKey:t}}return{displayName:e,logo:"",enumKey:null}},e5=e=>e2.provider_map[e]||null,e6=(e,t)=>{let s=e.target,a=s.parentElement;if(a){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),a.replaceChild(e,s)}},e3=({discountConfig:e,onDiscountChange:s,onRemoveProvider:a})=>{let[l,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(""),d=e=>{let t=parseFloat(n);!isNaN(t)&&t>=0&&t<=100&&s(e,(t/100).toString()),r(null),o("")},c=()=>{r(null),o("")},m=Object.entries(e).map(([e,t])=>({provider:e,discount:t})).sort((e,t)=>{let s=e4(e.provider).displayName,a=e4(t.provider).displayName;return s.localeCompare(a)});return(0,t.jsx)(e1,{data:m,columns:[{header:"Provider",cell:e=>{let{displayName:s,logo:a}=e4(e.provider);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,s)}),(0,t.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Discount Percentage",cell:e=>(0,t.jsx)("div",{className:"flex items-center gap-2",children:l===e.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eQ.TextInput,{value:n,onValueChange:o,onKeyDown:t=>{var s;return s=e.provider,void("Enter"===t.key?d(s):"Escape"===t.key&&c())},placeholder:"5",className:"w-20",autoFocus:!0}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"}),(0,t.jsx)(eY.Icon,{icon:eZ,size:"sm",onClick:()=>d(e.provider),className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,t.jsx)(eY.Icon,{icon:e0.XIcon,size:"sm",onClick:c,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(g.Text,{className:"font-medium",children:[(100*e.discount).toFixed(1),"%"]}),(0,t.jsx)(eY.Icon,{icon:eX.PencilAltIcon,size:"sm",onClick:()=>{var t,s;return t=e.provider,s=e.discount,void(r(t),o((100*s).toString()))},className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"250px"},{header:"Actions",cell:e=>{let{displayName:s}=e4(e.provider);return(0,t.jsx)(eY.Icon,{icon:eJ.TrashIcon,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"})},e8=({discountConfig:e,selectedProvider:s,newDiscount:a,onProviderChange:l,onDiscountChange:r,onAddProvider:i})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,t.jsx)(f.Tooltip,{title:"Select the LLM provider you want to configure a discount for",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select provider",value:s,onChange:l,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),children:Object.entries(e2.Providers).map(([s,a])=>{let l=e2.provider_map[s];return l&&e[l]?null:(0,t.jsx)(k.Select.Option,{value:s,label:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:e2.providerLogoMap[a],alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,a)}),(0,t.jsx)("span",{children:a})]})},s)})})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Discount Percentage",(0,t.jsx)(f.Tooltip,{title:"Enter a percentage value (e.g., 5 for 5% discount)",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a discount percentage"}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{placeholder:"5",value:a,onValueChange:r,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,t.jsx)(n.Button,{variant:"primary",onClick:i,disabled:!s||!a,children:"Add Provider Discount"})})]}),e7=({marginConfig:e,onMarginChange:s,onRemoveProvider:a})=>{let[l,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(""),[d,c]=(0,i.useState)(""),m=()=>{r(null),o(""),c("")},u=Object.entries(e).map(([e,t])=>({provider:e,margin:t})).sort((e,t)=>{if("global"===e.provider)return -1;if("global"===t.provider)return 1;let s=e4(e.provider).displayName,a=e4(t.provider).displayName;return s.localeCompare(a)});return(0,t.jsx)(e1,{data:u,columns:[{header:"Provider",cell:e=>{if("global"===e.provider)return(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsx)("span",{className:"font-medium",children:"Global (All Providers)"})});let{displayName:s,logo:a}=e4(e.provider);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,s)}),(0,t.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Margin",cell:e=>(0,t.jsx)("div",{className:"flex items-center gap-2",children:l===e.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{value:n,onValueChange:o,placeholder:"10",className:"w-20",autoFocus:!0}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"}),(0,t.jsx)("span",{className:"text-gray-400",children:"+"}),(0,t.jsx)("span",{className:"text-gray-600",children:"$"}),(0,t.jsx)(eQ.TextInput,{value:d,onValueChange:c,placeholder:"0.001",className:"w-24"})]}),(0,t.jsx)(eY.Icon,{icon:eZ,size:"sm",onClick:()=>{var t;let a,l;return t=e.provider,a=n?parseFloat(n):void 0,l=d?parseFloat(d):void 0,void(void 0!==a&&!isNaN(a)&&a>=0&&a<=1e3?void 0!==l&&!isNaN(l)&&l>=0?s(t,{percentage:a/100,fixed_amount:l}):s(t,a/100):void 0!==l&&!isNaN(l)&&l>=0&&s(t,{fixed_amount:l}),r(null),o(""),c(""))},className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,t.jsx)(eY.Icon,{icon:e0.XIcon,size:"sm",onClick:m,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Text,{className:"font-medium",children:(e=>{if("number"==typeof e)return`${(100*e).toFixed(1)}%`;let t=[];return void 0!==e.percentage&&t.push(`${(100*e.percentage).toFixed(1)}%`),void 0!==e.fixed_amount&&t.push(`$${e.fixed_amount.toFixed(6)}`),t.join(" + ")||"0%"})(e.margin)}),(0,t.jsx)(eY.Icon,{icon:eX.PencilAltIcon,size:"sm",onClick:()=>{var t,s;return t=e.provider,s=e.margin,void(r(t),"number"==typeof s?(o((100*s).toString()),c("")):(o(s.percentage?(100*s.percentage).toString():""),c(s.fixed_amount?s.fixed_amount.toString():"")))},className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"350px"},{header:"Actions",cell:e=>{let s="global"===e.provider?"Global":e4(e.provider).displayName;return(0,t.jsx)(eY.Icon,{icon:eJ.TrashIcon,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider margins configured"})},e9=({marginConfig:e,selectedProvider:s,marginType:a,percentageValue:l,fixedAmountValue:r,onProviderChange:i,onMarginTypeChange:o,onPercentageChange:d,onFixedAmountChange:c,onAddProvider:m})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,t.jsx)(f.Tooltip,{title:"Select 'Global' to apply margin to all providers, or select a specific provider",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,t.jsxs)(k.Select,{showSearch:!0,placeholder:"Select provider or 'Global'",value:s,onChange:i,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),children:[(0,t.jsx)(k.Select.Option,{value:"global",label:"Global (All Providers)",children:(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsx)("span",{className:"font-medium",children:"Global (All Providers)"})})},"global"),Object.entries(e2.Providers).map(([s,a])=>{let l=e2.provider_map[s];return l&&e[l]?null:(0,t.jsx)(k.Select.Option,{value:s,label:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:e2.providerLogoMap[a],alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,a)}),(0,t.jsx)("span",{children:a})]})},s)})]})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Margin Type",(0,t.jsx)(f.Tooltip,{title:"Choose how to apply the margin: percentage-based or fixed amount",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a margin type"}],children:(0,t.jsxs)(T.Radio.Group,{value:a,onChange:e=>o(e.target.value),className:"w-full",children:[(0,t.jsx)(T.Radio,{value:"percentage",children:"Percentage-based"}),(0,t.jsx)(T.Radio,{value:"fixed",children:"Fixed Amount"})]})}),"percentage"===a&&(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Margin Percentage",(0,t.jsx)(f.Tooltip,{title:"Enter a percentage value (e.g., 10 for 10% margin)",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a margin percentage"},{validator:(e,t)=>{if(!t)return Promise.reject(Error("Please enter a margin percentage"));let s=parseFloat(t);return isNaN(s)||s<0||s>1e3?Promise.reject(Error("Percentage must be between 0 and 1000")):Promise.resolve()}}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{placeholder:"10",value:l,onValueChange:d,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"})]})}),"fixed"===a&&(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Fixed Margin Amount",(0,t.jsx)(f.Tooltip,{title:"Enter a fixed amount in USD (e.g., 0.001 for $0.001 per request)",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a fixed amount"},{validator:(e,t)=>{if(!t)return Promise.reject(Error("Please enter a fixed amount"));let s=parseFloat(t);return isNaN(s)||s<0?Promise.reject(Error("Fixed amount must be non-negative")):Promise.resolve()}}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"$"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.001",value:r,onValueChange:c,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,t.jsx)(n.Button,{variant:"primary",onClick:m,disabled:!s||"percentage"===a&&!l||"fixed"===a&&!r,children:"Add Provider Margin"})})]});var te=e.i(291542),tt=e.i(955135),ts=e.i(175712);e.i(247167),e.i(62664);var ta=e.i(697539),tl=e.i(963188),tr=e.i(763731),ti=e.i(343794),tn=e.i(244009),to=e.i(242064),td=e.i(185793);let tc=e=>{let t,{value:s,formatter:a,precision:l,decimalSeparator:r,groupSeparator:n="",prefixCls:o}=e;if("function"==typeof a)t=a(s);else{let e=String(s),a=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(a&&"-"!==e){let e=a[1],s=a[2]||"0",d=a[4]||"";s=s.replace(/\B(?=(\d{3})+(?!\d))/g,n),"number"==typeof l&&(d=d.padEnd(l,"0").slice(0,l>0?l:0)),d&&(d=`${r}${d}`),t=[i.createElement("span",{key:"int",className:`${o}-content-value-int`},e,s),d&&i.createElement("span",{key:"decimal",className:`${o}-content-value-decimal`},d)]}else t=e}return i.createElement("span",{className:`${o}-content-value`},t)};var tm=e.i(183293),tu=e.i(246422),tp=e.i(838378);let tx=(0,tu.genStyleHooks)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:s,padding:a,colorTextDescription:l,titleFontSize:r,colorTextHeading:i,contentFontSize:n,fontFamily:o}=e;return{[t]:Object.assign(Object.assign({},(0,tm.resetComponent)(e)),{[`${t}-title`]:{marginBottom:s,color:l,fontSize:r},[`${t}-skeleton`]:{paddingTop:a},[`${t}-content`]:{color:i,fontSize:n,fontFamily:o,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:s},[`${t}-content-suffix`]:{marginInlineStart:s}}})}})((0,tp.mergeToken)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:s}=e;return{titleFontSize:s,contentFontSize:t}});var th=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(s[a[l]]=e[a[l]]);return s};let tg=i.forwardRef((e,t)=>{let{prefixCls:s,className:a,rootClassName:l,style:r,valueStyle:n,value:o=0,title:d,valueRender:c,prefix:m,suffix:u,loading:p=!1,formatter:x,precision:h,decimalSeparator:g=".",groupSeparator:y=",",onMouseEnter:j,onMouseLeave:f}=e,b=th(e,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:_,direction:v,className:N,style:w}=(0,to.useComponentConfig)("statistic"),k=_("statistic",s),[C,S,T]=tx(k),I=i.createElement(tc,{decimalSeparator:g,groupSeparator:y,prefixCls:k,formatter:x,precision:h,value:o}),F=(0,ti.default)(k,{[`${k}-rtl`]:"rtl"===v},N,a,l,S,T),L=i.useRef(null);i.useImperativeHandle(t,()=>({nativeElement:L.current}));let A=(0,tn.default)(b,{aria:!0,data:!0});return C(i.createElement("div",Object.assign({},A,{ref:L,className:F,style:Object.assign(Object.assign({},w),r),onMouseEnter:j,onMouseLeave:f}),d&&i.createElement("div",{className:`${k}-title`},d),i.createElement(td.default,{paragraph:!1,loading:p,className:`${k}-skeleton`,active:!0},i.createElement("div",{style:n,className:`${k}-content`},m&&i.createElement("span",{className:`${k}-content-prefix`},m),c?c(I):I,u&&i.createElement("span",{className:`${k}-content-suffix`},u)))))}),ty=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];var tj=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(s[a[l]]=e[a[l]]);return s};let tf=e=>{let{value:t,format:s="HH:mm:ss",onChange:a,onFinish:l,type:r}=e,n=tj(e,["value","format","onChange","onFinish","type"]),o="countdown"===r,[d,c]=i.useState(null),m=(0,ta.useEvent)(()=>{let e=Date.now(),s=new Date(t).getTime();return c({}),null==a||a(o?s-e:e-s),!o||!(s{let e,t=()=>{e=(0,tl.default)(()=>{m()&&t()})};return t(),()=>tl.default.cancel(e)},[t,o]),i.useEffect(()=>{c({})},[]),i.createElement(tg,Object.assign({},n,{value:t,valueRender:e=>(0,tr.cloneElement)(e,{title:void 0}),formatter:(e,t)=>d?function(e,t,s){let a,l,r,i,n,o,{format:d=""}=t,c=new Date(e).getTime(),m=Date.now();return a=s?Math.max(c-m,0):Math.max(m-c,0),l=/\[[^\]]*]/g,r=(d.match(l)||[]).map(e=>e.slice(1,-1)),i=d.replace(l,"[]"),n=ty.reduce((e,[t,s])=>{if(e.includes(t)){let l=Math.floor(a/s);return a-=l*s,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return l.toString().padStart(t,"0")})}return e},i),o=0,n.replace(l,()=>{let e=r[o];return o+=1,e})}(e,Object.assign(Object.assign({},t),{format:s}),o):"-"}))},tb=i.memo(e=>i.createElement(tf,Object.assign({},e,{type:"countdown"})));tg.Timer=tf,tg.Countdown=tb;var t_=e.i(621192),tv=e.i(178654),tN=e.i(56456),tw=e.i(755151),tk=e.i(240647),tC=e.i(737434),tS=e.i(91500),tT=e.i(931067);let tI={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 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"}}]},name:"file-excel",theme:"outlined"};var tF=e.i(9583),tL=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:tI}))});let tA=e=>null==e?"-":0===e?"$0.00":e<.01?`$${e.toFixed(6)}`:e<1?`$${e.toFixed(4)}`:`$${(0,eO.formatNumberWithCommas)(e,2)}`,tP=e=>null==e?"-":(0,eO.formatNumberWithCommas)(e,0),tM=({multiResult:e})=>{let[s,a]=(0,i.useState)(!1),l=(0,i.useRef)(null),r=e.entries.some(e=>null!==e.result);return((0,i.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&a(!1)};return s&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[s]),r)?(0,t.jsxs)("div",{className:"relative inline-block",ref:l,children:[(0,t.jsx)(n.Button,{size:"xs",variant:"secondary",icon:tC.DownloadOutlined,onClick:()=>a(!s),children:"Export"}),s&&(0,t.jsxs)("div",{className:"absolute right-0 mt-1 w-44 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:[(0,t.jsxs)("button",{className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>{(e=>{let t=window.open("","_blank");if(!t)return alert("Please allow popups to export PDF");let s=e.entries.filter(e=>null!==e.result),a=s.length,l=` + + + + Multi-Model Cost Estimate Report + + + +

LLM Cost Estimate Report

+

${a} model${1!==a?"s":""} configured

+ +
+

Combined Totals

+
+
+
Total Per Request
+
${tA(e.totals.cost_per_request)}
+
+
+
Total Daily
+
${tA(e.totals.daily_cost)}
+
+
+
Total Monthly
+
${tA(e.totals.monthly_cost)}
+
+
+ ${e.totals.margin_per_request>0?` +
+
+
Margin/Request
+
${tA(e.totals.margin_per_request)}
+
+
+
Daily Margin
+
${tA(e.totals.daily_margin)}
+
+
+
Monthly Margin
+
${tA(e.totals.monthly_margin)}
+
+
+ `:""} +
+ +

Model Breakdown

+ ${s.map(e=>{let t;return t=e.result,` +
+

${t.model} ${t.provider?`(${t.provider})`:""}

+ +
+

Input Tokens per Request: ${tP(t.input_tokens)}

+

Output Tokens per Request: ${tP(t.output_tokens)}

+ ${t.num_requests_per_day?`

Requests per Day: ${tP(t.num_requests_per_day)}

`:""} + ${t.num_requests_per_month?`

Requests per Month: ${tP(t.num_requests_per_month)}

`:""} +
+ + + + + + ${null!==t.daily_cost?"":""} + ${null!==t.monthly_cost?"":""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + +
Cost TypePer RequestDailyMonthly
Input Cost${tA(t.input_cost_per_request)}${tA(t.daily_input_cost)}${tA(t.monthly_input_cost)}
Output Cost${tA(t.output_cost_per_request)}${tA(t.daily_output_cost)}${tA(t.monthly_output_cost)}
Margin/Fee${tA(t.margin_cost_per_request)}${tA(t.daily_margin_cost)}${tA(t.monthly_margin_cost)}
Total${tA(t.cost_per_request)}${tA(t.daily_cost)}${tA(t.monthly_cost)}
+
+ `}).join("")} + + + + + `;t.document.write(l),t.document.close(),t.onload=()=>{t.print()}})(e),a(!1)},children:[(0,t.jsx)(tS.FilePdfOutlined,{className:"mr-3 text-red-500"}),"Export as PDF"]}),(0,t.jsxs)("button",{className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>{(e=>{let t=e.entries.filter(e=>null!==e.result),s=[["LLM Multi-Model Cost Estimate Report"],["Generated",new Date().toLocaleString()],[""]];for(let a of(s.push(["COMBINED TOTALS"],["Total Per Request",e.totals.cost_per_request.toString()],["Total Daily",e.totals.daily_cost?.toString()||"-"],["Total Monthly",e.totals.monthly_cost?.toString()||"-"],["Margin Per Request",e.totals.margin_per_request.toString()],["Daily Margin",e.totals.daily_margin?.toString()||"-"],["Monthly Margin",e.totals.monthly_margin?.toString()||"-"],[""]),s.push(["Model","Provider","Input Tokens","Output Tokens","Requests/Day","Requests/Month","Cost/Request","Daily Cost","Monthly Cost","Input Cost/Req","Output Cost/Req","Margin/Req"]),t)){let e=a.result;s.push([e.model,e.provider||"-",e.input_tokens.toString(),e.output_tokens.toString(),e.num_requests_per_day?.toString()||"-",e.num_requests_per_month?.toString()||"-",e.cost_per_request.toString(),e.daily_cost?.toString()||"-",e.monthly_cost?.toString()||"-",e.input_cost_per_request.toString(),e.output_cost_per_request.toString(),e.margin_cost_per_request.toString()])}let a=new Blob([s.map(e=>e.map(e=>`"${e}"`).join(",")).join("\n")],{type:"text/csv;charset=utf-8;"}),l=window.URL.createObjectURL(a),r=document.createElement("a");r.href=l,r.download=`cost_estimate_multi_model_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(l)})(e),a(!1)},children:[(0,t.jsx)(tL,{className:"mr-3 text-green-600"}),"Export as CSV"]})]})]}):null},tD=e=>null==e?"-":0===e?"$0":e<1e-4?`$${e.toExponential(2)}`:e<1?`$${e.toFixed(4)}`:`$${(0,eO.formatNumberWithCommas)(e,2,!0)}`,tE=({result:e,loading:s,timePeriod:a})=>{let l="day"===a?"Daily":"Monthly",r="day"===a?e.daily_cost:e.monthly_cost,i="day"===a?e.daily_input_cost:e.monthly_input_cost,n="day"===a?e.daily_output_cost:e.monthly_output_cost,o="day"===a?e.daily_margin_cost:e.monthly_margin_cost,d="day"===a?e.num_requests_per_day:e.num_requests_per_month;return(0,t.jsxs)("div",{className:"space-y-3 bg-gray-50 p-4 rounded-lg",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-500 text-sm",children:[(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"small"}),(0,t.jsx)("span",{children:"Updating..."})]}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Total/Request"}),(0,t.jsx)(g.Text,{className:"text-base font-semibold text-blue-600",children:tD(e.cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Input Cost"}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(e.input_cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Output Cost"}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(e.output_cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Margin Fee"}),(0,t.jsx)(g.Text,{className:`text-sm ${e.margin_cost_per_request>0?"text-amber-600":""}`,children:tD(e.margin_cost_per_request)})]})]}),null!==r&&(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 pt-2 border-t border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Total (",null==d?"-":(0,eO.formatNumberWithCommas)(d,0,!0)," req)"]}),(0,t.jsx)(g.Text,{className:`text-base font-semibold ${"day"===a?"text-green-600":"text-purple-600"}`,children:tD(r)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Input"]}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(i)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Output"]}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(n)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Margin Fee"]}),(0,t.jsx)(g.Text,{className:`text-sm ${(o??0)>0?"text-amber-600":""}`,children:tD(o)})]})]}),(e.input_cost_per_token||e.output_cost_per_token)&&(0,t.jsxs)("div",{className:"text-xs text-gray-400 pt-2 border-t border-gray-200",children:["Token Pricing: "," ",e.input_cost_per_token&&(0,t.jsxs)("span",{children:["Input $",(0,eO.formatNumberWithCommas)(1e6*e.input_cost_per_token,2),"/1M"]}),e.input_cost_per_token&&e.output_cost_per_token&&" | ",e.output_cost_per_token&&(0,t.jsxs)("span",{children:["Output $",(0,eO.formatNumberWithCommas)(1e6*e.output_cost_per_token,2),"/1M"]})]})]})},tz=({multiResult:e,timePeriod:s})=>{let[a,l]=(0,i.useState)(new Set),r=e.entries.filter(e=>null!==e.result),o=e.entries.filter(e=>e.loading),d=e.entries.filter(e=>null!==e.error),c=r.length>0,m=o.length>0,u=d.length>0;if(!c&&!m&&!u)return(0,t.jsx)("div",{className:"py-6 text-center border border-dashed border-gray-300 rounded-lg bg-gray-50",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Select models above to see cost estimates"})});if(!c&&m&&!u)return(0,t.jsxs)("div",{className:"py-6 text-center",children:[(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0})}),(0,t.jsx)(g.Text,{className:"text-gray-500 block mt-2",children:"Calculating costs..."})]});if(!c&&u)return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-base font-semibold text-gray-900",children:"Cost Estimates"}),m&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"small"})]}),d.map(e=>(0,t.jsxs)("div",{className:"text-sm text-red-600 bg-red-50 p-3 rounded-lg border border-red-200",children:[(0,t.jsxs)("span",{className:"font-medium",children:[e.entry.model||"Unknown model",": "]}),e.error]},e.entry.id))]});let p=e.totals.margin_per_request>0,x="day"===s?"Daily":"Monthly",h=[{title:"Model",dataIndex:"model",key:"model",render:(e,s)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e}),s.provider&&(0,t.jsx)(I.Tag,{color:"blue",className:"text-xs",children:s.provider}),s.loading&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"small"})]}),s.error&&(0,t.jsxs)("div",{className:"text-xs text-red-600 bg-red-50 px-2 py-1 rounded",children:["⚠️ ",s.error]}),s.hasZeroCost&&!s.error&&(0,t.jsx)("div",{className:"text-xs text-amber-600 bg-amber-50 px-2 py-1 rounded",children:"⚠️ No pricing data found for this model. Set base_model in config."})]})},{title:"Per Request",dataIndex:"cost_per_request",key:"cost_per_request",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:"font-mono text-sm",children:tD(e)})},{title:"Margin Fee",dataIndex:"margin_cost_per_request",key:"margin_cost_per_request",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:`font-mono text-sm ${(e??0)>0?"text-amber-600":"text-gray-400"}`,children:tD(e)})},{title:x,dataIndex:"day"===s?"daily_cost":"monthly_cost",key:"period_cost",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:"font-mono text-sm",children:tD(e)})},{title:"",key:"expand",width:40,render:(e,s)=>s.error?null:(0,t.jsx)(n.Button,{size:"xs",variant:"light",onClick:()=>{var e;return e=s.id,void l(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},className:"text-gray-400 hover:text-gray-600",children:a.has(s.id)?(0,t.jsx)(tw.DownOutlined,{}):(0,t.jsx)(tk.RightOutlined,{})})}],y=e.entries.filter(e=>e.entry.model).map(e=>({key:e.entry.id,id:e.entry.id,model:e.result?.model||e.entry.model,provider:e.result?.provider,cost_per_request:e.result?.cost_per_request??null,margin_cost_per_request:e.result?.margin_cost_per_request??null,daily_cost:e.result?.daily_cost??null,monthly_cost:e.result?.monthly_cost??null,error:e.error,loading:e.loading,hasZeroCost:e.result&&0===e.result.cost_per_request}));return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-base font-semibold text-gray-900",children:"Cost Estimates"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[m&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"small"}),(0,t.jsx)(tM,{multiResult:e})]})]}),(0,t.jsxs)(ts.Card,{size:"small",className:"bg-gradient-to-r from-slate-50 to-blue-50 border-slate-200",children:[(0,t.jsxs)(t_.Row,{gutter:[16,8],children:[(0,t.jsx)(tv.Col,{xs:24,sm:12,children:(0,t.jsx)(tg,{title:(0,t.jsx)("span",{className:"text-xs",children:"Total Per Request"}),value:tD(e.totals.cost_per_request),valueStyle:{color:"#1890ff",fontSize:"18px",fontFamily:"monospace"}})}),(0,t.jsx)(tv.Col,{xs:24,sm:12,children:(0,t.jsx)(tg,{title:(0,t.jsxs)("span",{className:"text-xs",children:["Total ",x]}),value:tD("day"===s?e.totals.daily_cost:e.totals.monthly_cost),valueStyle:{color:"day"===s?"#52c41a":"#722ed1",fontSize:"18px",fontFamily:"monospace"}})})]}),p&&(0,t.jsxs)(t_.Row,{gutter:[16,8],className:"mt-3 pt-3 border-t border-slate-200",children:[(0,t.jsxs)(tv.Col,{xs:24,sm:12,children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Margin Fee/Request"}),(0,t.jsx)("div",{className:"text-sm font-mono text-amber-600",children:tD(e.totals.margin_per_request)})]}),(0,t.jsxs)(tv.Col,{xs:24,sm:12,children:[(0,t.jsxs)("div",{className:"text-xs text-gray-500",children:[x," Margin Fee"]}),(0,t.jsx)("div",{className:"text-sm font-mono text-amber-600",children:tD("day"===s?e.totals.daily_margin:e.totals.monthly_margin)})]})]})]}),y.length>0&&(0,t.jsx)(te.Table,{columns:h,dataSource:y,pagination:!1,size:"small",className:"border border-gray-200 rounded-lg",expandable:{expandedRowKeys:Array.from(a),expandedRowRender:e=>{let a=r.find(t=>t.entry.id===e.id);return a?.result?(0,t.jsx)("div",{className:"py-2",children:(0,t.jsx)(tE,{result:a.result,loading:a.loading,timePeriod:s})}):null},showExpandColumn:!1}})]})},tO=()=>({id:`entry-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,model:"",input_tokens:1e3,output_tokens:500,num_requests_per_day:void 0,num_requests_per_month:void 0}),tR=({accessToken:e,models:s})=>{let[a,l]=(0,i.useState)([tO()]),[r,n]=(0,i.useState)("month"),{debouncedFetchForEntry:o,removeEntry:d,getMultiModelResult:c}=function(e){let[t,s]=(0,i.useState)(new Map),a=(0,i.useRef)(new Map),l=(0,i.useCallback)(async t=>{if(!e||!t.model)return void s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:null}),s});s(e=>{let s=new Map(e),a=s.get(t.id);return s.set(t.id,{entry:t,result:a?.result??null,loading:!0,error:null}),s});try{let a=(0,N.getProxyBaseUrl)(),l=a?`${a}/cost/estimate`:"/cost/estimate",r={model:t.model,input_tokens:t.input_tokens||0,output_tokens:t.output_tokens||0,num_requests_per_day:t.num_requests_per_day||null,num_requests_per_month:t.num_requests_per_month||null},i=await fetch(l,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(i.ok){let e=await i.json();s(s=>{let a=new Map(s);return a.set(t.id,{entry:t,result:e,loading:!1,error:null}),a})}else{let e=await i.json(),a=e.detail?.error||e.detail||"Failed to estimate cost";s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:a}),s})}}catch(e){console.error("Error estimating cost:",e),s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:"Network error"}),s})}},[e]),r=(0,i.useCallback)(e=>{let t=a.current.get(e.id);t&&clearTimeout(t);let s=setTimeout(()=>{l(e)},500);a.current.set(e.id,s)},[l]),n=(0,i.useCallback)(e=>{let t=a.current.get(e);t&&(clearTimeout(t),a.current.delete(e)),s(t=>{let s=new Map(t);return s.delete(e),s})},[]);return(0,i.useEffect)(()=>{let e=a.current;return()=>{e.forEach(e=>clearTimeout(e)),e.clear()}},[]),{debouncedFetchForEntry:r,removeEntry:n,getMultiModelResult:(0,i.useCallback)(e=>{let s=e.map(e=>{let s=t.get(e.id);return{entry:e,result:s?.result??null,loading:s?.loading??!1,error:s?.error??null}}),a=0,l=null,r=null,i=0,n=null,o=null;for(let e of s)e.result&&(a+=e.result.cost_per_request,i+=e.result.margin_cost_per_request,null!==e.result.daily_cost&&(l=(l??0)+e.result.daily_cost),null!==e.result.daily_margin_cost&&(n=(n??0)+e.result.daily_margin_cost),null!==e.result.monthly_cost&&(r=(r??0)+e.result.monthly_cost),null!==e.result.monthly_margin_cost&&(o=(o??0)+e.result.monthly_margin_cost));return{entries:s,totals:{cost_per_request:a,daily_cost:l,monthly_cost:r,margin_per_request:i,daily_margin:n,monthly_margin:o}}},[t])}}(e),m=(0,i.useCallback)((e,t,s)=>{l(a=>{let l=a.map(a=>a.id===e?{...a,[t]:s}:a),r=l.find(t=>t.id===e);return r&&r.model&&o(r),l})},[o]),u=(0,i.useCallback)(e=>{n(e),l(t=>t.map(t=>({...t,num_requests_per_day:"day"===e?t.num_requests_per_day:void 0,num_requests_per_month:"month"===e?t.num_requests_per_month:void 0})))},[]),p=(0,i.useCallback)(()=>{l(e=>[...e,tO()])},[]),x=(0,i.useCallback)(e=>{l(t=>t.filter(t=>t.id!==e)),d(e)},[d]),h=c(a),g=[{title:"Model",dataIndex:"model",key:"model",width:"35%",render:(e,a)=>(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select a model",value:a.model||void 0,onChange:e=>m(a.id,"model",e),optionFilterProp:"label",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:s.map(e=>({value:e,label:e})),style:{width:"100%"},size:"small"})},{title:"Input Tokens",dataIndex:"input_tokens",key:"input_tokens",width:"18%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:s.input_tokens,onChange:e=>m(s.id,"input_tokens",e??0),style:{width:"100%"},size:"small",formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")})},{title:"Output Tokens",dataIndex:"output_tokens",key:"output_tokens",width:"18%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:s.output_tokens,onChange:e=>m(s.id,"output_tokens",e??0),style:{width:"100%"},size:"small",formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")})},{title:`Requests/${"day"===r?"Day":"Month"}`,dataIndex:"day"===r?"num_requests_per_day":"num_requests_per_month",key:"num_requests",width:"20%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:"day"===r?s.num_requests_per_day:s.num_requests_per_month,onChange:e=>m(s.id,"day"===r?"num_requests_per_day":"num_requests_per_month",e??void 0),style:{width:"100%"},size:"small",placeholder:"-",formatter:e=>e?`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,","):""})},{title:"",key:"actions",width:50,render:(e,s)=>(0,t.jsx)(V.Button,{type:"text",icon:(0,t.jsx)(tt.DeleteOutlined,{}),onClick:()=>x(s.id),disabled:1===a.length,danger:!0,size:"small"})}];return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-2",children:(0,t.jsxs)(T.Radio.Group,{value:r,onChange:e=>u(e.target.value),size:"small",optionType:"button",buttonStyle:"solid",children:[(0,t.jsx)(T.Radio.Button,{value:"day",children:"Per Day"}),(0,t.jsx)(T.Radio.Button,{value:"month",children:"Per Month"})]})}),(0,t.jsx)(te.Table,{columns:g,dataSource:a,rowKey:"id",pagination:!1,size:"small",footer:()=>(0,t.jsx)(V.Button,{type:"dashed",onClick:p,icon:(0,t.jsx)(H.PlusOutlined,{}),className:"w-full",children:"Add Another Model"})}),(0,t.jsx)(tz,{multiResult:h,timePeriod:r})]})};var tB=e.i(270377),tq=e.i(778917),t$=e.i(664659);let tU=({items:e,children:s="Docs",className:a=""})=>{let[l,r]=(0,i.useState)(!1),n=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=e=>{n.current&&!n.current.contains(e.target)&&r(!1)};return l&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l]),(0,t.jsxs)("div",{className:`relative inline-block ${a}`,ref:n,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>r(!l),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":l,"aria-haspopup":"true",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)(t$.ChevronDown,{className:`h-3 w-3 transition-transform ${l?"rotate-180":""}`,"aria-hidden":"true"})]}),l&&(0,t.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:e.map((e,s)=>(0,t.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:()=>r(!1),children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)(tq.ExternalLink,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 ml-2","aria-hidden":"true"})]},s))})]})};var tV=e.i(673709);let tH=()=>{let[e,s]=(0,i.useState)(""),[a,l]=(0,i.useState)(""),r=(0,i.useMemo)(()=>{let t=parseFloat(e),s=parseFloat(a);if(isNaN(t)||isNaN(s)||0===t||0===s)return null;let l=t+s,r=s/l*100;return{originalCost:l.toFixed(10),finalCost:t.toFixed(10),discountAmount:s.toFixed(10),discountPercentage:r.toFixed(2)}},[e,a]);return(0,t.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Cost Calculation"}),(0,t.jsxs)(g.Text,{className:"text-xs text-gray-600",children:["Discounts are applied to provider costs: ",(0,t.jsx)("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-xs",children:"final_cost = base_cost × (1 - discount%/100)"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Example"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"A 5% discount on a $10.00 request results in: $10.00 × (1 - 0.05) = $9.50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Valid Range"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Discount percentages must be between 0% and 100%"})]}),(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-2",children:"Validating Discounts"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mb-3",children:"Make a test request and check the response headers to verify discounts are applied:"}),(0,t.jsx)(tV.default,{language:"bash",code:`curl -X POST -i http://your-proxy:4000/chat/completions \\ + -H "Content-Type: application/json" \\ + -H "Authorization: Bearer sk-1234" \\ + -d '{ + "model": "gemini/gemini-2.5-pro", + "messages": [{"role": "user", "content": "Hello"}] + }'`}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mt-3 mb-2",children:"Look for these headers in the response:"}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.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,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Final cost after discount"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.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,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Original cost before discount"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.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,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Amount discounted"})]})]})]}),(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-3",children:"Discount Calculator"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mb-3",children:"Enter values from your response headers to verify the discount:"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Response Cost (x-litellm-response-cost)"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.0171938125",value:e,onValueChange:s,className:"text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Discount Amount (x-litellm-response-cost-discount-amount)"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.0009049375",value:a,onValueChange:l,className:"text-sm"})]})]}),r&&(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,t.jsx)(g.Text,{className:"text-sm font-medium text-blue-900 mb-2",children:"Calculated Results"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Original Cost:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.originalCost]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Final Cost:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.finalCost]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Discount Amount:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.discountAmount]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-blue-300",children:[(0,t.jsx)(g.Text,{className:"text-xs font-semibold text-blue-900",children:"Discount Applied:"}),(0,t.jsxs)(g.Text,{className:"text-sm font-bold text-blue-900",children:[r.discountPercentage,"%"]})]})]})]})]})]})};var tG=e.i(689020);let tK=[{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"}],tW=({userID:e,userRole:s,accessToken:a})=>{let[l,r]=(0,i.useState)(void 0),[o,d]=(0,i.useState)(""),[c,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(void 0),[b,_]=(0,i.useState)("percentage"),[v,k]=(0,i.useState)(""),[C,S]=(0,i.useState)(""),[T,I]=(0,i.useState)([]),[F]=w.Form.useForm(),[L]=w.Form.useForm(),[A,P]=y.Modal.useModal(),M="proxy_admin"===s||"Admin"===s,{discountConfig:D,fetchDiscountConfig:E,handleAddProvider:z,handleRemoveProvider:O,handleDiscountChange:R}=function({accessToken:e}){let[t,s]=(0,i.useState)({}),a=(0,i.useCallback)(async()=>{try{let t=(0,N.getProxyBaseUrl)(),a=t?`${t}/config/cost_discount_config`:"/config/cost_discount_config",l=await fetch(a,{method:"GET",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();s(e.values||{})}else console.error("Failed to fetch discount config")}catch(e){console.error("Error fetching discount config:",e),ez.default.fromBackend("Failed to fetch discount configuration")}},[e]),l=(0,i.useCallback)(async t=>{try{let s=(0,N.getProxyBaseUrl)(),l=s?`${s}/config/cost_discount_config`:"/config/cost_discount_config",r=await fetch(l,{method:"PATCH",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok)ez.default.success("Discount configuration updated successfully"),await a();else{let e=await r.json(),t=e.detail?.error||e.detail||"Failed to update settings";ez.default.fromBackend(t)}}catch(e){console.error("Error updating discount config:",e),ez.default.fromBackend("Failed to update discount configuration")}},[e,a]),r=(0,i.useCallback)(async(e,a)=>{if(!e||!a)return ez.default.fromBackend("Please select a provider and enter discount percentage"),!1;let r=parseFloat(a);if(isNaN(r)||r<0||r>100)return ez.default.fromBackend("Discount must be between 0% and 100%"),!1;let i=e5(e);if(!i)return ez.default.fromBackend("Invalid provider selected"),!1;if(t[i])return ez.default.fromBackend(`Discount for ${e2.Providers[e]} already exists. Edit it in the table above.`),!1;let n={...t,[i]:r/100};return s(n),await l(n),!0},[t,l]),n=(0,i.useCallback)(async e=>{let a={...t};delete a[e],s(a),await l(a)},[t,l]),o=(0,i.useCallback)(async(e,a)=>{let r=parseFloat(a);if(!isNaN(r)&&r>=0&&r<=1){let a={...t,[e]:r};s(a),await l(a)}},[t,l]);return{discountConfig:t,setDiscountConfig:s,fetchDiscountConfig:a,saveDiscountConfig:l,handleAddProvider:r,handleRemoveProvider:n,handleDiscountChange:o}}({accessToken:a}),{marginConfig:B,fetchMarginConfig:q,handleAddMargin:$,handleRemoveMargin:U,handleMarginChange:V}=function({accessToken:e}){let[t,s]=(0,i.useState)({}),a=(0,i.useCallback)(async()=>{try{let t=(0,N.getProxyBaseUrl)(),a=t?`${t}/config/cost_margin_config`:"/config/cost_margin_config",l=await fetch(a,{method:"GET",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();s(e.values||{})}else console.error("Failed to fetch margin config")}catch(e){console.error("Error fetching margin config:",e),ez.default.fromBackend("Failed to fetch margin configuration")}},[e]),l=(0,i.useCallback)(async t=>{try{let s=(0,N.getProxyBaseUrl)(),l=s?`${s}/config/cost_margin_config`:"/config/cost_margin_config",r=await fetch(l,{method:"PATCH",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok)ez.default.success("Margin configuration updated successfully"),await a();else{let e=await r.json(),t=e.detail?.error||e.detail||"Failed to update settings";ez.default.fromBackend(t)}}catch(e){console.error("Error updating margin config:",e),ez.default.fromBackend("Failed to update margin configuration")}},[e,a]),r=(0,i.useCallback)(async e=>{let a,r,{selectedProvider:i,marginType:n,percentageValue:o,fixedAmountValue:d}=e;if(!i)return ez.default.fromBackend("Please select a provider"),!1;if("global"===i)a="global";else{let e=e5(i);if(!e)return ez.default.fromBackend("Invalid provider selected"),!1;a=e}if(t[a]){let e="global"===a?"Global":e2.Providers[i];return ez.default.fromBackend(`Margin for ${e} already exists. Edit it in the table above.`),!1}if("percentage"===n){let e=parseFloat(o);if(isNaN(e)||e<0||e>1e3)return ez.default.fromBackend("Percentage must be between 0% and 1000%"),!1;r=e/100}else{let e=parseFloat(d);if(isNaN(e)||e<0)return ez.default.fromBackend("Fixed amount must be non-negative"),!1;r={fixed_amount:e}}let c={...t,[a]:r};return s(c),await l(c),!0},[t,l]),n=(0,i.useCallback)(async e=>{let a={...t};delete a[e],s(a),await l(a)},[t,l]),o=(0,i.useCallback)(async(e,a)=>{let r={...t,[e]:a};s(r),await l(r)},[t,l]);return{marginConfig:t,setMarginConfig:s,fetchMarginConfig:a,saveMarginConfig:l,handleAddMargin:r,handleRemoveMargin:n,handleMarginChange:o}}({accessToken:a});(0,i.useEffect)(()=>{a&&(Promise.all([E(),q()]).finally(()=>{m(!1)}),(async()=>{try{let e=await (0,tG.fetchAvailableModels)(a);I(e.map(e=>e.model_group))}catch(e){console.error("Error fetching models:",e)}})())},[a,E,q]);let H=async()=>{await z(l,o)&&(r(void 0),d(""),p(!1))},G=async(e,s)=>{A.confirm({title:"Remove Provider Discount",icon:(0,t.jsx)(tB.ExclamationCircleOutlined,{}),content:`Are you sure you want to remove the discount for ${s}?`,okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:()=>O(e)})},K=async()=>{await $({selectedProvider:j,marginType:b,percentageValue:v,fixedAmountValue:C})&&(f(void 0),k(""),S(""),_("percentage"),h(!1))},W=async(e,s)=>{A.confirm({title:"Remove Provider Margin",icon:(0,t.jsx)(tB.ExclamationCircleOutlined,{}),content:`Are you sure you want to remove the margin for ${s}?`,okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:()=>U(e)})};return a?(0,t.jsxs)("div",{className:"w-full p-8",children:[P,(0,t.jsx)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ew.Title,{children:"Cost Tracking Settings"}),(0,t.jsx)(tU,{items:tK})]}),(0,t.jsx)(g.Text,{className:"text-gray-500 mt-1",children:"Configure cost discounts and margins for different LLM providers. Changes are saved automatically."})]})}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full space-y-4",children:[M&&(0,t.jsxs)(eG.Accordion,{children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Provider Discounts"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Apply percentage-based discounts to reduce costs for specific providers"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsxs)(eC.TabGroup,{children:[(0,t.jsxs)(eS.TabList,{className:"px-6 pt-4",children:[(0,t.jsx)(ek.Tab,{children:"Discounts"}),(0,t.jsx)(ek.Tab,{children:"Test It"})]}),(0,t.jsxs)(eI.TabPanels,{children:[(0,t.jsx)(eT.TabPanel,{children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(n.Button,{onClick:()=>p(!0),children:"+ Add Provider Discount"})}),c?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(D).length>0?(0,t.jsx)(e3,{discountConfig:D,onDiscountChange:R,onRemoveProvider:G}):(0,t.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,t.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,t.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,t.jsx)(g.Text,{className:"text-gray-700 font-medium mb-2",children:"No provider discounts configured"}),(0,t.jsx)(g.Text,{className:"text-gray-500 text-sm",children:'Click "Add Provider Discount" to get started'})]})]})}),(0,t.jsx)(eT.TabPanel,{children:(0,t.jsx)("div",{className:"px-6 pb-4",children:(0,t.jsx)(tH,{})})})]})]})})]}),M&&(0,t.jsxs)(eG.Accordion,{children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Fee/Price Margin"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Add fees or margins to LLM costs for internal billing and cost recovery"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(n.Button,{onClick:()=>h(!0),children:"+ Add Provider Margin"})}),c?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(B).length>0?(0,t.jsx)(e7,{marginConfig:B,onMarginChange:V,onRemoveProvider:W}):(0,t.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,t.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,t.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,t.jsx)(g.Text,{className:"text-gray-700 font-medium mb-2",children:"No provider margins configured"}),(0,t.jsx)(g.Text,{className:"text-gray-500 text-sm",children:'Click "Add Provider Margin" to get started'})]})]})})]}),(0,t.jsxs)(eG.Accordion,{defaultOpen:!0,children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Pricing Calculator"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Estimate LLM costs based on expected token usage and request volume"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(tR,{accessToken:a,models:T})})})]})]}),(0,t.jsx)(y.Modal,{title:(0,t.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Discount"})}),open:u,width:1e3,onCancel:()=>{p(!1),F.resetFields(),r(void 0),d("")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(g.Text,{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,t.jsx)(w.Form,{form:F,onFinish:()=>{H()},layout:"vertical",className:"space-y-6",children:(0,t.jsx)(e8,{discountConfig:D,selectedProvider:l,newDiscount:o,onProviderChange:r,onDiscountChange:d,onAddProvider:H})})]})}),(0,t.jsx)(y.Modal,{title:(0,t.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Margin"})}),open:x,width:1e3,onCancel:()=>{h(!1),L.resetFields(),f(void 0),k(""),S(""),_("percentage")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(g.Text,{className:"text-sm text-gray-600 mb-6",children:'Select a provider (or "Global" for all providers) and configure the margin. You can use percentage-based or fixed amount.'}),(0,t.jsx)(w.Form,{form:L,layout:"vertical",className:"space-y-6",children:(0,t.jsx)(e9,{marginConfig:B,selectedProvider:j,marginType:b,percentageValue:v,fixedAmountValue:C,onProviderChange:f,onMarginTypeChange:_,onPercentageChange:k,onFixedAmountChange:S,onAddProvider:K})})]})})]}):null};var tQ=e.i(226898),tY=e.i(973706),tJ=e.i(447566),tX=e.i(602073),tZ=e.i(313603),t0=e.i(285027),t1=e.i(266027),t2=e.i(653496),t4=e.i(149192),t5=e.i(788191);let t6=`Evaluate whether this guardrail's decision was correct. +Analyze the user input, the guardrail action taken, and determine if it was appropriate. + +Consider: +— Was the user's intent genuinely harmful or policy-violating? +— Was the guardrail's action (block / flag / pass) appropriate? +— Could this be a false positive or false negative? + +Return a structured verdict with confidence and justification.`,t3=`{ + "verdict": "correct" | "false_positive" | "false_negative", + "confidence": 0.0, + "justification": "string", + "risk_category": "string", + "suggested_action": "keep" | "adjust threshold" | "add allowlist" +} +`;function t8({open:e,onClose:s,guardrailName:a,accessToken:l,onRunEvaluation:r}){let[n,o]=(0,i.useState)(t6),[d,c]=(0,i.useState)(t3),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)([]),[h,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!e||!l)return void x([]);let t=!1;return g(!0),(0,tG.fetchAvailableModels)(l).then(e=>{t||x(e)}).catch(()=>{t||x([])}).finally(()=>{t||g(!1)}),()=>{t=!0}},[e,l]);let j=p.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)(y.Modal,{title:"Evaluation Settings",open:e,onCancel:s,width:640,footer:null,closeIcon:(0,t.jsx)(t4.CloseOutlined,{}),destroyOnClose:!0,children:[(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-4",children:a?`Configure AI evaluation for ${a}`:"Configure AI evaluation for re-running on logs"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Evaluation Prompt"}),(0,t.jsx)("button",{type:"button",onClick:()=>o(t6),className:"text-xs text-indigo-600 hover:text-indigo-700",children:"Reset to default"})]}),(0,t.jsx)(C.Input.TextArea,{value:n,onChange:e=>o(e.target.value),rows:6,className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"System prompt sent to the evaluation model. Output is structured via response_format."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Response Schema"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:"response_format: json_schema"}),(0,t.jsx)(C.Input.TextArea,{value:d,onChange:e=>c(e.target.value),rows:6,className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Model"}),(0,t.jsx)(k.Select,{placeholder:h?"Loading models…":"Select a model",value:m??void 0,onChange:u,options:j,style:{width:"100%"},showSearch:!0,optionFilterProp:"label",loading:h,notFoundContent:l?"No models available":"Sign in to see models"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsx)(V.Button,{onClick:s,children:"Cancel"}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(t5.PlayCircleOutlined,{}),onClick:()=>{m&&(r?.({prompt:n,schema:d,model:m}),s())},disabled:!m,children:"Run Evaluation"})]})]})}var t7=e.i(166540);e.i(3565);var t9=e.i(502626);let se={blocked:{icon:t4.CloseOutlined,color:"text-red-600",bg:"bg-red-50",border:"border-red-200",label:"Blocked"},passed:{icon:v.CheckCircleOutlined,color:"text-green-600",bg:"bg-green-50",border:"border-green-200",label:"Passed"},flagged:{icon:t0.WarningOutlined,color:"text-amber-600",bg:"bg-amber-50",border:"border-amber-200",label:"Flagged"}};function st({guardrailName:e,filterAction:s="all",logs:a=[],logsLoading:l=!1,totalLogs:r,accessToken:n=null,startDate:o="",endDate:d=""}){let[c,m]=(0,i.useState)(10),[u,p]=(0,i.useState)(s),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(!1),j=a.filter(e=>"all"===u||e.action===u).slice(0,c),f=r??a.length,b=o?(0,t7.default)(o).utc().format("YYYY-MM-DD HH:mm:ss"):(0,t7.default)().subtract(24,"hours").utc().format("YYYY-MM-DD HH:mm:ss"),_=d?(0,t7.default)(d).utc().endOf("day").format("YYYY-MM-DD HH:mm:ss"):(0,t7.default)().utc().format("YYYY-MM-DD HH:mm:ss"),{data:v}=(0,t1.useQuery)({queryKey:["spend-log-by-request",x,b,_],queryFn:async()=>n&&x?await (0,N.uiSpendLogsCall)({accessToken:n,start_date:b,end_date:_,page:1,page_size:10,params:{request_id:x}}):null,enabled:!!(n&&x&&g)}),w=v?.data?.[0]??null;return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:e?`Logs — ${e}`:"Request Logs"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:l?"Loading…":a.length>0?`Showing ${j.length} of ${f} entries`:"No logs for this period. Select a guardrail and date range."})]}),a.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-1",children:["all","blocked","flagged","passed"].map(e=>(0,t.jsx)(V.Button,{type:u===e?"primary":"default",size:"small",onClick:()=>p(e),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,t.jsx)("div",{className:"h-4 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Sample:"}),[10,50,100].map(e=>(0,t.jsx)(V.Button,{type:c===e?"primary":"default",size:"small",onClick:()=>m(e),children:e},e))]})]})]})}),l&&(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{})}),!l&&0===j.length&&(0,t.jsx)("div",{className:"py-12 text-center text-sm text-gray-500",children:"No logs to display. Adjust filters or date range."}),!l&&j.length>0&&(0,t.jsx)("div",{className:"divide-y divide-gray-100",children:j.map(e=>{let s=se[e.action],a=s.icon;return(0,t.jsxs)("button",{type:"button",onClick:()=>{h(e.id),y(!0)},className:"w-full text-left px-4 py-3 hover:bg-gray-50 transition-colors flex items-start gap-3",children:[(0,t.jsx)(a,{className:`w-4 h-4 mt-0.5 flex-shrink-0 ${s.color}`}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${s.bg} ${s.color} ${s.border}`,children:s.label}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:e.timestamp}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"·"}),e.model&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.model})]}),(0,t.jsx)("p",{className:"text-sm text-gray-800 truncate",children:e.input_snippet??e.input??"—"})]}),(0,t.jsx)(tw.DownOutlined,{className:"w-4 h-4 text-gray-400 flex-shrink-0 mt-1"})]},e.id)})}),(0,t.jsx)(t9.LogDetailsDrawer,{open:g,onClose:()=>{y(!1),h(null)},logEntry:w,accessToken:n,allLogs:w?[w]:[],startTime:b})]})}function ss({label:e,value:s,valueColor:a="text-gray-900",icon:l,subtitle:r}){return(0,t.jsxs)("div",{className:"h-full bg-white border border-gray-200 rounded-lg p-5 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-600",children:e}),l&&(0,t.jsx)("span",{className:"text-gray-400",children:l})]}),(0,t.jsx)("div",{className:`text-3xl font-semibold ${a} tracking-tight`,children:s}),r&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:r})]})}let sa={healthy:{bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},warning:{bg:"bg-amber-50",text:"text-amber-700",dot:"bg-amber-500"},critical:{bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}};function sl({guardrailId:e,onBack:s,accessToken:a=null,startDate:l,endDate:r}){let[n,o]=(0,i.useState)("overview"),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(1),{data:p,isLoading:x,error:h}=(0,t1.useQuery)({queryKey:["guardrails-usage-detail",e,l,r],queryFn:()=>(0,N.getGuardrailsUsageDetail)(a,e,l,r),enabled:!!a&&!!e}),{data:g,isLoading:y}=(0,t1.useQuery)({queryKey:["guardrails-usage-logs",e,m,50],queryFn:()=>(0,N.getGuardrailsUsageLogs)(a,{guardrailId:e,page:m,pageSize:50,startDate:l,endDate:r}),enabled:!!a&&!!e}),j=(0,i.useMemo)(()=>(g?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:e.action,score:e.score,model:e.model,input_snippet:e.input_snippet,output_snippet:e.output_snippet,reason:e.reason})),[g?.logs]),f=p?{name:p.guardrail_name,description:p.description??"",status:p.status,provider:p.provider,type:p.type,requestsEvaluated:p.requestsEvaluated,failRate:p.failRate,avgScore:p.avgScore,avgLatency:p.avgLatency}:{name:e,description:"",status:"healthy",provider:"—",type:"—",requestsEvaluated:0,failRate:0,avgScore:void 0,avgLatency:void 0},b=sa[f.status]??sa.healthy;return x&&!p?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})}):h&&!p?(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load guardrail details."})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:f.name}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 text-xs font-medium rounded-full ${b.bg} ${b.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${b.dot}`}),f.status.charAt(0).toUpperCase()+f.status.slice(1)]})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 ml-8",children:f.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:f.provider}),(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>c(!0),title:"Evaluation settings"})]})]})]}),(0,t.jsx)(t2.Tabs,{activeKey:n,onChange:o,items:[{key:"overview",label:"Overview"},{key:"logs",label:"Logs"}]}),"overview"===n&&(0,t.jsxs)("div",{className:"space-y-6 mt-4",children:[(0,t.jsxs)(t_.Row,{gutter:[16,16],children:[(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Requests Evaluated",value:f.requestsEvaluated.toLocaleString()})}),(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Fail Rate",value:`${f.failRate}%`,valueColor:f.failRate>15?"text-red-600":f.failRate>5?"text-amber-600":"text-green-600",subtitle:`${Math.round(f.requestsEvaluated*f.failRate/100).toLocaleString()} blocked`,icon:f.failRate>15?(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"}):void 0})}),(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Avg. latency added",value:null!=f.avgLatency?`${Math.round(f.avgLatency)}ms`:"—",valueColor:null!=f.avgLatency?f.avgLatency>150?"text-red-600":f.avgLatency>50?"text-amber-600":"text-green-600":"text-gray-500",subtitle:null!=f.avgLatency?"Per request (avg)":"No data"})})]}),(0,t.jsx)(st,{guardrailName:f.name,filterAction:"all",logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})]}),"logs"===n&&(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(st,{guardrailName:f.name,logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})}),(0,t.jsx)(t8,{open:d,onClose:()=>c(!1),guardrailName:f.name,accessToken:a})]})}let sr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z"}}]},name:"rise",theme:"outlined"};var si=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:sr}))}),sn=e.i(898586),so=e.i(584935);function sd({data:e}){let s=e&&e.length>0?e:[];return(0,t.jsxs)(o.Card,{className:"bg-white border border-gray-200",children:[(0,t.jsx)(ew.Title,{className:"text-base font-semibold text-gray-900 mb-4",children:"Request Outcomes Over Time"}),(0,t.jsx)("div",{className:"h-80 min-h-[280px]",children:s.length>0?(0,t.jsx)(so.BarChart,{data:s,index:"date",categories:["passed","blocked"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),yAxisWidth:48,showLegend:!0,stack:!0}):(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-gray-500",children:"No chart data for this period"})})]})}let sc={Bedrock:"bg-orange-100 text-orange-700 border-orange-200","Google Cloud":"bg-sky-100 text-sky-700 border-sky-200",LiteLLM:"bg-indigo-100 text-indigo-700 border-indigo-200",Custom:"bg-gray-100 text-gray-600 border-gray-200"};function sm({accessToken:e=null,startDate:s,endDate:a,onSelectGuardrail:l}){let[r,n]=(0,i.useState)("failRate"),[o,d]=(0,i.useState)("desc"),[c,m]=(0,i.useState)(!1),{data:u,isLoading:p,error:x}=(0,t1.useQuery)({queryKey:["guardrails-usage-overview",s,a],queryFn:()=>(0,N.getGuardrailsUsageOverview)(e,s,a),enabled:!!e}),h=u?.rows??[],g=(0,i.useMemo)(()=>{let e,t,s,a;return u?{totalRequests:u.totalRequests??0,totalBlocked:u.totalBlocked??0,passRate:String(u.passRate??0),avgLatency:h.length?Math.round(h.reduce((e,t)=>e+(t.avgLatency??0),0)/h.length):0,count:h.length}:(e=h.reduce((e,t)=>e+t.requestsEvaluated,0),t=h.reduce((e,t)=>e+Math.round(t.requestsEvaluated*t.failRate/100),0),s=e>0?((1-t/e)*100).toFixed(1):"0",{totalRequests:e,totalBlocked:t,passRate:s,avgLatency:(a=h.filter(e=>null!=e.avgLatency)).length>0?Math.round(a.reduce((e,t)=>e+(t.avgLatency??0),0)/a.length):0,count:h.length})},[u,h]),y=u?.chart,j=(0,i.useMemo)(()=>[...h].sort((e,t)=>{let s="desc"===o?-1:1,a=e[r]??0,l=t[r]??0;return(Number(a)-Number(l))*s}),[h,r,o]),f=[{title:"Guardrail",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsx)("button",{type:"button",className:"text-sm font-medium text-gray-900 hover:text-indigo-600 text-left",onClick:()=>l(s.id),children:e})},{title:"Provider",dataIndex:"provider",key:"provider",render:e=>(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${sc[e]??sc.Custom}`,children:e})},{title:"Requests",dataIndex:"requestsEvaluated",key:"requestsEvaluated",align:"right",sorter:!0,sortOrder:"requestsEvaluated"===r?"desc"===o?"descend":"ascend":null,render:e=>e.toLocaleString()},{title:"Fail Rate",dataIndex:"failRate",key:"failRate",align:"right",sorter:!0,sortOrder:"failRate"===r?"desc"===o?"descend":"ascend":null,render:(e,s)=>(0,t.jsxs)("span",{className:e>15?"text-red-600":e>5?"text-amber-600":"text-green-600",children:[e,"%","up"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-red-400",children:"↑"}),"down"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-green-400",children:"↓"})]})},{title:"Avg. latency added",dataIndex:"avgLatency",key:"avgLatency",align:"right",sorter:!0,sortOrder:"avgLatency"===r?"desc"===o?"descend":"ascend":null,render:e=>(0,t.jsx)("span",{className:null==e?"text-gray-400":e>150?"text-red-600":e>50?"text-amber-600":"text-green-600",children:null!=e?`${e}ms`:"—"})},{title:"Status",dataIndex:"status",key:"status",align:"center",render:e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${"healthy"===e?"bg-green-500":"warning"===e?"bg-amber-500":"bg-red-500"}`}),(0,t.jsx)("span",{className:"text-xs text-gray-600 capitalize",children:e})]})}],b=["failRate","requestsEvaluated","avgLatency"];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-lg text-indigo-500"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:"Guardrails Monitor"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Monitor guardrail performance across all requests"})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tC.DownloadOutlined,{}),title:"Coming soon",children:"Export Data"})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],className:"mb-6",children:[(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Total Evaluations",value:g.totalRequests.toLocaleString()})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Blocked Requests",value:g.totalBlocked.toLocaleString(),valueColor:"text-red-600",icon:(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"})})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Pass Rate",value:`${g.passRate}%`,valueColor:"text-green-600",icon:(0,t.jsx)(si,{className:"text-green-400"})})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Avg. latency added",value:`${g.avgLatency}ms`,valueColor:g.avgLatency>150?"text-red-600":g.avgLatency>50?"text-amber-600":"text-green-600"})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Active Guardrails",value:g.count})})]}),(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(sd,{data:y})}),(0,t.jsxs)(ts.Card,{className:"border border-gray-200 rounded-lg bg-white",styles:{body:{padding:0}},children:[(p||x)&&(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-center gap-2",children:[p&&(0,t.jsx)(eF.Spin,{size:"small"}),x&&(0,t.jsx)("span",{className:"text-sm text-red-600",children:"Failed to load data. Try again."})]}),(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(sn.Typography.Title,{level:5,className:"!mb-0 text-gray-900",children:"Guardrail Performance"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Click a guardrail to view details, logs, and configuration"})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>m(!0),title:"Evaluation settings"})})]}),(0,t.jsx)(te.Table,{columns:f,dataSource:j,rowKey:"id",pagination:!1,loading:p,onChange:(e,t,s)=>{s?.field&&b.includes(s.field)&&(n(s.field),d("ascend"===s.order?"asc":"desc"))},locale:0!==h.length||p?void 0:{emptyText:"No data for this period"},onRow:e=>({onClick:()=>l(e.id),style:{cursor:"pointer"}})})]}),(0,t.jsx)(t8,{open:c,onClose:()=>m(!1),accessToken:e})]})}let su=new Date,sp=new Date;function sx({accessToken:e=null}){let[s,a]=(0,i.useState)({type:"overview"}),l=(0,i.useMemo)(()=>new Date(sp),[]),r=(0,i.useMemo)(()=>new Date(su),[]),[n,o]=(0,i.useState)({from:l,to:r}),d=n.from?(0,N.formatDate)(n.from):"",c=n.to?(0,N.formatDate)(n.to):"",m=(0,i.useCallback)(e=>{o(e)},[]);return(0,t.jsxs)("div",{className:"p-6 w-full min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-4",children:(0,t.jsx)(tY.default,{value:n,onValueChange:m,label:"",showTimeRange:!1})}),"overview"===s.type?(0,t.jsx)(sm,{accessToken:e,startDate:d,endDate:c,onSelectGuardrail:e=>{a({type:"detail",guardrailId:e})}}):(0,t.jsx)(sl,{guardrailId:s.guardrailId,onBack:()=>{a({type:"overview"})},accessToken:e,startDate:d,endDate:c})]})}sp.setDate(sp.getDate()-7);var sh=e.i(487304),sg=e.i(760221);e.i(111790);var sy=e.i(280881),sj=e.i(934879),sf=e.i(402874),sb=e.i(797305),s_=e.i(109799),sv=e.i(747871),sN=e.i(56567),sw=e.i(468133),sk=e.i(645526),sC=e.i(91979),sS=e.i(525720),sT=e.i(372943),sI=e.i(95684),sF=e.i(497650),sL=e.i(368869),sA=e.i(998573),sP=e.i(438100),sM=e.i(475254);let sD=(0,sM.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);var sE=e.i(988846),sz=e.i(98740),sz=sz;function sO({size:e,fontSize:s}){let a=(0,t.jsx)(tN.LoadingOutlined,{style:s?{fontSize:s}:void 0,spin:!0});return(0,t.jsx)(eF.Spin,{indicator:a,size:e})}var sR=e.i(363256),sB=e.i(9314),sq=e.i(552130),s$=e.i(533882),sU=e.i(651904),sV=e.i(460285),sH=e.i(435451),sG=e.i(916940),sK=e.i(127952),sW=e.i(162386);let sQ=(e,t,s)=>"Admin"===e||!!s&&!!t&&s.some(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)),sY=(e,t,s)=>"Admin"===e?s||[]:s&&t?s.filter(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)):[],sJ=({teams:e,searchParams:s,accessToken:a,setTeams:l,userID:r,userRole:n,organizations:o,premiumUser:d=!1})=>{let c,m,u,p;console.log(`organizations: ${JSON.stringify(o)}`);let{data:x}=(0,s_.useOrganizations)(),[h,g]=(0,i.useState)(!0),[j,b]=(0,i.useState)(null),[v,S]=(0,i.useState)(1),[T,F]=(0,i.useState)(10),[L,A]=(0,i.useState)(0),[P,M]=(0,i.useState)(null),[D,E]=(0,i.useState)(null),[O,R]=(0,i.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),q=(0,i.useRef)(null),[$,G]=(0,i.useState)(!1),K=async(e={})=>{if(!a)return;let t=e.page??v,s=e.size??T,i=e.sortBy??O.sort_by,o=e.sortOrder??O.sort_order,d=e.organizationID??O.organization_id,c=e.teamAlias??O.team_alias;g(!0),b(null);try{let e=await (0,eV.teamListCall)(a,t,s,{organizationID:d||null,team_alias:c||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:i||null,sortOrder:o||null});l(e.teams??[]),A(e.total??0)}catch(e){b(e?.message||"Failed to fetch teams")}finally{g(!1)}};(0,i.useEffect)(()=>{K()},[a]);let[W]=w.Form.useForm(),[Q]=w.Form.useForm(),[Y,J]=(0,i.useState)(""),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(null),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),[ei,en]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(!1),[eu,ep]=(0,i.useState)([]),[ex,eh]=(0,i.useState)(!1),[eg,ef]=(0,i.useState)(null),[eb,e_]=(0,i.useState)([]),[ev,ew]=(0,i.useState)({}),[ek,eC]=(0,i.useState)(!1),[eS,eT]=(0,i.useState)([]),[eI,eF]=(0,i.useState)([]),[eL,eA]=(0,i.useState)([]),[eP,eM]=(0,i.useState)([]),[eD,eE]=(0,i.useState)(!1),[eB,eq]=(0,i.useState)({}),[e$,eU]=(0,i.useState)(null),[eH,eY]=(0,i.useState)(0);(0,i.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${D}`);let t=(e=[],D&&D.models.length>0?(console.log(`organization.models: ${D.models}`),e=D.models):e=eu,(0,B.unfurlWildcardModelsInList)(e,eu));console.log(`models: ${t}`),e_(t),W.setFieldValue("models",[])},[D,eu]),(0,i.useEffect)(()=>{if(ei){let e=sY(n,r,o);if(1===e.length){let t=e[0];W.setFieldValue("organization_id",t.organization_id),E(t)}else W.setFieldValue("organization_id",P?.organization_id||null),E(P)}},[ei,n,r,o,P]),(0,i.useEffect)(()=>{let e=async()=>{try{if(null==a)return;let e=(await (0,N.getPoliciesList)(a)).policies.map(e=>e.policy_name);eF(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==a)return;let e=(await (0,N.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);eT(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[a]);let eJ=async()=>{try{if(null==a)return;let e=await (0,N.fetchMCPAccessGroups)(a);eM(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,i.useEffect)(()=>{eJ()},[a]),(0,i.useEffect)(()=>{e&&ew(e.reduce((e,t)=>(e[t.team_id]={keys:t.keys||[],team_info:{members_with_roles:t.members_with_roles||[]}},e),{}))},[e]);let eX=async e=>{ef(e),eh(!0)},eZ=async()=>{if(null!=eg&&null!=e&&null!=a)try{eC(!0),await (0,N.teamDeleteCall)(a,eg.team_id),await K(),ez.default.success("Team deleted successfully")}catch(e){ez.default.fromBackend("Error deleting the team: "+e)}finally{eC(!1),eh(!1),ef(null)}};(0,i.useEffect)(()=>{(async()=>{try{if(null===r||null===n||null===a)return;let e=await (0,B.fetchAvailableModelsForTeamOrKey)(r,n,a);e&&ep(e)}catch(e){console.error("Error fetching user models:",e)}})()},[a,r,n,e]);let e0=async t=>{try{if(console.log(`formValues: ${JSON.stringify(t)}`),null!=a){let s=t?.team_alias,l=e?.map(e=>e.team_alias)??[],r=t?.organization_id||P?.organization_id;if(""===r||"string"!=typeof r?t.organization_id=null:t.organization_id=r.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(ez.default.info("Creating Team"),eL.length>0){let e={};if(t.metadata)try{e=JSON.parse(t.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}e={...e,logging:eL.filter(e=>e.callback_name)},t.metadata=JSON.stringify(e)}if(t.secret_manager_settings&&"string"==typeof t.secret_manager_settings)if(""===t.secret_manager_settings.trim())delete t.secret_manager_settings;else try{t.secret_manager_settings=JSON.parse(t.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}if(t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0||t.allowed_mcp_servers_and_groups&&(t.allowed_mcp_servers_and_groups.servers?.length>0||t.allowed_mcp_servers_and_groups.accessGroups?.length>0||t.allowed_mcp_servers_and_groups.toolPermissions)){if(t.object_permission={},t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0&&(t.object_permission.vector_stores=t.allowed_vector_store_ids,delete t.allowed_vector_store_ids),t.allowed_mcp_servers_and_groups){let{servers:e,accessGroups:s}=t.allowed_mcp_servers_and_groups;e&&e.length>0&&(t.object_permission.mcp_servers=e),s&&s.length>0&&(t.object_permission.mcp_access_groups=s),delete t.allowed_mcp_servers_and_groups}t.mcp_tool_permissions&&Object.keys(t.mcp_tool_permissions).length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_tool_permissions=t.mcp_tool_permissions,delete t.mcp_tool_permissions)}if(t.allowed_mcp_access_groups&&t.allowed_mcp_access_groups.length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_access_groups=t.allowed_mcp_access_groups,delete t.allowed_mcp_access_groups),t.allowed_agents_and_groups){let{agents:e,accessGroups:s}=t.allowed_agents_and_groups;t.object_permission||(t.object_permission={}),e&&e.length>0&&(t.object_permission.agents=e),s&&s.length>0&&(t.object_permission.agent_access_groups=s),delete t.allowed_agents_and_groups}Object.keys(eB).length>0&&(t.model_aliases=eB),e$?.router_settings&&Object.values(e$.router_settings).some(e=>null!=e&&""!==e)&&(t.router_settings=e$.router_settings),await (0,N.teamCreateCall)(a,t),ez.default.success("Team created"),await K({page:v,size:T}),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1),en(!1)}}catch(e){console.error("Error creating the team:",e),ez.default.fromBackend("Error creating the team: "+e)}},e1=async(e,t)=>{let s={...O,[e]:t};if(R(s),S(1),a)try{let e=await (0,eV.teamListCall)(a,1,T,{organizationID:s.organization_id||null,team_alias:s.team_alias||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:s.sort_by||null,sortOrder:s.sort_order||null});l(e.teams??[]),A(e.total??0)}catch(e){console.error("Error fetching teams:",e)}},{token:e2}=sL.theme.useToken(),{Title:e4,Text:e5}=sn.Typography,{Content:e6}=sT.Layout,e3=(0,i.useMemo)(()=>[{title:"Team ID",dataIndex:"team_id",key:"team_id",width:170,ellipsis:!0,render:(e,s)=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(e5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>ea(s.team_id),"data-testid":"team-id-cell",children:e})})},{title:"Team Alias",dataIndex:"team_alias",key:"team_alias",ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{style:{fontSize:14},children:e||(0,t.jsx)(e5,{type:"secondary",italic:!0,children:"—"})})},{title:"Organization",key:"organization",width:160,ellipsis:!0,render:(e,s)=>{let a=((e,t)=>{if(!e||!t)return e||"N/A";let s=t.find(t=>t.organization_id===e);return s?.organization_alias||e})(s.organization_id,x||o);return s.organization_id?(0,t.jsx)(e5,{ellipsis:!0,style:{fontSize:14},children:a}):(0,t.jsx)(e5,{type:"secondary",children:"—"})}},{title:"Resources",key:"resources",width:240,render:(e,s)=>{let a=ev?.[s.team_id]?.team_info?.members_with_roles?.length??0,l=s.models?.length??0,r=ev?.[s.team_id]?.keys?.length??0;return(0,t.jsxs)(sS.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a} Members`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sS.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sz.default,{size:14}),a]})})}),(0,t.jsx)(f.Tooltip,{title:`${l} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sS.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),l]})})}),(0,t.jsx)(f.Tooltip,{title:`${r} Keys`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sS.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sP.KeyIcon,{size:14}),r]})})})]})}},{title:"Spend / Budget",key:"spend",width:200,sorter:!0,render:(e,s)=>{let a=s.spend??0,l=s.max_budget,r=`$${a.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`,i=null!=l?`$${l.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:"Unlimited",n=null!=l&&l>0?Math.min(a/l*100,100):null;return(0,t.jsxs)(sS.Flex,{vertical:!0,gap:2,children:[(0,t.jsxs)(e5,{style:{fontSize:13},children:[r,(0,t.jsxs)(e5,{type:"secondary",style:{fontSize:12},children:[" / ",i]})]}),null!=n&&(0,t.jsx)(sF.Progress,{percent:n,size:"small",showInfo:!1,strokeColor:n>=90?"#ff4d4f":n>=70?"#faad14":"#1677ff",style:{marginBottom:0}})]})}},{title:"Created",dataIndex:"created_at",key:"created_at",width:130,ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:e?new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"—"})},{title:"Actions",key:"actions",width:120,align:"right",render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(eR.default,{variant:"Copy",tooltipText:"Copy Team ID",onClick:()=>{navigator.clipboard.writeText(s.team_id).then(()=>sA.message.success("Team ID copied")).catch(()=>sA.message.error("Failed to copy"))}}),"Admin"===n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit team",dataTestId:"edit-team-button",onClick:()=>{ea(s.team_id),er(!0)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete team",dataTestId:"delete-team-button",onClick:()=>eX(s)})]})]})}],[n,ev,x,o]),e8=(0,i.useMemo)(()=>e??[],[e]),e7=[{key:"your-teams",label:"Your Teams",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sS.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsxs)(sS.Flex,{gap:12,align:"center",children:[(0,t.jsx)(C.Input,{prefix:(0,t.jsx)(sE.SearchIcon,{size:16}),suffix:$?(0,t.jsx)(sO,{size:"small"}):null,placeholder:"Search teams by name...",onChange:e=>{var t;return t=e.target.value,void(q.current&&clearTimeout(q.current),G(!0),q.current=setTimeout(async()=>{try{R(e=>({...e,team_alias:t})),S(1),await K({page:1,teamAlias:t})}finally{G(!1)}},300))},allowClear:!0,style:{maxWidth:400}}),(0,t.jsx)(sR.default,{organizations:o,value:O.organization_id||void 0,onChange:e=>e1("organization_id",e||""),loading:h})]}),(0,t.jsx)(sI.Pagination,{current:v,total:L,pageSize:T,onChange:(e,t)=>{S(e),F(t),K({page:e,size:t})},size:"small",showTotal:e=>`${e} teams`,showSizeChanger:!0,pageSizeOptions:["10","20","50"]})]}),h?(0,t.jsx)(sS.Flex,{justify:"center",align:"center",style:{padding:"80px 0"},children:(0,t.jsx)(sO,{fontSize:48})}):j?(0,t.jsxs)(sS.Flex,{vertical:!0,align:"center",gap:16,style:{padding:"64px 0"},children:[(0,t.jsx)(e5,{type:"danger",style:{fontSize:15},children:"Failed to load teams"}),(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:j}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sC.ReloadOutlined,{}),onClick:()=>{K()},children:"Retry"})]}):(0,t.jsx)(te.Table,{columns:e3,dataSource:e8,rowKey:"team_id",pagination:!1,onChange:(e,t,s)=>{let a=Array.isArray(s)?s[0]:s,l=a.order?a.columnKey:"created_at",r="ascend"===a.order?"asc":(a.order,"desc");R(e=>({...e,sort_by:l,sort_order:r})),K({sortBy:l,sortOrder:r})},locale:{emptyText:(0,t.jsxs)("div",{style:{padding:"64px 0",textAlign:"center"},children:[(0,t.jsx)(sk.TeamOutlined,{style:{fontSize:40,color:"#d9d9d9",marginBottom:12}}),(0,t.jsx)("div",{children:(0,t.jsx)(e5,{style:{fontSize:15,color:"#595959"},children:"No teams yet"})}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:"Create your first team to organize members and manage access to models."})}),sQ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),style:{marginTop:16},"data-testid":"create-team-button",children:"Create Team"})]})},scroll:{x:1e3},size:"middle"})]}),(0,t.jsx)(sK.default,{isOpen:ex,title:"Delete Team?",alertMessage:eg?.keys?.length===0?void 0:`Warning: This team has ${eg?.keys?.length} keys associated with it. Deleting the team will also delete all associated keys. This action is irreversible.`,message:"Are you sure you want to delete this team and all its keys? This action cannot be undone.",resourceInformationTitle:"Team Information",resourceInformation:[{label:"Team ID",value:eg?.team_id,code:!0},{label:"Team Name",value:eg?.team_alias},{label:"Keys",value:eg?.keys?.length},{label:"Members",value:eg?.members_with_roles?.length}],requiredConfirmation:eg?.team_alias,onCancel:()=>{eh(!1),ef(null)},onOk:eZ,confirmLoading:ek})]})},{key:"available-teams",label:"Available Teams",children:(0,t.jsx)(sv.default,{accessToken:a,userID:r})},...(0,eN.isProxyAdminRole)(n||"")?[{key:"default-settings",label:"Default Team Settings",children:(0,t.jsx)(sw.default,{accessToken:a,userID:r||"",userRole:n||""})}]:[]];return(0,t.jsxs)(e6,{style:{padding:e2.paddingLG,paddingInline:2*e2.paddingLG},children:[es?(0,t.jsx)(sN.default,{teamId:es,onUpdate:e=>{l(t=>null==t?t:t.map(t=>e.team_id===t.team_id?(0,eO.updateExistingKeys)(t,e):t)),K()},onClose:()=>{ea(null),er(!1)},accessToken:a,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let t=0;te.team_id===es)),is_proxy_admin:"Admin"==n,userModels:eu,editTeam:el,premiumUser:d}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sS.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsxs)(e4,{level:2,style:{margin:0},children:[(0,t.jsx)(sk.TeamOutlined,{style:{marginRight:8}}),"Teams"]}),(0,t.jsx)(e5,{type:"secondary",children:"Manage teams, members, and their access to models and budgets"})]}),sQ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),"data-testid":"create-team-button",children:"Create Team"})]}),(0,t.jsx)(t2.Tabs,{items:e7})]}),sQ(n,r,o)&&(0,t.jsx)(y.Modal,{title:"Create Team",open:ei,width:1e3,footer:null,onOk:()=>{en(!1),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1)},onCancel:()=>{en(!1),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1)},children:(0,t.jsxs)(w.Form,{form:W,onFinish:e0,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"","data-testid":"team-name-input"})}),(c=sY(n,r,o),m="Admin"!==n,u=1===c.length,p=0===c.length,(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(f.Tooltip,{title:(0,t.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,t.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,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:P?P.organization_id:null,className:"mt-8",rules:m?[{required:!0,message:"Please select an organization"}]:[],help:u?"You can only create teams within this organization":m?"required":"",children:(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!m,disabled:u,placeholder:p?"No organizations available":"Search or select an Organization",onChange:e=>{W.setFieldValue("organization_id",e),E(c?.find(t=>t.organization_id===e)||null)},filterOption:(e,t)=>!!t&&(t.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:c?.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),m&&!u&&c.length>1&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(e5,{style:{color:"#1e40af",fontSize:14},children:"Please select an organization to create a team for. You can only create teams within organizations where you are an admin."})})]})),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(f.Tooltip,{title:"These are the models that your selected team has access to",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),rules:[{required:!0,message:"Please select at least one model"}],name:"models",children:(0,t.jsx)(sW.ModelSelect,{value:W.getFieldValue("models")||[],onChange:e=>W.setFieldValue("models",e),organizationID:W.getFieldValue("organization_id"),options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!W.getFieldValue("organization_id")},context:"team",dataTestId:"create-team-models-select"})}),(0,t.jsx)(w.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(sH.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(w.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(k.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(k.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(k.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(k.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(w.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(w.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsxs)(eG.Accordion,{className:"mt-20 mb-8",onClick:()=>{eD||(eJ(),eE(!0))},children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Additional Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(w.Form.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,t.jsx)(eQ.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,t.jsx)(w.Form.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,t.jsx)(sH.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(w.Form.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,t.jsx)(eQ.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(w.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(w.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(w.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,t.jsx)(C.Input.TextArea,{rows:4})}),(0,t.jsx)(w.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:d?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(C.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!d})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"Setup your first guardrail",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:eS.map(e=>({value:e,label:e}))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(_.Switch,{disabled:!d,checkedChildren:d?"Yes":"Premium feature - Upgrade to disable global guardrails by team",unCheckedChildren:d?"No":"Premium feature - Upgrade to disable global guardrails by team"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(f.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:eI.map(e=>({value:e,label:e}))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(f.Tooltip,{title:"Assign access groups to this team. Access groups control which models, MCP servers, and agents this team can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-8",help:"Select access groups to assign to this team",children:(0,t.jsx)(sB.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(f.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,t.jsx)(z.InfoCircleOutlined,{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,t.jsx)(sG.default,{onChange:e=>W.setFieldValue("allowed_vector_store_ids",e),value:W.getFieldValue("allowed_vector_store_ids"),accessToken:a||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(f.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,t.jsx)(z.InfoCircleOutlined,{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,t.jsx)(ey.default,{onChange:e=>W.setFieldValue("allowed_mcp_servers_and_groups",e),value:W.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:a||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(w.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(C.Input,{type:"hidden"})}),(0,t.jsx)(w.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(ej.default,{accessToken:a||"",selectedServers:W.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:W.getFieldValue("mcp_tool_permissions")||{},onChange:e=>W.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(f.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,t.jsx)(sq.default,{onChange:e=>W.setFieldValue("allowed_agents_and_groups",e),value:W.getFieldValue("allowed_agents_and_groups"),accessToken:a||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(sU.default,{value:eL,onChange:eA,premiumUser:d})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(sV.default,{accessToken:a||"",value:e$||void 0,onChange:eU,modelData:eu.length>0?{data:eu.map(e=>({model_name:e}))}:void 0},eH)})})]},`router-settings-accordion-${eH}`),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(e5,{type:"secondary",style:{fontSize:14,marginBottom:16,display:"block"},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,t.jsx)(s$.default,{accessToken:a||"",initialModelAliases:eB,onAliasUpdate:eq,showExampleConfig:!1})]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(V.Button,{htmlType:"submit","data-testid":"create-team-submit",children:"Create Team"})})]})})]})};var sX=e.i(702597),sZ=e.i(846835),s0=e.i(147612),s1=e.i(191403),s2=e.i(976883),s4=e.i(657688),s5=e.i(437902);let{Text:s6}=sn.Typography,s3=({litellmParams:e,accessToken:s,onTestComplete:a})=>{let[l,r]=(0,i.useState)(!0),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{r(!0);try{let t=await (0,N.testSearchToolConnection)(s,e);o(t),"success"===t.status&&ez.default.success("Connection test successful!")}catch(e){o({status:"error",message:e instanceof Error?e.message:"Unknown error occurred",error_type:"NetworkError"})}finally{r(!1),a&&a()}})()},[s,e,a]);let m=n?.message?(e=>{if(!e)return"Unknown error";let t=e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error:\s*/,"").replace(/^AuthenticationError:\s*/,"");if(t.includes("")||t.includes("(.*?)<\/title>/);return e?e[1]:t.includes("401")||t.includes("Authorization Required")?"Authentication failed: Invalid API key or credentials":"Authentication error - please check your API key"}return t.length>200?t.substring(0,200)+"...":t})(n.message):"Unknown error";return l?(0,t.jsx)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.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,t.jsxs)(s6,{style:{fontSize:"16px"},children:["Testing connection to ",e.search_provider||"search provider","..."]}),(0,t.jsx)(s5.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]})}):n?(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:["success"===n.status?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.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,t.jsxs)("div",{style:{marginLeft:"12px"},children:[(0,t.jsxs)(s6,{type:"success",style:{fontSize:"18px",fontWeight:500,display:"block"},children:["Connection to ",e.search_provider," successful!"]}),n.test_query&&(0,t.jsxs)(s6,{style:{fontSize:"14px",color:"#666",marginTop:"8px",display:"block"},children:["Test query: ",(0,t.jsx)("code",{style:{backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"4px"},children:n.test_query})]}),void 0!==n.results_count&&(0,t.jsxs)(s6,{style:{fontSize:"14px",color:"#666",display:"block"},children:["Results retrieved: ",n.results_count]})]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(t0.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(s6,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",e.search_provider||"search provider"," failed"]})]}),(0,t.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,t.jsxs)(s6,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(s6,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:m}),n.error_type&&(0,t.jsx)("div",{style:{marginTop:"8px"},children:(0,t.jsxs)(s6,{style:{fontSize:"13px",color:"#666"},children:["Error type:"," ",(0,t.jsx)("code",{style:{backgroundColor:"#ffebee",padding:"2px 6px",borderRadius:"4px",color:"#d32f2f"},children:n.error_type})]})}),n.message&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),style:{paddingLeft:0,height:"auto"},children:d?"Hide Details":"Show Details"})})]}),d&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(s6,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Full Error Details"}),(0,t.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:n.message})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fffbf0",border:"1px solid #ffe58f",borderLeft:"4px solid #faad14",borderRadius:"8px",padding:"16px"},children:[(0,t.jsx)(s6,{strong:!0,style:{display:"block",marginBottom:"8px",color:"#d48806"},children:"Troubleshooting tips:"}),(0,t.jsxs)("ul",{style:{margin:"8px 0",paddingLeft:"20px",color:"#ad6800"},children:[(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Verify your API key is correct and active"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Check if the search provider service is operational"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Ensure you have sufficient credits/quota with the provider"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Review the provider's documentation for any additional requirements"})]})]})]})}),(0,t.jsx)(F.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(V.Button,{type:"link",href:"https://docs.litellm.ai/docs/search",target:"_blank",icon:(0,t.jsx)(z.InfoCircleOutlined,{}),children:"View Search Documentation"})})]}):null},{TextArea:s8}=C.Input,s7=({providerName:e,displayName:s})=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)(s4.default,{src:`../ui/assets/logos/${e}.png`,alt:"",width:20,height:20,style:{marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,t.jsx)("span",{children:s})]}),s9=({userRole:e,accessToken:s,onCreateSuccess:a,isModalVisible:l,setModalVisible:r})=>{let[o]=w.Form.useForm(),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)({}),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),[j,b]=(0,i.useState)(""),{data:_,isLoading:v}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,N.fetchAvailableSearchProviders)(s)},enabled:!!s&&l}),C=_?.providers||[],S=async e=>{c(!0);try{let 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};if(console.log("Creating search tool with payload:",t),null!=s){let e=await (0,N.createSearchTool)(s,t);ez.default.success("Search tool created successfully"),o.resetFields(),u({}),r(!1),a(e)}}catch(e){ez.default.error("Error creating search tool: "+e)}finally{c(!1)}},T=async()=>{try{await o.validateFields(["search_provider","api_key"]),g(!0),b(`test-${Date.now()}`),x(!0)}catch(e){ez.default.error("Please fill in Search Provider and API Key before testing")}};return(i.default.useEffect(()=>{l||u({})},[l]),(0,eN.isAdminRole)(e))?(0,t.jsxs)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)("span",{className:"text-2xl",children:"🔍"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Search Tool"})]}),open:l,width:800,onCancel:()=>{o.resetFields(),u({}),r(!1)},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:[(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsxs)(w.Form,{form:o,onFinish:S,onValuesChange:(e,t)=>u(t),layout:"vertical",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Tool Name",(0,t.jsx)(f.Tooltip,{title:"A unique name to identify this search tool configuration (e.g., 'perplexity-search', 'tavily-news-search').",children:(0,t.jsx)(z.InfoCircleOutlined,{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,t.jsx)(eQ.TextInput,{placeholder:"e.g., perplexity-search, my-tavily-tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Provider",(0,t.jsx)(f.Tooltip,{title:"Select the search provider you want to use. Each provider has different capabilities and pricing.",children:(0,t.jsx)(z.InfoCircleOutlined,{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,t.jsx)(k.Select,{placeholder:"Select a search provider",className:"rounded-lg",size:"large",loading:v,showSearch:!0,optionFilterProp:"children",optionLabelProp:"label",children:C.map(e=>(0,t.jsx)(k.Select.Option,{value:e.provider_name,label:(0,t.jsx)(s7,{providerName:e.provider_name,displayName:e.ui_friendly_name}),children:(0,t.jsx)(s7,{providerName:e.provider_name,displayName:e.ui_friendly_name})},e.provider_name))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["API Key",(0,t.jsx)(f.Tooltip,{title:"The API key for authenticating with the search provider. This will be securely stored.",children:(0,t.jsx)(z.InfoCircleOutlined,{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,t.jsx)(eQ.TextInput,{type:"password",placeholder:"Enter your API key",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description (Optional)"}),name:"description",children:(0,t.jsx)(s8,{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,t.jsxs)("div",{className:"flex justify-between items-center pt-6 border-t border-gray-100",children:[(0,t.jsx)(f.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(sn.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(n.Button,{onClick:T,loading:h,children:"Test Connection"}),(0,t.jsx)(n.Button,{loading:d,type:"submit",children:"Add Search Tool"})]})]})]})}),(0,t.jsx)(y.Modal,{title:"Connection Test Results",open:p,onCancel:()=>{x(!1),g(!1)},footer:[(0,t.jsx)(n.Button,{onClick:()=>{x(!1),g(!1)},children:"Close"},"close")],width:700,children:p&&s&&(0,t.jsx)(s3,{litellmParams:{search_provider:m.search_provider,api_key:m.api_key,api_base:m.api_base},accessToken:s,onTestComplete:()=>g(!1)},j)})]}):null};var ae=e.i(350967),at=e.i(678784),as=e.i(118366),aa=e.i(928685);let{Text:al}=sn.Typography,ar=({searchToolName:e,accessToken:s,className:a=""})=>{let[l,r]=(0,i.useState)(""),[n,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)([]),[u,p]=(0,i.useState)({}),[x,h]=(0,i.useState)(!1),g=async()=>{if(!l.trim())return void A.default.warning("Please enter a search query");d(!0);let t=performance.now();try{let a=await (0,N.searchToolQueryCall)(s,e,l),r=performance.now(),i=Math.round(r-t),n={query:l,response:a,timestamp:Date.now(),latency:i};m(e=>[n,...e])}catch(e){console.error("Error querying search tool:",e),ez.default.fromBackend("Failed to query search tool")}finally{d(!1)}},y=e=>new Date(e).toLocaleString(),j=(0,t.jsx)(tN.LoadingOutlined,{style:{fontSize:24},spin:!0}),f=c.length>0?c[0]:null;return(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(ew.Title,{children:"Test Search Tool"})}),(0,t.jsxs)("div",{className:"flex flex-col",style:{minHeight:"600px"},children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex items-stretch gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white rounded-lg px-4 transition-all duration-200",style:{border:x?"2px solid #3b82f6":"2px solid #e5e7eb",boxShadow:x?"0 0 0 3px rgba(59, 130, 246, 0.1)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",height:"48px"},children:[(0,t.jsx)(aa.SearchOutlined,{className:"text-gray-400 mr-3",style:{fontSize:"18px"}}),(0,t.jsx)(C.Input,{value:l,onChange:e=>r(e.target.value),onFocus:()=>h(!0),onBlur:()=>h(!1),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),g())},placeholder:"Enter your search query...",disabled:n,bordered:!1,style:{fontSize:"15px",padding:0,height:"100%",boxShadow:"none"}})]}),(0,t.jsx)(V.Button,{type:"primary",onClick:g,disabled:n||!l.trim(),icon:(0,t.jsx)(aa.SearchOutlined,{}),loading:n,style:{height:"48px",paddingLeft:"24px",paddingRight:"24px",borderRadius:"8px",fontWeight:500,fontSize:"15px",backgroundColor:n||!l.trim()?void 0:"#1890ff",borderColor:n||!l.trim()?void 0:"#1890ff",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:"Search"})]})}),(0,t.jsx)("div",{className:"flex-1",children:f||n?(0,t.jsxs)("div",{children:[n&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center py-16",children:[(0,t.jsx)(eF.Spin,{indicator:j}),(0,t.jsx)(al,{className:"mt-4 text-gray-600 font-medium",children:"Searching..."})]}),f&&!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.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,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(al,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Search Query"}),(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mt-1.5",children:f.query})]}),(0,t.jsxs)("div",{className:"text-right ml-4",children:[(0,t.jsx)(al,{className:"text-xs text-gray-500",children:y(f.timestamp)}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,t.jsxs)("div",{className:"text-sm font-semibold text-blue-600",children:[f.response?.results?.length||0," ",f.response?.results?.length===1?"result":"results"]}),void 0!==f.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("div",{className:"text-sm font-semibold text-green-600",children:[f.latency,"ms"]})]})]})]})]})}),f.response&&f.response.results&&f.response.results.length>0?(0,t.jsx)("div",{className:"space-y-3",children:f.response.results.map((e,s)=>{let a=u[`0-${s}`]||!1;return(0,t.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,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,t.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,t.jsx)(V.Button,{type:"text",size:"small",className:"flex-shrink-0",icon:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.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,t.jsx)("div",{className:"text-sm text-green-700 mb-3 truncate font-medium",children:e.url}),(0,t.jsx)("div",{className:"text-sm text-gray-700 leading-relaxed",children:a?e.snippet:`${e.snippet.substring(0,200)}${e.snippet.length>200?"...":""}`}),e.snippet.length>200&&(0,t.jsx)(V.Button,{type:"link",size:"small",className:"mt-3 p-0 h-auto",onClick:()=>{let e;return e=`0-${s}`,void p(t=>({...t,[e]:!t[e]}))},style:{fontSize:"13px",fontWeight:500,color:"#3b82f6"},children:a?"Show less":"Show more"})]})},s)})}):(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 mx-auto mb-4",children:(0,t.jsx)(aa.SearchOutlined,{style:{fontSize:"24px",color:"#9ca3af"}})}),(0,t.jsx)(al,{className:"text-gray-600 font-medium",children:"No results found"}),(0,t.jsx)(al,{className:"text-sm text-gray-500 mt-1",children:"Try a different search query"})]})]}),c.length>1&&(0,t.jsxs)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)(al,{className:"text-sm font-semibold text-gray-700",children:"Previous Searches"}),(0,t.jsx)(V.Button,{onClick:()=>{m([]),p({}),ez.default.success("Search history cleared")},size:"small",type:"link",style:{fontSize:"13px",fontWeight:500},children:"Clear All"})]}),(0,t.jsx)("div",{className:"space-y-2",children:c.slice(1,6).map((e,s)=>(0,t.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:()=>{r(e.query)},children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800 truncate",children:e.query}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-1.5 flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"font-medium text-blue-600",children:[e.response?.results?.length||0," ",e.response?.results?.length===1?"result":"results"]}),void 0!==e.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"•"}),(0,t.jsxs)("span",{className:"font-medium text-green-600",children:[e.latency,"ms"]})]}),(0,t.jsx)("span",{children:"•"}),(0,t.jsx)("span",{children:y(e.timestamp)})]})]},s+1))})]})]}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center p-8",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-24 h-24 rounded-full bg-gray-100 mb-6",children:(0,t.jsx)(aa.SearchOutlined,{style:{fontSize:"48px",color:"#9ca3af"}})}),(0,t.jsx)(al,{className:"text-lg text-gray-600 font-medium",children:"Test your search tool"}),(0,t.jsx)(al,{className:"text-sm text-gray-500 mt-2",children:"Enter a query above to see search results"})]})})]})]})},ai=({searchTool:e,onBack:s,isEditing:a,accessToken:l,availableProviders:r})=>{var d;let c,[m,u]=(0,i.useState)({}),p=async(e,t)=>{await (0,eO.copyToClipboard)(e)&&(u(e=>({...e,[t]:!0})),setTimeout(()=>{u(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eA.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Search Tools"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(ew.Title,{children:e.search_tool_name}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-name"]?(0,t.jsx)(at.CheckIcon,{size:12}):(0,t.jsx)(as.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_name,"search-tool-name"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:e.search_tool_id}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-id"]?(0,t.jsx)(at.CheckIcon,{size:12}):(0,t.jsx)(as.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_id,"search-tool-id"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsxs)(ae.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Provider"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(ew.Title,{children:(d=e.litellm_params.search_provider,c=r.find(e=>e.provider_name===d),c?.ui_friendly_name||d)})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"API Key"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.litellm_params.api_key?"****":"Not set"})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Created At"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleString():"Unknown"})})]})]}),e.search_tool_info?.description&&(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)(g.Text,{children:"Description"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.search_tool_info.description})})]}),(0,t.jsx)("div",{className:"mt-6",children:l&&(0,t.jsx)(ar,{searchToolName:e.search_tool_name,accessToken:l})})]})},an=({accessToken:e,userRole:s,userID:a})=>{let{data:l,isLoading:r,refetch:o}=(0,t1.useQuery)({queryKey:["searchTools"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,N.fetchSearchTools)(e).then(e=>e.search_tools||[])},enabled:!!e}),{data:d,isLoading:c}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,N.fetchAvailableSearchProviders)(e)},enabled:!!e}),m=d?.providers||[],[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(!1),[b,_]=(0,i.useState)(null),[v,S]=(0,i.useState)(!1),[T,F]=(0,i.useState)(!1),[L,A]=(0,i.useState)(!1),[P]=w.Form.useForm(),M=i.default.useMemo(()=>{let e,s,a;return e=e=>{_(e),S(!1)},s=e=>{let t=l?.find(t=>t.search_tool_id===e);t&&(P.setFieldsValue({search_tool_name:t.search_tool_name,search_provider:t.litellm_params.search_provider,api_key:t.litellm_params.api_key,api_base:t.litellm_params.api_base,timeout:t.litellm_params.timeout,max_retries:t.litellm_params.max_retries,description:t.search_tool_info?.description}),_(e),A(!0))},a=D,[{title:"Search Tool ID",dataIndex:"search_tool_id",key:"search_tool_id",render:(s,a)=>a.is_from_config?(0,t.jsx)("span",{className:"text-xs",children:"-"}):(0,t.jsx)("button",{onClick:()=>e(a.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 cursor-pointer max-w-40",children:(0,t.jsx)("span",{className:"truncate block",children:a.search_tool_id})})},{title:"Name",dataIndex:"search_tool_name",key:"search_tool_name",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Provider",key:"provider",render:(e,s)=>{let a=s.litellm_params.search_provider,l=m.find(e=>e.provider_name===a),r=l?.ui_friendly_name||a;return(0,t.jsx)("span",{className:"text-sm",children:r})}},{title:"Created At",dataIndex:"created_at",key:"created_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.created_at?new Date(s.created_at).toLocaleDateString():"-"})},{title:"Updated At",dataIndex:"updated_at",key:"updated_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.updated_at?new Date(s.updated_at).toLocaleDateString():"-"})},{title:"Source",key:"source",render:(e,s)=>{let a=s.is_from_config??!1;return(0,t.jsx)(I.Tag,{color:a?"default":"blue",children:a?"Config":"DB"})}},{title:"Actions",key:"actions",render:(e,l)=>{let r=l.search_tool_id,i=l.is_from_config??!1;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit search tool",disabled:i,disabledTooltipText:"Config search tool cannot be edited on the dashboard. Please edit it from the config file.",onClick:()=>{r&&!i&&s(r)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete search tool",disabled:i,disabledTooltipText:"Config search tool cannot be deleted on the dashboard. Please delete it from the config file.",onClick:()=>{r&&!i&&a(r)}})]})}}]},[m,l,P]);function D(e){p(e),h(!0)}let E=async()=>{if(null!=u&&null!=e){f(!0);try{await (0,N.deleteSearchTool)(e,u),ez.default.success("Deleted search tool successfully"),h(!1),p(null),o()}catch(e){console.error("Error deleting the search tool:",e),ez.default.error("Failed to delete search tool")}finally{f(!1)}}},z=l?.find(e=>e.search_tool_id===u),O=z?m.find(e=>e.provider_name===z.litellm_params.search_provider):null,R=async()=>{if(e&&b)try{let t=await P.validateFields(),s={search_tool_name:t.search_tool_name,litellm_params:{search_provider:t.search_provider,api_key:t.api_key,api_base:t.api_base,timeout:t.timeout?parseFloat(t.timeout):void 0,max_retries:t.max_retries?parseInt(t.max_retries):void 0},search_tool_info:t.description?{description:t.description}:void 0};await (0,N.updateSearchTool)(e,b,s),ez.default.success("Search tool updated successfully"),A(!1),P.resetFields(),_(null),o()}catch(e){console.error("Failed to update search tool:",e),ez.default.error("Failed to update search tool")}};return e&&s&&a?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(sK.default,{isOpen:x,title:"Delete Search Tool",message:"Are you sure you want to delete this search tool? This action cannot be undone.",resourceInformationTitle:"Search Tool Information",resourceInformation:z?[{label:"Name",value:z.search_tool_name},{label:"ID",value:z.search_tool_id,code:!0},{label:"Provider",value:O?.ui_friendly_name||z.litellm_params.search_provider},{label:"Description",value:z.search_tool_info?.description||"-"}]:[],onCancel:()=>{h(!1),p(null)},onOk:E,confirmLoading:j}),(0,t.jsx)(s9,{userRole:s,accessToken:e,onCreateSuccess:e=>{F(!1),o()},isModalVisible:T,setModalVisible:F}),(0,t.jsx)(y.Modal,{title:"Edit Search Tool",open:L,onOk:R,onCancel:()=>{A(!1),P.resetFields(),_(null)},width:600,children:(0,t.jsxs)(w.Form,{form:P,layout:"vertical",children:[(0,t.jsx)(w.Form.Item,{name:"search_tool_name",label:"Search Tool Name",rules:[{required:!0,message:"Please enter a search tool name"}],children:(0,t.jsx)(C.Input,{placeholder:"e.g., my-perplexity-search"})}),(0,t.jsx)(w.Form.Item,{name:"search_provider",label:"Search Provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(k.Select,{placeholder:"Select a search provider",loading:c,children:m.map(e=>(0,t.jsx)(k.Select.Option,{value:e.provider_name,children:e.ui_friendly_name},e.provider_name))})}),(0,t.jsx)(w.Form.Item,{name:"api_key",label:"API Key",extra:"API key for the search provider",children:(0,t.jsx)(C.Input.Password,{placeholder:"Enter API key"})}),(0,t.jsx)(w.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(C.Input.TextArea,{rows:3,placeholder:"Description of this search tool"})})]})}),(0,t.jsx)(ew.Title,{children:"Search Tools"}),(0,t.jsx)(g.Text,{className:"text-tremor-content mt-2",children:"Configure and manage your search providers"}),(0,eN.isAdminRole)(s)&&(0,t.jsx)(n.Button,{className:"mt-4 mb-4",onClick:()=>F(!0),children:"+ Add New Search Tool"}),(0,t.jsx)(()=>b?(0,t.jsx)(ai,{searchTool:l?.find(e=>e.search_tool_id===b)||{search_tool_id:"",search_tool_name:"",litellm_params:{search_provider:""}},onBack:()=>{S(!1),_(null),o()},isEditing:v,accessToken:e,availableProviders:m}):(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(eF.Spin,{spinning:r,indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"large",children:(0,t.jsx)(te.Table,{bordered:!0,dataSource:l||[],columns:M,rowKey:e=>e.search_tool_id||e.search_tool_name,pagination:!1,locale:{emptyText:"No search tools configured"},size:"small"})})}),{})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:s,userID:a}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))};var ao=e.i(700904),ad=e.i(686311),ac=e.i(37727),am=e.i(643531),au=e.i(636772),ap=e.i(115571);function ax({onOpen:e,onDismiss:s,isVisible:a,title:l,description:r,buttonText:n,icon:o,accentColor:d,buttonStyle:c}){let m=(0,au.useDisableShowPrompts)(),[u,p]=(0,i.useState)(100),[x,h]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{if(!a){p(100),h(!1);return}let e=Date.now(),t=setInterval(()=>{let s=Math.max(0,100-(Date.now()-e)/15e3*100);p(s),s<=0&&clearInterval(t)},50);return()=>clearInterval(t)},[a]),(0,i.useEffect)(()=>{if(x){let e=setTimeout(()=>{h(!1),s()},5e3);return()=>clearTimeout(e)}},[x,s]),x)?(0,t.jsx)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center",children:(0,t.jsx)(am.Check,{className:"h-5 w-5 text-green-600"})}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)("p",{className:"text-sm text-gray-700 font-medium",children:"Got it, we will not ask again. Reactivate this at any time in the User Menu."})})]})})}):!a||m?null:(0,t.jsxs)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:[(0,t.jsx)("div",{className:"h-1 bg-gray-100 w-full",children:(0,t.jsx)("div",{className:"h-full transition-all duration-100 ease-linear",style:{width:`${u}%`,backgroundColor:d}})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",style:{color:d},children:[(0,t.jsx)(o,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm",children:l})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-0.5 rounded hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-3",children:r}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(V.Button,{type:"primary",block:!0,onClick:e,style:c,children:n}),(0,t.jsx)(V.Button,{variant:"outlined",danger:!0,block:!0,onClick:()=>{(0,ap.setLocalStorageItem)("disableShowPrompts","true"),(0,ap.emitLocalStorageChange)("disableShowPrompts"),h(!0)},className:"text-xs",children:"Don't ask me again"})]})]})]})}function ah({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ax,{onOpen:e,onDismiss:s,isVisible:a,title:"Quick feedback",description:"Help us improve LiteLLM! Share your experience in 5 quick questions.",buttonText:"Share feedback",icon:ad.MessageSquare,accentColor:"#3b82f6"})}var ag=e.i(972520),ay=e.i(180127),ay=ay,aj=e.i(536916);let af=[{id:"oss_adoption",label:"OSS Adoption",description:"Stars, contributors, forks, community support"},{id:"ai_integration",label:"AI Integration",description:"LiteLLM had the logging/guardrail integration we needed - Langfuse, OTEL, S3 logging, Azure Content Safety guardrails"},{id:"unified_api",label:"Unified API",description:"LiteLLM had the best OpenAI-compatible API across providers - OpenAI, Anthropic, Gemini, etc."},{id:"breadth_of_models",label:"Breadth of Models/Providers",description:"LiteLLM had the provider + endpoint combinations we needed - /ocr endpoint with Mistral OCR, /batches endppint with Bedrock API, etc."},{id:"other",label:"Other",description:"Something else not listed above"}];function ab({isOpen:e,onClose:s,onComplete:a}){let[l,r]=(0,i.useState)(1),[n,o]=(0,i.useState)({usingAtCompany:null,companyName:"",startDate:"",reasons:[],otherReason:"",email:""}),[d,c]=(0,i.useState)(!1),m=!0===n.usingAtCompany?5:4;if(!e)return null;let u=async()=>{c(!0);try{let e={oss_adoption:"OSS Adoption (stars, contributors, forks)",ai_integration:"AI Integration (Langfuse, OTEL, S3, Azure Content Safety)",unified_api:"Unified API (OpenAI-compatible)",breadth_of_models:"Breadth of Models/Providers (/ocr, /batches, Bedrock, Azure OCR)"},t=n.reasons.map(t=>"other"===t&&n.otherReason?`Other: ${n.otherReason}`:e[t]||t),s=new URLSearchParams({"entry.2015264290":n.usingAtCompany?"Yes":"No","entry.1876243786":n.companyName||"","entry.1282591459":n.startDate,"entry.393456108":t.join(", "),"entry.928142208":n.email||""});await fetch("https://feedback.litellm.ai/survey",{method:"POST",mode:"no-cors",body:s})}catch(e){console.error("Failed to submit survey:",e)}c(!1),a()},p=(e,t)=>{o(s=>({...s,[e]:t}))},x=e=>{o(t=>({...t,reasons:t.reasons.includes(e)?t.reasons.filter(t=>t!==e):[...t.reasons,e]}))},h=()=>{if(!1===n.usingAtCompany){if(1===l)return 1;if(3===l)return 2;if(4===l)return 3;if(5===l)return 4}return l},g=5===l;return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-lg bg-white rounded-xl shadow-2xl overflow-hidden flex flex-col max-h-[90vh] transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-blue-600",children:[(0,t.jsx)(ad.MessageSquare,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Quick Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-5 w-5"})})]}),(0,t.jsx)(sF.Progress,{percent:h()/m*100,showInfo:!1,strokeColor:"#2563eb",className:"m-0"}),(0,t.jsx)("div",{className:"p-8 flex-1 overflow-y-auto",children:1===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Are you using LiteLLM at your company?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Help us understand how our product is being used in professional environments."}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 pt-4",children:[(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!0),className:`p-6 rounded-lg border-2 text-left transition-all ${!0===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"Yes"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"We use it for work"})]}),(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!1),className:`p-6 rounded-lg border-2 text-left transition-all ${!1===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"No"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Personal project / Hobby"})]})]})]}):2===l&&!0===n.usingAtCompany?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"What company are you using LiteLLM at?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"This helps us understand our user base better."}),(0,t.jsx)(C.Input,{size:"large",placeholder:"Enter your company name",value:n.companyName,onChange:e=>p("companyName",e.target.value),autoFocus:!0})]}):3===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"When did you start using LiteLLM?"}),(0,t.jsx)(T.Radio.Group,{value:n.startDate,onChange:e=>p("startDate",e.target.value),className:"w-full",children:(0,t.jsx)(U.Space,{direction:"vertical",className:"w-full",children:["Less than a month ago","1-3 months ago","3-6 months ago","More than 6 months ago"].map(e=>(0,t.jsx)("label",{className:`flex items-center p-4 rounded-lg border cursor-pointer transition-all w-full ${n.startDate===e?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:(0,t.jsx)(T.Radio,{value:e,children:e})},e))})})]}):4===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Why did you pick LiteLLM over other AI Gateways?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Select all that apply."}),(0,t.jsx)("div",{className:"space-y-3",children:af.map(e=>{let s=n.reasons.includes(e.id);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>x(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),x(e.id))},className:`flex items-start p-4 rounded-lg border cursor-pointer transition-all ${s?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:[(0,t.jsx)(aj.Checkbox,{checked:s,className:"mt-0.5 pointer-events-none"}),(0,t.jsxs)("div",{className:"ml-3",children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900",children:e.label}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.description})]})]}),"other"===e.id&&s&&(0,t.jsx)(C.Input,{className:"mt-2 ml-7",placeholder:"Please specify...",value:n.otherReason,onChange:e=>p("otherReason",e.target.value),onClick:e=>e.stopPropagation(),autoFocus:!0})]},e.id)})})]}):5===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Want to share more?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Leave your email and we may reach out to learn more about your experience. This is completely optional."}),(0,t.jsx)(C.Input,{size:"large",type:"email",placeholder:"your@email.com (optional)",value:n.email,onChange:e=>p("email",e.target.value),autoFocus:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"We will only use this to follow up on your feedback. No spam, ever."})]}):null}),(0,t.jsxs)("div",{className:"px-6 py-4 bg-gray-50 border-t border-gray-200 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-sm text-gray-500 font-medium",children:["Step ",h()," of ",m]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[l>1&&(0,t.jsx)(V.Button,{onClick:()=>{3===l&&!1===n.usingAtCompany?r(1):r(l-1)},disabled:d,icon:(0,t.jsx)(ay.default,{className:"h-4 w-4"}),children:"Back"}),(0,t.jsxs)(V.Button,{type:"primary",onClick:()=>{1===l&&!1===n.usingAtCompany?r(3):l<5?r(l+1):u()},disabled:!(1===l?null!==n.usingAtCompany:2===l?n.companyName.trim().length>0:3===l?""!==n.startDate:4===l?n.reasons.includes("other")?n.reasons.length>0&&n.otherReason.trim().length>0:n.reasons.length>0:5===l)||d,loading:d,className:"min-w-[100px]",children:[g?"Submit":"Next",!g&&(0,t.jsx)(ag.ArrowRight,{className:"ml-2 h-4 w-4"})]})]})]})]})]})}var a_=e.i(758472);function av({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ax,{onOpen:e,onDismiss:s,isVisible:a,title:"Claude Code Feedback",description:"Help us improve your Claude Code experience with LiteLLM! Share your feedback in 4 quick questions.",buttonText:"Share feedback",icon:a_.Code,accentColor:"#7c3aed",buttonStyle:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"}})}function aN({isOpen:e,onClose:s,onComplete:a}){return e?(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-md bg-white rounded-xl shadow-2xl overflow-hidden transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-purple-600",children:[(0,t.jsx)(a_.Code,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Claude Code Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"p-8",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Help us improve your experience"}),(0,t.jsx)("p",{className:"text-gray-600 mb-6",children:"We'd love to hear about your experience using LiteLLM with Claude Code. Your feedback helps us improve the product for everyone."}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-6",children:"This brief survey takes about 2-3 minutes to complete."}),(0,t.jsx)(V.Button,{type:"primary",size:"large",block:!0,onClick:()=>{window.open("https://forms.gle/LZeJQ3XytBakckYa9","_blank","noopener,noreferrer"),a()},icon:(0,t.jsx)(tq.ExternalLink,{className:"h-4 w-4"}),style:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"},children:"Open Feedback Form"})]})]})]}):null}var aw=e.i(345244),ak=e.i(662316),aC=e.i(208075),aS=e.i(735042),aT=e.i(693569),aI=e.i(263147),aF=e.i(954616),aL=e.i(912598);let aA=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"DELETE",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}};var aP=e.i(152990),aM=e.i(682830),aD=e.i(657150),aD=aD,aE=e.i(302202),az=e.i(446891);let aO=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()};var aR=e.i(21548),aB=e.i(573421),aq=e.i(516430),aD=aD,a$=e.i(823429),a$=a$,sz=sz,aU=e.i(304911),aV=e.i(289793),aH=e.i(500727),aD=aD,aG=e.i(168118);let{TextArea:aK}=C.Input;function aW({form:e,isNameDisabled:s=!1}){let{data:a}=(0,aV.useAgents)(),{data:l}=(0,aH.useMCPServers)(),r=a?.agents??[],i=[{key:"1",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aG.InfoIcon,{size:16}),"General Info"]}),children:(0,t.jsxs)("div",{style:{paddingTop:16},children:[(0,t.jsx)(w.Form.Item,{name:"name",label:"Group Name",rules:[{required:!0,message:"Please enter the access group name"}],children:(0,t.jsx)(C.Input,{placeholder:"e.g. Engineering Team",disabled:s})}),(0,t.jsx)(w.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(aK,{rows:4,placeholder:"Describe the purpose of this access group..."})})]})},{key:"2",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(sD,{size:16}),"Models"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(w.Form.Item,{name:"modelIds",label:"Allowed Models",children:(0,t.jsx)(sW.ModelSelect,{context:"global",value:e.getFieldValue("modelIds")??[],onChange:t=>e.setFieldsValue({modelIds:t}),style:{width:"100%"}})})})},{key:"3",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aE.ServerIcon,{size:16}),"MCP Servers"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(w.Form.Item,{name:"mcpServerIds",label:"Allowed MCP Servers",children:(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"Select MCP servers",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:(l??[]).map(e=>({label:e.server_name??e.server_id,value:e.server_id}))})})})},{key:"4",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aD.default,{size:16}),"Agents"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(w.Form.Item,{name:"agentIds",label:"Allowed Agents",children:(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"Select agents",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:r.map(e=>({label:e.agent_name,value:e.agent_id}))})})})}];return(0,t.jsx)(w.Form,{form:e,layout:"vertical",name:"access_group_form",initialValues:{modelIds:[],mcpServerIds:[],agentIds:[]},children:(0,t.jsx)(t2.Tabs,{defaultActiveKey:"1",items:i})})}let aQ=async(e,t,s)=>{let a=(0,N.getProxyBaseUrl)(),l=`${a}/v1/access_group/${encodeURIComponent(t)}`,r=await fetch(l,{method:"PUT",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){let e=await r.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return r.json()};function aY({visible:e,accessGroup:s,onCancel:a,onSuccess:l}){let[r]=w.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async({accessGroupId:t,params:s})=>{if(!e)throw Error("Access token is required");return aQ(e,t,s)},onSuccess:(e,{accessGroupId:s})=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all}),t.invalidateQueries({queryKey:aI.accessGroupKeys.detail(s)})}})})();return(0,i.useEffect)(()=>{e&&s&&r.setFieldsValue({name:s.access_group_name,description:s.description??"",modelIds:s.access_model_names??[],mcpServerIds:s.access_mcp_server_ids??[],agentIds:s.access_agent_ids??[]})},[e,s,r]),(0,t.jsx)(y.Modal,{title:"Edit Access Group",open:e,onOk:()=>{r.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};n.mutate({accessGroupId:s.access_group_id,params:t},{onSuccess:()=>{A.default.success("Access group updated successfully"),l?.(),a()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:a,width:700,okText:"Save Changes",cancelText:"Cancel",confirmLoading:n.isPending,destroyOnHidden:!0,children:(0,t.jsx)(aW,{form:r})})}let{Title:aJ,Text:aX}=sn.Typography,{Content:aZ}=sT.Layout;function a0({accessGroupId:e,onBack:s}){let{data:a,isLoading:l}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aL.useQueryClient)();return(0,t1.useQuery)({queryKey:aI.accessGroupKeys.detail(e),queryFn:async()=>aO(t,e),enabled:!!(t&&e)&&eN.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(aI.accessGroupKeys.list({}));return t?.find(t=>t.access_group_id===e)}})})(e),{token:r}=sL.theme.useToken(),[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(!1);if(l)return(0,t.jsx)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:(0,t.jsx)(sS.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!a)return(0,t.jsxs)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aR.Empty,{description:"Access group not found"})]});let p=a.access_model_names??[],x=a.access_mcp_server_ids??[],h=a.access_agent_ids??[],g=a.assigned_key_ids??[],y=a.assigned_team_ids??[],j=d?g:g.slice(0,5),f=m?y:y.slice(0,5),b=[{key:"models",label:(0,t.jsxs)(sS.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sD,{size:16}),"Models",(0,t.jsx)(I.Tag,{style:{marginInlineEnd:0},children:p?.length})]}),children:p?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:p,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No models assigned to this group"})},{key:"mcp",label:(0,t.jsxs)(sS.Flex,{align:"center",gap:8,children:[(0,t.jsx)(aE.ServerIcon,{size:16}),"MCP Servers",(0,t.jsx)(I.Tag,{children:x?.length})]}),children:x?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:x,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No MCP servers assigned to this group"})},{key:"agents",label:(0,t.jsxs)(sS.Flex,{align:"center",gap:8,children:[(0,t.jsx)(aD.default,{size:16}),"Agents",(0,t.jsx)(I.Tag,{children:h?.length})]}),children:h?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:h,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No agents assigned to this group"})}];return(0,t.jsxs)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(aJ,{level:2,style:{margin:0},children:a.access_group_name}),(0,t.jsxs)(aX,{type:"secondary",children:["ID: ",(0,t.jsx)(aX,{copyable:!0,children:a.access_group_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(a$.default,{size:16}),onClick:()=>{o(!0)},children:"Edit Access Group"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Group Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:a.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(a.created_at).toLocaleString(),a.created_by&&(0,t.jsxs)(aX,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:a.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(a.updated_at).toLocaleString(),a.updated_by&&(0,t.jsxs)(aX,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:a.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sS.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sP.KeyIcon,{size:16}),"Attached Keys",(0,t.jsx)(I.Tag,{children:g?.length})]}),extra:g?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),children:d?"Show Less":`View All (${g?.length})`}):null,children:g?.length>0?(0,t.jsx)(sS.Flex,{wrap:"wrap",gap:8,children:j.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aX,{code:!0,style:{fontSize:12},children:e.length>20?`${e.slice(0,10)}...${e.slice(-6)}`:e})},e))}):(0,t.jsx)(aR.Empty,{description:"No keys attached",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sS.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sz.default,{size:16}),"Attached Teams",(0,t.jsx)(I.Tag,{children:y?.length})]}),extra:y?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>u(!m),children:m?"Show Less":`View All (${y?.length})`}):null,children:y?.length>0?(0,t.jsx)(sS.Flex,{wrap:"wrap",gap:8,children:f.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aX,{code:!0,style:{fontSize:12},children:e})},e))}):(0,t.jsx)(aR.Empty,{description:"No teams attached",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ts.Card,{children:(0,t.jsx)(t2.Tabs,{defaultActiveKey:"models",items:b})}),(0,t.jsx)(aY,{visible:n,accessGroup:a,onCancel:()=>o(!1)})]})}let a1=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/v1/access_group`,l=await fetch(a,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()};function a2({visible:e,onCancel:s,onSuccess:a}){let[l]=w.Form.useForm(),r=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return a1(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all})}})})();return(0,t.jsx)(y.Modal,{title:"Create Access Group",open:e,onOk:()=>{l.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};r.mutate(t,{onSuccess:()=>{A.default.success("Access group created successfully"),l.resetFields(),a?.(),s()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:s,width:700,okText:"Create Group",cancelText:"Cancel",confirmLoading:r.isPending,destroyOnClose:!0,children:(0,t.jsx)(aW,{form:l})})}let{Title:a4,Text:a5}=sn.Typography,{Content:a6}=sT.Layout;function a3(e){return{id:e.access_group_id,name:e.access_group_name,description:e.description??"",modelIds:e.access_model_names,mcpServerIds:e.access_mcp_server_ids,agentIds:e.access_agent_ids,keyIds:e.assigned_key_ids,teamIds:e.assigned_team_ids,createdAt:e.created_at,createdBy:e.created_by??"",updatedAt:e.updated_at,updatedBy:e.updated_by??""}}function a8(){let{token:e}=sL.theme.useToken(),{data:s,isLoading:a}=(0,aI.useAccessGroups)(),l=(0,i.useMemo)(()=>(s??[]).map(a3),[s]),[r,n]=(0,i.useState)(null),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[u,p]=(0,i.useState)(1),[x,h]=(0,i.useState)([]),[g,y]=(0,i.useState)(null),j=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return aA(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all})}})})();(0,i.useEffect)(()=>{p(1)},[c]);let b=(0,i.useMemo)(()=>l.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())||e.id.toLowerCase().includes(c.toLowerCase())||e.description.toLowerCase().includes(c.toLowerCase())),[l,c]),_=(0,i.useMemo)(()=>[{id:"id",accessorKey:"id",header:()=>(0,t.jsx)("span",{children:"ID"}),enableSorting:!1,size:170,cell:({row:e})=>{let s=e.original;return(0,t.jsx)(f.Tooltip,{title:s.id,children:(0,t.jsx)(a5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>n(s.id),children:s.id})})}},{id:"name",accessorKey:"name",header:()=>(0,t.jsx)("span",{children:"Name"}),enableSorting:!0,cell:({getValue:e})=>e()},{id:"resources",header:()=>(0,t.jsx)("span",{children:"Resources"}),enableSorting:!1,cell:({row:e})=>{let s=e.original,a=s.modelIds??[],l=s.mcpServerIds??[],r=s.agentIds??[];return(0,t.jsxs)(sS.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a?.length} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sS.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),a?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${l?.length} MCP Servers`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sS.Flex,{align:"center",gap:6,children:[(0,t.jsx)(aE.ServerIcon,{size:14}),l?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${r?.length} Agents`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sS.Flex,{align:"center",gap:6,children:[(0,t.jsx)(aD.default,{size:14}),r?.length]})})})]})}},{id:"createdAt",accessorKey:"createdAt",header:()=>(0,t.jsx)("span",{children:"Created"}),enableSorting:!0,sortingFn:"datetime",cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["lg"]}},{id:"updatedAt",accessorKey:"updatedAt",header:()=>(0,t.jsx)("span",{children:"Updated"}),enableSorting:!1,cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["xl"]}},{id:"actions",header:()=>(0,t.jsx)("span",{children:"Actions"}),enableSorting:!1,cell:({row:e})=>(0,t.jsx)(U.Space,{children:(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete access group",onClick:()=>y(e.original)})})}],[]),v=(0,aP.useReactTable)({data:b,columns:_,state:{sorting:x},onSortingChange:h,getCoreRowModel:(0,aM.getCoreRowModel)(),getSortedRowModel:(0,aM.getSortedRowModel)(),getRowId:e=>e.id}),N=v.getRowModel().rows,w=N.slice((u-1)*10,10*u),k=(0,i.useMemo)(()=>new Map(w.map(e=>[e.original.id,e])),[w]),S=(v.getHeaderGroups()[0]?.headers??[]).map(e=>{let s=e.column.getCanSort(),a=e.column.getIsSorted(),l=e.column.columnDef.meta,r={title:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[e.isPlaceholder?null:(0,aP.flexRender)(e.column.columnDef.header,e.getContext()),s&&(0,t.jsx)(az.TableHeaderSortDropdown,{sortState:!1!==a&&a,onSortChange:t=>{h(!1===t?[]:[{id:e.column.id,desc:"desc"===t}])},columnId:e.column.id})]}),key:e.id,width:e.column.columnDef.size,render:(t,s)=>{let a=k.get(s.id);if(!a)return null;let l=a.getVisibleCells().find(t=>t.column.id===e.id);return l?(0,aP.flexRender)(l.column.columnDef.cell,l.getContext()):null}};return l?.responsive&&(r.responsive=l.responsive),r}),T=w.map(e=>e.original);return r?(0,t.jsx)(a0,{accessGroupId:r,onBack:()=>n(null)}):(0,t.jsxs)(a6,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sS.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(a4,{level:2,style:{margin:0},children:"Access Groups"}),(0,t.jsx)(a5,{type:"secondary",children:"Manage resource permissions for your organization"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>d(!0),children:"Create Access Group"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sS.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(C.Input,{prefix:(0,t.jsx)(sE.SearchIcon,{size:16}),placeholder:"Search groups by name, ID, or description...",style:{maxWidth:400},value:c,onChange:e=>m(e.target.value),allowClear:!0}),(0,t.jsx)(sI.Pagination,{current:u,total:N?.length,pageSize:10,onChange:e=>p(e),size:"small",showTotal:e=>`${e} groups`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:S,dataSource:T,rowKey:"id",loading:a,pagination:!1})]}),(0,t.jsx)(a2,{visible:o,onCancel:()=>d(!1)}),(0,t.jsx)(sK.default,{isOpen:!!g,title:"Delete Access Group",message:"Are you sure you want to delete this access group? This action cannot be undone.",resourceInformationTitle:"Access Group Information",resourceInformation:[{label:"ID",value:g?.id,code:!0},{label:"Name",value:g?.name},{label:"Description",value:g?.description||"—"}],onCancel:()=>y(null),onOk:()=>{g&&j.mutate(g.id,{onSuccess:()=>{y(null)}})},confirmLoading:j.isPending})]})}var a7=e.i(510674);let a9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder-add",theme:"outlined"};var le=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:a9}))});let lt=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/project/new`,l=await fetch(a,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()};function ls({form:e}){let{accessToken:s,userId:a,userRole:l}=(0,R.default)(),{data:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)([]);(0,i.useEffect)(()=>{(async()=>{if(s)try{let e=(await (0,N.getGuardrailsList)(s)).guardrails.map(e=>e.guardrail_name);u(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[s]);let p=w.Form.useWatch("team_id",e);return(0,i.useEffect)(()=>{if(p&&r){let e=r.find(e=>e.team_id===p)??null;e&&e.team_id!==n?.team_id&&o(e)}},[p,r,n?.team_id]),(0,i.useEffect)(()=>{a&&l&&s&&n?(0,sX.fetchTeamModels)(a,l,s,n.team_id).then(e=>{c(Array.from(new Set([...n.models??[],...e])))}):c([])},[n,s,a,l]),(0,t.jsxs)(w.Form,{form:e,layout:"vertical",name:"project_form",initialValues:{isBlocked:!1},style:{marginTop:24},children:[(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:13,color:"#374151",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Basic Information"}),(0,t.jsx)(F.Divider,{style:{marginTop:8,marginBottom:16}}),(0,t.jsxs)(t_.Row,{gutter:24,children:[(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(w.Form.Item,{name:"project_alias",label:"Project Name",rules:[{required:!0,message:"Please enter a project name"}],children:(0,t.jsx)(C.Input,{placeholder:"e.g. Customer Support Bot"})})}),(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(w.Form.Item,{name:"team_id",label:"Team",rules:[{required:!0,message:"Please select a team"}],children:(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Search or select a team",onChange:t=>{o(r?.find(e=>e.team_id===t)??null),e.setFieldValue("models",[])},allowClear:!0,optionLabelProp:"label",filterOption:(e,t)=>{let s=r?.find(e=>e.team_id===t?.value);if(!s)return!1;let a=e.toLowerCase().trim();return(s.team_alias||"").toLowerCase().includes(a)||s.team_id.toLowerCase().includes(a)},children:r?.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.team_id,label:e.team_alias||e.team_id,children:[(0,t.jsx)("span",{style:{fontWeight:500},children:e.team_alias})," ",(0,t.jsxs)("span",{style:{color:"#9ca3af"},children:["(",e.team_id,")"]})]},e.team_id))})})})]}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(w.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(C.Input.TextArea,{placeholder:"Describe the purpose of this project",rows:3})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(w.Form.Item,{name:"models",label:"Allowed Models (scoped to selected team's models)",help:n?void 0:"Select a team first to see available models",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:n?"Select models":"Select a team first",disabled:!n,allowClear:!0,maxTagCount:"responsive",onChange:t=>{t.includes("all-team-models")&&e.setFieldsValue({models:["all-team-models"]})},children:[(0,t.jsx)(k.Select.Option,{value:"all-team-models",children:"All Team Models"},"all-team-models"),d.map(e=>(0,t.jsx)(k.Select.Option,{value:e,children:(0,B.getModelDisplayName)(e)},e))]})})})}),(0,t.jsx)(t_.Row,{gutter:24,children:(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(w.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,t.jsx)(L.InputNumber,{prefix:"$",style:{width:"100%"},placeholder:"0.00",min:0,precision:2})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)($.Collapse,{ghost:!0,style:{background:"#f9fafb",borderRadius:8,border:"1px solid #e5e7eb"},items:[{key:"1",label:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{color:"#374151"},children:"Advanced Settings"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sS.Flex,{align:"center",gap:12,children:[(0,t.jsx)(sn.Typography.Text,{strong:!0,children:"Block Project"}),(0,t.jsx)(w.Form.Item,{name:"isBlocked",valuePropName:"checked",noStyle:!0,children:(0,t.jsx)(_.Switch,{})})]}),(0,t.jsx)(w.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.isBlocked!==t.isBlocked,children:({getFieldValue:e})=>e("isBlocked")?(0,t.jsx)(j.Alert,{banner:!0,type:"warning",showIcon:!0,message:"All API requests using keys under this project will be rejected.",style:{marginTop:12}}):null}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(w.Form.Item,{label:"Guardrails",name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:m.map(e=>({value:e,label:e}))})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Model-Specific Limits"}),(0,t.jsx)(w.Form.List,{name:"modelLimits",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(w.Form.Item,{...r,name:[a,"model"],rules:[{required:!0,message:"Missing model"},{validator:(t,s)=>s&&(e.getFieldValue("modelLimits")??[]).filter(e=>e?.model===s).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],children:(0,t.jsx)(C.Input,{placeholder:"Model name (e.g. gpt-4)"})}),(0,t.jsx)(w.Form.Item,{...r,name:[a,"tpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(w.Form.Item,{...r,name:[a,"rpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(w.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Model Limit"})})]})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Metadata"}),(0,t.jsx)(w.Form.List,{name:"metadata",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(w.Form.Item,{...r,name:[a,"key"],rules:[{required:!0,message:"Missing key"},{validator:(t,s)=>s&&(e.getFieldValue("metadata")??[]).filter(e=>e?.key===s).length>1?Promise.reject(Error("Duplicate key")):Promise.resolve()}],children:(0,t.jsx)(C.Input,{placeholder:"Key"})}),(0,t.jsx)(w.Form.Item,{...r,name:[a,"value"],rules:[{required:!0,message:"Missing value"}],children:(0,t.jsx)(C.Input,{placeholder:"Value"})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(w.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Key-Value Pair"})})]})})]})}]})})})]})}function la(e){let t={},s={};for(let a of e.modelLimits??[])a.model&&(null!=a.rpm&&(t[a.model]=a.rpm),null!=a.tpm&&(s[a.model]=a.tpm));let a={};for(let t of e.metadata??[])t.key&&(a[t.key]=t.value);return{project_alias:e.project_alias,description:e.description,models:e.models??[],max_budget:e.max_budget,blocked:e.isBlocked??!1,...e.guardrails&&e.guardrails.length>0&&{guardrails:e.guardrails},...Object.keys(t).length>0&&{model_rpm_limit:t},...Object.keys(s).length>0&&{model_tpm_limit:s},...Object.keys(a).length>0&&{metadata:a}}}function ll({isOpen:e,onClose:s}){let[a]=w.Form.useForm(),l=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return lt(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:a7.projectKeys.all})}})})(),r=async()=>{try{let e=await a.validateFields(),t={...la(e),team_id:e.team_id};l.mutate(t,{onSuccess:()=>{A.default.success("Project created successfully"),a.resetFields(),s()},onError:e=>{A.default.error(e.message||"Failed to create project")}})}catch(e){console.error("Validation failed:",e)}},i=()=>{a.resetFields(),s()};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:18},children:"Create New Project"}),open:e,onCancel:i,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:i,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(le,{}),loading:l.isPending,onClick:r,children:"Create Project"},"submit")],children:(0,t.jsx)(ls,{form:a})})}let lr=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/project/info?project_id=${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()},li=(0,sM.default)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);var a$=a$,sz=sz,ln=e.i(987432);let lo=async(e,t,s)=>{let a=(0,N.getProxyBaseUrl)(),l=`${a}/project/update`,r=await fetch(l,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({project_id:t,...s})});if(!r.ok){let e=await r.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return r.json()};function ld({isOpen:e,project:s,onClose:a,onSuccess:l}){let[r]=w.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async({projectId:t,params:s})=>{if(!e)throw Error("Access token is required");return lo(e,t,s)},onSuccess:()=>{t.invalidateQueries({queryKey:a7.projectKeys.all})}})})();(0,i.useEffect)(()=>{if(e&&s){let e=s.metadata??{},t=e.model_rpm_limit??{},a=e.model_tpm_limit??{},l=Array.isArray(e.guardrails)?e.guardrails:[],i=[];for(let e of new Set([...Object.keys(t),...Object.keys(a)]))i.push({model:e,rpm:t[e],tpm:a[e]});let n=new Set(["model_rpm_limit","model_tpm_limit","guardrails"]),o=[];for(let[t,s]of Object.entries(e))n.has(t)||o.push({key:t,value:String(s)});r.setFieldsValue({project_alias:s.project_alias??"",team_id:s.team_id??"",description:s.description??"",models:s.models??[],max_budget:s.litellm_budget_table?.max_budget??void 0,isBlocked:s.blocked,guardrails:l.length>0?l:void 0,modelLimits:i.length>0?i:void 0,metadata:o.length>0?o:void 0})}},[e,s,r]);let o=async()=>{try{let e=await r.validateFields(),t={...la(e),team_id:e.team_id};n.mutate({projectId:s.project_id,params:t},{onSuccess:()=>{A.default.success("Project updated successfully"),l?.(),a()},onError:e=>{A.default.error(e.message||"Failed to update project")}})}catch(e){console.error("Validation failed:",e)}};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:18},children:"Edit Project"}),open:e,onCancel:a,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:a,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(ln.SaveOutlined,{}),loading:n.isPending,onClick:o,children:"Save Changes"},"submit")],children:(0,t.jsx)(ls,{form:r})})}let{Title:lc,Text:lm}=sn.Typography,{Content:lu}=sT.Layout;function lp({projectId:e,onBack:s}){let a,l,r,n,{data:o,isLoading:d}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aL.useQueryClient)();return(0,t1.useQuery)({queryKey:a7.projectKeys.detail(e),queryFn:async()=>lr(t,e),enabled:!!(t&&e)&&eN.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(a7.projectKeys.list({}));return t?.find(t=>t.project_id===e)}})})(e),{data:c}=(0,eV.useTeam)(o?.team_id??void 0),m=c?.team_info??c,{token:u}=sL.theme.useToken(),[p,x]=(0,i.useState)(!1),h=o?.spend??0,g=o?.litellm_budget_table?.max_budget??null,y=null!=g&&g>0,j=y?Math.min(h/g*100,100):0,f=(0,i.useMemo)(()=>Object.entries(o?.model_spend??{}).map(([e,t])=>({model:e,spend:t})).sort((e,t)=>t.spend-e.spend),[o?.model_spend]);return d?(0,t.jsx)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:(0,t.jsx)(sS.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"large"})})}):o?(0,t.jsxs)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sS.Flex,{align:"center",gap:8,children:[(0,t.jsx)(lc,{level:2,style:{margin:0},children:o.project_alias??o.project_id}),(0,t.jsx)(I.Tag,{color:o.blocked?"red":"green",children:o.blocked?"Blocked":"Active"})]}),(0,t.jsxs)(lm,{type:"secondary",children:["ID: ",(0,t.jsx)(lm,{copyable:!0,children:o.project_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(a$.default,{size:16}),onClick:()=>x(!0),children:"Edit Project"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Project Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:o.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(o.created_at).toLocaleString(),o.created_by&&(0,t.jsxs)(lm,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:o.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(o.updated_at).toLocaleString(),o.updated_by&&(0,t.jsxs)(lm,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:o.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:8,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sS.Flex,{align:"center",gap:8,children:[(0,t.jsx)(li,{size:16}),"Budget"]}),style:{height:"100%"},children:(0,t.jsxs)(sS.Flex,{vertical:!0,gap:16,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(lm,{strong:!0,style:{fontSize:28,lineHeight:1},children:["$",h.toFixed(2)]}),(0,t.jsx)("br",{}),(0,t.jsx)(lm,{type:"secondary",children:y?`of $${g.toFixed(2)} budget`:"No budget limit"})]}),y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(sF.Progress,{percent:Math.round(10*j)/10,strokeColor:j>=90?"#f5222d":j>=70?"#faad14":"#52c41a",showInfo:!1}),(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[(Math.round(10*j)/10).toFixed(1),"% utilized"]})]})]})})}),(0,t.jsx)(tv.Col,{xs:24,lg:16,children:(0,t.jsx)(ts.Card,{title:"Spend by Model",style:{height:"100%"},children:f.length>0?(0,t.jsx)(so.BarChart,{data:f,index:"model",categories:["spend"],colors:["cyan"],layout:"vertical",valueFormatter:e=>`$${e.toFixed(4)}`,yAxisWidth:140,showLegend:!1,style:{height:Math.max(40*f.length,120)}}):(0,t.jsx)(aR.Empty,{description:"No model spend recorded yet",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sS.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sP.KeyIcon,{size:16}),"Keys"]}),style:{height:"100%"},children:(0,t.jsx)(aR.Empty,{description:"No keys to display",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sS.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sz.default,{size:16}),"Team"]}),style:{height:"100%"},children:m?(a=m.max_budget??null,l=m.spend??0,n=(r=null!=a&&a>0)?Math.min(l/a*100,100):0,(0,t.jsxs)(sS.Flex,{vertical:!0,gap:12,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lm,{strong:!0,style:{fontSize:16},children:m.team_alias||m.team_id}),(0,t.jsx)("br",{}),(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:["ID:"," ",(0,t.jsx)(lm,{copyable:!0,style:{fontSize:12},children:m.team_id})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"Models"}),(m.models?.length??0)>0?(0,t.jsx)(sS.Flex,{wrap:"wrap",gap:4,style:{maxHeight:60,overflow:"hidden"},children:m.models?.map(e=>(0,t.jsx)(I.Tag,{style:{margin:0},children:e},e))}):(0,t.jsx)(lm,{type:"secondary",children:"All models"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sS.Flex,{justify:"space-between",align:"center",style:{marginBottom:2},children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12},children:"Spend"}),(0,t.jsxs)(lm,{style:{fontSize:12},children:["$",l.toFixed(2),r?(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[" ","/ $",a.toFixed(2)]}):(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[" ","(Unlimited)"]})]})]}),r&&(0,t.jsx)(sF.Progress,{percent:Math.round(10*n)/10,strokeColor:n>=90?"#f5222d":n>=70?"#faad14":"#52c41a",size:"small",showInfo:!1})]}),(0,t.jsxs)(sS.Flex,{justify:"space-between",children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12},children:"Members"}),(0,t.jsx)(lm,{style:{fontSize:12},children:m.members_with_roles?.length??0})]})]})):o.team_id?(0,t.jsx)(sS.Flex,{justify:"center",align:"center",style:{padding:16},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"small"})}):(0,t.jsx)(aR.Empty,{description:"No team assigned",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ld,{isOpen:p,project:o,onClose:()=>x(!1)})]}):(0,t.jsxs)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aR.Empty,{description:"Project not found"})]})}let{Title:lx,Text:lh}=sn.Typography,{Content:lg}=sT.Layout;function ly(){let{token:e}=sL.theme.useToken(),{data:s,isLoading:a}=(0,a7.useProjects)(),{data:l,isLoading:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(""),[p,x]=(0,i.useState)(1);(0,i.useEffect)(()=>{x(1)},[m]);let h=(0,i.useMemo)(()=>{let e=new Map;for(let t of l??[])e.set(t.team_id,t.team_alias??t.team_id);return e},[l]),g=(0,i.useMemo)(()=>{let e=s??[];if(!m)return e;let t=m.toLowerCase();return e.filter(e=>{let s=h.get(e.team_id??"")??"";return(e.project_alias??"").toLowerCase().includes(t)||e.project_id.toLowerCase().includes(t)||(e.description??"").toLowerCase().includes(t)||s.toLowerCase().includes(t)})},[s,m,h]),y=[{title:"ID",dataIndex:"project_id",key:"project_id",width:170,render:e=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(lh,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>o(e),children:e})})},{title:"Name",dataIndex:"project_alias",key:"project_alias",sorter:(e,t)=>(e.project_alias??"").localeCompare(t.project_alias??""),render:e=>e??"—"},{title:"Team",key:"team",sorter:(e,t)=>{let s=h.get(e.team_id??"")??"",a=h.get(t.team_id??"")??"";return s.localeCompare(a)},render:(e,s)=>{if(!s.team_id)return"—";let a=h.get(s.team_id);return a||(r?(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"small"}):s.team_id)}},{title:"Models",key:"models",render:(e,s)=>{let a=s.models??[];return(0,t.jsx)(f.Tooltip,{title:a.length>0?a.join(", "):"No models",children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sS.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),a.length]})})})}},{title:"Status",dataIndex:"blocked",key:"status",render:e=>(0,t.jsx)(I.Tag,{color:e?"red":"green",children:e?"Blocked":"Active"})},{title:"Created",dataIndex:"created_at",key:"created_at",sorter:(e,t)=>new Date(e.created_at).getTime()-new Date(t.created_at).getTime(),responsive:["lg"],render:e=>new Date(e).toLocaleDateString()},{title:"Updated",dataIndex:"updated_at",key:"updated_at",responsive:["xl"],render:e=>new Date(e).toLocaleDateString()}];return n?(0,t.jsx)(lp,{projectId:n,onBack:()=>o(null)}):(0,t.jsxs)(lg,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sS.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(lx,{level:2,style:{margin:0},children:"Projects"}),(0,t.jsx)(lh,{type:"secondary",children:"Manage projects within your teams"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>c(!0),children:"Create Project"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sS.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(C.Input,{prefix:(0,t.jsx)(sE.SearchIcon,{size:16}),placeholder:"Search projects by name, ID, description, or team...",style:{maxWidth:400},value:m,onChange:e=>u(e.target.value),allowClear:!0}),(0,t.jsx)(sI.Pagination,{current:p,total:g.length,pageSize:10,onChange:e=>x(e),size:"small",showTotal:e=>`${e} projects`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:y,dataSource:g.slice((p-1)*10,10*p),rowKey:"project_id",loading:a,pagination:!1})]}),(0,t.jsx)(ll,{isOpen:d,onClose:()=>c(!1)})]})}var lj=e.i(241902);let lf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"};var lb=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:lf}))}),l_=e.i(366308);let lv=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"},{value:"blocked",label:"blocked",color:"#991b1b",bg:"#fee2e2",border:"#fca5a5"}],lN=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"}],lw=({value:e,toolName:s,saving:a,onChange:l,policyType:r="input",size:i="small",minWidth:n=110,stopPropagation:o=!0})=>{let d="output"===r?lN:lv,c=lv.find(t=>t.value===e)??lv[0];return(0,t.jsx)(k.Select,{size:i,value:e,disabled:a,loading:a,onChange:e=>l(s,e),onClick:e=>o&&e.stopPropagation(),style:{minWidth:n,fontWeight:500,backgroundColor:c.bg,borderColor:c.border,color:c.color,borderRadius:999,fontSize:"small"===i?11:12},popupMatchSelectWidth:!1,options:d.map(e=>({value:e.value,label:(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,fontWeight:500,color:e.color},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:e.color,display:"inline-block",flexShrink:0}}),e.label]})}))})},lk="tool-detail";function lC({toolName:e,onBack:s,accessToken:a}){let l=(0,aL.useQueryClient)(),[r,n]=(0,i.useState)(!1),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)("team"),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(null),j=(0,i.useMemo)(()=>{let e,t,s;return e=new Date,(t=new Date).setDate(t.getDate()-90),{start:(s=e=>e.toISOString().slice(0,19).replace("T"," "))(t),end:s(e)}},[]),{data:f,isLoading:b,error:_}=(0,t1.useQuery)({queryKey:[lk,e],queryFn:()=>(0,N.fetchToolDetail)(a,e),enabled:!!a&&!!e}),{data:v}=(0,t1.useQuery)({queryKey:["tool-policy-options"],queryFn:()=>(0,N.fetchToolPolicyOptions)(a),enabled:!!a,staleTime:6e4}),{data:w}=(0,t1.useQuery)({queryKey:["teams-list-tool-detail"],queryFn:()=>(0,N.teamListCall)(a,null,null),enabled:!!a}),{data:C}=(0,t1.useQuery)({queryKey:["keys-list-tool-detail"],queryFn:()=>(0,N.keyListCall)(a,null,null,null,null,null,1,100),enabled:!!a}),{data:S,isLoading:T}=(0,t1.useQuery)({queryKey:["tool-usage-logs",e,j.start,j.end],queryFn:()=>(0,N.getToolUsageLogs)(a,e,{page:1,pageSize:50,startDate:j.start,endDate:j.end}),enabled:!!a&&!!e}),I=(0,i.useMemo)(()=>(S?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:"passed",model:e.model??void 0,input_snippet:e.input_snippet??void 0})),[S?.logs]);(0,i.useMemo)(()=>(Array.isArray(w)?w:w?.data??[]).map(e=>({team_id:e.team_id??e.id??"",team_alias:e.team_alias??e.team_id??"",models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:"",created_at:"",keys:[],members_with_roles:[],spend:0})),[w]);let F=(0,i.useMemo)(()=>(C?.keys??C?.data??[]).map(e=>({token:e.token??e.api_key??e.key_hash??"",key_alias:e.key_alias??(e.token??e.api_key??e.key_hash)?.toString?.()?.substring?.(0,8)})),[C]),L=(0,i.useCallback)(()=>{l.invalidateQueries({queryKey:[lk,e]})},[l,e]),A=(0,i.useCallback)(async(t,s)=>{if(a){d(!0);try{await (0,N.updateToolPolicy)(a,e,{input_policy:s}),L()}catch(e){alert(`Failed to update input policy: ${e instanceof Error?e.message:String(e)}`)}finally{d(!1)}}},[a,e,L]),P=(0,i.useCallback)(async(t,s)=>{if(a){m(!0);try{await (0,N.updateToolPolicy)(a,e,{output_policy:s}),L()}catch(e){alert(`Failed to update output policy: ${e instanceof Error?e.message:String(e)}`)}finally{m(!1)}}},[a,e,L]),M=(0,i.useCallback)(async()=>{if(!a||!e)return;let t="team"===u;if((!t||x)&&(t||g?.token)){n(!0);try{await (0,N.updateToolPolicy)(a,e,{input_policy:"blocked"},{team_id:t?x:void 0,key_hash:t?void 0:g.token,key_alias:t?void 0:g.key_alias}),L(),h(null),y(null)}catch(e){alert(`Failed to add override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,u,x,g,L]),D=(0,i.useCallback)(async t=>{if(a&&e){n(!0);try{await (0,N.deleteToolPolicyOverride)(a,e,{team_id:t.team_id??void 0,key_hash:t.key_hash??void 0}),L()}catch(e){alert(`Failed to remove override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,L]);if(b&&!f)return(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})});if(_&&!f)return(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load tool details."})]});if(!f)return null;let{tool:E,overrides:z}=f,O=v?.input_policies?.find(e=>e.value===E.input_policy)?.description,R=v?.output_policies?.find(e=>e.value===E.output_policy)?.description;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1 flex-wrap",children:[(0,t.jsx)(l_.ToolOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900 font-mono",children:E.tool_name}),(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-gray-100 text-gray-700 border border-gray-200",children:E.origin??"—"}),(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:[(E.call_count??0).toLocaleString()," calls"]})]}),(0,t.jsxs)("dl",{className:"mt-3 flex flex-wrap gap-x-6 gap-y-1 text-sm text-gray-600",children:[E.user_agent&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"User Agent:"}),(0,t.jsx)("dd",{className:"font-mono truncate max-w-[40ch]",title:E.user_agent,children:E.user_agent})]}),E.created_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"First Discovered:"}),(0,t.jsx)("dd",{children:new Date(E.created_at).toLocaleString()})]}),E.last_used_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"Last Used:"}),(0,t.jsx)("dd",{children:new Date(E.last_used_at).toLocaleString()})]})]})]})})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Input Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:O??"Controls what data this tool is allowed to accept."}),(0,t.jsx)(lw,{value:E.input_policy,toolName:E.tool_name,saving:o,onChange:A,policyType:"input",size:"middle",minWidth:140,stopPropagation:!1})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Output Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:R??"Controls how this tool's output is trusted by downstream tools."}),(0,t.jsx)(lw,{value:E.output_policy,toolName:E.tool_name,saving:c,onChange:P,policyType:"output",size:"middle",minWidth:140,stopPropagation:!1})]})]}),z.length>0&&(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Blocked for team or key"}),(0,t.jsx)("ul",{className:"border rounded-md divide-y divide-gray-100 bg-red-50/30",children:z.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between px-3 py-2.5 text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-700",children:[e.team_id?`Team: ${e.team_id}`:"",e.team_id&&e.key_hash?" · ":"",e.key_hash?`Key: ${e.key_alias||e.key_hash.substring(0,8)}`:"",e.team_id||e.key_hash?"":"—"]}),(0,t.jsx)(V.Button,{type:"link",danger:!0,size:"small",disabled:r,onClick:()=>D(e),children:"Remove"})]},e.override_id))})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Block for team or key"}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 max-w-md",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Scope"}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"team"===u,onChange:()=>p("team"),className:"align-middle"}),"Team"]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"key"===u,onChange:()=>p("key"),className:"align-middle"}),"Key"]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"team"===u?"Team":"Key"}),"team"===u?(0,t.jsx)(q.default,{value:x??void 0,onChange:e=>h(e||null)}):(0,t.jsx)(k.Select,{placeholder:"Select key",allowClear:!0,showSearch:!0,optionFilterProp:"label",value:g?g.token:void 0,onChange:e=>{y(F.find(t=>t.token===e)??null)},options:F.map(e=>({value:e.token,label:e.key_alias||e.token?.substring?.(0,12)||e.token})),className:"w-full",style:{minWidth:200}})]}),(0,t.jsxs)(V.Button,{type:"primary",danger:!0,disabled:r||("team"===u?!x:!g?.token),loading:r,onClick:M,children:["Block for ",u]})]})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2",children:[(0,t.jsx)(lb,{}),"Recent logs"]}),(0,t.jsx)(st,{guardrailName:E.tool_name,filterAction:"passed",logs:I,logsLoading:T,totalLogs:S?.total??0,accessToken:a,startDate:j.start,endDate:j.end})]})]})]})}var lS=e.i(307582),lT=e.i(969550);function lI(e){return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`}function lF(e,t){if(!e)return!1;try{let s=new Date(e);return lI(s)===t}catch{return!1}}function lL(e,t){return e.filter(e=>lF(e.created_at,t)).length}let lA=({accessToken:e,onSelectTool:s})=>{let[a,l]=(0,i.useState)([]),[r,n]=(0,i.useState)(!0),[o,h]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[j,b]=(0,i.useState)(null),[v,w]=(0,i.useState)(null),[k,C]=(0,i.useState)(""),[S,T]=(0,i.useState)("created_at"),[I,F]=(0,i.useState)("desc"),[L,A]=(0,i.useState)(1),[P,M]=(0,i.useState)(!0),[D,E]=(0,i.useState)({}),z=(0,i.useDeferredValue)(o),O=o||z,R=(0,i.useCallback)(async()=>{if(e){h(!0),y(null);try{let t=await (0,N.fetchToolsList)(e);l(t)}catch(e){y(e.message??"Failed to load tools")}finally{h(!1),n(!1)}}},[e]);(0,i.useEffect)(()=>{R()},[R]),(0,i.useEffect)(()=>{if(!P)return;let e=setInterval(R,15e3);return()=>clearInterval(e)},[P,R]);let B=async(t,s)=>{if(e){b(t);try{await (0,N.updateToolPolicy)(e,t,{input_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,input_policy:s}:e))}catch(e){alert(`Failed to update input policy: ${e.message}`)}finally{b(null)}}},q=async(t,s)=>{if(e){w(t);try{await (0,N.updateToolPolicy)(e,t,{output_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,output_policy:s}:e))}catch(e){alert(`Failed to update output policy: ${e.message}`)}finally{w(null)}}},$=Array.from(new Set(a.map(e=>e.team_id).filter(Boolean))).map(e=>({label:e,value:e})),U=Array.from(new Set(a.map(e=>e.key_alias).filter(Boolean))).map(e=>({label:e,value:e})),V=[{name:"Input Policy",label:"Input Policy",options:lv.map(e=>({label:e.label,value:e.value}))},{name:"Output Policy",label:"Output Policy",options:lN.map(e=>({label:e.label,value:e.value}))},{name:"Team Name",label:"Team Name",options:$},{name:"Key Name",label:"Key Name",options:U}],{newToday:H,newYesterday:G,trendSubtitle:K,totalTools:W,blockedCount:Q,activeTeamsCount:Y,needsReviewTools:J}=(0,i.useMemo)(()=>{let e=new Date,t=lI(e),s=new Date(e);s.setUTCDate(s.getUTCDate()-1);let l=lI(s),r=lL(a,t),i=lL(a,l),n=function(e,t){let s=e-t;if(0!==s)return s>0?`+${s} since yesterday`:`${s} since yesterday`}(r,i),o=a.length,d=a.filter(e=>"blocked"===e.input_policy).length;return{newToday:r,newYesterday:i,trendSubtitle:n,totalTools:o,blockedCount:d,activeTeamsCount:new Set(a.map(e=>e.team_id).filter(Boolean)).size,needsReviewTools:a.filter(e=>lF(e.created_at,t)&&"untrusted"===e.input_policy)}},[a]),X=({label:e,field:s})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(az.TableHeaderSortDropdown,{sortState:S===s&&I,onSortChange:e=>{!1===e?(T("created_at"),F("desc")):(T(s),F(e)),A(1)}})]}),Z=a.filter(e=>{if(k){let t=k.toLowerCase();if(!(e.tool_name.toLowerCase().includes(t)||(e.team_id??"").toLowerCase().includes(t)||(e.key_alias??"").toLowerCase().includes(t)||(e.key_hash??"").toLowerCase().includes(t)||e.input_policy.toLowerCase().includes(t)||e.output_policy.toLowerCase().includes(t)))return!1}return(!D["Input Policy"]||e.input_policy===D["Input Policy"])&&(!D["Output Policy"]||e.output_policy===D["Output Policy"])&&(!D["Team Name"]||e.team_id===D["Team Name"])&&(!D["Key Name"]||e.key_alias===D["Key Name"])}),ee=[...Z].sort((e,t)=>{let s=e[S]??"",a=t[S]??"";return sa?"desc"===I?-1:1:0}),et=Math.max(1,Math.ceil(ee.length/50)),es=ee.slice((L-1)*50,50*L);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Tool Policies"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ss,{label:"New Today",value:H,valueColor:"text-green-600",subtitle:K,icon:(0,t.jsx)("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})})}),(0,t.jsx)(ss,{label:"Total Tools Discovered",value:W}),(0,t.jsx)(ss,{label:"Blocked Tools",value:Q,valueColor:Q>0?"text-red-600":void 0}),(0,t.jsx)(ss,{label:"Active Teams",value:Y>0?Y:"—"})]}),J.length>0&&(0,t.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-6",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-amber-900 mb-1",children:"Needs Review"}),(0,t.jsxs)("p",{className:"text-sm text-amber-800 mb-3",children:[J.length," new tool",1!==J.length?"s":""," discovered that require policy decisions."]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:J.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-white border border-amber-200 rounded-md text-sm",children:[(0,t.jsx)("span",{className:"font-mono text-amber-900 truncate max-w-[200px]",title:e.tool_name,children:e.tool_name}),(0,t.jsx)("button",{type:"button",onClick:()=>(e=>{let t=ee.findIndex(t=>t.tool_id===e);if(t>=0){let s=Math.floor(t/50)+1;s!==L&&A(s),requestAnimationFrame(()=>{setTimeout(()=>{document.getElementById(`tool-row-${e}`)?.scrollIntoView({behavior:"smooth",block:"center"})},100)})}})(e.tool_id),className:"text-amber-700 hover:text-amber-900 font-medium text-xs whitespace-nowrap",children:"Review"})]},e.tool_id))})]}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("div",{className:"relative w-64",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Tool 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:k,onChange:e=>{C(e.target.value),A(1)}}),(0,t.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,t.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,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(_.Switch,{checked:P,onChange:M})]}),(0,t.jsxs)("button",{onClick:R,disabled:O,className:"flex items-center gap-1.5 px-3 py-2 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-60",children:[(0,t.jsx)("svg",{className:`w-4 h-4 ${O?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.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"})}),O?"Fetching":"Fetch"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm text-gray-600 whitespace-nowrap",children:[(0,t.jsxs)("span",{children:["Showing ",0===Z.length?0:(L-1)*50+1," -"," ",Math.min(50*L,Z.length)," of ",Z.length," results"]}),(0,t.jsxs)("span",{children:["Page ",L," of ",et]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(lT.default,{options:V,onApplyFilters:e=>{E(e),A(1)},onResetFilters:()=>{E({}),A(1)},buttonLabel:"Filters"})})]}),P&&(0,t.jsxs)("div",{className:"bg-green-50 border-b border-green-100 px-6 py-2 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"}),(0,t.jsx)("button",{onClick:()=>M(!1),className:"text-xs text-green-600 underline",children:"Stop"})]}),g&&(0,t.jsx)("div",{className:"mx-6 mt-4 p-3 bg-red-50 border border-red-200 rounded text-sm text-red-700",children:g}),(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 w-full",children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Discovered",field:"created_at"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Tool Name",field:"tool_name"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Input Policy",field:"input_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Output Policy",field:"output_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"# Calls",field:"call_count"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Team Name",field:"team_id"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"Key Hash"}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Key Name",field:"key_alias"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"User Agent"})]})}),(0,t.jsx)(c.TableBody,{children:r?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"Loading tools…"})}):0===es.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"No tools discovered yet. Make a chat completion that returns tool_calls to start auto-discovery."})}):es.map(e=>(0,t.jsxs)(x.TableRow,{id:`tool-row-${e.tool_id}`,className:"h-8 hover:bg-gray-50",children:[(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(lS.TimeCell,{utcTime:e.created_at??""})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden",children:(0,t.jsx)("button",{type:"button",onClick:()=>s?.(e.tool_name),className:"text-left w-full font-mono text-xs max-w-[20ch] truncate block font-medium text-blue-600 hover:text-blue-800 hover:underline focus:outline-none focus:ring-0",children:(0,t.jsx)(f.Tooltip,{title:s?"Click to view details and block for team/key":e.tool_name,children:(0,t.jsx)("span",{children:e.tool_name})})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lw,{value:e.input_policy,toolName:e.tool_name,saving:j===e.tool_name,onChange:B,policyType:"input"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lw,{value:e.output_policy,toolName:e.tool_name,saving:v===e.tool_name,onChange:q,policyType:"output"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)("div",{className:"flex items-center justify-end h-8 tabular-nums text-sm font-mono text-gray-700",children:(e.call_count??0).toLocaleString()})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.team_id??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.team_id??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_hash??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block text-blue-600",children:e.key_hash??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_alias??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.key_alias??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.user_agent??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[20ch] truncate block text-xs text-gray-500",children:e.user_agent??"-"})})})]},e.tool_id))})]}),et>1&&(0,t.jsxs)("div",{className:"border-t px-6 py-3 flex items-center justify-between text-sm text-gray-600",children:[(0,t.jsxs)("span",{children:["Showing ",(L-1)*50+1," - ",Math.min(50*L,ee.length)," of"," ",ee.length]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]})]})};function lP({accessToken:e,userRole:s}){let[a,l]=(0,i.useState)({type:"overview"});return(0,t.jsx)("div",{className:"p-6 w-full min-w-0 flex-1",children:"detail"===a.type?(0,t.jsx)(lC,{toolName:a.toolName,onBack:()=>{l({type:"overview"})},accessToken:e}):(0,t.jsx)(lA,{accessToken:e,userRole:s,onSelectTool:e=>{l({type:"detail",toolName:e})}})})}var lM=e.i(936190),lD=e.i(910119),lE=e.i(275144),lz=e.i(268004),lO=e.i(161281),lR=e.i(321836),lB=e.i(947293),lq=e.i(618566),l$=e.i(592143);function lU(e,t="/"){document.cookie=`${e}=; Max-Age=0; Path=${t}`,"token"===e&&(0,lz.clearTokenCookies)()}let lV={api_ref:"api-reference","api-reference":"api-reference"};function lH(){let[e,n]=(0,i.useState)(""),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)([]),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)([]),[v,w]=(0,i.useState)({PROXY_BASE_URL:"",PROXY_LOGOUT_URL:""}),[k,C]=(0,i.useState)(!0),S=(0,lq.useRouter)(),T=(0,lq.useSearchParams)(),[I,F]=(0,i.useState)({data:[]}),[L,A]=(0,i.useState)(null),[P,M]=(0,i.useState)(!1),[D,E]=(0,i.useState)(!0),[z,O]=(0,i.useState)(null),[R,B]=(0,i.useState)(!0),[q,$]=(0,i.useState)(!1),[U,V]=(0,i.useState)(!1),[H,G]=(0,i.useState)(!1),[K,W]=(0,i.useState)(!1),[Q,Y]=(0,i.useState)(!1),J=T.get("invitation_id"),X="true"===T.get("create"),Z=(0,i.useMemo)(()=>{if(!X)return;let e=T.get("owned_by"),t=T.get("team_id"),s=T.get("key_alias"),a=T.get("models"),l=T.get("key_type");if(!e&&!t&&!s&&!a&&!l)return;let r=e&&["you","service_account","another_user"].includes(e)?e:void 0,i=l&&["default","llm_api","management"].includes(l)?l:void 0,n=s?s.trim().slice(0,256):void 0,o=a?a.split(",").slice(0,100).map(e=>e.trim().slice(0,256)).filter(e=>e.length>0):void 0;return{owned_by:r,team_id:t?.trim()||void 0,key_alias:n,models:o&&o.length>0?o:void 0,key_type:i}},[T,X]),[ee,et]=(0,i.useState)(()=>T.get("page")||"api-keys"),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),ei=(0,i.useRef)(!1),en=e=>{y(t=>t?[...t,e]:[e]),M(()=>!P)},eo=!1===D&&null===L&&null===J;(0,i.useEffect)(()=>{let e=!1;return(async()=>{try{await (0,N.getUiConfig)()}catch{}if(e)return;let t=(0,lz.getCookie)("token"),s=t&&!(0,lO.isJwtExpired)(t)?t:null;t&&!s&&lU("token","/"),e||(A(s),E(!1))})(),()=>{e=!0}},[]),(0,i.useEffect)(()=>{if(eo){(0,lR.storeReturnUrl)();let e=(N.proxyBaseUrl||"")+"/ui/login",t=(0,lR.buildLoginUrlWithReturn)(e);window.location.replace(t)}},[eo]);let ed=ee in lV;return((0,i.useEffect)(()=>{if(!D&&ed){let e=(N.proxyBaseUrl||"")+"/ui";S.replace(`${e}/${lV[ee]}`)}},[D,ed,ee,S]),(0,i.useEffect)(()=>{if(D||!L||ei.current)return;ei.current=!0;let e=(0,lR.consumeReturnUrl)();if(e&&(0,lR.isValidReturnUrl)(e)){let t=new URL(e,window.location.origin);if(t.origin!==window.location.origin)return;let s=window.location.href;(0,lR.normalizeUrlForCompare)(e)!==(0,lR.normalizeUrlForCompare)(s)&&window.location.replace(t.href)}},[D,L]),(0,i.useEffect)(()=>{L||(ei.current=!1)},[L]),(0,i.useEffect)(()=>{if(!L)return;if((0,lO.isJwtExpired)(L)){lU("token","/"),A(null);return}let e=null;try{e=(0,lB.jwtDecode)(L)}catch{lU("token","/"),A(null);return}if(e){if(ea(e.key),m(e.disabled_non_admin_personal_key_creation),e.user_role){let t=(0,eN.formatUserRole)(e.user_role);n(t),"Admin Viewer"==t&&et("usage")}e.user_email&&p(e.user_email),e.login_method&&C("username_password"==e.login_method),e.premium_user&&d(e.premium_user),e.auth_header_name&&(0,N.setGlobalLitellmHeaderName)(e.auth_header_name),e.user_id&&O(e.user_id)}},[L]),(0,i.useEffect)(()=>{es&&z&&e&&(0,sX.fetchUserModels)(z,e,es,_),es&&z&&e&&(0,eV.teamListCall)(es,1,100,{userID:"Admin"!==e&&"Admin Viewer"!==e?z:null}).then(e=>h(e.teams??[])).catch(console.error),es&&(0,sZ.fetchOrganizations)(es,f)},[es,z,e]),(0,i.useEffect)(()=>{es&&L&&(async()=>{try{let e=await (0,N.getInProductNudgesCall)(es),t=e?.is_claude_code_enabled||!1;V(t),t&&(G(!0),B(!1))}catch(e){console.error("Failed to fetch in-product nudges:",e)}})()},[es,L]),(0,i.useEffect)(()=>{if(R&&!q){let e=setTimeout(()=>{B(!1)},15e3);return()=>clearTimeout(e)}},[R,q]),(0,i.useEffect)(()=>{if(H&&!K){let e=setTimeout(()=>{G(!1)},15e3);return()=>clearTimeout(e)}},[H,K]),D||eo||ed)?(0,t.jsx)(eH.default,{}):(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(l$.ConfigProvider,{theme:{algorithm:Q?sL.theme.darkAlgorithm:sL.theme.defaultAlgorithm},children:(0,t.jsx)(lE.ThemeProvider,{accessToken:es,children:J?(0,t.jsx)(aT.default,{userID:z,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:P}):(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,t.jsx)(sf.default,{userID:z,userRole:e,premiumUser:o,userEmail:u,setProxySettings:w,proxySettings:v,accessToken:es,isPublicPage:!1,sidebarCollapsed:el,onToggleSidebar:()=>{er(!el)},isDarkMode:Q,toggleDarkMode:()=>{Y(!Q)}}),(0,t.jsxs)("div",{className:"flex flex-1",children:[(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(s.default,{setPage:e=>{let t=new URLSearchParams(T);t.set("page",e),window.history.pushState(null,"",`?${t.toString()}`),et(e)},defaultSelectedKey:ee,sidebarCollapsed:el})}),"api-keys"==ee?(0,t.jsx)(aT.default,{userID:z,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:P,autoOpenCreate:X,prefillData:Z}):"models"==ee?(0,t.jsx)(a.default,{token:L,keys:g,modelData:I,setModelData:F,premiumUser:o,teams:x}):"llm-playground"==ee?(0,t.jsx)(l.default,{}):"users"==ee?(0,t.jsx)(lD.default,{userID:z,userRole:e,token:L,keys:g,teams:x,accessToken:es,setKeys:y}):"teams"==ee?(0,t.jsx)(sJ,{teams:x,setTeams:h,accessToken:es,userID:z,userRole:e,organizations:j,premiumUser:o,searchParams:T}):"organizations"==ee?(0,t.jsx)(sZ.default,{organizations:j,setOrganizations:f,userModels:b,accessToken:es,userRole:e,premiumUser:o}):"admin-panel"==ee?(0,t.jsx)(r.default,{proxySettings:v}):"logging-and-alerts"==ee?(0,t.jsx)(ao.default,{userID:z,userRole:e,accessToken:es,premiumUser:o}):"budgets"==ee?(0,t.jsx)(eq.default,{accessToken:es}):"guardrails"==ee?(0,t.jsx)(sh.default,{accessToken:es,userRole:e}):"policies"==ee?(0,t.jsx)(sg.default,{accessToken:es,userRole:e}):"agents"==ee?(0,t.jsx)(eB,{accessToken:es,userRole:e,teams:x}):"prompts"==ee?(0,t.jsx)(s1.default,{accessToken:es,userRole:e}):"transform-request"==ee?(0,t.jsx)(ak.default,{accessToken:es}):"router-settings"==ee?(0,t.jsx)(tQ.default,{userID:z,userRole:e,accessToken:es,modelData:I}):"ui-theme"==ee?(0,t.jsx)(aC.default,{userID:z,userRole:e,accessToken:es}):"cost-tracking"==ee?(0,t.jsx)(tW,{userID:z,userRole:e,accessToken:es}):"model-hub-table"==ee?(0,eN.isAdminRole)(e)?(0,t.jsx)(sj.default,{accessToken:es,publicPage:!1,premiumUser:o,userRole:e}):(0,t.jsx)(s2.default,{accessToken:es,isEmbedded:!0}):"caching"==ee?(0,t.jsx)(e$.default,{userID:z,userRole:e,token:L,accessToken:es,premiumUser:o}):"pass-through-settings"==ee?(0,t.jsx)(s0.default,{userID:z,userRole:e,accessToken:es,modelData:I,premiumUser:o}):"logs"==ee?(0,t.jsx)(lM.default,{userID:z,userRole:e,token:L,accessToken:es,premiumUser:o}):"mcp-servers"==ee?(0,t.jsx)(sy.MCPServers,{accessToken:es,userRole:e,userID:z}):"search-tools"==ee?(0,t.jsx)(an,{accessToken:es,userRole:e,userID:z}):"tag-management"==ee?(0,t.jsx)(aw.default,{accessToken:es,userRole:e,userID:z}):"skills"==ee||"claude-code-plugins"==ee?(0,t.jsx)(eU.default,{accessToken:es,userRole:e}):"access-groups"==ee?(0,t.jsx)(a8,{}):"projects"==ee?(0,t.jsx)(ly,{}):"vector-stores"==ee?(0,t.jsx)(lj.default,{accessToken:es,userRole:e,userID:z}):"tool-policies"==ee?(0,t.jsx)(lP,{accessToken:es,userRole:e}):"guardrails-monitor"==ee?(0,t.jsx)(sx,{accessToken:es}):"new_usage"==ee?(0,t.jsx)(sb.default,{teams:x??[],organizations:j??[]}):(0,t.jsx)(aS.default,{userID:z,userRole:e,token:L,accessToken:es,keys:g,premiumUser:o})]}),(0,t.jsx)(ah,{isVisible:R,onOpen:()=>{B(!1),$(!0)},onDismiss:()=>{B(!1)}}),(0,t.jsx)(ab,{isOpen:q,onClose:()=>{$(!1),B(!0)},onComplete:()=>{$(!1)}}),(0,t.jsx)(av,{isVisible:H,onOpen:()=>{G(!1),W(!0)},onDismiss:()=>{G(!1)}}),(0,t.jsx)(aN,{isOpen:K,onClose:()=>{W(!1),G(!0)},onComplete:()=>{W(!1)}})]})})})})}function lG(){return(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(lH,{})})}e.s(["default",()=>lG],952683)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/37e77c06e99eb8ff.js b/litellm/proxy/_experimental/out/_next/static/chunks/37e77c06e99eb8ff.js new file mode 100644 index 0000000000..3a5400c407 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/37e77c06e99eb8ff.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},100486,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"};var o=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(o.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["CrownOutlined",0,a],100486)},295320,283713,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var o=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(o.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["CloudServerOutlined",0,a],295320);var i=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,n=e?.workers??[],[o,a]=(0,r.useState)(()=>localStorage.getItem(s));(0,r.useEffect)(()=>{if(!o||0===n.length)return;let e=n.find(e=>e.worker_id===o);e&&(0,i.switchToWorkerUrl)(e.url)},[o,n]);let c=n.find(e=>e.worker_id===o)??null,u=(0,r.useCallback)(e=>{let t=n.find(t=>t.worker_id===e);t&&(a(e),localStorage.setItem(s,e),(0,i.switchToWorkerUrl)(t.url))},[n]);return{isControlPlane:t,workers:n,selectedWorkerId:o,selectedWorker:c,selectWorker:u,disconnectFromWorker:(0,r.useCallback)(()=>{a(null),localStorage.removeItem(s),(0,i.switchToWorkerUrl)(null)},[])}}],283713)},44121,186515,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var o=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(o.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["MenuFoldOutlined",0,a],44121);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var l=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["MenuUnfoldOutlined",0,l],186515)},371401,e=>{"use strict";var t=e.i(115571),r=e.i(271645);function n(e){let r=t=>{"disableUsageIndicator"===t.key&&e()},n=t=>{let{key:r}=t.detail;"disableUsageIndicator"===r&&e()};return window.addEventListener("storage",r),window.addEventListener(t.LOCAL_STORAGE_EVENT,n),()=>{window.removeEventListener("storage",r),window.removeEventListener(t.LOCAL_STORAGE_EVENT,n)}}function o(){return"true"===(0,t.getLocalStorageItem)("disableUsageIndicator")}function a(){return(0,r.useSyncExternalStore)(n,o)}e.s(["useDisableUsageIndicator",()=>a])},275144,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(764205);let o=(0,r.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:a})=>{let[i,l]=(0,r.useState)(null),[s,c]=(0,r.useState)(null);return(0,r.useEffect)(()=>{(async()=>{try{let e=(0,n.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.ok){let e=await r.json();e.values?.logo_url&&l(e.values.logo_url),e.values?.favicon_url&&c(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,r.useEffect)(()=>{if(s){let e=document.querySelectorAll("link[rel*='icon']");if(e.length>0)e.forEach(e=>{e.href=s});else{let e=document.createElement("link");e.rel="icon",e.href=s,document.head.appendChild(e)}}},[s]),(0,t.jsx)(o.Provider,{value:{logoUrl:i,setLogoUrl:l,faviconUrl:s,setFaviconUrl:c},children:e})},"useTheme",0,()=>{let e=(0,r.useContext)(o);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},998183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return s},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function a(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},195057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(151836)._(e.r(998183)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",l=e.hash||"",s=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),s&&"object"==typeof s&&(s=String(a.urlQueryToSearchParams(s)));let u=e.search||s&&`?${s}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),o&&"/"!==o[0]&&(o="/"+o)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),o=o.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${o}${u}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},718967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return v},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return x},NormalizeError:function(){return y},PageNotFoundError:function(){return w},SP:function(){return m},ST:function(){return p},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return s},isResSent:function(){return f},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return j}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>l.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function g(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await g(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,p=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class v extends Error{}class y extends Error{}class w extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},573668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(718967),o=e.r(652817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},284508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},522016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return v},useLinkStatus:function(){return w}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(151836),i=e.r(843476),l=a._(e.r(271645)),s=e.r(195057),c=e.r(8372),u=e.r(818581),d=e.r(718967),f=e.r(405550);e.r(233525);let h=e.r(91949),g=e.r(573668),m=e.r(509396);function p(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}function v(t){var r;let n,o,a,[s,v]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),w=(0,l.useRef)(null),{href:x,as:b,children:j,prefetch:S=null,passHref:E,replace:L,shallow:_,scroll:C,onClick:k,onMouseEnter:T,onTouchStart:P,legacyBehavior:O=!1,onNavigate:I,ref:N,unstable_dynamicOnHover:B,...R}=t;n=j,O&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let U=l.default.useContext(c.AppRouterContext),z=!1!==S,A=!1!==S?null===(r=S)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,{href:M,as:D}=l.default.useMemo(()=>{let e=p(x);return{href:e,as:b?p(b):e}},[x,b]);if(O){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=l.default.Children.only(n)}let $=O?o&&"object"==typeof o&&o.ref:N,F=l.default.useCallback(e=>(null!==U&&(w.current=(0,h.mountLinkInstance)(e,M,U,A,z,v)),()=>{w.current&&((0,h.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,h.unmountPrefetchableInstance)(e)}),[z,M,U,A,v]),H={ref:(0,u.useMergedRef)(F,$),onClick(t){O||"function"!=typeof k||k(t),O&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!U||t.defaultPrevented||function(t,r,n,o,a,i,s){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(699781);l.default.startTransition(()=>{d(n||r,a?"replace":"push",i??!0,o.current)})}}(t,M,D,w,L,C,I)},onMouseEnter(e){O||"function"!=typeof T||T(e),O&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),U&&z&&(0,h.onNavigationIntent)(e.currentTarget,!0===B)},onTouchStart:function(e){O||"function"!=typeof P||P(e),O&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),U&&z&&(0,h.onNavigationIntent)(e.currentTarget,!0===B)}};return(0,d.isAbsoluteUrl)(D)?H.href=D:O&&!E&&("a"!==o.type||"href"in o.props)||(H.href=(0,f.addBasePath)(D)),a=O?l.default.cloneElement(o,H):(0,i.jsx)("a",{...R,...H,children:n}),(0,i.jsx)(y.Provider,{value:s,children:a})}e.r(284508);let y=(0,l.createContext)(h.IDLE_LINK_STATUS),w=()=>(0,l.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},402874,521323,636772,e=>{"use strict";var t=e.i(843476),r=e.i(764205),n=e.i(266027);let o=(0,e.i(243652).createQueryKeys)("healthReadiness"),a=async()=>{let e=(0,r.getProxyBaseUrl)(),t=await fetch(`${e}/health/readiness`);if(!t.ok)throw Error(`Failed to fetch health readiness: ${t.statusText}`);return t.json()},i=()=>(0,n.useQuery)({queryKey:o.detail("readiness"),queryFn:a,staleTime:3e5});e.s(["useHealthReadiness",0,i],521323);var l=e.i(115571),s=e.i(271645);function c(e){let t=t=>{"disableBouncingIcon"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableBouncingIcon"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function u(){return"true"===(0,l.getLocalStorageItem)("disableBouncingIcon")}function d(){return(0,s.useSyncExternalStore)(c,u)}var f=e.i(275144),h=e.i(268004),g=e.i(321836),m=e.i(62478),p=e.i(44121),v=e.i(186515);e.i(247167);var y=e.i(931067),w=e.i(9583),x=e.i(464571),b=e.i(790848),j=e.i(262218),S=e.i(522016);function E(e){let t=t=>{"disableBlogPosts"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableBlogPosts"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function L(){return"true"===(0,l.getLocalStorageItem)("disableBlogPosts")}function _(){return(0,s.useSyncExternalStore)(E,L)}async function C(){let e=(0,r.getProxyBaseUrl)(),t=await fetch(`${e}/public/litellm_blog_posts`);if(!t.ok)throw Error(`Failed to fetch blog posts: ${t.statusText}`);return t.json()}var k=e.i(56456),T=e.i(326373),P=e.i(770914),O=e.i(898586);let{Text:I,Title:N,Paragraph:B}=O.Typography,R=()=>{let e,r=_(),{data:o,isLoading:a,isError:i,refetch:l}=(0,n.useQuery)({queryKey:["blogPosts"],queryFn:C,staleTime:36e5,retry:1,retryDelay:0});return r?null:(e=a?[{key:"loading",label:(0,t.jsx)(k.LoadingOutlined,{}),disabled:!0}]:i?[{key:"error",label:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(I,{type:"danger",children:"Failed to load posts"}),(0,t.jsx)(x.Button,{size:"small",onClick:()=>l(),children:"Retry"})]}),disabled:!0}]:o&&0!==o.posts.length?[...o.posts.slice(0,5).map(e=>({key:e.url,label:(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",width:380},children:[(0,t.jsx)(N,{level:5,style:{marginBottom:2},children:e.title}),(0,t.jsx)(I,{type:"secondary",style:{fontSize:11},children:new Date(e.date+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),(0,t.jsx)(B,{ellipsis:{rows:2},children:e.description})]})})),{type:"divider"},{key:"view-all",label:(0,t.jsx)("a",{href:"https://docs.litellm.ai/blog",target:"_blank",rel:"noopener noreferrer",children:"View all posts"})}]:[{key:"empty",label:(0,t.jsx)(I,{type:"secondary",children:"No posts available"}),disabled:!0}],(0,t.jsx)(T.Dropdown,{menu:{items:e},trigger:["hover"],placement:"bottomRight",children:(0,t.jsx)(x.Button,{type:"text",children:"Blog"})}))};function U(e){let t=t=>{"disableShowPrompts"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableShowPrompts"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function z(){return"true"===(0,l.getLocalStorageItem)("disableShowPrompts")}function A(){return(0,s.useSyncExternalStore)(U,z)}e.s(["useDisableShowPrompts",()=>A],636772);let M={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"}}]},name:"github",theme:"outlined"};var D=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:M}))});let $={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M409.4 128c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h76.7v-76.8c0-42.3-34.3-76.7-76.7-76.8zm0 204.8H204.7c-42.4 0-76.7 34.4-76.7 76.8s34.4 76.8 76.7 76.8h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.8-76.6-76.8zM614 486.4c42.4 0 76.8-34.4 76.7-76.8V204.8c0-42.4-34.3-76.8-76.7-76.8-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.5 34.3 76.8 76.7 76.8zm281.4-76.8c0-42.4-34.4-76.8-76.7-76.8S742 367.2 742 409.6v76.8h76.7c42.3 0 76.7-34.4 76.7-76.8zm-76.8 128H614c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM614 742.4h-76.7v76.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM409.4 537.6c-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8V614.4c0-20.3-8.1-39.9-22.4-54.3a76.92 76.92 0 00-54.3-22.5zM128 614.4c0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5c42.4 0 76.8-34.4 76.7-76.8v-76.8h-76.7c-42.3 0-76.7 34.4-76.7 76.8z"}}]},name:"slack",theme:"outlined"};var F=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:$}))});let H=()=>A()?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Button,{href:"https://www.litellm.ai/support",target:"_blank",rel:"noopener noreferrer",icon:(0,t.jsx)(F,{}),className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",children:"Join Slack"}),(0,t.jsx)(x.Button,{href:"https://github.com/BerriAI/litellm",target:"_blank",rel:"noopener noreferrer",className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",icon:(0,t.jsx)(D,{}),children:"Star us on GitHub"})]});var V=e.i(135214),G=e.i(371401),K=e.i(100486),W=e.i(755151);let q={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"};var Q=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:q}))}),X=e.i(948401),J=e.i(602073),Z=e.i(771674),Y=e.i(312361),ee=e.i(592968);let{Text:et}=O.Typography,er=({onLogout:e})=>{let{userId:r,userEmail:n,userRole:o,premiumUser:a}=(0,V.default)(),i=A(),c=(0,G.useDisableUsageIndicator)(),u=_(),f=d(),[h,g]=(0,s.useState)(!1);(0,s.useEffect)(()=>{g("true"===(0,l.getLocalStorageItem)("disableShowNewBadge"))},[]);let m=[{key:"logout",label:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Q,{}),"Logout"]}),onClick:e}];return(0,t.jsx)(T.Dropdown,{menu:{items:m},popupRender:e=>(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-lg",children:[(0,t.jsxs)(P.Space,{direction:"vertical",size:"small",style:{width:"100%",padding:"12px"},children:[(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(X.MailOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:n||"-"})]}),a?(0,t.jsx)(j.Tag,{icon:(0,t.jsx)(K.CrownOutlined,{}),color:"gold",children:"Premium"}):(0,t.jsx)(ee.Tooltip,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,t.jsx)(j.Tag,{icon:(0,t.jsx)(K.CrownOutlined,{}),children:"Standard"})})]}),(0,t.jsx)(Y.Divider,{style:{margin:"8px 0"}}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Z.UserOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:"User ID"})]}),(0,t.jsx)(et,{copyable:!0,ellipsis:!0,style:{maxWidth:"150px"},title:r||"-",children:r||"-"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(J.SafetyOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:"Role"})]}),(0,t.jsx)(et,{children:o})]}),(0,t.jsx)(Y.Divider,{style:{margin:"8px 0"}}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide New Feature Indicators"}),(0,t.jsx)(b.Switch,{size:"small",checked:h,onChange:e=>{g(e),e?(0,l.setLocalStorageItem)("disableShowNewBadge","true"):(0,l.removeLocalStorageItem)("disableShowNewBadge"),(0,l.emitLocalStorageChange)("disableShowNewBadge")},"aria-label":"Toggle hide new feature indicators"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide All Prompts"}),(0,t.jsx)(b.Switch,{size:"small",checked:i,onChange:e=>{e?(0,l.setLocalStorageItem)("disableShowPrompts","true"):(0,l.removeLocalStorageItem)("disableShowPrompts"),(0,l.emitLocalStorageChange)("disableShowPrompts")},"aria-label":"Toggle hide all prompts"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Usage Indicator"}),(0,t.jsx)(b.Switch,{size:"small",checked:c,onChange:e=>{e?(0,l.setLocalStorageItem)("disableUsageIndicator","true"):(0,l.removeLocalStorageItem)("disableUsageIndicator"),(0,l.emitLocalStorageChange)("disableUsageIndicator")},"aria-label":"Toggle hide usage indicator"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Blog Posts"}),(0,t.jsx)(b.Switch,{size:"small",checked:u,onChange:e=>{e?(0,l.setLocalStorageItem)("disableBlogPosts","true"):(0,l.removeLocalStorageItem)("disableBlogPosts"),(0,l.emitLocalStorageChange)("disableBlogPosts")},"aria-label":"Toggle hide blog posts"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Bouncing Icon"}),(0,t.jsx)(b.Switch,{size:"small",checked:f,onChange:e=>{e?(0,l.setLocalStorageItem)("disableBouncingIcon","true"):(0,l.removeLocalStorageItem)("disableBouncingIcon"),(0,l.emitLocalStorageChange)("disableBouncingIcon")},"aria-label":"Toggle hide bouncing icon"})]})]}),(0,t.jsx)(Y.Divider,{style:{margin:0}}),s.default.cloneElement(e,{style:{boxShadow:"none"}})]}),children:(0,t.jsx)(x.Button,{type:"text",children:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Z.UserOutlined,{}),(0,t.jsx)(et,{children:"User"}),(0,t.jsx)(W.DownOutlined,{})]})})})};var en=e.i(199133),eo=e.i(295320),ea=e.i(283713);let ei=({onWorkerSwitch:e})=>{let{isControlPlane:r,selectedWorker:n,workers:o}=(0,ea.useWorker)();return r&&n?(0,t.jsx)(en.Select,{showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),value:n.worker_id,style:{minWidth:180},suffixIcon:(0,t.jsx)(eo.CloudServerOutlined,{}),options:o.map(e=>({label:e.name,value:e.worker_id,disabled:e.worker_id===n.worker_id})),onChange:t=>{e(t)}}):null};e.s(["default",0,({userID:e,userEmail:n,userRole:o,premiumUser:a,proxySettings:l,setProxySettings:c,accessToken:u,isPublicPage:y=!1,sidebarCollapsed:w=!1,onToggleSidebar:b,isDarkMode:E,toggleDarkMode:L})=>{let _=(0,r.getProxyBaseUrl)(),[C,k]=(0,s.useState)(""),{logoUrl:T}=(0,f.useTheme)(),{data:P}=i(),O=P?.litellm_version,I=d(),N=T||`${_}/get_image`;return(0,s.useEffect)(()=>{(async()=>{if(u){let e=await (0,m.fetchProxySettings)(u);console.log("response from fetchProxySettings",e),e&&c(e)}})()},[u]),(0,s.useEffect)(()=>{k(l?.PROXY_LOGOUT_URL||"")},[l]),(0,t.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)("div",{className:"flex items-center h-14 px-4",children:[(0,t.jsxs)("div",{className:"flex items-center flex-shrink-0",children:[b&&(0,t.jsx)("button",{onClick:b,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:w?"Expand sidebar":"Collapse sidebar",children:(0,t.jsx)("span",{className:"text-lg",children:w?(0,t.jsx)(v.MenuUnfoldOutlined,{}):(0,t.jsx)(p.MenuFoldOutlined,{})})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.default,{href:_||"/",className:"flex items-center",children:(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("div",{className:"h-10 max-w-48 flex items-center justify-center overflow-hidden",children:(0,t.jsx)("img",{src:N,alt:"LiteLLM Brand",className:"max-w-full max-h-full w-auto h-auto object-contain"})})})}),O&&(0,t.jsxs)("div",{className:"relative",children:[!I&&(0,t.jsx)("span",{className:"absolute -top-1 -left-2 text-lg animate-bounce",style:{animationDuration:"2s"},title:"Thanks for using LiteLLM!",children:"🌑"}),(0,t.jsx)(j.Tag,{className:"relative text-xs font-medium cursor-pointer z-10",children:(0,t.jsxs)("a",{href:"https://docs.litellm.ai/release_notes",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0",children:["v",O]})})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,t.jsx)(ei,{onWorkerSwitch:e=>{(0,h.clearTokenCookies)(),(0,g.clearStoredReturnUrl)(),localStorage.removeItem("litellm_selected_worker_id"),localStorage.removeItem("litellm_worker_url"),window.location.href=`/ui/login?worker=${encodeURIComponent(e)}`}}),(0,t.jsx)(H,{}),!1,(0,t.jsx)(x.Button,{type:"text",href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",children:"Docs"}),(0,t.jsx)(R,{}),!y&&(0,t.jsx)(er,{onLogout:()=>{(0,h.clearTokenCookies)(),localStorage.removeItem("litellm_selected_worker_id"),localStorage.removeItem("litellm_worker_url"),window.location.href=C}})]})]})})})}],402874)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/37e7834517e667e4.js b/litellm/proxy/_experimental/out/_next/static/chunks/37e7834517e667e4.js new file mode 100644 index 0000000000..0d83a7b6c2 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/37e7834517e667e4.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,916925,e=>{"use strict";var r,a=((r={}).A2A_Agent="A2A Agent",r.AI21="Ai21",r.AI21_CHAT="Ai21 Chat",r.AIML="AI/ML API",r.AIOHTTP_OPENAI="Aiohttp Openai",r.Anthropic="Anthropic",r.ANTHROPIC_TEXT="Anthropic Text",r.AssemblyAI="AssemblyAI",r.AUTO_ROUTER="Auto Router",r.Bedrock="Amazon Bedrock",r.BedrockMantle="Amazon Bedrock Mantle",r.SageMaker="AWS SageMaker",r.Azure="Azure",r.Azure_AI_Studio="Azure AI Foundry (Studio)",r.AZURE_TEXT="Azure Text",r.BASETEN="Baseten",r.BYTEZ="Bytez",r.Cerebras="Cerebras",r.CLARIFAI="Clarifai",r.CLOUDFLARE="Cloudflare",r.CODESTRAL="Codestral",r.Cohere="Cohere",r.COHERE_CHAT="Cohere Chat",r.COMETAPI="Cometapi",r.COMPACTIFAI="Compactifai",r.Cursor="Cursor",r.Dashscope="Dashscope",r.Databricks="Databricks (Qwen API)",r.DATAROBOT="Datarobot",r.DeepInfra="DeepInfra",r.Deepgram="Deepgram",r.Deepseek="Deepseek",r.DOCKER_MODEL_RUNNER="Docker Model Runner",r.DOTPROMPT="Dotprompt",r.ElevenLabs="ElevenLabs",r.EMPOWER="Empower",r.FalAI="Fal AI",r.FEATHERLESS_AI="Featherless Ai",r.FireworksAI="Fireworks AI",r.FRIENDLIAI="Friendliai",r.GALADRIEL="Galadriel",r.GITHUB_COPILOT="Github Copilot",r.Google_AI_Studio="Google AI Studio",r.GradientAI="GradientAI",r.Groq="Groq",r.HEROKU="Heroku",r.Hosted_Vllm="vllm",r.HUGGINGFACE="Huggingface",r.HYPERBOLIC="Hyperbolic",r.Infinity="Infinity",r.JinaAI="Jina AI",r.LAMBDA_AI="Lambda Ai",r.LEMONADE="Lemonade",r.LLAMAFILE="Llamafile",r.LM_STUDIO="Lm Studio",r.LLAMA="Meta Llama",r.MARITALK="Maritalk",r.MiniMax="MiniMax",r.MistralAI="Mistral AI",r.MOONSHOT="Moonshot",r.MORPH="Morph",r.NEBIUS="Nebius",r.NLP_CLOUD="Nlp Cloud",r.NOVITA="Novita",r.NSCALE="Nscale",r.NVIDIA_NIM="Nvidia Nim",r.Ollama="Ollama",r.OLLAMA_CHAT="Ollama Chat",r.OOBABOOGA="Oobabooga",r.OpenAI="OpenAI",r.OPENAI_LIKE="Openai Like",r.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",r.OpenAI_Text="OpenAI Text Completion",r.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",r.Openrouter="Openrouter",r.Oracle="Oracle Cloud Infrastructure (OCI)",r.OVHCLOUD="Ovhcloud",r.Perplexity="Perplexity",r.PETALS="Petals",r.PG_VECTOR="Pg Vector",r.PREDIBASE="Predibase",r.RECRAFT="Recraft",r.REPLICATE="Replicate",r.RunwayML="RunwayML",r.SAGEMAKER_LEGACY="Sagemaker",r.Sambanova="Sambanova",r.SAP="SAP Generative AI Hub",r.Snowflake="Snowflake",r.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",r.TogetherAI="TogetherAI",r.TOPAZ="Topaz",r.Triton="Triton",r.V0="V0",r.VERCEL_AI_GATEWAY="Vercel Ai Gateway",r.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",r.VERTEX_AI_BETA="Vertex Ai Beta",r.VLLM="Vllm",r.VolcEngine="VolcEngine",r.Voyage="Voyage AI",r.WANDB="Wandb",r.WATSONX="Watsonx",r.WATSONX_TEXT="Watsonx Text",r.xAI="xAI",r.XINFERENCE="Xinference",r);let t={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},o="../ui/assets/logos/",i={"A2A Agent":`${o}a2a_agent.png`,Ai21:`${o}ai21.svg`,"Ai21 Chat":`${o}ai21.svg`,"AI/ML API":`${o}aiml_api.svg`,"Aiohttp Openai":`${o}openai_small.svg`,Anthropic:`${o}anthropic.svg`,"Anthropic Text":`${o}anthropic.svg`,AssemblyAI:`${o}assemblyai_small.png`,Azure:`${o}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${o}microsoft_azure.svg`,"Azure Text":`${o}microsoft_azure.svg`,Baseten:`${o}baseten.svg`,"Amazon Bedrock":`${o}bedrock.svg`,"Amazon Bedrock Mantle":`${o}bedrock.svg`,"AWS SageMaker":`${o}bedrock.svg`,Cerebras:`${o}cerebras.svg`,Cloudflare:`${o}cloudflare.svg`,Codestral:`${o}mistral.svg`,Cohere:`${o}cohere.svg`,"Cohere Chat":`${o}cohere.svg`,Cometapi:`${o}cometapi.svg`,Cursor:`${o}cursor.svg`,"Databricks (Qwen API)":`${o}databricks.svg`,Dashscope:`${o}dashscope.svg`,Deepseek:`${o}deepseek.svg`,Deepgram:`${o}deepgram.png`,DeepInfra:`${o}deepinfra.png`,ElevenLabs:`${o}elevenlabs.png`,"Fal AI":`${o}fal_ai.jpg`,"Featherless Ai":`${o}featherless.svg`,"Fireworks AI":`${o}fireworks.svg`,Friendliai:`${o}friendli.svg`,"Github Copilot":`${o}github_copilot.svg`,"Google AI Studio":`${o}google.svg`,GradientAI:`${o}gradientai.svg`,Groq:`${o}groq.svg`,vllm:`${o}vllm.png`,Huggingface:`${o}huggingface.svg`,Hyperbolic:`${o}hyperbolic.svg`,Infinity:`${o}infinity.png`,"Jina AI":`${o}jina.png`,"Lambda Ai":`${o}lambda.svg`,"Lm Studio":`${o}lmstudio.svg`,"Meta Llama":`${o}meta_llama.svg`,MiniMax:`${o}minimax.svg`,"Mistral AI":`${o}mistral.svg`,Moonshot:`${o}moonshot.svg`,Morph:`${o}morph.svg`,Nebius:`${o}nebius.svg`,Novita:`${o}novita.svg`,"Nvidia Nim":`${o}nvidia_nim.svg`,Ollama:`${o}ollama.svg`,"Ollama Chat":`${o}ollama.svg`,Oobabooga:`${o}openai_small.svg`,OpenAI:`${o}openai_small.svg`,"Openai Like":`${o}openai_small.svg`,"OpenAI Text Completion":`${o}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${o}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${o}openai_small.svg`,Openrouter:`${o}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${o}oracle.svg`,Perplexity:`${o}perplexity-ai.svg`,Recraft:`${o}recraft.svg`,Replicate:`${o}replicate.svg`,RunwayML:`${o}runwayml.png`,Sagemaker:`${o}bedrock.svg`,Sambanova:`${o}sambanova.svg`,"SAP Generative AI Hub":`${o}sap.png`,Snowflake:`${o}snowflake.svg`,"Text-Completion-Codestral":`${o}mistral.svg`,TogetherAI:`${o}togetherai.svg`,Topaz:`${o}topaz.svg`,Triton:`${o}nvidia_triton.png`,V0:`${o}v0.svg`,"Vercel Ai Gateway":`${o}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${o}google.svg`,"Vertex Ai Beta":`${o}google.svg`,Vllm:`${o}vllm.png`,VolcEngine:`${o}volcengine.png`,"Voyage AI":`${o}voyage.webp`,Watsonx:`${o}watsonx.svg`,"Watsonx Text":`${o}watsonx.svg`,xAI:`${o}xai.svg`,Xinference:`${o}xinference.svg`};e.s(["Providers",()=>a,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"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 if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let r=Object.keys(t).find(r=>t[r].toLowerCase()===e.toLowerCase());if(!r)return{logo:"",displayName:e};let o=a[r];return{logo:i[o],displayName:o}},"getProviderModels",0,(e,r)=>{console.log(`Provider key: ${e}`);let a=t[e];console.log(`Provider mapped to: ${a}`);let o=[];return e&&"object"==typeof r&&(Object.entries(r).forEach(([e,r])=>{if(null!==r&&"object"==typeof r&&"litellm_provider"in r){let t=r.litellm_provider;(t===a||"string"==typeof t&&t.includes(a))&&o.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(r).forEach(([e,r])=>{null!==r&&"object"==typeof r&&"litellm_provider"in r&&"cohere_chat"===r.litellm_provider&&o.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(r).forEach(([e,r])=>{null!==r&&"object"==typeof r&&"litellm_provider"in r&&"sagemaker_chat"===r.litellm_provider&&o.push(e)}))),o},"providerLogoMap",0,i,"provider_map",0,t])},240647,e=>{"use strict";var r=e.i(286612);e.s(["RightOutlined",()=>r.default])},362024,e=>{"use strict";var r=e.i(988122);e.s(["Collapse",()=>r.default])},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,r)=>(e[r.team_id]=r.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,r)=>{let a=r.find(r=>r.team_id===e);return a?a.team_alias:null}])},793130,e=>{"use strict";var r=e.i(290571),a=e.i(429427),t=e.i(371330),o=e.i(271645),i=e.i(394487),l=e.i(503269),n=e.i(214520),s=e.i(746725),u=e.i(914189),c=e.i(144279),d=e.i(294316),m=e.i(601893),g=e.i(140721),A=e.i(942803),p=e.i(233538),f=e.i(694421),v=e.i(700020),b=e.i(35889),I=e.i(998348),h=e.i(722678);let C=(0,o.createContext)(null);C.displayName="GroupContext";let E=o.Fragment,T=Object.assign((0,v.forwardRefWithAs)(function(e,r){var E;let T=(0,o.useId)(),_=(0,A.useProvidedId)(),O=(0,m.useDisabled)(),{id:k=_||`headlessui-switch-${T}`,disabled:L=O||!1,checked:x,defaultChecked:M,onChange:y,name:R,value:N,form:S,autoFocus:$=!1,...w}=e,P=(0,o.useContext)(C),[D,F]=(0,o.useState)(null),G=(0,o.useRef)(null),B=(0,d.useSyncRefs)(G,r,null===P?null:P.setSwitch,F),V=(0,n.useDefaultValue)(M),[H,z]=(0,l.useControllable)(x,y,null!=V&&V),U=(0,s.useDisposables)(),[j,W]=(0,o.useState)(!1),X=(0,u.useEvent)(()=>{W(!0),null==z||z(!H),U.nextFrame(()=>{W(!1)})}),K=(0,u.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),X()}),q=(0,u.useEvent)(e=>{e.key===I.Keys.Space?(e.preventDefault(),X()):e.key===I.Keys.Enter&&(0,f.attemptSubmit)(e.currentTarget)}),Y=(0,u.useEvent)(e=>e.preventDefault()),Z=(0,h.useLabelledBy)(),J=(0,b.useDescribedBy)(),{isFocusVisible:Q,focusProps:ee}=(0,a.useFocusRing)({autoFocus:$}),{isHovered:er,hoverProps:ea}=(0,t.useHover)({isDisabled:L}),{pressed:et,pressProps:eo}=(0,i.useActivePress)({disabled:L}),ei=(0,o.useMemo)(()=>({checked:H,disabled:L,hover:er,focus:Q,active:et,autofocus:$,changing:j}),[H,er,Q,et,L,j,$]),el=(0,v.mergeProps)({id:k,ref:B,role:"switch",type:(0,c.useResolveButtonType)(e,D),tabIndex:-1===e.tabIndex?0:null!=(E=e.tabIndex)?E:0,"aria-checked":H,"aria-labelledby":Z,"aria-describedby":J,disabled:L||void 0,autoFocus:$,onClick:K,onKeyUp:q,onKeyPress:Y},ee,ea,eo),en=(0,o.useCallback)(()=>{if(void 0!==V)return null==z?void 0:z(V)},[z,V]),es=(0,v.useRender)();return o.default.createElement(o.default.Fragment,null,null!=R&&o.default.createElement(g.FormFields,{disabled:L,data:{[R]:N||"on"},overrides:{type:"checkbox",checked:H},form:S,onReset:en}),es({ourProps:el,theirProps:w,slot:ei,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var r;let[a,t]=(0,o.useState)(null),[i,l]=(0,h.useLabels)(),[n,s]=(0,b.useDescriptions)(),u=(0,o.useMemo)(()=>({switch:a,setSwitch:t}),[a,t]),c=(0,v.useRender)();return o.default.createElement(s,{name:"Switch.Description",value:n},o.default.createElement(l,{name:"Switch.Label",value:i,props:{htmlFor:null==(r=u.switch)?void 0:r.id,onClick(e){a&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),a.click(),a.focus({preventScroll:!0}))}}},o.default.createElement(C.Provider,{value:u},c({ourProps:{},theirProps:e,slot:{},defaultTag:E,name:"Switch.Group"}))))},Label:h.Label,Description:b.Description});var _=e.i(888288),O=e.i(95779),k=e.i(444755),L=e.i(673706),x=e.i(829087);let M=(0,L.makeClassName)("Switch"),y=o.default.forwardRef((e,a)=>{let{checked:t,defaultChecked:i=!1,onChange:l,color:n,name:s,error:u,errorMessage:c,disabled:d,required:m,tooltip:g,id:A}=e,p=(0,r.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),f={bgColor:n?(0,L.getColorClassNames)(n,O.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:n?(0,L.getColorClassNames)(n,O.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[v,b]=(0,_.default)(i,t),[I,h]=(0,o.useState)(!1),{tooltipProps:C,getReferenceProps:E}=(0,x.useTooltip)(300);return o.default.createElement("div",{className:"flex flex-row items-center justify-start"},o.default.createElement(x.default,Object.assign({text:g},C)),o.default.createElement("div",Object.assign({ref:(0,L.mergeRefs)([a,C.refs.setReference]),className:(0,k.tremorTwMerge)(M("root"),"flex flex-row relative h-5")},p,E),o.default.createElement("input",{type:"checkbox",className:(0,k.tremorTwMerge)(M("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:s,required:m,checked:v,onChange:e=>{e.preventDefault()}}),o.default.createElement(T,{checked:v,onChange:e=>{b(e),null==l||l(e)},disabled:d,className:(0,k.tremorTwMerge)(M("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>h(!0),onBlur:()=>h(!1),id:A},o.default.createElement("span",{className:(0,k.tremorTwMerge)(M("sr-only"),"sr-only")},"Switch ",v?"on":"off"),o.default.createElement("span",{"aria-hidden":"true",className:(0,k.tremorTwMerge)(M("background"),v?f.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),o.default.createElement("span",{"aria-hidden":"true",className:(0,k.tremorTwMerge)(M("round"),v?(0,k.tremorTwMerge)(f.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",I?(0,k.tremorTwMerge)("ring-2",f.ringColor):"")}))),u&&c?o.default.createElement("p",{className:(0,k.tremorTwMerge)(M("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});y.displayName="Switch",e.s(["Switch",()=>y],793130)},418371,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:o="w-4 h-4"})=>{let[i,l]=(0,a.useState)(!1),{logo:n}=(0,t.getProviderLogoAndName)(e);return i||!n?(0,r.jsx)("div",{className:`${o} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,r.jsx)("img",{src:n,alt:`${e} logo`,className:o,onError:()=>l(!0)})}])},571303,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(115504);function o({className:e="",...o}){var i,l;let n=(0,a.useId)();return i=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),r=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===n),a=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==n);r&&a&&(r.currentTime=a.currentTime)},l=[n],(0,a.useLayoutEffect)(i,l),(0,r.jsxs)("svg",{"data-spinner-id":n,className:(0,t.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...o,children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>o],571303)},366283,e=>{"use strict";var r=e.i(290571),a=e.i(271645),t=e.i(95779),o=e.i(444755),i=e.i(673706);let l=(0,i.makeClassName)("Callout"),n=a.default.forwardRef((e,n)=>{let{title:s,icon:u,color:c,className:d,children:m}=e,g=(0,r.__rest)(e,["title","icon","color","className","children"]);return a.default.createElement("div",Object.assign({ref:n,className:(0,o.tremorTwMerge)(l("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",c?(0,o.tremorTwMerge)((0,i.getColorClassNames)(c,t.colorPalette.background).bgColor,(0,i.getColorClassNames)(c,t.colorPalette.darkBorder).borderColor,(0,i.getColorClassNames)(c,t.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,o.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),d)},g),a.default.createElement("div",{className:(0,o.tremorTwMerge)(l("header"),"flex items-start")},u?a.default.createElement(u,{className:(0,o.tremorTwMerge)(l("icon"),"flex-none h-5 w-5 mr-1.5")}):null,a.default.createElement("h4",{className:(0,o.tremorTwMerge)(l("title"),"font-semibold")},s)),a.default.createElement("p",{className:(0,o.tremorTwMerge)(l("body"),"overflow-y-auto",m?"mt-2":"")},m))});n.displayName="Callout",e.s(["Callout",()=>n],366283)},986888,e=>{"use strict";var r=e.i(843476),a=e.i(797305),t=e.i(135214),o=e.i(214541);e.s(["default",0,()=>{let{accessToken:e,userRole:i,userId:l,premiumUser:n}=(0,t.default)(),{teams:s}=(0,o.default)();return(0,r.jsx)(a.default,{teams:s??[],organizations:[]})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/399a183eff6b9833.js b/litellm/proxy/_experimental/out/_next/static/chunks/399a183eff6b9833.js new file mode 100644 index 0000000000..9be07c0517 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/399a183eff6b9833.js @@ -0,0 +1,72 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),Object.defineProperty(l,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},269200,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("Table"),s=l.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement("div",{className:(0,a.tremorTwMerge)(r("root"),"overflow-auto",n)},l.default.createElement("table",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},o),i))});s.displayName="Table",e.s(["Table",()=>s],269200)},427612,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHead"),s=l.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("thead",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",n)},o),i))});s.displayName="TableHead",e.s(["TableHead",()=>s],427612)},64848,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHeaderCell"),s=l.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("th",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",n)},o),i))});s.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>s],64848)},942232,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableBody"),s=l.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("tbody",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",n)},o),i))});s.displayName="TableBody",e.s(["TableBody",()=>s],942232)},496020,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableRow"),s=l.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("tr",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("row"),n)},o),i))});s.displayName="TableRow",e.s(["TableRow",()=>s],496020)},977572,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableCell"),s=l.default.forwardRef((e,s)=>{let{children:i,className:n}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("td",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"align-middle whitespace-nowrap text-left p-4",n)},o),i))});s.displayName="TableCell",e.s(["TableCell",()=>s],977572)},389083,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(829087),r=e.i(480731),s=e.i(95779),i=e.i(444755),n=e.i(673706);let o={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"}},c={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"}},d=(0,n.makeClassName)("Badge"),u=l.default.forwardRef((e,u)=>{let{color:m,icon:h,size:g=r.Sizes.SM,tooltip:p,className:x,children:f}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),y=h||null,{tooltipProps:j,getReferenceProps:v}=(0,a.useTooltip)();return l.default.createElement("span",Object.assign({ref:(0,n.mergeRefs)([u,j.refs.setReference]),className:(0,i.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,i.tremorTwMerge)((0,n.getColorClassNames)(m,s.colorPalette.background).bgColor,(0,n.getColorClassNames)(m,s.colorPalette.iconText).textColor,(0,n.getColorClassNames)(m,s.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,i.tremorTwMerge)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),o[g].paddingX,o[g].paddingY,o[g].fontSize,x)},v,b),l.default.createElement(a.default,Object.assign({text:p},j)),y?l.default.createElement(y,{className:(0,i.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[g].height,c[g].width)}):null,l.default.createElement("span",{className:(0,i.tremorTwMerge)(d("text"),"whitespace-nowrap")},f))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},68155,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.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:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,l],68155)},360820,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.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:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,l],360820)},871943,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.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:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,l],871943)},94629,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.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:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,l],94629)},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(562901),a=e.i(343794),r=e.i(914949),s=e.i(529681),i=e.i(242064),n=e.i(829672),o=e.i(285781),c=e.i(836938),d=e.i(920228),u=e.i(62405),m=e.i(408850),h=e.i(87414),g=e.i(310730);let p=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:l,antCls:a,zIndexPopup:r,colorText:s,colorWarning:i,marginXXS:n,marginXS:o,fontSize:c,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:r,[`&${a}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:o,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${l}`]:{color:i,fontSize:c,lineHeight:1,marginInlineEnd:o},[`${t}-title`]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:n,color:s}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:o}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var x=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rt.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(l[a[r]]=e[a[r]]);return l};let f=e=>{let{prefixCls:a,okButtonProps:r,cancelButtonProps:s,title:n,description:g,cancelText:p,okText:x,okType:f="primary",icon:b=t.createElement(l.default,null),showCancel:y=!0,close:j,onConfirm:v,onCancel:w,onPopupClick:_}=e,{getPrefixCls:k}=t.useContext(i.ConfigContext),[N]=(0,m.useLocale)("Popconfirm",h.default.Popconfirm),C=(0,c.getRenderPropValue)(n),S=(0,c.getRenderPropValue)(g);return t.createElement("div",{className:`${a}-inner-content`,onClick:_},t.createElement("div",{className:`${a}-message`},b&&t.createElement("span",{className:`${a}-message-icon`},b),t.createElement("div",{className:`${a}-message-text`},C&&t.createElement("div",{className:`${a}-title`},C),S&&t.createElement("div",{className:`${a}-description`},S))),t.createElement("div",{className:`${a}-buttons`},y&&t.createElement(d.default,Object.assign({onClick:w,size:"small"},s),p||(null==N?void 0:N.cancelText)),t.createElement(o.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,u.convertLegacyProps)(f)),r),actionFn:v,close:j,prefixCls:k("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},x||(null==N?void 0:N.okText))))};var b=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rt.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(l[a[r]]=e[a[r]]);return l};let y=t.forwardRef((e,o)=>{var c,d;let{prefixCls:u,placement:m="top",trigger:h="click",okType:g="primary",icon:x=t.createElement(l.default,null),children:y,overlayClassName:j,onOpenChange:v,onVisibleChange:w,overlayStyle:_,styles:k,classNames:N}=e,C=b(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:S,className:T,style:I,classNames:E,styles:M}=(0,i.useComponentConfig)("popconfirm"),[A,D]=(0,r.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(d=e.defaultOpen)?d:e.defaultVisible}),R=(e,t)=>{D(e,!0),null==w||w(e),null==v||v(e,t)},B=S("popconfirm",u),P=(0,a.default)(B,T,j,E.root,null==N?void 0:N.root),O=(0,a.default)(E.body,null==N?void 0:N.body),[F]=p(B);return F(t.createElement(n.default,Object.assign({},(0,s.default)(C,["title"]),{trigger:h,placement:m,onOpenChange:(t,l)=>{let{disabled:a=!1}=e;a||R(t,l)},open:A,ref:o,classNames:{root:P,body:O},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},M.root),I),_),null==k?void 0:k.root),body:Object.assign(Object.assign({},M.body),null==k?void 0:k.body)},content:t.createElement(f,Object.assign({okType:g,icon:x},e,{prefixCls:B,close:e=>{R(!1,e)},onConfirm:t=>{var l;return null==(l=e.onConfirm)?void 0:l.call(void 0,t)},onCancel:t=>{var l;R(!1,t),null==(l=e.onCancel)||l.call(void 0,t)}})),"data-popover-inject":!0}),y))});y._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:l,placement:r,className:s,style:n}=e,o=x(e,["prefixCls","placement","className","style"]),{getPrefixCls:c}=t.useContext(i.ConfigContext),d=c("popconfirm",l),[u]=p(d);return u(t.createElement(g.default,{placement:r,className:(0,a.default)(d,s),style:n,content:t.createElement(f,Object.assign({prefixCls:d},o))}))},e.s(["Popconfirm",0,y],883552)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},848725,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.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:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});e.s(["EyeIcon",0,l],848725)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let 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-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};var r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["StopOutlined",0,s],724154)},292335,122520,165615,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",AWS_SIGV4:"aws_sigv4"},l={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};function a(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["AUTH_TYPE",0,t,"OAUTH_FLOW",0,{INTERACTIVE:"interactive",M2M:"m2m"},"TRANSPORT",0,l,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?l.SSE:t&&e!==l.STDIO?l.OPENAPI:e],292335),e.s(["extractErrorMessage",()=>a],122520);let r=e=>{let t=new Uint8Array(e),l="";return t.forEach(e=>l+=String.fromCharCode(e)),btoa(l).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},s=async e=>{let t=new TextEncoder().encode(e);return r(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,s,"generateCodeVerifier",0,()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),r(e.buffer)}],165615)},264843,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"};var r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["MessageOutlined",0,s],264843)},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var l=e.i(546467);e.s(["ExternalLinkIcon",()=>l.default],634831);let a=(0,e.i(475254).default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);e.s(["KeyIcon",()=>a],438100)},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["SaveOutlined",0,s],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},446891,836991,153472,e=>{"use strict";var t,l,a=e.i(843476),r=e.i(464571),s=e.i(326373),i=e.i(94629),n=e.i(360820),o=e.i(871943),c=e.i(271645);let d=c.forwardRef(function(e,t){return c.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),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,d],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let l=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(n.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(d,{className:"h-4 w-4"})}];return(0,a.jsx)(s.Dropdown,{menu:{items:l,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(r.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(n.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(i.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var u=e.i(266027),m=e.i(954616),h=e.i(243652),g=e.i(135214),p=e.i(764205),x=((t={}).GENERAL_SETTINGS="general_settings",t),f=((l={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",l);let b=async(e,t)=>{try{let l=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(l,{method:"GET",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},y=(0,h.createQueryKeys)("proxyConfig"),j=async(e,t)=>{try{let l=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(l,{method:"POST",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>x,"GeneralSettingsFieldName",()=>f,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,g.default)();return(0,m.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await j(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,g.default)();return(0,u.useQuery)({queryKey:y.list({filters:{configType:e}}),queryFn:async()=>await b(t,e),enabled:!!t})}],153472)},149121,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(152990),r=e.i(682830),s=e.i(269200),i=e.i(427612),n=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572);function u({data:e=[],columns:u,onRowClick:m,renderSubComponent:h,renderChildRows:g,getRowCanExpand:p,isLoading:x=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:b="No logs found",enableSorting:y=!1}){let j=!!(h||g)&&!!p,[v,w]=(0,l.useState)([]),_=(0,a.useReactTable)({data:e,columns:u,...y&&{state:{sorting:v},onSortingChange:w,enableSortingRemoval:!1},...j&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,r.getCoreRowModel)(),...y&&{getSortedRowModel:(0,r.getSortedRowModel)()},...j&&{getExpandedRowModel:(0,r.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(i.TableHead,{children:_.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let l=y&&e.column.getCanSort(),r=e.column.getIsSorted();return(0,t.jsx)(n.TableHeaderCell,{className:`py-1 h-8 ${l?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:l?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),l&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===r?"↑":"desc"===r?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:x?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):_.getRowModel().rows.length>0?_.getRowModel().rows.map(e=>(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),j&&e.getIsExpanded()&&g&&g({row:e}),j&&e.getIsExpanded()&&h&&!g&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:h({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})})})]})})}e.s(["DataTable",()=>u])},37091,e=>{"use strict";var t=e.i(290571),l=e.i(95779),a=e.i(444755),r=e.i(673706),s=e.i(271645);let i=s.default.forwardRef((e,i)=>{let{color:n,children:o,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return s.default.createElement("p",Object.assign({ref:i,className:(0,a.tremorTwMerge)(n?(0,r.getColorClassNames)(n,l.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},d),o)});i.displayName="Subtitle",e.s(["Subtitle",()=>i],37091)},888288,e=>{"use strict";var t=e.i(271645);let l=(e,l)=>{let a=void 0!==l,[r,s]=(0,t.useState)(e);return[a?l:r,e=>{a||s(e)}]};e.s(["default",()=>l])},793130,e=>{"use strict";var t=e.i(290571),l=e.i(429427),a=e.i(371330),r=e.i(271645),s=e.i(394487),i=e.i(503269),n=e.i(214520),o=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(601893),h=e.i(140721),g=e.i(942803),p=e.i(233538),x=e.i(694421),f=e.i(700020),b=e.i(35889),y=e.i(998348),j=e.i(722678);let v=(0,r.createContext)(null);v.displayName="GroupContext";let w=r.Fragment,_=Object.assign((0,f.forwardRefWithAs)(function(e,t){var w;let _=(0,r.useId)(),k=(0,g.useProvidedId)(),N=(0,m.useDisabled)(),{id:C=k||`headlessui-switch-${_}`,disabled:S=N||!1,checked:T,defaultChecked:I,onChange:E,name:M,value:A,form:D,autoFocus:R=!1,...B}=e,P=(0,r.useContext)(v),[O,F]=(0,r.useState)(null),L=(0,r.useRef)(null),z=(0,u.useSyncRefs)(L,t,null===P?null:P.setSwitch,F),H=(0,n.useDefaultValue)(I),[U,V]=(0,i.useControllable)(T,E,null!=H&&H),$=(0,o.useDisposables)(),[q,K]=(0,r.useState)(!1),G=(0,c.useEvent)(()=>{K(!0),null==V||V(!U),$.nextFrame(()=>{K(!1)})}),W=(0,c.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),G()}),J=(0,c.useEvent)(e=>{e.key===y.Keys.Space?(e.preventDefault(),G()):e.key===y.Keys.Enter&&(0,x.attemptSubmit)(e.currentTarget)}),Y=(0,c.useEvent)(e=>e.preventDefault()),Q=(0,j.useLabelledBy)(),X=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,l.useFocusRing)({autoFocus:R}),{isHovered:et,hoverProps:el}=(0,a.useHover)({isDisabled:S}),{pressed:ea,pressProps:er}=(0,s.useActivePress)({disabled:S}),es=(0,r.useMemo)(()=>({checked:U,disabled:S,hover:et,focus:Z,active:ea,autofocus:R,changing:q}),[U,et,Z,ea,S,q,R]),ei=(0,f.mergeProps)({id:C,ref:z,role:"switch",type:(0,d.useResolveButtonType)(e,O),tabIndex:-1===e.tabIndex?0:null!=(w=e.tabIndex)?w:0,"aria-checked":U,"aria-labelledby":Q,"aria-describedby":X,disabled:S||void 0,autoFocus:R,onClick:W,onKeyUp:J,onKeyPress:Y},ee,el,er),en=(0,r.useCallback)(()=>{if(void 0!==H)return null==V?void 0:V(H)},[V,H]),eo=(0,f.useRender)();return r.default.createElement(r.default.Fragment,null,null!=M&&r.default.createElement(h.FormFields,{disabled:S,data:{[M]:A||"on"},overrides:{type:"checkbox",checked:U},form:D,onReset:en}),eo({ourProps:ei,theirProps:B,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[l,a]=(0,r.useState)(null),[s,i]=(0,j.useLabels)(),[n,o]=(0,b.useDescriptions)(),c=(0,r.useMemo)(()=>({switch:l,setSwitch:a}),[l,a]),d=(0,f.useRender)();return r.default.createElement(o,{name:"Switch.Description",value:n},r.default.createElement(i,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){l&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),l.click(),l.focus({preventScroll:!0}))}}},r.default.createElement(v.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:w,name:"Switch.Group"}))))},Label:j.Label,Description:b.Description});var k=e.i(888288),N=e.i(95779),C=e.i(444755),S=e.i(673706),T=e.i(829087);let I=(0,S.makeClassName)("Switch"),E=r.default.forwardRef((e,l)=>{let{checked:a,defaultChecked:s=!1,onChange:i,color:n,name:o,error:c,errorMessage:d,disabled:u,required:m,tooltip:h,id:g}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),x={bgColor:n?(0,S.getColorClassNames)(n,N.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:n?(0,S.getColorClassNames)(n,N.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[f,b]=(0,k.default)(s,a),[y,j]=(0,r.useState)(!1),{tooltipProps:v,getReferenceProps:w}=(0,T.useTooltip)(300);return r.default.createElement("div",{className:"flex flex-row items-center justify-start"},r.default.createElement(T.default,Object.assign({text:h},v)),r.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([l,v.refs.setReference]),className:(0,C.tremorTwMerge)(I("root"),"flex flex-row relative h-5")},p,w),r.default.createElement("input",{type:"checkbox",className:(0,C.tremorTwMerge)(I("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:m,checked:f,onChange:e=>{e.preventDefault()}}),r.default.createElement(_,{checked:f,onChange:e=>{b(e),null==i||i(e)},disabled:u,className:(0,C.tremorTwMerge)(I("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>j(!0),onBlur:()=>j(!1),id:g},r.default.createElement("span",{className:(0,C.tremorTwMerge)(I("sr-only"),"sr-only")},"Switch ",f?"on":"off"),r.default.createElement("span",{"aria-hidden":"true",className:(0,C.tremorTwMerge)(I("background"),f?x.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),r.default.createElement("span",{"aria-hidden":"true",className:(0,C.tremorTwMerge)(I("round"),f?(0,C.tremorTwMerge)(x.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",y?(0,C.tremorTwMerge)("ring-2",x.ringColor):"")}))),c&&d?r.default.createElement("p",{className:(0,C.tremorTwMerge)(I("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});E.displayName="Switch",e.s(["Switch",()=>E],793130)},418371,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:r="w-4 h-4"})=>{let[s,i]=(0,l.useState)(!1),{logo:n}=(0,a.getProviderLogoAndName)(e);return s||!n?(0,t.jsx)("div",{className:`${r} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:n,alt:`${e} logo`,className:r,onError:()=>i(!0)})}])},704308,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(994388),r=e.i(212931),s=e.i(764205),i=e.i(808613),n=e.i(311451),o=e.i(199133),c=e.i(888259),d=e.i(209261);let{TextArea:u}=n.Input,{Option:m}=o.Select,h=["Development","Productivity","Learning","Security","Data & Analytics","Integration","Testing","Documentation"],g=({visible:e,onClose:g,accessToken:p,onSuccess:x})=>{let[f]=i.Form.useForm(),[b,y]=(0,l.useState)(!1),[j,v]=(0,l.useState)(null),w=async e=>{if(!p)return void c.default.error("No access token available");if(!j)return void c.default.error("Please enter a valid GitHub URL");if(!(0,d.validatePluginName)(e.name))return void c.default.error("Skill name must be kebab-case (lowercase letters, numbers, and hyphens only)");if(e.version&&!(0,d.isValidSemanticVersion)(e.version))return void c.default.error("Version must be in semantic versioning format (e.g., 1.0.0)");if(e.authorEmail&&!(0,d.isValidEmail)(e.authorEmail))return void c.default.error("Invalid email format");if(e.homepage&&!(0,d.isValidUrl)(e.homepage))return void c.default.error("Invalid homepage URL format");y(!0);try{let t={name:e.name.trim(),source:j.parsed};e.version&&(t.version=e.version.trim()),e.description&&(t.description=e.description.trim()),(e.authorName||e.authorEmail)&&(t.author={},e.authorName&&(t.author.name=e.authorName.trim()),e.authorEmail&&(t.author.email=e.authorEmail.trim())),e.homepage&&(t.homepage=e.homepage.trim()),e.category&&(t.category=e.category),e.keywords&&(t.keywords=(0,d.parseKeywords)(e.keywords)),e.domain&&(t.domain=e.domain.trim()),e.namespace&&(t.namespace=e.namespace.trim()),await (0,s.registerClaudeCodePlugin)(p,t),c.default.success("Skill registered successfully"),f.resetFields(),v(null),x(),g()}catch(e){console.error("Error registering skill:",e),c.default.error("Failed to register skill")}finally{y(!1)}},_=()=>{f.resetFields(),v(null),g()};return(0,t.jsx)(r.Modal,{title:"Add New Skill",open:e,onCancel:_,footer:null,width:700,className:"top-8",children:(0,t.jsxs)(i.Form,{form:f,layout:"vertical",onFinish:w,className:"mt-4",children:[(0,t.jsx)(i.Form.Item,{label:"GitHub URL",name:"skillUrl",rules:[{required:!0,message:"Please enter a GitHub URL"}],tooltip:"Paste a GitHub URL — repo, folder, or file link. E.g. github.com/org/repo or github.com/org/repo/tree/main/my-skill",children:(0,t.jsx)(n.Input,{placeholder:"https://github.com/org/repo/tree/main/my-skill",className:"rounded-lg",onChange:e=>{let t=function(e){let t=e.trim().replace(/^https?:\/\//,"").replace(/\/+$/,"");if(!t.startsWith("github.com/"))return null;let l=t.slice(11).split("/");if(l.length<2)return null;let a=l[0],r=l[1].replace(/\.git$/,"");if(2===l.length||2===l.length&&r)return{parsed:{source:"github",repo:`${a}/${r}`},label:`GitHub repo — ${a}/${r}`,suggestedName:r};if(l.length>=5&&("tree"===l[2]||"blob"===l[2])){let e=l.slice(4),t=e[e.length-1];if(t&&t.includes(".")&&e.pop(),0===e.length)return{parsed:{source:"github",repo:`${a}/${r}`},label:`GitHub repo — ${a}/${r}`,suggestedName:r};let s=e.join("/");return{parsed:{source:"git-subdir",url:`https://github.com/${a}/${r}`,path:s},label:`GitHub subdir — ${a}/${r} @ ${s}`,suggestedName:e[e.length-1]}}return null}(e.target.value);v(t),t&&(f.getFieldValue("name")||f.setFieldsValue({name:t.suggestedName}))}})}),j&&(0,t.jsxs)("div",{className:"mb-4 px-3 py-2 bg-blue-50 border border-blue-200 rounded-lg text-sm text-blue-700",children:["Detected: ",j.label]}),(0,t.jsx)(i.Form.Item,{label:"Skill Name",name:"name",rules:[{required:!0,message:"Please enter skill name"},{pattern:/^[a-z0-9-]+$/,message:"Name must be kebab-case (lowercase, numbers, hyphens only)"}],tooltip:"Unique identifier in kebab-case format (e.g., my-skill)",children:(0,t.jsx)(n.Input,{placeholder:"my-skill",className:"rounded-lg"})}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)(i.Form.Item,{label:"Domain (Optional)",name:"domain",tooltip:"Top-level grouping in the Skill Hub (e.g., Productivity)",className:"flex-1",children:(0,t.jsx)(n.Input,{placeholder:"Productivity",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Namespace (Optional)",name:"namespace",tooltip:"Sub-grouping within domain (e.g., workflows)",className:"flex-1",children:(0,t.jsx)(n.Input,{placeholder:"workflows",className:"rounded-lg"})})]}),(0,t.jsx)(i.Form.Item,{label:"Description (Optional)",name:"description",tooltip:"Brief description of what the skill does",children:(0,t.jsx)(u,{rows:3,placeholder:"A skill that helps with...",maxLength:500,className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Category (Optional)",name:"category",tooltip:"Select a category or enter a custom one",children:(0,t.jsx)(o.Select,{placeholder:"Select or type a category",allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"rounded-lg",children:h.map(e=>(0,t.jsx)(m,{value:e,children:e},e))})}),(0,t.jsx)(i.Form.Item,{label:"Keywords (Optional)",name:"keywords",tooltip:"Comma-separated list of keywords for search",children:(0,t.jsx)(n.Input,{placeholder:"search, web, api",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Version (Optional)",name:"version",tooltip:"Semantic version (e.g., 1.0.0)",children:(0,t.jsx)(n.Input,{placeholder:"1.0.0",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Author Name (Optional)",name:"authorName",tooltip:"Name of the skill author or organization",children:(0,t.jsx)(n.Input,{placeholder:"Your Name or Organization",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Author Email (Optional)",name:"authorEmail",rules:[{type:"email",message:"Please enter a valid email"}],tooltip:"Contact email for the skill author",children:(0,t.jsx)(n.Input,{type:"email",placeholder:"author@example.com",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{className:"mb-0 mt-6",children:(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(a.Button,{variant:"secondary",onClick:_,disabled:b,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"submit",loading:b,children:b?"Adding...":"Add Skill"})]})})]})})};var p=e.i(166406),x=e.i(871943),f=e.i(360820),b=e.i(94629),y=e.i(68155),j=e.i(152990),v=e.i(682830),w=e.i(389083),_=e.i(269200),k=e.i(942232),N=e.i(977572),C=e.i(427612),S=e.i(64848),T=e.i(496020),I=e.i(592968),E=e.i(727749);let M=({pluginsList:e,isLoading:r,onDeleteClick:s,accessToken:i,isAdmin:n,onPluginClick:o})=>{let[c,u]=(0,l.useState)([{id:"created_at",desc:!0}]),m=[{header:"Skill Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,r=l.name||"";return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(I.Tooltip,{title:r,children:(0,t.jsx)(a.Button,{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 min-w-[150px] justify-start",onClick:()=>o(l.id),children:r})}),(0,t.jsx)(I.Tooltip,{title:"Copy Plugin ID",children:(0,t.jsx)(p.CopyOutlined,{onClick:e=>{var t;e.stopPropagation(),t=l.id,navigator.clipboard.writeText(t),E.default.success("Copied to clipboard!")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Version",accessorKey:"version",cell:({row:e})=>{let l=e.original.version||"N/A";return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:l})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original.description||"No description";return(0,t.jsx)(I.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"text-xs text-gray-600 block max-w-[300px] truncate",children:l})})}},{header:"Category",accessorKey:"category",cell:({row:e})=>{let l=e.original.category;if(!l)return(0,t.jsx)(w.Badge,{color:"gray",className:"text-xs font-normal",size:"xs",children:"Uncategorized"});let a=(0,d.getCategoryBadgeColor)(l);return(0,t.jsx)(w.Badge,{color:a,className:"text-xs font-normal",size:"xs",children:l})}},{header:"Public",accessorKey:"enabled",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(w.Badge,{color:l.enabled?"green":"gray",className:"text-xs font-normal",size:"xs",children:l.enabled?"Yes":"No"})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{var l;let a=e.original;return(0,t.jsx)(I.Tooltip,{title:a.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:(l=a.created_at)?new Date(l).toLocaleString():"-"})})}},...n?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(I.Tooltip,{title:"Delete skill",children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),s(l.name,l.name)},icon:y.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],h=(0,j.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:u,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(_.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(C.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(T.TableRow,{children:e.headers.map(e=>(0,t.jsx)(S.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(f.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(x.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(b.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(k.TableBody,{children:r?(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(N.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e&&e.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(T.TableRow,{className:"h-8 cursor-pointer hover:bg-gray-50",onClick:()=>o(e.original.id),children:e.getVisibleCells().map(e=>(0,t.jsx)(N.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(N.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No skills found. Add one to get started."})})})})})]})})})};var A=e.i(652272),D=e.i(708347);e.s(["default",0,({accessToken:e,userRole:i})=>{let[n,o]=(0,l.useState)([]),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),[h,p]=(0,l.useState)(!1),[x,f]=(0,l.useState)(null),[b,y]=(0,l.useState)(null),j=!!i&&(0,D.isAdminRole)(i),v=async()=>{if(e){m(!0);try{let t=await (0,s.getClaudeCodePluginsList)(e,!1);o(t.plugins)}catch(e){console.error("Error fetching skills:",e)}finally{m(!1)}}};(0,l.useEffect)(()=>{v()},[e]);let w=async()=>{if(x&&e){p(!0);try{await (0,s.deleteClaudeCodePlugin)(e,x.name),E.default.success(`Skill "${x.displayName}" deleted successfully`),v()}catch(e){console.error("Error deleting skill:",e),E.default.error("Failed to delete skill")}finally{p(!1),f(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[b?(0,t.jsx)(A.default,{skill:b,onBack:()=>y(null),isAdmin:j,accessToken:e,onPublishClick:v}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Skills"}),(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["Register Claude Code skills. Published skills appear in the Skill Hub for all users and are served via"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"/claude-code/marketplace.json"}),"."]}),(0,t.jsx)("div",{className:"mt-2 flex gap-2",children:(0,t.jsx)(a.Button,{onClick:()=>d(!0),disabled:!e||!j,children:"+ Add Skill"})})]}),(0,t.jsx)(M,{pluginsList:n,isLoading:u,onDeleteClick:(e,t)=>{f({name:e,displayName:t})},accessToken:e,isAdmin:j,onPluginClick:e=>{let t=n.find(t=>t.id===e);t&&y(t)}})]}),(0,t.jsx)(g,{visible:c,onClose:()=>d(!1),accessToken:e,onSuccess:v}),x&&(0,t.jsxs)(r.Modal,{title:"Delete Skill",open:null!==x,onOk:w,onCancel:()=>f(null),confirmLoading:h,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete skill:"," ",(0,t.jsx)("strong",{children:x.displayName}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],704308)},571303,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(115504);function r({className:e="",...r}){var s,i;let n=(0,l.useId)();return s=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===n),l=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==n);t&&l&&(t.currentTime=l.currentTime)},i=[n],(0,l.useLayoutEffect)(s,i),(0,t.jsxs)("svg",{"data-spinner-id":n,className:(0,a.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...r,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>r],571303)},936578,e=>{"use strict";var t=e.i(843476),l=e.i(115504),a=e.i(571303);function r(){return(0,t.jsxs)("div",{className:(0,l.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(a.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>r])},902739,e=>{"use strict";var t=e.i(843476),l=e.i(111672),a=e.i(764205),r=e.i(135214),s=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:i,sidebarCollapsed:n})=>{let{accessToken:o}=(0,r.default)(),[c,d]=(0,s.useState)(null),[u,m]=(0,s.useState)(!1),[h,g]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,b]=(0,s.useState)(!1),[y,j]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(!o)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,a.getUISettings)(o);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),d(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&m(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&x(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&b(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&j(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[o]),(0,t.jsx)(l.default,{setPage:e,defaultSelectedKey:i,collapsed:n,enabledPagesInternalUsers:c,enableProjectsUI:u,disableAgentsForInternalUsers:h,allowAgentsForTeamAdmins:p,disableVectorStoresForInternalUsers:f,allowVectorStoresForTeamAdmins:y})}])},208075,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),r=e.i(629569),s=e.i(599724),i=e.i(779241),n=e.i(994388),o=e.i(275144),c=e.i(764205),d=e.i(727749);e.s(["default",0,({userID:e,userRole:u,accessToken:m})=>{let{logoUrl:h,setLogoUrl:g,faviconUrl:p,setFaviconUrl:x}=(0,o.useTheme)(),[f,b]=(0,l.useState)(""),[y,j]=(0,l.useState)(""),[v,w]=(0,l.useState)(!1);(0,l.useEffect)(()=>{m&&_()},[m]);let _=async()=>{try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",l=await fetch(t,{method:"GET",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();b(e.values?.logo_url||""),j(e.values?.favicon_url||""),g(e.values?.logo_url||null),x(e.values?.favicon_url||null)}}catch(e){console.error("Error fetching theme settings:",e)}},k=async()=>{w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:f||null,favicon_url:y||null})})).ok)d.default.success("Theme settings updated successfully!"),g(f||null),x(y||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating theme settings:",e),d.default.fromBackend("Failed to update theme settings")}finally{w(!1)}},N=async()=>{b(""),j(""),g(null),x(null),w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:null,favicon_url:null})})).ok)d.default.success("Theme settings reset to default!");else throw Error("Failed to reset")}catch(e){console.error("Error resetting theme settings:",e),d.default.fromBackend("Failed to reset theme settings")}finally{w(!1)}};return m?(0,t.jsxs)("div",{className:"w-full mx-auto max-w-4xl px-6 py-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(r.Title,{className:"text-2xl font-bold mb-2",children:"UI Theme Customization"}),(0,t.jsx)(s.Text,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo and favicon."})]}),(0,t.jsx)(a.Card,{className:"shadow-sm p-6",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,t.jsx)(i.TextInput,{placeholder:"https://example.com/logo.png",value:f,onValueChange:e=>{b(e),g(e||null)},className:"w-full"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty for default"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Favicon URL"}),(0,t.jsx)(i.TextInput,{placeholder:"https://example.com/favicon.ico",value:y,onValueChange:e=>{j(e),x(e||null)},className:"w-full"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom favicon (.ico, .png, or .svg) or leave empty for default"})]}),(0,t.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,t.jsx)(n.Button,{onClick:k,loading:v,disabled:v,color:"indigo",children:"Save Changes"}),(0,t.jsx)(n.Button,{onClick:N,loading:v,disabled:v,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}])},662316,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(464571),r=e.i(166406),s=e.i(629569),i=e.i(764205),n=e.i(727749);e.s(["default",0,({accessToken:e})=>{let[o,c]=(0,l.useState)(`{ + "model": "openai/gpt-4o", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "Explain quantum computing in simple terms" + } + ], + "temperature": 0.7, + "max_tokens": 500, + "stream": true +}`),[d,u]=(0,l.useState)(""),[m,h]=(0,l.useState)(!1),g=async()=>{h(!0);try{let r;try{r=JSON.parse(o)}catch(e){n.default.fromBackend("Invalid JSON in request body"),h(!1);return}let s={call_type:"completion",request_body:r};if(!e){n.default.fromBackend("No access token found"),h(!1);return}let c=await (0,i.transformRequestCall)(e,s);if(c.raw_request_api_base&&c.raw_request_body){var t,l,a;let e,r,s=(t=c.raw_request_api_base,l=c.raw_request_body,a=c.raw_request_headers||{},e=JSON.stringify(l,null,2).split("\n").map(e=>` ${e}`).join("\n"),r=Object.entries(a).map(([e,t])=>`-H '${e}: ${t}'`).join(" \\\n "),`curl -X POST \\ + ${t} \\ + ${r?`${r} \\ + `:""}-H 'Content-Type: application/json' \\ + -d '{ +${e} + }'`);u(s),n.default.success("Request transformed successfully")}else{let e="string"==typeof c?c:JSON.stringify(c);u(e),n.default.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),n.default.fromBackend("Failed to transform request")}finally{h(!1)}};return(0,t.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,t.jsx)(s.Title,{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:o,onChange:e=>c(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),g())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,t.jsxs)(a.Button,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:g,loading:m,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:d||`curl -X POST \\ + https://api.openai.com/v1/chat/completions \\ + -H 'Authorization: Bearer sk-xxx' \\ + -H 'Content-Type: application/json' \\ + -d '{ + "model": "gpt-4", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + } + ], + "temperature": 0.7 + }'`}),(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(r.CopyOutlined,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(d||""),n.default.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"}),"."]})})]})}])},673709,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(678784);let r=(0,e.i(475254).default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);var s=e.i(650056);let i={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};e.s(["default",0,({code:e,language:n})=>{let[o,c]=(0,l.useState)(!1);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!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:o?(0,t.jsx)(a.CheckIcon,{size:16}):(0,t.jsx)(r,{size:16})}),(0,t.jsx)(s.Prism,{language:n,style:i,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],673709)},778917,e=>{"use strict";var t=e.i(546467);e.s(["ExternalLink",()=>t.default])},646050,e=>{"use strict";var t=e.i(843476),l=e.i(994388),a=e.i(304967),r=e.i(197647),s=e.i(653824),i=e.i(269200),n=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),m=e.i(881073),h=e.i(404206),g=e.i(723731),p=e.i(599724),x=e.i(271645),f=e.i(650056),b=e.i(127952),y=e.i(902555),j=e.i(727749),v=e.i(266027),w=e.i(954616),_=e.i(912598),k=e.i(243652),N=e.i(764205),C=e.i(135214);let S=(0,k.createQueryKeys)("budgets");var T=e.i(779241),I=e.i(677667),E=e.i(898667),M=e.i(130643),A=e.i(464571),D=e.i(212931),R=e.i(808613),B=e.i(28651),P=e.i(199133);let O=({isModalVisible:e,setIsModalVisible:l})=>{let[a]=R.Form.useForm(),r=(()=>{let{accessToken:e}=(0,C.default)(),t=(0,_.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,N.budgetCreateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),s=async e=>{try{j.default.info("Making API Call"),await r.mutateAsync(e),j.default.success("Budget Created"),a.resetFields(),l(!1)}catch(e){console.error("Error creating the budget:",e),j.default.fromBackend(`Error creating the budget: ${e}`)}};return(0,t.jsx)(D.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),a.resetFields()},onCancel:()=>{l(!1),a.resetFields()},children:(0,t.jsxs)(R.Form,{form:a,onFinish:s,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R.Form.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)(T.TextInput,{placeholder:""})}),(0,t.jsx)(R.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(R.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(I.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(M.AccordionBody,{children:[(0,t.jsx)(R.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(B.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(R.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(P.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(P.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(P.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(P.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(A.Button,{htmlType:"submit",children:"Create Budget"})})]})})},F=({isModalVisible:e,setIsModalVisible:l,existingBudget:a})=>{let[r]=R.Form.useForm(),s=(()=>{let{accessToken:e}=(0,C.default)(),t=(0,_.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,N.budgetUpdateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})();(0,x.useEffect)(()=>{r.setFieldsValue(a)},[a,r]);let i=async e=>{try{j.default.info("Making API Call"),await s.mutateAsync(e),j.default.success("Budget Updated"),r.resetFields(),l(!1)}catch(e){console.error("Error updating the budget:",e),j.default.fromBackend(`Error updating the budget: ${e}`)}};return(0,t.jsx)(D.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),r.resetFields()},onCancel:()=>{l(!1),r.resetFields()},children:(0,t.jsxs)(R.Form,{form:r,onFinish:i,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:a,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R.Form.Item,{label:"Budget ID",name:"budget_id",help:"Budget ID cannot be changed after creation",children:(0,t.jsx)(T.TextInput,{placeholder:"",disabled:!0})}),(0,t.jsx)(R.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(R.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(I.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(M.AccordionBody,{children:[(0,t.jsx)(R.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(B.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(R.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(P.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(P.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(P.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(P.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(A.Button,{htmlType:"submit",children:"Save"})})]})})},L=` +curl -X POST --location '/end_user/new' \\ + +-H 'Authorization: Bearer ' \\ + +-H 'Content-Type: application/json' \\ + +-d '{"user_id": "my-customer-id', "budget_id": ""}' # 👈 KEY CHANGE + +`,z=` +curl -X POST --location '/chat/completions' \\ + +-H 'Authorization: Bearer ' \\ + +-H 'Content-Type: application/json' \\ + +-d '{ + "model": "gpt-3.5-turbo', + "messages":[{"role": "user", "content": "Hey, how's it going?"}], + "user": "my-customer-id" +}' # 👈 KEY CHANGE + +`,H=`from openai import OpenAI +client = OpenAI( + base_url="", + api_key="" +) + +completion = client.chat.completions.create( + model="gpt-3.5-turbo", + messages=[ + {"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Hello!"} + ], + user="my-customer-id" +) + +print(completion.choices[0].message)`;e.s(["default",0,({accessToken:e})=>{let[k,T]=(0,x.useState)(!1),[I,E]=(0,x.useState)(!1),[M,A]=(0,x.useState)(null),[D,R]=(0,x.useState)(!1),{data:B=[]}=(()=>{let{accessToken:e}=(0,C.default)();return(0,v.useQuery)({queryKey:S.list({}),queryFn:async()=>(await (0,N.getBudgetList)(e)??[]).filter(e=>null!=e),enabled:!!e})})(),P=(()=>{let{accessToken:e}=(0,C.default)(),t=(0,_.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,N.budgetDeleteCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),U=async t=>{null!=e&&(A(t),E(!0))},V=async()=>{if(M&&null!=e)try{await P.mutateAsync(M.budget_id),j.default.success("Budget deleted.")}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{R(!1),A(null)}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(l.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>T(!0),children:"+ Create Budget"}),(0,t.jsxs)(s.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Budgets"}),(0,t.jsx)(r.Tab,{children:"Examples"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(O,{isModalVisible:k,setIsModalVisible:T}),M&&(0,t.jsx)(F,{isModalVisible:I,setIsModalVisible:E,existingBudget:M}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(p.Text,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(i.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"Budget ID"}),(0,t.jsx)(d.TableHeaderCell,{children:"Max Budget"}),(0,t.jsx)(d.TableHeaderCell,{children:"TPM"}),(0,t.jsx)(d.TableHeaderCell,{children:"RPM"})]})}),(0,t.jsx)(n.TableBody,{children:B.slice().sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()).map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e.budget_id}),(0,t.jsx)(o.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(y.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>U(e),dataTestId:"edit-budget-button"}),(0,t.jsx)(y.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{A(e),R(!0)},dataTestId:"delete-budget-button"})]},e.budget_id))})]})]}),(0,t.jsx)(b.default,{isOpen:D,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:M?.budget_id,code:!0},{label:"Max Budget",value:M?.max_budget},{label:"TPM",value:M?.tpm_limit},{label:"RPM",value:M?.rpm_limit}],onCancel:()=>{R(!1)},onOk:V,confirmLoading:P.isPending})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(p.Text,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(s.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Assign Budget to Customer"}),(0,t.jsx)(r.Tab,{children:"Test it (Curl)"}),(0,t.jsx)(r.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:L})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:z})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"python",children:H})})]})]})]})})]})]})]})}],646050)},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,t)=>(e[t.team_id]=t.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,t)=>{let l=t.find(t=>t.team_id===e);return l?l.team_alias:null}])},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["GlobalOutlined",0,s],160818)},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,r,s)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,r?.organization_id||null,l):await (0,t.teamListCall)(e,r?.organization_id||null),console.log(`givenTeams: ${i}`),s(i)};e.s(["fetchTeams",0,l])},747871,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(269200),r=e.i(942232),s=e.i(977572),i=e.i(427612),n=e.i(64848),o=e.i(496020),c=e.i(304967),d=e.i(994388),u=e.i(599724),m=e.i(389083),h=e.i(764205),g=e.i(727749);e.s(["default",0,({accessToken:e,userID:p})=>{let[x,f]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{if(e&&p)try{let t=await (0,h.availableTeamListCall)(e);f(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,p]);let b=async t=>{if(e&&p)try{await (0,h.teamMemberAddCall)(e,t,{user_id:p,role:"user"}),g.default.success("Successfully joined team"),f(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),g.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(i.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(n.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(n.TableHeaderCell,{children:"Description"}),(0,t.jsx)(n.TableHeaderCell,{children:"Members"}),(0,t.jsx)(n.TableHeaderCell,{children:"Models"}),(0,t.jsx)(n.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(r.TableBody,{children:[x.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Text,{children:e.team_alias})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Text,{children:e.description||"No description available"})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsxs)(u.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,l)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(u.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},l)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(u.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Button,{size:"xs",variant:"secondary",onClick:()=>b(e.team_id),children:"Join Team"})})]},e.team_id)),0===x.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(s.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(u.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])},468133,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(175712),r=e.i(464571),s=e.i(28651),i=e.i(898586),n=e.i(482725),o=e.i(199133),c=e.i(262218),d=e.i(621192),u=e.i(178654),m=e.i(751904),h=e.i(987432),g=e.i(764205),p=e.i(860585),x=e.i(355619),f=e.i(727749),b=e.i(162386);let{Title:y,Text:j}=i.Typography,v=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],w=({label:e,description:l,isEditing:a,viewContent:r,editContent:s})=>(0,t.jsxs)(d.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(u.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:l})]}),(0,t.jsx)(u.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:a?s:r})})]}),_=()=>(0,t.jsx)(j,{className:"text-gray-400 italic",children:"Not set"}),k=(e,l)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:l?l(e):e},e))}):(0,t.jsx)(_,{}),N={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[i,d]=(0,l.useState)(!0),[u,C]=(0,l.useState)(N),[S,T]=(0,l.useState)(!1),[I,E]=(0,l.useState)(N),[M,A]=(0,l.useState)(!1),[D,R]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(!e)return d(!1);try{let t=await (0,g.getDefaultTeamSettings)(e),l={...N,...t.values||{}};C(l),E(l)}catch(e){console.error("Error fetching team SSO settings:",e),R(!0),f.default.fromBackend("Failed to fetch team settings")}finally{d(!1)}})()},[e]);let B=async()=>{if(e){A(!0);try{let t=await (0,g.updateDefaultTeamSettings)(e,I),l={...N,...t.settings||{}};C(l),E(l),T(!1),f.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),f.default.fromBackend("Failed to update team settings")}finally{A(!1)}}},P=(e,t)=>{E(l=>({...l,[e]:t}))};return i?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(n.Spin,{size:"large"})}):D?(0,t.jsx)(a.Card,{children:(0,t.jsx)(j,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(a.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(y,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(j,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:S?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(r.Button,{onClick:()=>{T(!1),E(u)},disabled:M,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"primary",onClick:B,loading:M,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(r.Button,{onClick:()=>T(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:S,viewContent:null!=u.max_budget?(0,t.jsxs)(j,{children:["$",Number(u.max_budget).toLocaleString()]}):(0,t.jsx)(_,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:I.max_budget,onChange:e=>P("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(w,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:S,viewContent:u.budget_duration?(0,t.jsx)(j,{children:(0,p.getBudgetDurationLabel)(u.budget_duration)}):(0,t.jsx)(_,{}),editContent:(0,t.jsx)(p.default,{value:I.budget_duration||null,onChange:e=>P("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(w,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:S,viewContent:null!=u.tpm_limit?(0,t.jsx)(j,{children:u.tpm_limit.toLocaleString()}):(0,t.jsx)(_,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:I.tpm_limit,onChange:e=>P("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(w,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:S,viewContent:null!=u.rpm_limit?(0,t.jsx)(j,{children:u.rpm_limit.toLocaleString()}):(0,t.jsx)(_,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:I.rpm_limit,onChange:e=>P("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Models",description:"Default list of models that new teams can access.",isEditing:S,viewContent:k(u.models,x.getModelDisplayName),editContent:(0,t.jsx)(b.ModelSelect,{value:I.models||[],onChange:e=>P("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(w,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:S,viewContent:k(u.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:I.team_member_permissions||[],onChange:e=>P("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:l,onClose:a})=>(0,t.jsx)(c.Tag,{color:"blue",closable:l,onClose:a,className:"mr-1 mt-1 mb-1",children:e}),children:v.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},735042,e=>{"use strict";e.i(247167);var t=e.i(843476),l=e.i(584935),a=e.i(290571),r=e.i(271645),s=e.i(95779),i=e.i(444755),n=e.i(673706);let o=(0,n.makeClassName)("BarList");function c(e,t){let{data:l=[],color:c,valueFormatter:d=n.defaultValueFormatter,showAnimation:u=!1,onValueChange:m,sortOrder:h="descending",className:g}=e,p=(0,a.__rest)(e,["data","color","valueFormatter","showAnimation","onValueChange","sortOrder","className"]),x=m?"button":"div",f=r.default.useMemo(()=>"none"===h?l:[...l].sort((e,t)=>"ascending"===h?e.value-t.value:t.value-e.value),[l,h]),b=r.default.useMemo(()=>{let e=Math.max(...f.map(e=>e.value),0);return f.map(t=>0===t.value?0:Math.max(t.value/e*100,2))},[f]);return r.default.createElement("div",Object.assign({ref:t,className:(0,i.tremorTwMerge)(o("root"),"flex justify-between space-x-6",g),"aria-sort":h},p),r.default.createElement("div",{className:(0,i.tremorTwMerge)(o("bars"),"relative w-full space-y-1.5")},f.map((e,t)=>{var l,a,d;let h=e.icon;return r.default.createElement(x,{key:null!=(l=e.key)?l:t,onClick:()=>{null==m||m(e)},className:(0,i.tremorTwMerge)(o("bar"),"group w-full flex items-center rounded-tremor-small",m?["cursor-pointer","hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-subtle/40"]:"")},r.default.createElement("div",{className:(0,i.tremorTwMerge)("flex items-center rounded transition-all bg-opacity-40","h-8",e.color||c?[(0,n.getColorClassNames)(null!=(a=e.color)?a:c,s.colorPalette.background).bgColor,m?"group-hover:bg-opacity-30":""]:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle/60",!m||e.color||c?"":"group-hover:bg-tremor-brand-subtle/30 group-hover:dark:bg-dark-tremor-brand-subtle/70",t===f.length-1?"mb-0":"",u?"duration-500":""),style:{width:`${b[t]}%`,transition:u?"all 1s":""}},r.default.createElement("div",{className:(0,i.tremorTwMerge)("absolute left-2 pr-4 flex max-w-full")},h?r.default.createElement(h,{className:(0,i.tremorTwMerge)(o("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?r.default.createElement("a",{href:e.href,target:null!=(d=e.target)?d:"_blank",rel:"noreferrer",className:(0,i.tremorTwMerge)(o("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default",m?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:e=>e.stopPropagation()},e.name):r.default.createElement("p",{className:(0,i.tremorTwMerge)(o("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name))))})),r.default.createElement("div",{className:o("labels")},f.map((e,t)=>{var l;return r.default.createElement("div",{key:null!=(l=e.key)?l:t,className:(0,i.tremorTwMerge)(o("labelWrapper"),"flex justify-end items-center","h-8",t===f.length-1?"mb-0":"mb-1.5")},r.default.createElement("p",{className:(0,i.tremorTwMerge)(o("labelText"),"whitespace-nowrap leading-none truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},d(e.value)))})))}c.displayName="BarList";let d=r.default.forwardRef(c);var u=e.i(304967),m=e.i(629569),h=e.i(269200),g=e.i(427612),p=e.i(64848),x=e.i(496020),f=e.i(977572),b=e.i(942232),y=e.i(37091),j=e.i(617802),v=e.i(144267),w=e.i(350967),_=e.i(309426),k=e.i(599724),N=e.i(404206),C=e.i(723731),S=e.i(653824),T=e.i(881073),I=e.i(197647),E=e.i(206929),M=e.i(35983),A=e.i(413990),D=e.i(476961),R=e.i(994388),B=e.i(621642),P=e.i(25080),O=e.i(764205),F=e.i(1023),L=e.i(500330);console.log("process.env.NODE_ENV","production");let z=e=>null!==e&&("Admin"===e||"Admin Viewer"===e);e.s(["default",0,({accessToken:e,token:a,userRole:s,userID:i,keys:n,premiumUser:o})=>{let c=new Date,[H,U]=(0,r.useState)([]),[V,$]=(0,r.useState)([]),[q,K]=(0,r.useState)([]),[G,W]=(0,r.useState)([]),[J,Y]=(0,r.useState)([]),[Q,X]=(0,r.useState)([]),[Z,ee]=(0,r.useState)([]),[et,el]=(0,r.useState)([]),[ea,er]=(0,r.useState)([]),[es,ei]=(0,r.useState)([]),[en,eo]=(0,r.useState)({}),[ec,ed]=(0,r.useState)([]),[eu,em]=(0,r.useState)(""),[eh,eg]=(0,r.useState)(["all-tags"]),[ep,ex]=(0,r.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[ef,eb]=(0,r.useState)(null),[ey,ej]=(0,r.useState)(0),ev=new Date(c.getFullYear(),c.getMonth(),1),ew=new Date(c.getFullYear(),c.getMonth()+1,0),e_=eI(ev),ek=eI(ew);function eN(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}console.log("keys in usage",n),console.log("premium user in usage",o);let eC=async()=>{if(e)try{let t=await (0,O.getProxyUISettings)(e);return console.log("usage tab: proxy_settings",t),t}catch(e){console.error("Error fetching proxy settings:",e)}};(0,r.useEffect)(()=>{eT(ep.from,ep.to)},[ep,eh]);let eS=async(t,l,a)=>{if(!t||!l||!e)return;console.log("uiSelectedKey",a);let r=await (0,O.adminTopEndUsersCall)(e,a,t.toISOString(),l.toISOString());console.log("End user data updated successfully",r),W(r)},eT=async(t,l)=>{if(!t||!l||!e)return;let a=await eC();a?.DISABLE_EXPENSIVE_DB_QUERIES||(X((await (0,O.tagsSpendLogsCall)(e,t.toISOString(),l.toISOString(),0===eh.length?void 0:eh)).spend_per_tag),console.log("Tag spend data updated successfully"))};function eI(e){let t=e.getFullYear(),l=e.getMonth()+1,a=e.getDate();return`${t}-${l<10?"0"+l:l}-${a<10?"0"+a:a}`}console.log(`Start date is ${e_}`),console.log(`End date is ${ek}`);let eE=async(e,t,l)=>{try{let l=await e();t(l)}catch(e){console.error(l,e)}},eM=(e,t,l,a)=>{let r=[],s=new Date(t),i=new Map(e.map(e=>{let t=(e=>{if(e.includes("-"))return e;{let[t,l]=e.split(" ");return new Date(new Date().getFullYear(),new Date(`${t} 01 2024`).getMonth(),parseInt(l)).toISOString().split("T")[0]}})(e.date);return[t,{...e,date:t}]}));for(;s<=l;){let e=s.toISOString().split("T")[0];if(i.has(e))r.push(i.get(e));else{let t={date:e,api_requests:0,total_tokens:0};a.forEach(e=>{t[e]||(t[e]=0)}),r.push(t)}s.setDate(s.getDate()+1)}return r},eA=async()=>{if(e)try{let t=await (0,O.adminSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=eM(t,a,r,[]),i=Number(s.reduce((e,t)=>e+(t.spend||0),0).toFixed(2));ej(i),U(s)}catch(e){console.error("Error fetching overall spend:",e)}},eD=async()=>{e&&await eE(async()=>(await (0,O.adminTopKeysCall)(e)).map(e=>({key:e.api_key.substring(0,10),api_key:e.api_key,key_alias:e.key_alias,spend:Number(e.total_spend.toFixed(2))})),$,"Error fetching top keys")},eR=async()=>{e&&await eE(async()=>(await (0,O.adminTopModelsCall)(e)).map(e=>({key:e.model,spend:(0,L.formatNumberWithCommas)(e.total_spend,2)})),K,"Error fetching top models")},eB=async()=>{e&&await eE(async()=>{let t=await (0,O.teamSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0);return Y(eM(t.daily_spend,a,r,t.teams)),el(t.teams),t.total_spend_per_team.map(e=>({name:e.team_id||"",value:(0,L.formatNumberWithCommas)(e.total_spend||0,2)}))},er,"Error fetching team spend")},eP=async()=>{if(e)try{let t=await (0,O.adminGlobalActivity)(e,e_,ek),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=eM(t.daily_data||[],a,r,["api_requests","total_tokens"]);eo({...t,daily_data:s})}catch(e){console.error("Error fetching global activity:",e)}},eO=async()=>{if(e)try{let t=await (0,O.adminGlobalActivityPerModel)(e,e_,ek),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=t.map(e=>({...e,daily_data:eM(e.daily_data||[],a,r,["api_requests","total_tokens"])}));ed(s)}catch(e){console.error("Error fetching global activity per model:",e)}};return((0,r.useEffect)(()=>{(async()=>{if(e&&a&&s&&i){let t=await eC();!(t&&(eb(t),t?.DISABLE_EXPENSIVE_DB_QUERIES))&&(console.log("fetching data - valiue of proxySettings",ef),eA(),eE(()=>e&&a?(0,O.adminspendByProvider)(e,a,e_,ek):Promise.reject("No access token or token"),ei,"Error fetching provider spend"),eD(),eR(),eP(),eO(),z(s)&&(eB(),e&&eE(async()=>(await (0,O.allTagNamesCall)(e)).tag_names,ee,"Error fetching tag names"),e&&eE(()=>(0,O.tagsSpendLogsCall)(e,ep.from?.toISOString(),ep.to?.toISOString(),void 0),e=>X(e.spend_per_tag),"Error fetching top tags"),e&&eE(()=>(0,O.adminTopEndUsersCall)(e,null,void 0,void 0),W,"Error fetching top end users")))}})()},[e,a,s,i,e_,ek]),ef?.DISABLE_EXPENSIVE_DB_QUERIES)?(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Database Query Limit Reached"}),(0,t.jsxs)(k.Text,{className:"mt-4",children:["SpendLogs in DB has ",ef.NUM_SPEND_LOGS_ROWS," rows.",(0,t.jsx)("br",{}),"Please follow our guide to view usage when SpendLogs has more than 1M rows."]}),(0,t.jsx)(R.Button,{className:"mt-4",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/spending_monitoring",target:"_blank",children:"View Usage Guide"})})]})}):(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{className:"mt-2",children:[(0,t.jsx)(I.Tab,{children:"All Up"}),z(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.Tab,{children:"Team Based Usage"}),(0,t.jsx)(I.Tab,{children:"Customer Usage"}),(0,t.jsx)(I.Tab,{children:"Tag Based Usage"})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{})})]}),(0,t.jsxs)(C.TabPanels,{children:[(0,t.jsx)(N.TabPanel,{children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(I.Tab,{children:"Cost"}),(0,t.jsx)(I.Tab,{children:"Activity"})]}),(0,t.jsxs)(C.TabPanels,{children:[(0,t.jsx)(N.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[100vh] w-full",children:[(0,t.jsxs)(_.Col,{numColSpan:2,children:[(0,t.jsxs)(k.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content mb-2 mt-2 text-lg",children:["Project Spend ",new Date().toLocaleString("default",{month:"long"})," 1 -"," ",new Date(new Date().getFullYear(),new Date().getMonth()+1,0).getDate()]}),(0,t.jsx)(j.default,{userSpend:ey,selectedTeam:null,userMaxBudget:null})]}),(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Monthly Spend"}),(0,t.jsx)(l.BarChart,{data:H,index:"date",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$ ${(0,L.formatNumberWithCommas)(e,2)}`,yAxisWidth:100,tickGap:5})]})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(F.default,{topKeys:V,teams:null,topKeysLimit:5,setTopKeysLimit:()=>{}})]})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Models"}),(0,t.jsx)(l.BarChart,{className:"mt-4 h-40",data:q,index:"key",categories:["spend"],colors:["cyan"],yAxisWidth:200,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>`$${(0,L.formatNumberWithCommas)(e,2)}`})]})}),(0,t.jsx)(_.Col,{numColSpan:1}),(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Spend by Provider"}),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsx)(A.DonutChart,{className:"mt-4 h-40",variant:"pie",data:es,index:"provider",category:"spend",colors:["cyan"],valueFormatter:e=>`$${(0,L.formatNumberWithCommas)(e,2)}`})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend"})]})}),(0,t.jsx)(b.TableBody,{children:es.map(e=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.provider}),(0,t.jsx)(f.TableCell,{children:1e-5>parseFloat(e.spend.toFixed(2))?"less than 0.00":(0,L.formatNumberWithCommas)(e.spend,2)})]},e.provider))})]})})]})})]})})]})}),(0,t.jsx)(N.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:1,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"All Up"}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",eN(en.sum_api_requests)]}),(0,t.jsx)(D.AreaChart,{className:"h-40",data:en.daily_data,valueFormatter:eN,index:"date",colors:["cyan"],categories:["api_requests"],onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",eN(en.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:en.daily_data,valueFormatter:eN,index:"date",colors:["cyan"],categories:["total_tokens"],onValueChange:e=>console.log(e)})]})]})]}),(0,t.jsx)(t.Fragment,{children:ec.map((e,a)=>(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:e.model}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",eN(e.sum_api_requests)]}),(0,t.jsx)(D.AreaChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["api_requests"],valueFormatter:eN,onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",eN(e.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["total_tokens"],valueFormatter:eN,onValueChange:e=>console.log(e)})]})]})]},a))})]})})]})]})}),(0,t.jsx)(N.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(_.Col,{numColSpan:2,children:[(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Total Spend Per Team"}),(0,t.jsx)(d,{data:ea})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Daily Spend Per Team"}),(0,t.jsx)(l.BarChart,{className:"h-72",data:J,showLegend:!0,index:"date",categories:et,yAxisWidth:80,stack:!0})]})]}),(0,t.jsx)(_.Col,{numColSpan:2})]})}),(0,t.jsxs)(N.TabPanel,{children:[(0,t.jsxs)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:["Customers of your LLM API calls. Tracked when a `user` param is passed in your LLM calls"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/users",target:"_blank",children:"docs here"})]}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{children:(0,t.jsx)(v.default,{value:ep,onValueChange:e=>{ex(e),eS(e.from,e.to,null)}})}),(0,t.jsxs)(_.Col,{children:[(0,t.jsx)(k.Text,{children:"Select Key"}),(0,t.jsxs)(E.Select,{defaultValue:"all-keys",children:[(0,t.jsx)(M.SelectItem,{value:"all-keys",onClick:()=>{eS(ep.from,ep.to,null)},children:"All Keys"},"all-keys"),n?.map((e,l)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,t.jsx)(M.SelectItem,{value:String(l),onClick:()=>{eS(ep.from,ep.to,e.token)},children:e.key_alias},l):null)]})]})]}),(0,t.jsx)(u.Card,{className:"mt-4",children:(0,t.jsxs)(h.Table,{className:"max-h-[70vh] min-h-[500px]",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Customer"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(p.TableHeaderCell,{children:"Total Events"})]})}),(0,t.jsx)(b.TableBody,{children:G?.map((e,l)=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.end_user}),(0,t.jsx)(f.TableCell,{children:(0,L.formatNumberWithCommas)(e.total_spend,2)}),(0,t.jsx)(f.TableCell,{children:e.total_count})]},l))})]})})]}),(0,t.jsxs)(N.TabPanel,{children:[(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsx)(v.default,{className:"mb-4",value:ep,onValueChange:e=>{ex(e),eT(e.from,e.to)}})}),(0,t.jsx)(_.Col,{children:o?(0,t.jsx)("div",{children:(0,t.jsxs)(B.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(P.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsx)(P.MultiSelectItem,{value:String(e),children:e},e))]})}):(0,t.jsx)("div",{children:(0,t.jsxs)(B.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(P.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsxs)(M.SelectItem,{value:String(e),disabled:!0,children:["✨ ",e," (Enterprise only Feature)"]},e))]})})})]}),(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full mb-4",children:[(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Spend Per Tag"}),(0,t.jsxs)(k.Text,{children:["Get Started by Tracking cost per tag"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/cost_tracking",target:"_blank",children:"here"})]}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Q,index:"name",categories:["spend"],colors:["cyan"]})]})}),(0,t.jsx)(_.Col,{numColSpan:2})]})]})]})]})})}],735042)},345244,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(752978),r=e.i(994388),s=e.i(309426),i=e.i(599724),n=e.i(350967),o=e.i(278587),c=e.i(304967),d=e.i(629569),u=e.i(389083),m=e.i(677667),h=e.i(898667),g=e.i(130643),p=e.i(808613),x=e.i(311451),f=e.i(199133),b=e.i(592968),y=e.i(827252),j=e.i(702597),v=e.i(355619),w=e.i(764205),_=e.i(727749),k=e.i(435451),N=e.i(860585),C=e.i(500330),S=e.i(678784),T=e.i(118366),I=e.i(464571);let E=({tagId:e,onClose:a,accessToken:s,is_admin:n,editTag:o})=>{let[E]=p.Form.useForm(),[M,A]=(0,l.useState)(null),[D,R]=(0,l.useState)(o),[B,P]=(0,l.useState)([]),[O,F]=(0,l.useState)({}),L=async(e,t)=>{await (0,C.copyToClipboard)(e)&&(F(e=>({...e,[t]:!0})),setTimeout(()=>{F(e=>({...e,[t]:!1}))},2e3))},z=async()=>{if(s)try{let t=(await (0,w.tagInfoCall)(s,[e]))[e];t&&(A(t),o&&E.setFieldsValue({name:t.name,description:t.description,models:t.models,max_budget:t.litellm_budget_table?.max_budget,budget_duration:t.litellm_budget_table?.budget_duration}))}catch(e){console.error("Error fetching tag details:",e),_.default.fromBackend("Error fetching tag details: "+e)}};(0,l.useEffect)(()=>{z()},[e,s]),(0,l.useEffect)(()=>{s&&(0,j.fetchUserModels)("dummy-user","Admin",s,P)},[s]);let H=async e=>{if(s)try{await (0,w.tagUpdateCall)(s,{name:e.name,description:e.description,models:e.models,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,budget_duration:e.budget_duration}),_.default.success("Tag updated successfully"),R(!1),z()}catch(e){console.error("Error updating tag:",e),_.default.fromBackend("Error updating tag: "+e)}};return M?(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(r.Button,{onClick:a,className:"mb-4",children:"← Back to Tags"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Tag Name:"}),(0,t.jsx)("span",{className:"font-mono px-2 py-1 bg-gray-100 rounded text-sm border border-gray-200",children:M.name}),(0,t.jsx)(I.Button,{type:"text",size:"small",icon:O["tag-name"]?(0,t.jsx)(S.CheckIcon,{size:12}):(0,t.jsx)(T.CopyIcon,{size:12}),onClick:()=>L(M.name,"tag-name"),className:`transition-all duration-200 ${O["tag-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsx)(i.Text,{className:"text-gray-500",children:M.description||"No description"})]}),n&&!D&&(0,t.jsx)(r.Button,{onClick:()=>R(!0),children:"Edit Tag"})]}),D?(0,t.jsx)(c.Card,{children:(0,t.jsxs)(p.Form,{form:E,onFinish:H,layout:"vertical",initialValues:M,children:[(0,t.jsx)(p.Form.Item,{label:"Tag Name",name:"name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(x.Input,{className:"rounded-md border-gray-300"})}),(0,t.jsx)(p.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(x.Input.TextArea,{rows:4})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process this type of data",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:B.map(e=>(0,t.jsx)(f.Select.Option,{value:e,children:(0,v.getModelDisplayName)(e)},e))})}),(0,t.jsxs)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(k.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(N.default,{onChange:e=>E.setFieldValue("budget_duration",e)})}),(0,t.jsx)("div",{className:"mt-4 p-3 bg-gray-50 rounded-md border border-gray-200",children:(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["TPM/RPM limits for tags are not currently supported. If you need this feature, please"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"create a GitHub issue"}),"."]})})]})]}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(r.Button,{onClick:()=>R(!1),children:"Cancel"}),(0,t.jsx)(r.Button,{type:"submit",children:"Save Changes"})]})]})}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.Title,{children:"Tag Details"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Name"}),(0,t.jsx)(i.Text,{children:M.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Description"}),(0,t.jsx)(i.Text,{children:M.description||"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Allowed Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:M.models&&0!==M.models.length?M.models.map(e=>(0,t.jsx)(u.Badge,{color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:M.model_info?.[e]||e})},e)):(0,t.jsx)(u.Badge,{color:"red",children:"All Models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(i.Text,{children:M.created_at?new Date(M.created_at).toLocaleString():"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(i.Text,{children:M.updated_at?new Date(M.updated_at).toLocaleString():"-"})]})]})]}),M.litellm_budget_table&&(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.Title,{children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[void 0!==M.litellm_budget_table.max_budget&&null!==M.litellm_budget_table.max_budget&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsxs)(i.Text,{children:["$",M.litellm_budget_table.max_budget]})]}),M.litellm_budget_table.budget_duration&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Budget Duration"}),(0,t.jsx)(i.Text,{children:M.litellm_budget_table.budget_duration})]}),void 0!==M.litellm_budget_table.tpm_limit&&null!==M.litellm_budget_table.tpm_limit&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"TPM Limit"}),(0,t.jsx)(i.Text,{children:M.litellm_budget_table.tpm_limit.toLocaleString()})]}),void 0!==M.litellm_budget_table.rpm_limit&&null!==M.litellm_budget_table.rpm_limit&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"RPM Limit"}),(0,t.jsx)(i.Text,{children:M.litellm_budget_table.rpm_limit.toLocaleString()})]})]})]})]})]}):(0,t.jsx)("div",{children:"Loading..."})};var M=e.i(871943),A=e.i(360820),D=e.i(591935),R=e.i(94629),B=e.i(68155),P=e.i(152990),O=e.i(682830),F=e.i(269200),L=e.i(942232),z=e.i(977572),H=e.i(427612),U=e.i(64848),V=e.i(496020);let $="This is just a spend tag that was passed dynamically in a request. It does not control any LLM models.",q=({data:e,onEdit:s,onDelete:n,onSelectTag:o})=>{let[c,d]=l.default.useState([{id:"created_at",desc:!0}]),m=[{header:"Tag Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,a=l.description===$;return(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(b.Tooltip,{title:a?"You cannot view the information of a dynamically generated spend tag":l.name,children:(0,t.jsx)(r.Button,{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",onClick:()=>o(l.name),disabled:a,children:l.name})})})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(b.Tooltip,{title:l.description,children:(0,t.jsx)("span",{className:"text-xs",children:l.description||"-"})})}},{header:"Allowed Models",accessorKey:"models",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:l?.models?.length===0?(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"red",children:"All Models"}):l?.models?.map(e=>(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:(0,t.jsx)(i.Text,{children:l.model_info?.[e]||e})})},e))})}},{header:"Created",accessorKey:"created_at",sortingFn:"datetime",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("span",{className:"text-xs",children:new Date(l.created_at).toLocaleDateString()})}},{id:"actions",header:"Actions",cell:({row:e})=>{let l=e.original,r=l.description===$;return(0,t.jsxs)("div",{className:"flex space-x-2",children:[r?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be edited",children:(0,t.jsx)(a.Icon,{icon:D.PencilAltIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Edit tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Edit tag",children:(0,t.jsx)(a.Icon,{icon:D.PencilAltIcon,size:"sm",onClick:()=>s(l),className:"cursor-pointer hover:text-blue-500"})}),r?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be deleted",children:(0,t.jsx)(a.Icon,{icon:B.TrashIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Delete tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Delete tag",children:(0,t.jsx)(a.Icon,{icon:B.TrashIcon,size:"sm",onClick:()=>n(l.name),className:"cursor-pointer hover:text-red-500"})})]})}}],h=(0,P.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:d,getCoreRowModel:(0,O.getCoreRowModel)(),getSortedRowModel:(0,O.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(F.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(H.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(V.TableRow,{children:e.headers.map(e=>(0,t.jsx)(U.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,P.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(A.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(M.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(R.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(L.TableBody,{children:h.getRowModel().rows.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(V.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(z.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,P.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(V.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No tags found"})})})})})]})})})};var K=e.i(779241),G=e.i(212931);let W=({visible:e,onCancel:l,onSubmit:a,availableModels:s})=>{let[i]=p.Form.useForm();return(0,t.jsx)(G.Modal,{title:"Create New Tag",open:e,width:800,footer:null,onCancel:()=>{i.resetFields(),l()},children:(0,t.jsxs)(p.Form,{form:i,onFinish:e=>{a(e),i.resetFields()},labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(p.Form.Item,{label:"Tag Name",name:"tag_name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(p.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(x.Input.TextArea,{rows:4})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process requests from this tag",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_llms",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:s.map(e=>(0,t.jsx)(f.Select.Option,{value:e.model_info.id,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:e.model_name}),(0,t.jsxs)("span",{className:"text-gray-400 ml-2",children:["(",e.model_info.id,")"]})]})},e.model_info.id))})}),(0,t.jsxs)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits (Optional)"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(p.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend. When reached, requests with this tag will be blocked",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(k.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(p.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(N.default,{onChange:e=>i.setFieldValue("budget_duration",e)})}),(0,t.jsx)("div",{className:"mt-4 p-3 bg-gray-50 rounded-md border border-gray-200",children:(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["TPM/RPM limits for tags are not currently supported. If you need this feature, please"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"create a GitHub issue"}),"."]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(r.Button,{type:"submit",children:"Create Tag"})})]})})};e.s(["default",0,({accessToken:e,userID:c,userRole:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1),[p,x]=(0,l.useState)(null),[f,b]=(0,l.useState)(!1),[y,j]=(0,l.useState)(!1),[v,k]=(0,l.useState)(null),[N,C]=(0,l.useState)(""),[S,T]=(0,l.useState)([]),I=async()=>{if(e)try{let t=await (0,w.tagListCall)(e);console.log("List tags response:",t),m(Object.values(t))}catch(e){console.error("Error fetching tags:",e),_.default.fromBackend("Error fetching tags: "+e)}},M=async t=>{if(e)try{await (0,w.tagCreateCall)(e,{name:t.tag_name,description:t.description,models:t.allowed_llms,max_budget:t.max_budget,soft_budget:t.soft_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,budget_duration:t.budget_duration}),_.default.success("Tag created successfully"),g(!1),I()}catch(e){console.error("Error creating tag:",e),_.default.fromBackend("Error creating tag: "+e)}},A=async e=>{k(e),j(!0)},D=async()=>{if(e&&v){try{await (0,w.tagDeleteCall)(e,v),_.default.success("Tag deleted successfully"),I()}catch(e){console.error("Error deleting tag:",e),_.default.fromBackend("Error deleting tag: "+e)}j(!1),k(null)}};return(0,l.useEffect)(()=>{c&&d&&e&&(async()=>{try{let t=await (0,w.modelInfoCall)(e,c,d);t&&t.data&&T(t.data)}catch(e){console.error("Error fetching models:",e),_.default.fromBackend("Error fetching models: "+e)}})()},[e,c,d]),(0,l.useEffect)(()=>{I()},[e]),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:p?(0,t.jsx)(E,{tagId:p,onClose:()=>{x(null),b(!1)},accessToken:e,is_admin:"Admin"===d,editTag:f}):(0,t.jsxs)("div",{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between mt-2 w-full items-center mb-4",children:[(0,t.jsx)("h1",{children:"Tag Management"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[N&&(0,t.jsxs)(i.Text,{children:["Last Refreshed: ",N]}),(0,t.jsx)(a.Icon,{icon:o.RefreshIcon,variant:"shadow",size:"xs",className:"self-center cursor-pointer",onClick:()=>{I(),C(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(i.Text,{className:"mb-4",children:["Click on a tag name to view and edit its details.",(0,t.jsxs)("p",{children:["You can use tags to restrict the usage of certain LLMs based on tags passed in the request. Read more about tag routing"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/tag_routing",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})]}),(0,t.jsx)(r.Button,{className:"mb-4",onClick:()=>g(!0),children:"+ Create New Tag"}),(0,t.jsx)(n.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,t.jsx)(s.Col,{numColSpan:1,children:(0,t.jsx)(q,{data:u,onEdit:e=>{x(e.name),b(!0)},onDelete:A,onSelectTag:x})})}),(0,t.jsx)(W,{visible:h,onCancel:()=>g(!1),onSubmit:M,availableModels:S}),y&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.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,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.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,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Tag"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this tag?"})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(r.Button,{onClick:D,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(r.Button,{onClick:()=>{j(!1),k(null)},children:"Cancel"})]})]})]})})]})})}],345244)},368670,e=>{"use strict";var t=e.i(764205),l=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,l.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},226898,972520,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),r=e.i(269200),s=e.i(427612),i=e.i(496020),n=e.i(389083),o=e.i(64848),c=e.i(977572),d=e.i(942232),u=e.i(599724),m=e.i(994388),h=e.i(752978),g=e.i(793130),p=e.i(404206),x=e.i(723731),f=e.i(653824),b=e.i(881073),y=e.i(197647),j=e.i(764205),v=e.i(28651),w=e.i(68155),_=e.i(220508),k=e.i(464571),N=e.i(727749),C=e.i(158392);let S=({accessToken:e,userRole:a,userID:r,modelData:s})=>{let[i,n]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)({}),[m,h]=(0,l.useState)({});return((0,l.useEffect)(()=>{e&&a&&r&&((0,j.getCallbacksCall)(e,r,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy;let l=t.routing_strategy||null;n(e=>({...e,routerSettings:t,selectedStrategy:l}))}),(0,j.getRouterSettingsCall)(e).then(e=>{if(console.log("router settings from API",e),e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),u(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&c(l.options),e.routing_strategy_descriptions&&h(e.routing_strategy_descriptions);let a=e.fields.find(e=>"enable_tag_filtering"===e.field_name);a?.field_value!==null&&a?.field_value!==void 0&&n(e=>({...e,enableTagFiltering:a.field_value}))}}))},[e,a,r]),e)?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(C.default,{value:i,onChange:n,routerFieldsMetadata:d,availableRoutingStrategies:o,routingStrategyDescriptions:m}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(k.Button,{onClick:()=>window.location.reload(),children:"Reset"}),(0,t.jsx)(k.Button,{type:"primary",onClick:()=>{if(!e)return;let t=i.routerSettings;console.log("router_settings",t);let l=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),a=new Set(["model_group_alias","retry_policy"]),r=Object.fromEntries(Object.entries({...t,enable_tag_filtering:i.enableTagFiltering}).map(([e,t])=>{if("routing_strategy_args"!==e&&"routing_strategy"!==e&&"enable_tag_filtering"!==e){let r=document.querySelector(`input[name="${e}"]`),s=((e,t,r)=>{if(void 0===t)return r;let s=t.trim();if("null"===s.toLowerCase())return null;if(l.has(e)){let e=Number(s);return Number.isNaN(e)?r:e}if(a.has(e)){if(""===s)return null;try{return JSON.parse(s)}catch{return r}}return"true"===s.toLowerCase()||"false"!==s.toLowerCase()&&s})(e,r?.value,t);return[e,s]}if("routing_strategy"===e)return[e,i.selectedStrategy];if("enable_tag_filtering"===e)return[e,i.enableTagFiltering];if("routing_strategy_args"===e&&"latency-based-routing"===i.selectedStrategy){let e={},t=document.querySelector('input[name="lowest_latency_buffer"]'),l=document.querySelector('input[name="ttl"]');return t?.value&&(e.lowest_latency_buffer=Number(t.value)),l?.value&&(e.ttl=Number(l.value)),console.log(`setRoutingStrategyArgs: ${e}`),["routing_strategy_args",e]}return null}).filter(e=>null!=e));console.log("updatedVariables",r);try{(0,j.setCallbacksCall)(e,{router_settings:r})}catch(e){N.default.fromBackend("Failed to update router settings: "+e)}N.default.success("router settings updated successfully")},children:"Save Changes"})]})]}):null};e.i(247167);var T=e.i(368670);let I=l.forwardRef(function(e,t){return l.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),l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 5l7 7m0 0l-7 7m7-7H3"}))});var E=e.i(122577),M=e.i(592968),A=e.i(898586),D=e.i(356449),R=e.i(127952),B=e.i(418371),P=e.i(888259),O=e.i(689020),F=e.i(212931);let L=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function z({open:e,onCancel:l,children:a}){return(0,t.jsx)(F.Modal,{title:(0,t.jsx)("div",{className:"pb-4 border-b border-gray-100",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-800",children:[(0,t.jsx)("div",{className:"p-2 bg-indigo-50 rounded-lg",children:(0,t.jsx)(L,{className:"w-5 h-5 text-indigo-600"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-bold m-0",children:"Configure Model Fallbacks"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 font-normal m-0",children:"Manage multiple fallback chains for different models (up to 5 groups at a time)"})]})]})}),open:e,width:900,footer:null,onCancel:l,maskClosable:!1,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsx)("div",{className:"mt-6",children:a})})}e.s(["ArrowRight",()=>L],972520);var H=e.i(419470);function U({models:e,accessToken:a,value:r=[],onChange:s}){let[i,n]=(0,l.useState)(!1),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)(0),[h,g]=(0,l.useState)(!1),[p,x]=(0,l.useState)([{id:"1",primaryModel:null,fallbackModels:[]}]);(0,l.useEffect)(()=>{i&&(x([{id:"1",primaryModel:null,fallbackModels:[]}]),u(e=>e+1))},[i]),(0,l.useEffect)(()=>{let e=async()=>{try{let e=await (0,O.fetchAvailableModels)(a);console.log("Fetched models for fallbacks:",e),c(e)}catch(e){console.error("Error fetching model info for fallbacks:",e)}};i&&e()},[a,i]);let f=Array.from(new Set(o.map(e=>e.model_group))).sort(),b=()=>{n(!1),x([{id:"1",primaryModel:null,fallbackModels:[]}])},y=async()=>{let e=p.filter(e=>!e.primaryModel||0===e.fallbackModels.length);if(e.length>0)return void P.default.error(`Please complete configuration for all groups. ${e.length} group(s) incomplete.`);let t=[...r||[],...p.map(e=>({[e.primaryModel]:e.fallbackModels}))];if(s){g(!0);try{await s(t),N.default.success(`${p.length} fallback configuration(s) added successfully!`),b()}catch(e){console.error("Error saving fallbacks:",e)}finally{g(!1)}}else N.default.fromBackend("onChange callback not provided")};return(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Button,{className:"mx-auto",onClick:()=>n(!0),icon:()=>(0,t.jsx)("span",{className:"mr-1",children:"+"}),children:"Add Fallbacks"}),(0,t.jsxs)(z,{open:i,onCancel:b,children:[(0,t.jsx)(H.FallbackSelectionForm,{groups:p,onGroupsChange:x,availableModels:f,maxFallbacks:10,maxGroups:5},d),p.length>0&&(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 mt-6 border-t border-gray-100",children:[(0,t.jsx)(k.Button,{type:"default",onClick:b,disabled:h,children:"Cancel"}),(0,t.jsx)(k.Button,{type:"default",onClick:y,disabled:0===p.length||h,loading:h,children:h?"Saving Configuration...":"Save All Configurations"})]})]})]})}let V="inline-flex items-center gap-2 px-2.5 py-1 rounded-md border border-gray-200 bg-gray-50 text-sm font-medium text-gray-800 shrink-0";async function $(e,l){console.log=function(){};let a=window.location.origin,r=new D.default.OpenAI({apiKey:l,baseURL:a,dangerouslyAllowBrowser:!0});try{N.default.info("Testing fallback model response...");let l=await r.chat.completions.create({model:e,messages:[{role:"user",content:"Hi, this is a test message"}],mock_testing_fallbacks:!0});N.default.success((0,t.jsxs)("span",{children:["Test model=",(0,t.jsx)("strong",{children:e}),", received model=",(0,t.jsx)("strong",{children:l.model}),". See"," ",(0,t.jsx)("a",{href:"#",onClick:()=>window.open("https://docs.litellm.ai/docs/proxy/reliability","_blank"),style:{textDecoration:"underline",color:"blue"},children:"curl"})]}))}catch(e){N.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`)}}let q=({accessToken:e,userRole:a,userID:n,modelData:u})=>{let[m,g]=(0,l.useState)({}),[p,x]=(0,l.useState)(!1),[f,b]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),{data:_}=(0,T.useModelCostMap)(),k=e=>null!=_&&"object"==typeof _&&e in _?_[e].litellm_provider??"":"";(0,l.useEffect)(()=>{e&&a&&n&&(0,j.getCallbacksCall)(e,n,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)})},[e,a,n]);let C=e=>{b(e),v(!0)},S=async()=>{if(!f||!e)return;let t=Object.keys(f)[0];if(!t)return;x(!0);let l=m.fallbacks.map(e=>{let l={...e};return t in l&&Array.isArray(l[t])&&delete l[t],l}).filter(e=>Object.keys(e).length>0),a={...m,fallbacks:l};try{await (0,j.setCallbacksCall)(e,{router_settings:a}),g(a),N.default.success("Router settings updated successfully")}catch(e){N.default.fromBackend("Failed to update router settings: "+e)}finally{x(!1),v(!1),b(null)}};if(!e)return null;let D=async t=>{if(!e)return;let l={...m,fallbacks:t};try{await (0,j.setCallbacksCall)(e,{router_settings:l}),g(l)}catch(t){throw N.default.fromBackend("Failed to update router settings: "+t),e&&a&&n&&(0,j.getCallbacksCall)(e,n,a).then(e=>{let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)}),t}},P=Array.isArray(m.fallbacks)&&m.fallbacks.length>0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U,{models:u?.data?u.data.map(e=>e.model_name):[],accessToken:e||"",value:m.fallbacks||[],onChange:D}),P?(0,t.jsxs)(r.Table,{children:[(0,t.jsx)(s.TableHead,{children:(0,t.jsxs)(i.TableRow,{children:[(0,t.jsx)(o.TableHeaderCell,{children:"Model Name"}),(0,t.jsx)(o.TableHeaderCell,{children:"Fallbacks"}),(0,t.jsx)(o.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(d.TableBody,{children:m.fallbacks.map((a,r)=>Object.entries(a).map(([s,n])=>{let o;return(0,t.jsxs)(i.TableRow,{children:[(0,t.jsx)(c.TableCell,{className:"align-top",children:(o=k?.(s)??s,(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(B.ProviderLogo,{provider:o,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:s})]}))}),(0,t.jsx)(c.TableCell,{className:"align-top",children:function(e,a,r){let s=Array.isArray(a)?a:[];if(0===s.length)return null;let i=({modelName:e})=>{let l=r?.(e)??e;return(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(B.ProviderLogo,{provider:l,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:e})]})};return(0,t.jsxs)("span",{className:"grid grid-cols-[auto_1fr] items-start gap-x-2 w-full min-w-0",children:[(0,t.jsx)("span",{className:"inline-flex items-center justify-center w-8 h-8 shrink-0 self-start text-blue-600","aria-hidden":!0,children:(0,t.jsx)(I,{className:"w-5 h-5 stroke-[2.5]"})}),(0,t.jsx)("span",{className:"flex flex-wrap items-start gap-1 min-w-0",children:s.map((e,a)=>(0,t.jsxs)(l.default.Fragment,{children:[a>0&&(0,t.jsx)(h.Icon,{icon:I,size:"xs",className:"shrink-0 text-gray-400"}),(0,t.jsx)(i,{modelName:e})]},e))})]})}(0,Array.isArray(n)?n:[],k)}),(0,t.jsxs)(c.TableCell,{className:"align-top",children:[(0,t.jsx)(M.Tooltip,{title:"Test fallback",children:(0,t.jsx)(h.Icon,{icon:E.PlayIcon,size:"sm",onClick:()=>$(Object.keys(a)[0],e||""),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(M.Tooltip,{title:"Delete fallback",children:(0,t.jsx)("span",{"data-testid":"delete-fallback-button",role:"button",tabIndex:0,onClick:()=>C(a),onKeyDown:e=>"Enter"===e.key&&C(a),className:"cursor-pointer inline-flex",children:(0,t.jsx)(h.Icon,{icon:w.TrashIcon,size:"sm",className:"hover:text-red-600"})})})]})]},r.toString()+s)}))})]}):(0,t.jsx)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 px-4 py-6 text-center",children:(0,t.jsx)(A.Typography.Text,{type:"secondary",children:"No fallbacks configured. Add fallbacks to automatically try another model when the primary fails."})}),(0,t.jsx)(R.default,{isOpen:y,title:"Delete Fallback?",message:"Are you sure you want to delete this fallback? This action cannot be undone.",resourceInformationTitle:"Fallback Information",resourceInformation:[{label:"Model Name",value:f?Object.keys(f)[0]:"",code:!0}],onCancel:()=>{v(!1),b(null)},onOk:S,confirmLoading:p})]})};e.s(["default",0,({accessToken:e,userRole:k,userID:N,modelData:C})=>{let[T,I]=(0,l.useState)([]);(0,l.useEffect)(()=>{e&&(0,j.getGeneralSettingsCall)(e).then(e=>{I(e)})},[e]);let E=(e,t)=>{I(T.map(l=>l.field_name===e?{...l,field_value:t}:l))};return e?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(f.TabGroup,{className:"h-[75vh] w-full",children:[(0,t.jsxs)(b.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(y.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(y.Tab,{value:"2",children:"Fallbacks"}),(0,t.jsx)(y.Tab,{value:"3",children:"General"})]}),(0,t.jsxs)(x.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(S,{accessToken:e,userRole:k,userID:N,modelData:C})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:k,userID:N,modelData:C})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(a.Card,{children:(0,t.jsxs)(r.Table,{children:[(0,t.jsx)(s.TableHead,{children:(0,t.jsxs)(i.TableRow,{children:[(0,t.jsx)(o.TableHeaderCell,{children:"Setting"}),(0,t.jsx)(o.TableHeaderCell,{children:"Value"}),(0,t.jsx)(o.TableHeaderCell,{children:"Status"}),(0,t.jsx)(o.TableHeaderCell,{children:"Action"})]})}),(0,t.jsx)(d.TableBody,{children:T.filter(e=>"TypedDictionary"!==e.field_type).map((l,a)=>(0,t.jsxs)(i.TableRow,{children:[(0,t.jsxs)(c.TableCell,{children:[(0,t.jsx)(u.Text,{children:l.field_name}),(0,t.jsx)("p",{style:{fontSize:"0.65rem",color:"#808080",fontStyle:"italic"},className:"mt-1",children:l.field_description})]}),(0,t.jsx)(c.TableCell,{children:"Integer"==l.field_type?(0,t.jsx)(v.InputNumber,{step:1,value:l.field_value,onChange:e=>E(l.field_name,e)}):"Boolean"==l.field_type?(0,t.jsx)(g.Switch,{checked:!0===l.field_value||"true"===l.field_value,onChange:e=>E(l.field_name,e)}):null}),(0,t.jsx)(c.TableCell,{children:!0==l.stored_in_db?(0,t.jsx)(n.Badge,{icon:_.CheckCircleIcon,className:"text-white",children:"In DB"}):!1==l.stored_in_db?(0,t.jsx)(n.Badge,{className:"text-gray bg-white outline",children:"In Config"}):(0,t.jsx)(n.Badge,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,t.jsxs)(c.TableCell,{children:[(0,t.jsx)(m.Button,{onClick:()=>((t,l)=>{if(!e)return;let a=T[l].field_value;if(null!=a&&void 0!=a)try{(0,j.updateConfigFieldSetting)(e,t,a);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:!0}:e);I(l)}catch(e){}})(l.field_name,a),children:"Update"}),(0,t.jsx)(h.Icon,{icon:w.TrashIcon,color:"red",onClick:()=>((t,l)=>{if(e)try{(0,j.deleteConfigFieldSetting)(e,t);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:null,field_value:null}:e);I(l)}catch(e){}})(l.field_name,0),children:"Reset"})]})]},a))})]})})})]})]})}):null}],226898)},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),r=e.i(947293),s=e.i(764205),i=e.i(954616),n=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function p(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var x=e.i(175712),f=e.i(808613),b=e.i(311451),y=e.i(898586);function j({variant:e,userEmail:a,isPending:r,claimError:s,onSubmit:i}){let[n]=f.Form.useForm();return l.default.useEffect(()=>{a&&n.setFieldValue("user_email",a)},[a,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(x.Card,{children:[(0,t.jsx)(y.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(y.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(y.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(f.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>i({password:e.password}),children:[(0,t.jsx)(f.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(b.Input,{type:"email",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(b.Input.Password,{})}),s&&(0,t.jsx)(h.Alert,{type:"error",message:s,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:r,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function v({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:x,isError:f}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,s.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:b,isPending:y}=(0,i.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,s.claimOnboardingToken)(e,t,l,a)}),v=g?.token?(0,r.jwtDecode)(g.token):null,w=v?.user_email??"",_=v?.user_id??null,k=v?.key??null,N=g?.token??null;return x?(0,t.jsx)(m,{}):f?(0,t.jsx)(p,{}):(0,t.jsx)(j,{variant:e,userEmail:w,isPending:y,claimError:u,onSubmit:e=>{k&&N&&_&&d&&(h(null),b({accessToken:k,inviteId:d,userId:_,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,s.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function w(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(v,{variant:"reset_password"===e?"reset_password":"signup"})}function _(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(w,{})})}e.s(["default",()=>_],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),r=e.i(764205),s=e.i(135214);let i=(0,a.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:p=!1,allFilters:x})=>{let[f,b]=(0,d.useState)(""),[y,j]=(0,o.useDebouncedState)("",{wait:300}),{data:v,fetchNextPage:w,hasNextPage:_,isFetchingNextPage:k,isLoading:N}=((e=50,t,a)=>{let{accessToken:n}=(0,s.default)();return(0,l.useInfiniteQuery)({queryKey:i.list({filters:{size:e,...t&&{search:t},...a&&{team_id:a}}}),queryFn:async({pageParam:l})=>await (0,r.keyAliasesCall)(n,l,e,t,a),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!v?.pages)return[];let e=new Set,t=[];for(let l of v.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[v]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:p,showSearch:!0,filterOption:!1,onSearch:e=>{b(e),j(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&_&&!k&&w()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:C,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,k&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),r=e.i(350967),s=e.i(898586),i=e.i(947293),n=e.i(618566),o=e.i(271645),c=e.i(566606),d=e.i(584578),u=e.i(764205),m=e.i(702597),h=e.i(207082),g=e.i(109799),p=e.i(500330),x=e.i(871943),f=e.i(502547),b=e.i(360820),y=e.i(94629),j=e.i(152990),v=e.i(682830),w=e.i(389083),_=e.i(994388),k=e.i(752978),N=e.i(269200),C=e.i(942232),S=e.i(977572),T=e.i(427612),I=e.i(64848),E=e.i(496020),M=e.i(599724),A=e.i(827252),D=e.i(772345),R=e.i(464571),B=e.i(282786),P=e.i(981339),O=e.i(592968),F=e.i(355619),L=e.i(633627),z=e.i(374009),H=e.i(700514),U=e.i(135214),V=e.i(50882),$=e.i(969550),q=e.i(304911),K=e.i(20147);function G({teams:e,organizations:l,onSortChange:a,currentSort:r}){let{data:i}=(0,g.useOrganizations)(),n=i??l??[],[c,d]=(0,o.useState)(null),[m,G]=o.default.useState(()=>r?[{id:r.sortBy,desc:"desc"===r.sortOrder}]:[{id:"created_at",desc:!0}]),[W,J]=o.default.useState({pageIndex:0,pageSize:50}),Y=m.length>0?m[0].id:null,Q=m.length>0?m[0].desc?"desc":"asc":null,{data:X,isPending:Z,isFetching:ee,isError:et,refetch:el}=(0,h.useKeys)(W.pageIndex+1,W.pageSize,{sortBy:Y||void 0,sortOrder:Q||void 0,expand:"user"}),[ea,er]=(0,o.useState)({}),{filters:es,filteredKeys:ei,filteredTotalCount:en,allTeams:eo,allOrganizations:ec,handleFilterChange:ed,handleFilterReset:eu}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:r}=(0,U.default)(),[s,i]=(0,o.useState)(a),[n,c]=(0,o.useState)(t||[]),[d,m]=(0,o.useState)(l||[]),[h,g]=(0,o.useState)(e),[p,x]=(0,o.useState)(null),f=(0,o.useRef)(0),b=(0,o.useCallback)((0,z.default)(async e=>{if(!r)return;let t=Date.now();f.current=t;try{let l=await (0,u.keyListCall)(r,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,H.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===f.current&&l&&(g(l.keys),x(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[r]);return(0,o.useEffect)(()=>{if(!e)return void g([]);let t=[...e];s["Team ID"]&&(t=t.filter(e=>e.team_id===s["Team ID"])),s["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===s["Organization ID"])),g(t)},[e,s]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,L.fetchAllTeams)(r);e.length>0&&c(e);let t=await (0,L.fetchAllOrganizations)(r);t.length>0&&m(t)};r&&e()},[r]),(0,o.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{i({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||b({...s,...e})},handleFilterReset:()=>{i(a),x(null),b(a)}}}({keys:X?.keys||[],teams:e,organizations:l}),em=(0,o.useDeferredValue)(ee),eh=(ee||em)&&!et,eg=en??X?.total_count??0;(0,o.useEffect)(()=>{if(el){let e=()=>{el()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[el]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(O.Tooltip,{title:l,children:(0,t.jsx)(_.Button,{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 block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let r=e?.find(e=>e.team_id===a),s=r?.team_alias||a,i=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:s})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=n.find(e=>e.organization_id===l),r=a?.organization_alias||l,s=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:r})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(B.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(A.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,r=l.user?.user_email??l.user_email??null,i=l.user_id??null,n="default_user_id"===i,o=a||r||i,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:r},{label:"User ID",value:i}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(s.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||r?(0,t.jsx)(B.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(B.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(q.default,{userId:i})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,r=a?.user_alias??null,i=a?.user_email??null,n="default_user_id"===l,o=r||i||l,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:r},{label:"User Email",value:i},{label:"User ID",value:l}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(s.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||r||i?(0,t.jsx)(B.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(B.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(q.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(B.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(A.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(O.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,p.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,p.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(l)?(0,t.jsx)("div",{className:"flex flex-col",children:0===l.length?(0,t.jsx)(w.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(M.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[l.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(k.Icon,{icon:ea[e.row.id]?x.ChevronDownIcon:f.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{er(t=>({...t,[e.row.id]:!t[e.row.id]}))}})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(M.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(M.Text,{children:e.length>30?`${(0,F.getModelDisplayName)(e).slice(0,30)}...`:(0,F.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(w.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(M.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.slice(3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(M.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(M.Text,{children:e.length>30?`${(0,F.getModelDisplayName)(e).slice(0,30)}...`:(0,F.getModelDisplayName)(e)})},l+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==l.tpm_limit?l.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==l.rpm_limit?l.rpm_limit:"Unlimited"]})]})}}],[e,n]),ex=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>eo&&0!==eo.length?eo.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ef=(0,j.useReactTable)({data:ei,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:W},onSortingChange:e=>{let t="function"==typeof e?e(m):e;if(G(t),t&&t.length>0){let e=t[0],l=e.id,r=e.desc?"desc":"asc";ed({...es,"Sort By":l,"Sort Order":r},!0),a?.(l,r)}},onPaginationChange:J,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),getPaginationRowModel:(0,v.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(eg/W.pageSize)});o.default.useEffect(()=>{r&&G([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]);let{pageIndex:eb,pageSize:ey}=ef.getState().pagination,ej=Math.min((eb+1)*ey,eg),ev=`${eb*ey+1} - ${ej}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:c?(0,t.jsx)(K.default,{keyId:c.token,onClose:()=>d(null),keyData:c,teams:eo,onDelete:el}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)($.default,{options:ex,onApplyFilters:ed,initialValues:es,onResetFilters:eu})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[Z?(0,t.jsx)(P.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",ev," of ",eg," results"]}),(0,t.jsx)(R.Button,{type:"default",icon:(0,t.jsx)(D.SyncOutlined,{spin:eh}),onClick:()=>{el()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[Z?(0,t.jsx)(P.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",eb+1," of ",ef.getPageCount()]}),Z?(0,t.jsx)(P.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ef.previousPage(),disabled:Z||!ef.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Z?(0,t.jsx)(P.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ef.nextPage(),disabled:Z||!ef.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ef.getCenterTotalSize()},children:[(0,t.jsx)(T.TableHead,{children:ef.getHeaderGroups().map(e=>(0,t.jsx)(E.TableRow,{children:e.headers.map(e=>(0,t.jsx)(I.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(b.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(x.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(y.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ef.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(C.TableBody,{children:Z?(0,t.jsx)(E.TableRow,{children:(0,t.jsx)(S.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):ei.length>0?ef.getRowModel().rows.map(e=>(0,t.jsx)(E.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(S.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(E.TableRow,{children:(0,t.jsx)(S.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:h,teams:g,keys:p,setUserRole:x,userEmail:f,setUserEmail:b,setTeams:y,setKeys:j,premiumUser:v,organizations:w,addKey:_,createClicked:k,autoOpenCreate:N,prefillData:C})=>{let[S,T]=(0,o.useState)(null),[I,E]=(0,o.useState)(null),M=(0,n.useSearchParams)(),A=(0,l.getCookie)("token"),D=M.get("invitation_id"),[R,B]=(0,o.useState)(null),[P,O]=(0,o.useState)(null),[F,L]=(0,o.useState)([]),[z,H]=(0,o.useState)(null),[U,V]=(0,o.useState)(null);if((0,o.useEffect)(()=>{let e=()=>{let e=sessionStorage.getItem("token");sessionStorage.clear(),e&&sessionStorage.setItem("token",e)};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[]),(0,o.useEffect)(()=>{if(A){let e=(0,i.jwtDecode)(A);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),B(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"app_user":return"App User";case"internal_user":return"Internal User";case"internal_user_viewer":return"Internal Viewer";default:return"Unknown Role"}}(e.user_role);console.log("Decoded user_role:",t),x(t)}else console.log("User role not defined");e.user_email?b(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&R&&h&&!S){let t=sessionStorage.getItem("userModels"+e);t?L(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(I)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(R);H(t);let l=await (0,u.userGetInfoV2)(R,e);T(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,u.modelAvailableCall)(R,e,h)).data.map(e=>e.id);console.log("available_model_names:",a),L(a),console.log("userModels:",F),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&$()}})(),(0,d.fetchTeams)(R,e,h,I,y))}},[e,A,R,h]),(0,o.useEffect)(()=>{R&&(async()=>{try{let e=await (0,u.keyInfoCall)(R,[R]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&$()}})()},[R]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(I)}, accessToken: ${R}, userID: ${e}, userRole: ${h}`),R&&(console.log("fetching teams"),(0,d.fetchTeams)(R,e,h,I,y))},[I]),(0,o.useEffect)(()=>{if(null!==p&&null!=U&&null!==U.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(p)}`),p))U.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===U.team_id&&(e+=t.spend);console.log(`sum: ${e}`),O(e)}else if(null!==p){let e=0;for(let t of p)e+=t.spend;O(e)}},[U]),null!=D)return(0,t.jsx)(c.default,{});function $(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==A)return console.log("All cookies before redirect:",document.cookie),$(),null;try{let e=(0,i.jwtDecode)(A);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),$(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),$(),null}if(null==R)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==h&&x("App Owner"),h&&"Admin Viewer"==h){let{Title:e,Paragraph:l}=s.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",U),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(r.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(m.default,{team:U,teams:g,data:p,addKey:_,autoOpenCreate:N,prefillData:C},U?U.team_id:null),(0,t.jsx)(G,{teams:g,organizations:w})]})})})}],693569)},559061,e=>{"use strict";var t=e.i(843476),l=e.i(584935),a=e.i(304967),r=e.i(309426),s=e.i(350967),i=e.i(752978),n=e.i(621642),o=e.i(25080),c=e.i(37091),d=e.i(197647),u=e.i(653824),m=e.i(881073),h=e.i(404206),g=e.i(723731),p=e.i(599724),x=e.i(271645),f=e.i(727749),b=e.i(144267),y=e.i(278587),j=e.i(764205),v=e.i(994388),w=e.i(220508),_=e.i(964306),k=e.i(551332);let N=({responseTimeMs:e})=>null==e?null:(0,t.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-500 font-mono",children:[(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 6V12L16 14M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,t.jsxs)("span",{children:[e.toFixed(0),"ms"]})]}),C=e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{}return t},S=({label:e,value:l})=>{let[a,r]=x.default.useState(!1),[s,i]=x.default.useState(!1),n=l?.toString()||"N/A",o=n.length>50?n.substring(0,50)+"...":n;return(0,t.jsx)("tr",{className:"hover:bg-gray-50",children:(0,t.jsx)("td",{className:"px-4 py-2 align-top",colSpan:2,children:(0,t.jsxs)("div",{className:"flex items-center justify-between group",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[(0,t.jsx)("button",{onClick:()=>r(!a),className:"text-gray-400 hover:text-gray-600 mr-2",children:a?"▼":"▶"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm text-gray-600",children:e}),(0,t.jsx)("pre",{className:"mt-1 text-sm font-mono text-gray-800 whitespace-pre-wrap",children:a?n:o})]})]}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(n),i(!0),setTimeout(()=>i(!1),2e3)},className:"opacity-0 group-hover:opacity-100 text-gray-400 hover:text-gray-600",children:(0,t.jsx)(k.ClipboardCopyIcon,{className:"h-4 w-4"})})]})})})},T=({response:e})=>{let l=null,a={},r={};try{if(e?.error)try{let t="string"==typeof e.error.message?JSON.parse(e.error.message):e.error.message;l={message:t?.message||"Unknown error",traceback:t?.traceback||"No traceback available",litellm_params:t?.litellm_cache_params||{},health_check_cache_params:t?.health_check_cache_params||{}},a=C(l.litellm_params)||{},r=C(l.health_check_cache_params)||{}}catch(t){console.warn("Error parsing error details:",t),l={message:String(e.error.message||"Unknown error"),traceback:"Error parsing details",litellm_params:{},health_check_cache_params:{}}}else a=C(e?.litellm_cache_params)||{},r=C(e?.health_check_cache_params)||{}}catch(e){console.warn("Error in response parsing:",e),a={},r={}}let s={redis_host:r?.redis_client?.connection_pool?.connection_kwargs?.host||r?.redis_async_client?.connection_pool?.connection_kwargs?.host||r?.connection_kwargs?.host||r?.host||"N/A",redis_port:r?.redis_client?.connection_pool?.connection_kwargs?.port||r?.redis_async_client?.connection_pool?.connection_kwargs?.port||r?.connection_kwargs?.port||r?.port||"N/A",redis_version:r?.redis_version||"N/A",startup_nodes:(()=>{try{if(r?.redis_kwargs?.startup_nodes)return JSON.stringify(r.redis_kwargs.startup_nodes);let e=r?.redis_client?.connection_pool?.connection_kwargs?.host||r?.redis_async_client?.connection_pool?.connection_kwargs?.host,t=r?.redis_client?.connection_pool?.connection_kwargs?.port||r?.redis_async_client?.connection_pool?.connection_kwargs?.port;return e&&t?JSON.stringify([{host:e,port:t}]):"N/A"}catch(e){return"N/A"}})(),namespace:r?.namespace||"N/A"};return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,t.jsxs)(u.TabGroup,{children:[(0,t.jsxs)(m.TabList,{className:"border-b border-gray-200 px-4",children:[(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Summary"}),(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Raw Response"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-6",children:[e?.status==="healthy"?(0,t.jsx)(w.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}):(0,t.jsx)(_.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsxs)(p.Text,{className:`text-sm font-medium ${e?.status==="healthy"?"text-green-500":"text-red-500"}`,children:["Cache Status: ",e?.status||"unhealthy"]})]}),(0,t.jsx)("table",{className:"w-full border-collapse",children:(0,t.jsxs)("tbody",{children:[l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold text-red-600",children:"Error Details"})}),(0,t.jsx)(S,{label:"Error Message",value:l.message}),(0,t.jsx)(S,{label:"Traceback",value:l.traceback})]}),(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Cache Details"})}),(0,t.jsx)(S,{label:"Cache Configuration",value:String(a?.type)}),(0,t.jsx)(S,{label:"Ping Response",value:String(e.ping_response)}),(0,t.jsx)(S,{label:"Set Cache Response",value:e.set_cache_response||"N/A"}),(0,t.jsx)(S,{label:"litellm_settings.cache_params",value:JSON.stringify(a,null,2)}),a?.type==="redis"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Redis Details"})}),(0,t.jsx)(S,{label:"Redis Host",value:s.redis_host||"N/A"}),(0,t.jsx)(S,{label:"Redis Port",value:s.redis_port||"N/A"}),(0,t.jsx)(S,{label:"Redis Version",value:s.redis_version||"N/A"}),(0,t.jsx)(S,{label:"Startup Nodes",value:s.startup_nodes||"N/A"}),(0,t.jsx)(S,{label:"Namespace",value:s.namespace||"N/A"})]})]})})]})}),(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded-md p-4 font-mono text-sm",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words overflow-auto max-h-[500px]",children:(()=>{try{let t={...e,litellm_cache_params:a,health_check_cache_params:r},l=JSON.parse(JSON.stringify(t,(e,t)=>{if("string"==typeof t)try{return JSON.parse(t)}catch{}return t}));return JSON.stringify(l,null,2)}catch(e){return"Error formatting JSON: "+e.message}})()})})})]})]})})},I=({accessToken:e,healthCheckResponse:l,runCachingHealthCheck:a,responseTimeMs:r})=>{let[s,i]=x.default.useState(null),[n,o]=x.default.useState(!1),c=async()=>{o(!0);let e=performance.now();await a(),i(performance.now()-e),o(!1)};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(v.Button,{onClick:c,disabled:n,className:"bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 text-white text-sm px-4 py-2 rounded-md",children:n?"Running Health Check...":"Run Health Check"}),(0,t.jsx)(N,{responseTimeMs:s})]}),l&&(0,t.jsx)(T,{response:l})]})};var E=e.i(677667),M=e.i(898667),A=e.i(130643),D=e.i(206929),R=e.i(35983);let B=({redisType:e,redisTypeDescriptions:l,onTypeChange:a})=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Redis Type"}),(0,t.jsxs)(D.Select,{value:e,onValueChange:a,children:[(0,t.jsx)(R.SelectItem,{value:"node",children:"Node (Single Instance)"}),(0,t.jsx)(R.SelectItem,{value:"cluster",children:"Cluster"}),(0,t.jsx)(R.SelectItem,{value:"sentinel",children:"Sentinel"}),(0,t.jsx)(R.SelectItem,{value:"semantic",children:"Semantic"})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:l[e]||"Select the type of Redis deployment you're using"})]});var P=e.i(135214),O=e.i(620250),F=e.i(779241),L=e.i(199133),z=e.i(689020),H=e.i(435451);let U=({field:e,currentValue:l})=>{let[a,r]=(0,x.useState)([]),[s,i]=(0,x.useState)(l||""),{accessToken:n}=(0,P.default)();if((0,x.useEffect)(()=>{n&&(async()=>{try{let e=await (0,z.fetchAvailableModels)(n);console.log("Fetched models for selector:",e),e.length>0&&r(e)}catch(e){console.error("Error fetching model info:",e)}})()},[n]),"Boolean"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",name:e.field_name,defaultChecked:!0===l||"true"===l,className:"h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:e.field_description})]})]});if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(H.default,{name:e.field_name,type:"number",defaultValue:l,placeholder:e.field_description}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("List"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)("textarea",{name:e.field_name,defaultValue:"object"==typeof l?JSON.stringify(l,null,2):l,placeholder:e.field_description,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500",rows:4}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("Models_Select"===e.field_type){let l=a.filter(e=>"embedding"===e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(L.Select,{value:s,onChange:i,showSearch:!0,placeholder:"Search and select a model...",options:l,style:{width:"100%"},className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("input",{type:"hidden",name:e.field_name,value:s}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})}if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(O.NumberInput,{name:e.field_name,defaultValue:l,placeholder:e.field_description,step:"Float"===e.field_type?.01:1}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});let o="password"===e.field_name||e.field_name.includes("password")?"password":"text";return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(F.TextInput,{name:e.field_name,type:o,defaultValue:l,placeholder:e.field_description}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})},V=(e,t)=>e.find(e=>e.field_name===t),$=(e,t)=>{let l={type:"redis"};return e.forEach(e=>{if("redis_type"===e.field_name||null!==e.redis_type&&void 0!==e.redis_type&&e.redis_type!==t)return;let a=e.field_name,r=null;if("Boolean"===e.field_type){let e=document.querySelector(`input[name="${a}"]`);e?.checked!==void 0&&(r=e.checked)}else if("List"===e.field_type){let e=document.querySelector(`textarea[name="${a}"]`);if(e?.value)try{r=JSON.parse(e.value)}catch(e){console.error(`Invalid JSON for ${a}:`,e)}}else{let t=document.querySelector(`input[name="${a}"]`);if(t?.value){let l=t.value.trim();if(""!==l)if("Integer"===e.field_type){let e=Number(l);isNaN(e)||(r=e)}else if("Float"===e.field_type){let e=Number(l);isNaN(e)||(r=e)}else r=l}}null!=r&&(l[a]=r)}),l},q=({accessToken:e,userRole:l,userID:a})=>{let r,s,i,n,o,[c,d]=(0,x.useState)({}),[u,m]=(0,x.useState)([]),[h,g]=(0,x.useState)({}),[p,b]=(0,x.useState)("node"),[y,w]=(0,x.useState)(!1),[_,k]=(0,x.useState)(!1),N=(0,x.useCallback)(async()=>{try{let t=await (0,j.getCacheSettingsCall)(e);console.log("cache settings from API",t),t.fields&&m(t.fields),t.current_values&&(d(t.current_values),t.current_values.redis_type&&b(t.current_values.redis_type)),t.redis_type_descriptions&&g(t.redis_type_descriptions)}catch(e){console.error("Failed to load cache settings:",e),f.default.fromBackend("Failed to load cache settings")}},[e]);(0,x.useEffect)(()=>{e&&N()},[e,N]);let C=async()=>{if(e){w(!0);try{let t=$(u,p),l=await (0,j.testCacheConnectionCall)(e,t);"success"===l.status?f.default.success("Cache connection test successful!"):f.default.fromBackend(`Connection test failed: ${l.message||l.error}`)}catch(e){console.error("Test connection error:",e),f.default.fromBackend(`Connection test failed: ${e.message||"Unknown error"}`)}finally{w(!1)}}},S=async()=>{if(e){k(!0);try{let t=$(u,p);"semantic"===p&&(t.type="redis-semantic"),await (0,j.updateCacheSettingsCall)(e,t),f.default.success("Cache settings updated successfully"),await N()}catch(e){console.error("Failed to save cache settings:",e),f.default.fromBackend("Failed to update cache settings")}finally{k(!1)}}};if(!e)return null;let{basicFields:T,sslFields:I,cacheManagementFields:D,gcpFields:R,clusterFields:P,sentinelFields:O,semanticFields:F}=(r=["host","port","password","username"].map(e=>V(u,e)).filter(Boolean),s=["ssl","ssl_cert_reqs","ssl_check_hostname"].map(e=>V(u,e)).filter(Boolean),i=["namespace","ttl","max_connections"].map(e=>V(u,e)).filter(Boolean),n=["gcp_service_account","gcp_ssl_ca_certs"].map(e=>V(u,e)).filter(Boolean),o=u.filter(e=>"cluster"===e.redis_type),{basicFields:r,sslFields:s,cacheManagementFields:i,gcpFields:n,clusterFields:o,sentinelFields:u.filter(e=>"sentinel"===e.redis_type),semanticFields:u.filter(e=>"semantic"===e.redis_type)});return(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Cache Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure Redis cache for LiteLLM"})]}),(0,t.jsx)(B,{redisType:p,redisTypeDescriptions:h,onTypeChange:b}),(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Connection Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:T.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(U,{field:e,currentValue:l},e.field_name)})})]}),"cluster"===p&&P.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Cluster Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6",children:P.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(U,{field:e,currentValue:l},e.field_name)})})]}),"sentinel"===p&&O.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Sentinel Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:O.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(U,{field:e,currentValue:l},e.field_name)})})]}),"semantic"===p&&F.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Semantic Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:F.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(U,{field:e,currentValue:l},e.field_name)})})]}),(0,t.jsxs)(E.Accordion,{className:"mt-4",children:[(0,t.jsx)(M.AccordionHeader,{children:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Advanced Settings"})}),(0,t.jsx)(A.AccordionBody,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[I.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"SSL Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:I.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(U,{field:e,currentValue:l},e.field_name)})})]}),D.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"Cache Management"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:D.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(U,{field:e,currentValue:l},e.field_name)})})]}),R.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"GCP Authentication"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:R.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(U,{field:e,currentValue:l},e.field_name)})})]})]})})]})]}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(v.Button,{variant:"secondary",size:"sm",onClick:C,disabled:y,className:"text-sm",children:y?"Testing...":"Test Connection"}),(0,t.jsx)(v.Button,{size:"sm",onClick:S,disabled:_,className:"text-sm font-medium",children:_?"Saving...":"Save Changes"})]})]})},K=e=>{if(e)return e.toISOString().split("T")[0]};function G(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}e.s(["default",0,({accessToken:e,token:v,userRole:w,userID:_,premiumUser:k})=>{let[N,C]=(0,x.useState)([]),[S,T]=(0,x.useState)([]),[E,M]=(0,x.useState)([]),[A,D]=(0,x.useState)([]),[R,B]=(0,x.useState)("0"),[P,O]=(0,x.useState)("0"),[F,L]=(0,x.useState)("0"),[z,H]=(0,x.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[U,V]=(0,x.useState)(""),[$,W]=(0,x.useState)("");(0,x.useEffect)(()=>{e&&z&&((async()=>{D(await (0,j.adminGlobalCacheActivity)(e,K(z.from),K(z.to)))})(),V(new Date().toLocaleString()))},[e]);let J=Array.from(new Set(A.map(e=>e?.api_key??""))),Y=Array.from(new Set(A.map(e=>e?.model??"")));Array.from(new Set(A.map(e=>e?.call_type??"")));let Q=async(t,l)=>{t&&l&&e&&D(await (0,j.adminGlobalCacheActivity)(e,K(t),K(l)))};(0,x.useEffect)(()=>{console.log("DATA IN CACHE DASHBOARD",A);let e=A;S.length>0&&(e=e.filter(e=>S.includes(e.api_key))),E.length>0&&(e=e.filter(e=>E.includes(e.model))),console.log("before processed data in cache dashboard",e);let t=0,l=0,a=0,r=e.reduce((e,r)=>{console.log("Processing item:",r),r.call_type||(console.log("Item has no call_type:",r),r.call_type="Unknown"),t+=(r.total_rows||0)-(r.cache_hit_true_rows||0),l+=r.cache_hit_true_rows||0,a+=r.cached_completion_tokens||0;let s=e.find(e=>e.name===r.call_type);return s?(s["LLM API requests"]+=(r.total_rows||0)-(r.cache_hit_true_rows||0),s["Cache hit"]+=r.cache_hit_true_rows||0,s["Cached Completion Tokens"]+=r.cached_completion_tokens||0,s["Generated Completion Tokens"]+=r.generated_completion_tokens||0):e.push({name:r.call_type,"LLM API requests":(r.total_rows||0)-(r.cache_hit_true_rows||0),"Cache hit":r.cache_hit_true_rows||0,"Cached Completion Tokens":r.cached_completion_tokens||0,"Generated Completion Tokens":r.generated_completion_tokens||0}),e},[]);B(G(l)),O(G(a));let s=l+t;s>0?L((l/s*100).toFixed(2)):L("0"),C(r),console.log("PROCESSED DATA IN CACHE DASHBOARD",r)},[S,E,z,A]);let X=async()=>{try{f.default.info("Running cache health check..."),W("");let t=await (0,j.cachingHealthCheckCall)(null!==e?e:"");console.log("CACHING HEALTH CHECK RESPONSE",t),W(t)}catch(t){let e;if(console.error("Error running health check:",t),t&&t.message)try{let l=JSON.parse(t.message);l.error&&(l=l.error),e=l}catch(l){e={message:t.message}}else e={message:"Unknown error occurred"};W({error:e})}};return(0,t.jsxs)(u.TabGroup,{className:"gap-2 p-8 h-full w-full mt-2 mb-8",children:[(0,t.jsxs)(m.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(d.Tab,{children:"Cache Analytics"}),(0,t.jsx)(d.Tab,{children:"Cache Health"}),(0,t.jsx)(d.Tab,{children:"Cache Settings"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[U&&(0,t.jsxs)(p.Text,{children:["Last Refreshed: ",U]}),(0,t.jsx)(i.Icon,{icon:y.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:()=>{V(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(a.Card,{children:[(0,t.jsxs)(s.Grid,{numItems:3,className:"gap-4 mt-4",children:[(0,t.jsx)(r.Col,{children:(0,t.jsx)(n.MultiSelect,{placeholder:"Select Virtual Keys",value:S,onValueChange:T,children:J.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(r.Col,{children:(0,t.jsx)(n.MultiSelect,{placeholder:"Select Models",value:E,onValueChange:M,children:Y.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(r.Col,{children:(0,t.jsx)(b.default,{value:z,onValueChange:e=>{H(e),Q(e.from,e.to)}})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mt-4",children:[(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hit Ratio"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsxs)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:[F,"%"]})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hits"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:R})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cached Tokens"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:P})})]})]}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cache Hits vs API Requests"}),(0,t.jsx)(l.BarChart,{title:"Cache Hits vs API Requests",data:N,stack:!0,index:"name",valueFormatter:G,categories:["LLM API requests","Cache hit"],colors:["sky","teal"],yAxisWidth:48}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cached Completion Tokens vs Generated Completion Tokens"}),(0,t.jsx)(l.BarChart,{className:"mt-6",data:N,stack:!0,index:"name",valueFormatter:G,categories:["Generated Completion Tokens","Cached Completion Tokens"],colors:["sky","teal"],yAxisWidth:48})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(I,{accessToken:e,healthCheckResponse:$,runCachingHealthCheck:X})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:w,userID:_})})]})]})}],559061)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3ac3a9a88413bb27.js b/litellm/proxy/_experimental/out/_next/static/chunks/3ac3a9a88413bb27.js new file mode 100644 index 0000000000..31de866e0f --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3ac3a9a88413bb27.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,954616,e=>{"use strict";var t=e.i(271645),s=e.i(114272),r=e.i(540143),a=e.i(915823),i=e.i(619273),l=class extends a.Subscribable{#e;#t=void 0;#s;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#i()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#a(){let e=this.#s?.state??(0,s.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function c(e,s){let a=(0,n.useQueryClient)(s),[c]=t.useState(()=>new l(a,e));t.useEffect(()=>{c.setOptions(e)},[c,e]);let o=t.useSyncExternalStore(t.useCallback(e=>c.subscribe(r.notifyManager.batchCalls(e)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),u=t.useCallback((e,t)=>{c.mutate(e,t).catch(i.noop)},[c]);if(o.error&&(0,i.shouldThrowError)(c.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:u,mutateAsync:o.mutate}}e.s(["useMutation",()=>c],954616)},888288,e=>{"use strict";var t=e.i(271645);let s=(e,s)=>{let r=void 0!==s,[a,i]=(0,t.useState)(e);return[r?s:a,e=>{r||i(e)}]};e.s(["default",()=>s])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>t.default])},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var a=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(a.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ArrowLeftOutlined",0,i],447566)},292639,e=>{"use strict";var t=e.i(764205),s=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,s.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},250980,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){return t.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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,s],250980)},502547,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){return t.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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,s],502547)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let s=e.i(264042).Row;e.s(["Row",0,s],621192)},214541,e=>{"use strict";var t=e.i(271645),s=e.i(135214),r=e.i(270345);e.s(["default",0,()=>{let[e,a]=(0,t.useState)([]),{accessToken:i,userId:l,userRole:n}=(0,s.default)();return(0,t.useEffect)(()=>{(async()=>{a(await (0,r.fetchTeams)(i,l,n,null))})()},[i,l,n]),{teams:e,setTeams:a}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function s(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function r(e,r){let a=t(e);return isNaN(r)?s(e,NaN):(r&&a.setDate(a.getDate()+r),a)}function a(e,r){let a=t(e);if(isNaN(r))return s(e,NaN);if(!r)return a;let i=a.getDate(),l=s(e,a.getTime());return(l.setMonth(a.getMonth()+r+1,0),i>=l.getDate())?l:(a.setFullYear(l.getFullYear(),l.getMonth(),i),a)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>s],96226),e.s(["addDays",()=>r],439189),e.s(["addMonths",()=>a],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),s=e.i(343794),r=e.i(529681),a=e.i(908286),i=e.i(242064),l=e.i(246422),n=e.i(838378);let c=["wrap","nowrap","wrap-reverse"],o=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],u=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],d=function(e,t){let r,a,i;return(0,s.default)(Object.assign(Object.assign(Object.assign({},(r=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${r}`]:r&&c.includes(r)})),(a={},u.forEach(s=>{a[`${e}-align-${s}`]=t.align===s}),a[`${e}-align-stretch`]=!t.align&&!!t.vertical,a)),(i={},o.forEach(s=>{i[`${e}-justify-${s}`]=t.justify===s}),i)))},p=(0,l.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:s,paddingLG:r}=e,a=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:s,flexGapLG:r});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(a),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(a),(e=>{let{componentCls:t}=e,s={};return c.forEach(e=>{s[`${t}-wrap-${e}`]={flexWrap:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return u.forEach(e=>{s[`${t}-align-${e}`]={alignItems:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return o.forEach(e=>{s[`${t}-justify-${e}`]={justifyContent:e}}),s})(a)]},()=>({}),{resetStyle:!1});var h=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(s[r[a]]=e[r[a]]);return s};let m=t.default.forwardRef((e,l)=>{let{prefixCls:n,rootClassName:c,className:o,style:u,flex:m,gap:g,vertical:x=!1,component:f="div",children:v}=e,y=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:b,direction:j,getPrefixCls:w}=t.default.useContext(i.ConfigContext),N=w("flex",n),[M,S,C]=p(N),O=null!=x?x:null==b?void 0:b.vertical,k=(0,s.default)(o,c,null==b?void 0:b.className,N,S,C,d(N,e),{[`${N}-rtl`]:"rtl"===j,[`${N}-gap-${g}`]:(0,a.isPresetSize)(g),[`${N}-vertical`]:O}),_=Object.assign(Object.assign({},null==b?void 0:b.style),u);return m&&(_.flex=m),g&&!(0,a.isPresetSize)(g)&&(_.gap=g),M(t.default.createElement(f,Object.assign({ref:l,className:k,style:_},(0,r.default)(y,["justify","wrap","align"])),v))});e.s(["Flex",0,m],525720)},891547,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:i,className:l,accessToken:n,disabled:c})=>{let[o,u]=(0,s.useState)([]),[d,p]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,a.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{p(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(r.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:i,loading:d,className:l,allowClear:!0,options:o.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(199133),a=e.i(764205);function i(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let s=e.version_number??1,r=e.version_status??"draft";return{label:`${e.policy_name} — v${s} (${r})${e.description?` — ${e.description}`:""}`,value:"production"===r?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:l,className:n,accessToken:c,disabled:o,onPoliciesLoaded:u})=>{let[d,p]=(0,s.useState)([]),[h,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(c){m(!0);try{let e=await (0,a.getPoliciesList)(c);e.policies&&(p(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[c,u]),(0,t.jsx)("div",{children:(0,t.jsx)(r.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:l,loading:h,className:n,allowClear:!0,options:i(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>i])},384767,e=>{"use strict";var t=e.i(843476),s=e.i(599724),r=e.i(271645),a=e.i(389083);let i=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 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"}))});var l=e.i(764205);let n=function({vectorStores:e,accessToken:n}){let[c,o]=(0,r.useState)([]);return(0,r.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,l.vectorStoreListCall)(n);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)}})()},[n,e.length]),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,t.jsx)(a.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((e,s)=>{let r;return(0,t.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:(r=c.find(t=>t.vector_store_id===e))?`${r.vector_store_name||r.vector_store_id} (${r.vector_store_id})`:e},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(i,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},c=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 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"}))});var o=e.i(871943),u=e.i(502547),d=e.i(592968);let p=function({mcpServers:e,mcpAccessGroups:i=[],mcpToolPermissions:n={},mcpToolsets:p=[],accessToken:h}){let[m,g]=(0,r.useState)([]),[x,f]=(0,r.useState)([]),[v,y]=(0,r.useState)(new Set),[b,j]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{(async()=>{if(h&&e.length>0)try{let e=await (0,l.fetchMCPServers)(h);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[h,e.length]),(0,r.useEffect)(()=>{(async()=>{if(h&&p.length>0)try{let e=await (0,l.fetchMCPToolsets)(h),t=Array.isArray(e)?e.filter(e=>p.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[h,p.length]);let w=[...e.map(e=>({type:"server",value:e})),...i.map(e=>({type:"accessGroup",value:e}))],N=w.length+p.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(a.Badge,{color:"blue",size:"xs",children:N})]}),N>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[w.map((e,s)=>{let r="server"===e.type?n[e.value]:void 0,a=r&&r.length>0,i=v.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return a&&(t=e.value,void y(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s}))},className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ${a?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,t.jsx)(d.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=m.find(t=>t.server_id===e);if(t){let s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${s})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.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,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:r.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===r.length?"tool":"tools"}),i?(0,t.jsx)(o.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&i&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:r.map((e,s)=>(0,t.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)}),p.length>0&&p.map((e,s)=>{let r=x.find(t=>t.toolset_id===e),a=b.has(e),i=r?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>i>0&&void j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-purple-200 transition-all ${i>0?"cursor-pointer hover:bg-purple-50 hover:border-purple-300":"bg-white"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:r?.toolset_name??e}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-purple-600 bg-purple-50 border border-purple-200 rounded uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),i>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:i}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===i?"tool":"tools"}),a?(0,t.jsx)(o.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),i>0&&a&&r&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-purple-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:r.tools.map((e,s)=>(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-purple-50 border border-purple-200 text-purple-800 text-xs font-medium",children:[(0,t.jsxs)("span",{className:"text-purple-400 mr-1 text-[10px]",children:[e.server_id.slice(0,6),"…"]}),e.tool_name]},s))})})]},`toolset-${s}`)})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(c,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.Text,{className:"text-gray-500 text-sm",children:"No MCP servers, access groups, or toolsets configured"})]})]})},h=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))}),m=function({agents:e,agentAccessGroups:i=[],accessToken:n}){let[c,o]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,l.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&o(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let u=[...e.map(e=>({type:"agent",value:e})),...i.map(e=>({type:"accessGroup",value:e}))],p=u.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(h,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(a.Badge,{color:"purple",size:"xs",children:p})]}),p>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:u.map((e,s)=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 bg-white",children:(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"agent"===e.type?(0,t.jsx)(d.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=c.find(t=>t.agent_id===e);if(t){let s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${s})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.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,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(h,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.Text,{className:"text-gray-500 text-sm",children:"No agents or access groups configured"})]})]})};e.s(["default",0,function({objectPermission:e,variant:r="card",className:a="",accessToken:i}){let l=e?.vector_stores||[],c=e?.mcp_servers||[],o=e?.mcp_access_groups||[],u=e?.mcp_tool_permissions||{},d=e?.mcp_toolsets||[],h=e?.agents||[],g=e?.agent_access_groups||[],x=(0,t.jsxs)("div",{className:"card"===r?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:l,accessToken:i}),(0,t.jsx)(p,{mcpServers:c,mcpAccessGroups:o,mcpToolPermissions:u,mcpToolsets:d,accessToken:i}),(0,t.jsx)(m,{agents:h,agentAccessGroups:g,accessToken:i})]});return"card"===r?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${a}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),x]}):(0,t.jsxs)("div",{className:`${a}`,children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var a=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(a.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["GlobalOutlined",0,i],160818)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2aa5ca37f441cf6f.js b/litellm/proxy/_experimental/out/_next/static/chunks/3bddc72a3ecc2253.js similarity index 64% rename from litellm/proxy/_experimental/out/_next/static/chunks/2aa5ca37f441cf6f.js rename to litellm/proxy/_experimental/out/_next/static/chunks/3bddc72a3ecc2253.js index 7b35028105..2010addaba 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/2aa5ca37f441cf6f.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3bddc72a3ecc2253.js @@ -1,3 +1,3 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.default)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);e.s(["Sparkles",()=>a],283086);let l=(0,s.default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",()=>l],195116)},97859,e=>{"use strict";e.s(["AGENT_CALL_TYPES",0,["asend_message"],"ERROR_CODE_OPTIONS",0,[{label:"400 - Bad Request",value:"400"},{label:"401 - Invalid Authentication",value:"401"},{label:"403 - Permission Denied",value:"403"},{label:"404 - Not Found",value:"404"},{label:"408 - Request Timeout",value:"408"},{label:"422 - Unprocessable Entity",value:"422"},{label:"429 - Rate Limited",value:"429"},{label:"500 - Internal Server Error",value:"500"},{label:"502 - Bad Gateway",value:"502"},{label:"503 - Service Unavailable",value:"503"},{label:"529 - Overloaded",value:"529"}],"MCP_CALL_TYPES",0,["call_mcp_tool","list_mcp_tools"],"QUICK_SELECT_OPTIONS",0,[{label:"Last 15 Minutes",value:15,unit:"minutes"},{label:"Last Hour",value:1,unit:"hours"},{label:"Last 4 Hours",value:4,unit:"hours"},{label:"Last 24 Hours",value:24,unit:"hours"},{label:"Last 7 Days",value:7,unit:"days"}]])},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,m=e.i(755151),x=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(m.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,x.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,x.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,n]=(0,s.useState)({});return e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 cursor-pointer",onClick:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h4",{className:"font-medium",children:["Detected Entities (",e.length,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[s]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>{n(e=>({...e,[s]:!e[s]}))},children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsx)("span",{className:"font-medium mr-2",children:e.entity_type}),(0,t.jsxs)("span",{className:`font-mono ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Entity Type:"}),(0,t.jsx)("span",{children:e.entity_type})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Position:"}),(0,t.jsxs)("span",{children:["Characters ",e.start,"-",e.end]})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Confidence:"}),(0,t.jsx)("span",{className:l(e.score),children:e.score.toFixed(2)})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[e.recognition_metadata&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Recognizer:"}),(0,t.jsx)("span",{children:e.recognition_metadata.recognizer_name})]}),(0,t.jsxs)("div",{className:"flex overflow-hidden",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Identifier:"}),(0,t.jsx)("span",{className:"truncate text-xs font-mono",children:e.recognition_metadata.recognizer_identifier})]})]}),e.analysis_explanation&&(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Explanation:"}),(0,t.jsx)("span",{children:e.analysis_explanation})]})]})]})})]},s)})})]}):null},i=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,o]=(0,s.useState)(l);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>o(e=>!e),children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${n?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),m=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=e.usage&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)});return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{label:"Blocked Response:",children:(0,t.jsx)("span",{className:"italic",children:e.blockedResponse})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Outputs"}),(0,t.jsx)("div",{className:"space-y-2",children:s.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsx)("div",{className:"text-sm whitespace-pre-wrap",children:e.text??(0,t.jsx)("em",{children:"(non-text output)"})})},s))})]})]}),e.assessments?.length?(0,t.jsx)("div",{className:"space-y-3",children:e.assessments.map((e,s)=>{let a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),children:[e.wordPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Word Policy"}),(e.wordPolicy.customWords?.length??0)>0&&(0,t.jsx)(o,{title:"Custom Words",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.customWords.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{title:"Managed Word Lists",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.managedWordLists.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(e.detected)]},s))})})]}),e.contentPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Content Policy"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Strength"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Confidence"})]})}),(0,t.jsx)("tbody",{children:e.contentPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.filterStrength??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.confidence??"—"})]},s))})]})})]}):null,e.contextualGroundingPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Contextual Grounding"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Score"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Threshold"})]})}),(0,t.jsx)("tbody",{children:e.contextualGroundingPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.score??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.threshold??"—"})]},s))})]})})]}):null,e.sensitiveInformationPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Sensitive Information"}),(e.sensitiveInformationPolicy.piiEntities?.length??0)>0&&(0,t.jsx)(o,{title:"PII Entities",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.piiEntities.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{title:"Custom Regexes",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.regexes.map((e,s)=>(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-2 bg-gray-50 rounded gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"regex"}),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.regex})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[n(e.detected),e.match&&(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]})]},s))})})]}),e.topicPolicy?.topics?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Topic Policy"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.topicPolicy.topics.map((e,s)=>(0,t.jsx)("div",{className:"px-3 py-1.5 bg-gray-50 rounded-md text-xs",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{title:"Invocation Metrics",defaultOpen:!1,children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`images ${e.invocationMetrics.guardrailCoverage.images.guarded??0}/${e.invocationMetrics.guardrailCoverage.images.total??0}`,"blue")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(d,{label:"Usage:",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.invocationMetrics.usage&&Object.entries(e.invocationMetrics.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)})})})]})}),e.automatedReasoningPolicy?.findings?.length?(0,t.jsx)(o,{title:"Automated Reasoning Findings",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.automatedReasoningPolicy.findings.map((e,s)=>(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},x=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(0,s.useState)(l);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>n(e=>!e),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({response:e})=>{if(!e||"string"==typeof e)return"string"==typeof e&&e?(0,t.jsx)("div",{className:"bg-white rounded-lg border border-red-200 p-4",children:(0,t.jsxs)("div",{className:"text-red-800",children:[(0,t.jsx)("h5",{className:"font-medium mb-2",children:"Error"}),(0,t.jsx)("p",{className:"text-sm",children:e})]})}):null;let s=Array.isArray(e)?e:[];if(0===s.length)return(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsx)("div",{className:"text-gray-600 text-sm",children:"No detections found"})});let a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=s.filter(e=>"MASK"===e.action).length,o=s.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&x(`${i} blocked`,"red"),n>0&&x(`${n} masked`,"blue"),0===i&&0===n&&x("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&x(`${a.length} patterns`,"slate"),l.length>0&&x(`${l.length} keywords`,"slate"),r.length>0&&x(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",count:a.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:a.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{title:"Blocked Words Detected",count:l.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:l.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",count:r.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:r.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:x(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M5 8l2 2 4-4",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),y=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M6 6l4 4M10 6l-4 4",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),j=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"animate-spin",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"#D1D5DB",strokeWidth:"2"}),(0,t.jsx)("path",{d:"M8 2a6 6 0 0 1 6 6",stroke:"#6366F1",strokeWidth:"2",strokeLinecap:"round"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(0,t.jsx)("span",{className:"font-medium text-sm text-gray-900",children:e})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded text-[11px] font-medium bg-gray-100 text-gray-500 border border-gray-200",children:"UNAVAILABLE"}),(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${n?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:e.check_name}),(0,t.jsx)("span",{className:"text-[10px] font-mono text-gray-400",children:e.article})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:e.detail})]})]},s))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),m(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>m(!1))},[e,a]),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Regulatory Compliance"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(b,{title:"EU AI Act",data:l,loading:o,error:x}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(e,t)=>{if(null==e)return!1;if("string"==typeof e)return e===t;if(Array.isArray(e))return e.includes(t);if("object"==typeof e&&"default"in e){let s=e.default;if("string"==typeof s)return s===t;if(Array.isArray(s))return s.some(e=>"string"==typeof e&&e===t)}return!1},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,C=()=>(0,t.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,t.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"#EEF2FF"}),(0,t.jsx)("path",{d:"M20 10l8 4v6c0 5.25-3.4 10.15-8 11.5C15.4 30.15 12 25.25 12 20v-6l8-4z",stroke:"#6366F1",strokeWidth:"1.5",fill:"none"}),(0,t.jsx)("path",{d:"M16 20l3 3 5-6",stroke:"#6366F1",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]}),T=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M7 11l3 3 5-6",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),L=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M8 8l6 6M14 8l-6 6",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),M=()=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#3B82F6",strokeWidth:"1.5",fill:"#EFF6FF"}),(0,t.jsx)("path",{d:"M9 7.5l6 3.5-6 3.5V7.5z",fill:"#3B82F6"})]}),A=()=>(0,t.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,t.jsx)("circle",{cx:"11",cy:"11",r:"5",fill:"#9CA3AF"})}),D=({expanded:e})=>(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${e?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),E=()=>(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M8 2v8m0 0l-3-3m3 3l3-3M3 12h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),I=({matchDetails:e})=>e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("h5",{className:"text-sm font-medium mb-2 text-gray-700",children:["Match Details (",e.length,")"]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b text-left text-gray-500",children:[(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Type"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Method"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Action"}),(0,t.jsx)("th",{className:"pb-2 font-medium",children:"Detail"})]})}),(0,t.jsx)("tbody",{children:e.map((e,s)=>(0,t.jsxs)("tr",{className:"border-b border-gray-100",children:[(0,t.jsx)("td",{className:"py-2 pr-4",children:e.type}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:"px-2 py-0.5 bg-slate-100 text-slate-700 rounded text-xs",children:e.detection_method??"-"})}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${"BLOCK"===e.action_taken?"bg-red-100 text-red-800":"bg-blue-50 text-blue-700"}`,children:e.action_taken??"-"})}),(0,t.jsxs)("td",{className:"py-2 font-mono text-xs text-gray-600 break-all",children:[e.category?`[${e.category}] `:"",e.snippet??"-"]})]},s))})]})})]}):null,O=({response:e})=>{let[a,l]=(0,s.useState)(!1);return(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>l(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(D,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},z=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);return(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Request Lifecycle"}),(0,t.jsx)("div",{className:"relative",children:l.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-3 relative",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(A,{}):"llm"===e.type?(0,t.jsx)(M,{}):e.isSuccess?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),x=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(e=>{if(null==e)return null;if("string"==typeof e)return e;if(Array.isArray(e)){let t=e[0];return"string"==typeof t?t:null}if("object"==typeof e&&"default"in e){let t=e.default;if("string"==typeof t)return t;if(Array.isArray(t)){let e=t[0];return"string"==typeof e?e:null}}return null})(e.guardrail_mode))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} matched`:null;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm truncate",children:x}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),null!=e.confidence_score&&(0,t.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(D,{expanded:n})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[e.classification&&(0,t.jsxs)("div",{className:"mb-3 bg-gray-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Classification"}),e.classification.category&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Category:"}),(0,t.jsx)("span",{children:e.classification.category})]}),e.classification.article_reference&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reference:"}),(0,t.jsx)("span",{className:"font-mono",children:e.classification.article_reference})]}),null!=e.classification.confidence&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Confidence:"}),(0,t.jsxs)("span",{children:[(100*e.classification.confidence).toFixed(0),"%"]})]}),e.classification.reason&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reason:"}),(0,t.jsx)("span",{children:e.classification.reason})]})]}),e.match_details&&e.match_details.length>0&&(0,t.jsx)(I,{matchDetails:e.match_details}),c>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Masked Entities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.masked_entity_count||{}).map(([e,s])=>(0,t.jsxs)("span",{className:"px-2 py-1 bg-blue-50 text-blue-700 rounded text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(m,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(O,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm w-full max-w-full overflow-hidden mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(C,{}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Guardrails & Policy Compliance"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-500",children:[r.length," guardrail",1!==r.length?"s":""," evaluated"]}),(0,t.jsx)("span",{className:"text-gray-300",children:"|"}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M3 6l2.5 2.5L9 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,i," Passed"]})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsx)("div",{className:"text-right",children:(0,t.jsxs)("div",{className:"text-sm font-medium text-gray-900",children:["Total: ",o,"ms overhead"]})}),(0,t.jsxs)("button",{onClick:()=>{let e=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download=`guardrail-compliance-log-${new Date().toISOString().slice(0,10)}.json`,s.click(),URL.revokeObjectURL(t)},className:"inline-flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(E,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,logEntry:l})}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("div",{className:"w-[340px] flex-shrink-0 border-r border-gray-100 px-6 py-5",children:(0,t.jsx)(z,{entries:r})}),(0,t.jsxs)("div",{className:"flex-1 px-6 py-5 min-w-0",children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Evaluation Details"}),(0,t.jsx)("div",{className:"space-y-3",children:r.map((e,s)=>(0,t.jsx)(R,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o,rawInputTokens:d,cacheReadTokens:c,cacheCreationTokens:m})=>{let x=o?.toLowerCase()==="true",u=void 0!==i||void 0!==n,p=e?.input_cost!==void 0||e?.output_cost!==void 0,h=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(p||u||h||e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount||void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount)))return null;let g=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),f=e&&(void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount),y=x?0:e?.input_cost,j=x?0:e?.output_cost,b=x?0:e?.original_cost,v=x?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Cost Breakdown"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mr-4",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Total:"}),(0,t.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[l(a),x&&" (Cached)"]})]})]}),children:(0,t.jsxs)("div",{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2 max-w-2xl",children:[(()=>{if(e?.cache_read_cost!==void 0||e?.cache_creation_cost!==void 0){let s=x?0:(y??0)-(e?.cache_read_cost??0)-(e?.cache_creation_cost??0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(s),null!=d&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",d.toLocaleString()," tokens)"]})]})]}),(e?.cache_read_cost??0)>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(x?0:e?.cache_read_cost),(c??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(c??0).toLocaleString()," tokens)"]})]})]}),(e?.cache_creation_cost??0)>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(x?0:e?.cache_creation_cost),(m??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(m??0).toLocaleString()," tokens)"]})]})]})]})}return(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(y),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.toLocaleString()," prompt tokens)"]})]})]})})(),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Output Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(j),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.toLocaleString()," completion tokens)"]})]})]}),e?.tool_usage_cost!==void 0&&e.tool_usage_cost>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Tool Usage Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:l(e.tool_usage_cost)})]}),e?.additional_costs&&Object.entries(e.additional_costs).filter(([,e])=>null!=e&&0!==e).map(([e,s])=>(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-600 font-medium w-1/3",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-900",children:l(s)})]},e))]}),!x&&(0,t.jsx)("div",{className:"pt-2 border-t border-gray-100 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex text-sm font-semibold",children:[(0,t.jsx)("span",{className:"text-gray-900 w-1/3",children:"Original LLM Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:l(b)})]})}),(g||f)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[g&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.discount_percent&&0!==e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Discount (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(e.discount_amount)]})]}),void 0!==e.discount_amount&&void 0===e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Discount Amount:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(e.discount_amount)]})]})]}),f&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.margin_percent&&0!==e.margin_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Margin (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((e.margin_total_amount||0)-(e.margin_fixed_amount||0))]})]}),void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Margin:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l(e.margin_fixed_amount)]})]})]})]}),(0,t.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-200 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"font-bold text-sm text-gray-900 w-1/3",children:"Final Calculated Cost:"}),(0,t.jsxs)("span",{className:"text-sm font-bold text-gray-900",children:[l(v),x&&" (Cached)"]})]})})]})}]})})}])},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({show:e,onOpenSettings:s})=>e?(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-start",children:[(0,t.jsx)("div",{className:"text-blue-500 mr-3 flex-shrink-0 mt-0.5",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,t.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-blue-800",children:"Request/Response Data Not Available"}),(0,t.jsxs)("p",{className:"text-sm text-blue-700 mt-1",children:["To view request and response details, enable prompt storage in your LiteLLM configuration by adding the following to your ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded",children:"proxy_config.yaml"})," file",s&&(0,t.jsxs)(t.Fragment,{children:[" or"," ",(0,t.jsx)("button",{onClick:s,className:"text-blue-600 hover:text-blue-800 underline font-medium",children:"open the settings"})," ","to configure this directly."]})]}),(0,t.jsx)("pre",{className:"mt-2 bg-white p-3 rounded border border-blue-200 text-xs font-mono overflow-auto",children:`general_settings: +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.default)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);e.s(["Sparkles",()=>a],283086);let l=(0,s.default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",()=>l],195116)},97859,e=>{"use strict";e.s(["AGENT_CALL_TYPES",0,["asend_message"],"ERROR_CODE_OPTIONS",0,[{label:"400 - Bad Request",value:"400"},{label:"401 - Invalid Authentication",value:"401"},{label:"403 - Permission Denied",value:"403"},{label:"404 - Not Found",value:"404"},{label:"408 - Request Timeout",value:"408"},{label:"422 - Unprocessable Entity",value:"422"},{label:"429 - Rate Limited",value:"429"},{label:"500 - Internal Server Error",value:"500"},{label:"502 - Bad Gateway",value:"502"},{label:"503 - Service Unavailable",value:"503"},{label:"529 - Overloaded",value:"529"}],"MCP_CALL_TYPES",0,["call_mcp_tool","list_mcp_tools"],"QUICK_SELECT_OPTIONS",0,[{label:"Last 15 Minutes",value:15,unit:"minutes"},{label:"Last Hour",value:1,unit:"hours"},{label:"Last 4 Hours",value:4,unit:"hours"},{label:"Last 24 Hours",value:24,unit:"hours"},{label:"Last 7 Days",value:7,unit:"days"}]])},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,m=e.i(755151),x=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(m.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,x.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,x.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,n]=(0,s.useState)({});return e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 cursor-pointer",onClick:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h4",{className:"font-medium",children:["Detected Entities (",e.length,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[s]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>{n(e=>({...e,[s]:!e[s]}))},children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsx)("span",{className:"font-medium mr-2",children:e.entity_type}),(0,t.jsxs)("span",{className:`font-mono ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Entity Type:"}),(0,t.jsx)("span",{children:e.entity_type})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Position:"}),(0,t.jsxs)("span",{children:["Characters ",e.start,"-",e.end]})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Confidence:"}),(0,t.jsx)("span",{className:l(e.score),children:e.score.toFixed(2)})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[e.recognition_metadata&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Recognizer:"}),(0,t.jsx)("span",{children:e.recognition_metadata.recognizer_name})]}),(0,t.jsxs)("div",{className:"flex overflow-hidden",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Identifier:"}),(0,t.jsx)("span",{className:"truncate text-xs font-mono",children:e.recognition_metadata.recognizer_identifier})]})]}),e.analysis_explanation&&(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Explanation:"}),(0,t.jsx)("span",{children:e.analysis_explanation})]})]})]})})]},s)})})]}):null},i=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,o]=(0,s.useState)(l);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>o(e=>!e),children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${n?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),m=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=e.usage&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)});return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{label:"Blocked Response:",children:(0,t.jsx)("span",{className:"italic",children:e.blockedResponse})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Outputs"}),(0,t.jsx)("div",{className:"space-y-2",children:s.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsx)("div",{className:"text-sm whitespace-pre-wrap",children:e.text??(0,t.jsx)("em",{children:"(non-text output)"})})},s))})]})]}),e.assessments?.length?(0,t.jsx)("div",{className:"space-y-3",children:e.assessments.map((e,s)=>{let a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),children:[e.wordPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Word Policy"}),(e.wordPolicy.customWords?.length??0)>0&&(0,t.jsx)(o,{title:"Custom Words",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.customWords.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{title:"Managed Word Lists",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.managedWordLists.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(e.detected)]},s))})})]}),e.contentPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Content Policy"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Strength"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Confidence"})]})}),(0,t.jsx)("tbody",{children:e.contentPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.filterStrength??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.confidence??"—"})]},s))})]})})]}):null,e.contextualGroundingPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Contextual Grounding"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Score"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Threshold"})]})}),(0,t.jsx)("tbody",{children:e.contextualGroundingPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.score??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.threshold??"—"})]},s))})]})})]}):null,e.sensitiveInformationPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Sensitive Information"}),(e.sensitiveInformationPolicy.piiEntities?.length??0)>0&&(0,t.jsx)(o,{title:"PII Entities",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.piiEntities.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{title:"Custom Regexes",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.regexes.map((e,s)=>(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-2 bg-gray-50 rounded gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"regex"}),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.regex})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[n(e.detected),e.match&&(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]})]},s))})})]}),e.topicPolicy?.topics?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Topic Policy"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.topicPolicy.topics.map((e,s)=>(0,t.jsx)("div",{className:"px-3 py-1.5 bg-gray-50 rounded-md text-xs",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{title:"Invocation Metrics",defaultOpen:!1,children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`images ${e.invocationMetrics.guardrailCoverage.images.guarded??0}/${e.invocationMetrics.guardrailCoverage.images.total??0}`,"blue")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(d,{label:"Usage:",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.invocationMetrics.usage&&Object.entries(e.invocationMetrics.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)})})})]})}),e.automatedReasoningPolicy?.findings?.length?(0,t.jsx)(o,{title:"Automated Reasoning Findings",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.automatedReasoningPolicy.findings.map((e,s)=>(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},x=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(0,s.useState)(l);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>n(e=>!e),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({response:e})=>{if(!e||"string"==typeof e)return"string"==typeof e&&e?(0,t.jsx)("div",{className:"bg-white rounded-lg border border-red-200 p-4",children:(0,t.jsxs)("div",{className:"text-red-800",children:[(0,t.jsx)("h5",{className:"font-medium mb-2",children:"Error"}),(0,t.jsx)("p",{className:"text-sm",children:e})]})}):null;let s=Array.isArray(e)?e:[];if(0===s.length)return(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsx)("div",{className:"text-gray-600 text-sm",children:"No detections found"})});let a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=s.filter(e=>"MASK"===e.action).length,o=s.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&x(`${i} blocked`,"red"),n>0&&x(`${n} masked`,"blue"),0===i&&0===n&&x("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&x(`${a.length} patterns`,"slate"),l.length>0&&x(`${l.length} keywords`,"slate"),r.length>0&&x(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",count:a.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:a.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{title:"Blocked Words Detected",count:l.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:l.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",count:r.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:r.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:x(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M5 8l2 2 4-4",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),y=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M6 6l4 4M10 6l-4 4",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),j=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"animate-spin",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"#D1D5DB",strokeWidth:"2"}),(0,t.jsx)("path",{d:"M8 2a6 6 0 0 1 6 6",stroke:"#6366F1",strokeWidth:"2",strokeLinecap:"round"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(0,t.jsx)("span",{className:"font-medium text-sm text-gray-900",children:e})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded text-[11px] font-medium bg-gray-100 text-gray-500 border border-gray-200",children:"UNAVAILABLE"}),(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${n?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:e.check_name}),(0,t.jsx)("span",{className:"text-[10px] font-mono text-gray-400",children:e.article})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:e.detail})]})]},s))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),m(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>m(!1))},[e,a]),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Regulatory Compliance"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(b,{title:"EU AI Act",data:l,loading:o,error:x}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(e,t)=>{if(null==e)return!1;if("string"==typeof e)return e===t;if(Array.isArray(e))return e.includes(t);if("object"==typeof e&&"default"in e){let s=e.default;if("string"==typeof s)return s===t;if(Array.isArray(s))return s.some(e=>"string"==typeof e&&e===t)}return!1},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,C=()=>(0,t.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,t.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"#EEF2FF"}),(0,t.jsx)("path",{d:"M20 10l8 4v6c0 5.25-3.4 10.15-8 11.5C15.4 30.15 12 25.25 12 20v-6l8-4z",stroke:"#6366F1",strokeWidth:"1.5",fill:"none"}),(0,t.jsx)("path",{d:"M16 20l3 3 5-6",stroke:"#6366F1",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]}),T=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M7 11l3 3 5-6",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),L=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M8 8l6 6M14 8l-6 6",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),M=()=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#3B82F6",strokeWidth:"1.5",fill:"#EFF6FF"}),(0,t.jsx)("path",{d:"M9 7.5l6 3.5-6 3.5V7.5z",fill:"#3B82F6"})]}),A=()=>(0,t.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,t.jsx)("circle",{cx:"11",cy:"11",r:"5",fill:"#9CA3AF"})}),E=({expanded:e})=>(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${e?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),D=()=>(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M8 2v8m0 0l-3-3m3 3l3-3M3 12h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),I=({matchDetails:e})=>e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("h5",{className:"text-sm font-medium mb-2 text-gray-700",children:["Match Details (",e.length,")"]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b text-left text-gray-500",children:[(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Type"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Method"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Action"}),(0,t.jsx)("th",{className:"pb-2 font-medium",children:"Detail"})]})}),(0,t.jsx)("tbody",{children:e.map((e,s)=>(0,t.jsxs)("tr",{className:"border-b border-gray-100",children:[(0,t.jsx)("td",{className:"py-2 pr-4",children:e.type}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:"px-2 py-0.5 bg-slate-100 text-slate-700 rounded text-xs",children:e.detection_method??"-"})}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${"BLOCK"===e.action_taken?"bg-red-100 text-red-800":"bg-blue-50 text-blue-700"}`,children:e.action_taken??"-"})}),(0,t.jsxs)("td",{className:"py-2 font-mono text-xs text-gray-600 break-all",children:[e.category?`[${e.category}] `:"",e.snippet??"-"]})]},s))})]})})]}):null,O=({response:e})=>{let[a,l]=(0,s.useState)(!1);return(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>l(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(E,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},z=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);return(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Request Lifecycle"}),(0,t.jsx)("div",{className:"relative",children:l.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-3 relative",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(A,{}):"llm"===e.type?(0,t.jsx)(M,{}):e.isSuccess?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),x=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(e=>{if(null==e)return null;if("string"==typeof e)return e;if(Array.isArray(e)){let t=e[0];return"string"==typeof t?t:null}if("object"==typeof e&&"default"in e){let t=e.default;if("string"==typeof t)return t;if(Array.isArray(t)){let e=t[0];return"string"==typeof e?e:null}}return null})(e.guardrail_mode))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} matched`:null;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm truncate",children:x}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),null!=e.confidence_score&&(0,t.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(E,{expanded:n})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[e.classification&&(0,t.jsxs)("div",{className:"mb-3 bg-gray-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Classification"}),e.classification.category&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Category:"}),(0,t.jsx)("span",{children:e.classification.category})]}),e.classification.article_reference&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reference:"}),(0,t.jsx)("span",{className:"font-mono",children:e.classification.article_reference})]}),null!=e.classification.confidence&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Confidence:"}),(0,t.jsxs)("span",{children:[(100*e.classification.confidence).toFixed(0),"%"]})]}),e.classification.reason&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reason:"}),(0,t.jsx)("span",{children:e.classification.reason})]})]}),e.match_details&&e.match_details.length>0&&(0,t.jsx)(I,{matchDetails:e.match_details}),c>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Masked Entities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.masked_entity_count||{}).map(([e,s])=>(0,t.jsxs)("span",{className:"px-2 py-1 bg-blue-50 text-blue-700 rounded text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(m,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(O,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm w-full max-w-full overflow-hidden mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(C,{}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Guardrails & Policy Compliance"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-500",children:[r.length," guardrail",1!==r.length?"s":""," evaluated"]}),(0,t.jsx)("span",{className:"text-gray-300",children:"|"}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M3 6l2.5 2.5L9 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,i," Passed"]})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsx)("div",{className:"text-right",children:(0,t.jsxs)("div",{className:"text-sm font-medium text-gray-900",children:["Total: ",o,"ms overhead"]})}),(0,t.jsxs)("button",{onClick:()=>{let e=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download=`guardrail-compliance-log-${new Date().toISOString().slice(0,10)}.json`,s.click(),URL.revokeObjectURL(t)},className:"inline-flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(D,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,logEntry:l})}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("div",{className:"w-[340px] flex-shrink-0 border-r border-gray-100 px-6 py-5",children:(0,t.jsx)(z,{entries:r})}),(0,t.jsxs)("div",{className:"flex-1 px-6 py-5 min-w-0",children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Evaluation Details"}),(0,t.jsx)("div",{className:"space-y-3",children:r.map((e,s)=>(0,t.jsx)(R,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o,rawInputTokens:d,cacheReadTokens:c,cacheCreationTokens:m})=>{let x=o?.toLowerCase()==="true",u=void 0!==i||void 0!==n,p=e?.input_cost!==void 0||e?.output_cost!==void 0,h=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(p||u||h||e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount||void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount)))return null;let g=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),f=e&&(void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount),y=x?0:e?.input_cost,j=x?0:e?.output_cost,b=x?0:e?.original_cost,v=x?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Cost Breakdown"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mr-4",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Total:"}),(0,t.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[l(a),x&&" (Cached)"]})]})]}),children:(0,t.jsxs)("div",{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2 max-w-2xl",children:[(()=>{if(e?.cache_read_cost!==void 0||e?.cache_creation_cost!==void 0){let s=x?0:(y??0)-(e?.cache_read_cost??0)-(e?.cache_creation_cost??0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(s),null!=d&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",d.toLocaleString()," tokens)"]})]})]}),(e?.cache_read_cost??0)>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(x?0:e?.cache_read_cost),(c??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(c??0).toLocaleString()," tokens)"]})]})]}),(e?.cache_creation_cost??0)>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(x?0:e?.cache_creation_cost),(m??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(m??0).toLocaleString()," tokens)"]})]})]})]})}return(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(y),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.toLocaleString()," prompt tokens)"]})]})]})})(),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Output Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(j),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.toLocaleString()," completion tokens)"]})]})]}),e?.tool_usage_cost!==void 0&&e.tool_usage_cost>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Tool Usage Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:l(e.tool_usage_cost)})]}),e?.additional_costs&&Object.entries(e.additional_costs).filter(([,e])=>null!=e&&0!==e).map(([e,s])=>(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-600 font-medium w-1/3",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-900",children:l(s)})]},e))]}),!x&&(0,t.jsx)("div",{className:"pt-2 border-t border-gray-100 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex text-sm font-semibold",children:[(0,t.jsx)("span",{className:"text-gray-900 w-1/3",children:"Original LLM Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:l(b)})]})}),(g||f)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[g&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.discount_percent&&0!==e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Discount (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(e.discount_amount)]})]}),void 0!==e.discount_amount&&void 0===e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Discount Amount:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(e.discount_amount)]})]})]}),f&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.margin_percent&&0!==e.margin_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Margin (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((e.margin_total_amount||0)-(e.margin_fixed_amount||0))]})]}),void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Margin:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l(e.margin_fixed_amount)]})]})]})]}),(0,t.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-200 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"font-bold text-sm text-gray-900 w-1/3",children:"Final Calculated Cost:"}),(0,t.jsxs)("span",{className:"text-sm font-bold text-gray-900",children:[l(v),x&&" (Cached)"]})]})})]})}]})})}])},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({show:e,onOpenSettings:s})=>e?(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-start",children:[(0,t.jsx)("div",{className:"text-blue-500 mr-3 flex-shrink-0 mt-0.5",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,t.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-blue-800",children:"Request/Response Data Not Available"}),(0,t.jsxs)("p",{className:"text-sm text-blue-700 mt-1",children:["To view request and response details, enable prompt storage in your LiteLLM configuration by adding the following to your ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded",children:"proxy_config.yaml"})," file",s&&(0,t.jsxs)(t.Fragment,{children:[" or"," ",(0,t.jsx)("button",{onClick:s,className:"text-blue-600 hover:text-blue-800 underline font-medium",children:"open the settings"})," ","to configure this directly."]})]}),(0,t.jsx)("pre",{className:"mt-2 bg-white p-3 rounded border border-blue-200 text-xs font-mono overflow-auto",children:`general_settings: store_model_in_db: true - store_prompts_in_spend_logs: true`}),(0,t.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change."})]})]}):null])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),m=e.i(195116),x=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(70635),M=e.i(70969),A=e.i(916925);function D({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Vector Store Requests"}),children:(0,t.jsx)("div",{className:"p-4",children:e.map((e,s)=>{var i,n;return(0,t.jsxs)("div",{className:"mb-6 last:mb-0",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border p-4 mb-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Query:"}),(0,t.jsx)("span",{className:"font-mono",children:e.query})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Vector Store ID:"}),(0,t.jsx)("span",{className:"font-mono",children:e.vector_store_id})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,t.jsx)("span",{className:"flex items-center",children:(()=>{let{logo:s,displayName:a}=(0,A.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,t.jsx)("span",{children:r(e.start_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,t.jsx)("span",{children:r(e.end_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,t.jsx)("span",{children:(i=e.start_time,n=e.end_time,`${((n-i)*1e3).toFixed(2)}ms`)})]})]})]})}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Search Results"}),(0,t.jsx)("div",{className:"space-y-2",children:e.vector_store_search_response.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center p-3 bg-gray-50 cursor-pointer",onClick:()=>{let e;return e=`${s}-${r}`,void l(t=>({...t,[e]:!t[e]}))},children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+1]}),(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["Score: ",(0,t.jsx)("span",{className:"font-mono",children:e.score.toFixed(4)})]})]})]}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:e.content.map((e,s)=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:e.type}),(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all bg-gray-50 p-2 rounded",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>D],331052);var E=e.i(592968),I=e.i(207066);let{Text:O}=g.Typography;function z({value:e,maxWidth:s=I.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(E.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:I.FONT_FAMILY_MONO,fontSize:I.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:R}=g.Typography;function P({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(R,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let B=e=>!!e&&e instanceof Date,F=e=>"object"==typeof e&&null!==e,q=e=>!!e&&e instanceof Object&&"function"==typeof e;function H(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function $(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:m,outerRef:x,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},H(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!x.current)return;let s=x.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=x.current)?void 0:e.querySelector('[role=button][tabindex="0"]');s&&(s.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,s.createElement)("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},(0,s.createElement)("span",{className:j,onClick:S,onKeyDown:w,role:"button","aria-label":b,"aria-expanded":h,"aria-controls":h?y:void 0,ref:f,tabIndex:0===o?0:-1}),(t||""===t)&&(m?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},H(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},H(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(W,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:m,beforeExpandChange:u,outerRef:x}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function Y(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function K(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function V(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=B(l)?l.toISOString():q(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},H(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function W(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(K,Object.assign({},e)):!F(t)||B(t)||q(t)?(0,s.createElement)(V,Object.assign({},e)):(0,s.createElement)(Y,Object.assign({},e))}let U={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},G=()=>!0,J=e=>{let{data:t,style:a=U,shouldExpandNode:l=G,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&F(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(W,{key:t,field:t,value:n,style:{...U,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(W,{value:t,style:{...U,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>J,"defaultStyles",()=>U],867612);let{Text:Q}=g.Typography;function X({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:I.JSON_MAX_HEIGHT,overflow:"auto",background:I.COLOR_BG_LIGHT,padding:I.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(J,{data:e,style:U,clickToExpandNode:!0})})}):(0,t.jsx)(Q,{type:"secondary",children:"No data"})}function Z(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function ee(e){return Array.isArray(e)?e:e?[e]:[]}function et(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var es=e.i(366308),ea=e.i(755151),el=e.i(291542);let{Text:er}=g.Typography;function ei({tool:e}){let s=Object.entries(e.parameters?.properties||{}).map(([t,s])=>({key:t,name:t,type:s.type||"any",description:s.description||"-",required:e.parameters?.required?.includes(t)||!1})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(er,{code:!0,children:[e,s.required&&(0,t.jsx)(er,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(er,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(er,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(er,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(el.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Called With"}),(0,t.jsx)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:4,padding:12},children:(0,t.jsx)("pre",{style:{margin:0,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(e.callData.arguments,null,2)})})]})]})}function en({tool:e}){let s={type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}};return(0,t.jsx)("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12,background:"#fafafa",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(s,null,2)})}let{Text:eo}=g.Typography;function ed({tool:e}){let[a,l]=(0,s.useState)("formatted");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12},children:[(0,t.jsx)(eo,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(ei,{tool:e}):(0,t.jsx)(en,{tool:e})]})}let{Text:ec}=g.Typography;function em({tool:e}){let[a,l]=(0,s.useState)(!1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(es.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ec,{style:{fontSize:14},children:[e.index,". ",e.name]})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(j.Tag,{color:e.called?"blue":"default",children:e.called?"called":"not called"}),a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ed,{tool:e})})]})}let{Text:ex}=g.Typography;function eu({log:e}){let s=function(e){let t,s=!(t=et(e.proxy_server_request||e.messages))||Array.isArray(t)?[]:"object"==typeof t&&t.tools&&Array.isArray(t.tools)?t.tools:[];if(0===s.length)return[];let a=function(e){let t=et(e.response);if(!t||"object"!=typeof t)return[];let s=t.choices;if(Array.isArray(s)&&s.length>0){let e=s[0].message;if(e&&Array.isArray(e.tool_calls))return e.tool_calls}if(Array.isArray(t.content)){let e=t.content.filter(e=>"tool_use"===e.type);if(e.length>0)return e.map(e=>({id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.input||{})}}))}if(Array.isArray(t.tool_calls))return t.tool_calls;if(Array.isArray(t.results)){let e=[];for(let s of t.results)if("response.done"===s.type&&s.response?.output)for(let t of s.response.output)"function_call"===t.type&&e.push({id:t.call_id||"",type:"function",function:{name:t.name||"",arguments:t.arguments||"{}"}});if(e.length>0)return e}return[]}(e),l=new Set(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.set(t,{id:e.id,name:t,arguments:function(e){try{return JSON.parse(e)}catch{return{}}}(e.function?.arguments||"{}")})}),s.map((e,t)=>{let s=e.function?.name||e.name||`Tool ${t+1}`;return{index:t+1,name:s,description:e.function?.description||e.description||"",parameters:e.function?.parameters||e.input_schema||{},called:l.has(s),callData:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Tools"}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let ep=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eh=e.i(888259),eg=e.i(264843),ef=e.i(624001);let{Text:ey}=g.Typography;function ej({type:e,tokens:s,cost:l,onCopy:r,isCollapsed:n,onToggleCollapse:o,turnCount:d}){return(0,t.jsxs)("div",{onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:n?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:o?"pointer":"default",transition:"background 0.15s ease"},onMouseEnter:e=>{o&&(e.currentTarget.style.background="#f5f5f5")},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[o&&(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:n?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ey,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(E.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:eb}=g.Typography;function ev({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(eb,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(eb,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(0,t.jsx)("div",{style:{maxHeight:r?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!r},children:(0,t.jsx)("div",{style:{paddingLeft:16,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:e_}=g.Typography;function eN({tool:e,compact:s=!1}){return(0,t.jsxs)("div",{style:{background:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:6,padding:s?"6px 10px":"10px 14px",marginTop:8,fontFamily:"monospace",fontSize:12,position:"relative"},children:[(0,t.jsx)("div",{style:{position:"absolute",top:-8,left:12,background:"#fff",padding:"0 6px",fontSize:10,color:"#8c8c8c",border:"1px solid #e9ecef",borderRadius:3},children:"function"}),(0,t.jsx)(e_,{strong:!0,style:{fontSize:13,display:"block",marginBottom:6},children:e.name}),Object.keys(e.arguments).length>0&&(0,t.jsx)("div",{children:Object.entries(e.arguments).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:2},children:[(0,t.jsxs)(e_,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(e_,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:ew}=g.Typography;function eS({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(ew,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(eN,{tool:e,compact:l},e.id||s))})]}):null}let{Text:ek}=g.Typography;function eC({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:["HISTORY (",e.length," message",1!==e.length?"s":"",")"]})]}),(0,t.jsx)("div",{style:{maxHeight:a?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!a},children:(0,t.jsx)("div",{style:{paddingLeft:16,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(eS,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eT({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=e.find(e=>"system"===e.role),o=e.filter(e=>"system"!==e.role),d=o.length>0?o[o.length-1]:null,c=o.slice(0,-1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eh.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(ev,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eC,{messages:c}),d&&(0,t.jsx)(eS,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eL}=g.Typography;function eM({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eh.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eS,{label:"ASSISTANT",content:e.content,toolCalls:e.toolCalls})})})]}):(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eL,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eA=e.i(782273),eD=e.i(313603),eE=e.i(793916);let{Text:eI}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(ez,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eR,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.length&&(0,t.jsx)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"16px",color:"#8c8c8c",fontStyle:"italic",fontSize:13},children:"No recognized realtime events found"})]})}function ez({session:e,turnCount:a}){let[l,r]=(0,s.useState)(!0);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)("div",{onClick:()=>r(!l),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:l?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:"pointer",transition:"background 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:l?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eD.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(eI,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(eI,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eA.SoundOutlined,{})," ",e.voice]}),e.modalities&&(0,t.jsx)("div",{style:{display:"flex",gap:4},children:e.modalities.map(e=>(0,t.jsxs)(j.Tag,{style:{margin:0},children:["audio"===e?(0,t.jsx)(eE.AudioOutlined,{}):(0,t.jsx)(eg.MessageOutlined,{})," ",e]},e))})]})}),(0,t.jsx)("div",{style:{maxHeight:l?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!l},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 24px",fontSize:13},children:[(0,t.jsx)(eq,{label:"Model",value:e.model}),(0,t.jsx)(eq,{label:"Voice",value:e.voice}),(0,t.jsx)(eq,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eq,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eq,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eq,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eq,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eq,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:4},children:"Instructions"}),(0,t.jsx)("div",{style:{fontSize:12,lineHeight:1.6,color:"#595959",background:"#fafafa",padding:"8px 12px",borderRadius:4,border:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:120,overflowY:"auto"},children:e.instructions})]})]})})]})}function eR({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:l?.completion_tokens??n,cost:l?.output_cost,onCopy:()=>{let t=e.flatMap(e=>(e.output||[]).flatMap(e=>(e.content||[]).map(t=>`${e.role}: ${t.transcript||t.text||""}`))).join("\n");navigator.clipboard.writeText(t)},isCollapsed:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eP,{response:e,index:s},e.id||s))})})]})}function eP({response:e,index:s}){let a=e.output||[],l=e.usage;return(0,t.jsxs)("div",{style:{marginBottom:12,paddingBottom:12,borderBottom:"1px solid #f5f5f5"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)(j.Tag,{color:"completed"===e.status?"green":"orange",style:{margin:0},children:e.status||"unknown"}),l&&(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(E.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eB,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eF,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eF,{label:"Output",details:l.output_token_details})]})}function eB({output:e}){let s=e.content||[];return s.some(e=>e.transcript||e.text)?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eE.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})]},s):null})]}):null}function eF({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:[e," Token Breakdown"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:4},children:a.map(([e,s])=>"number"==typeof s?(0,t.jsxs)(j.Tag,{style:{margin:0},children:[e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),": ",s.toLocaleString()]},e):null)})]})}function eq({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function eH({request:e,response:s,metrics:a}){let l,r,i;if(s&&s.results&&Array.isArray(s.results)&&0!==s.results.length&&s.results.some(e=>"session.created"===e.type||"session.updated"===e.type||"response.done"===e.type))return(0,t.jsx)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&Array.isArray(e.messages)&&e.messages.forEach(e=>{let t;l.push({role:e.role||"user",content:"string"==typeof(t=e.content)?t:Array.isArray(t)?t.map(e=>"string"==typeof e?e:"text"===e.type?e.text:"image_url"===e.type?"[Image]":JSON.stringify(e)).join("\n"):JSON.stringify(t),toolCallId:e.tool_call_id})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:ep(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eT,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eM,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:e$}=g.Typography;function eY({logEntry:e,onOpenSettings:s,isLoadingDetails:a=!1,accessToken:l}){var r,i;let n=e.metadata||{},o="failure"===n.status,d=o?n.error_information:null,c=!!(r=e.messages)&&(Array.isArray(r)?r.length>0:"object"==typeof r&&Object.keys(r).length>0),m=!!(i=e.response)&&Object.keys(Z(i)).length>0,x=!c&&!m&&!o&&!a,u=n?.guardrail_information,p=ee(u),h=p.length>0,g=p.reduce((e,t)=>{let s=t?.masked_entity_count;return s?e+Object.values(s).reduce((e,t)=>"number"==typeof t?e+t:e,0):e},0),j=0===p.length?"-":1===p.length?p[0]?.guardrail_name??"-":`${p.length} guardrails`,b=n.vector_store_request_metadata&&Array.isArray(n.vector_store_request_metadata)&&n.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${I.DRAWER_CONTENT_PADDING} ${I.DRAWER_CONTENT_PADDING} 0`},children:[o&&d&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eK,{errorInfo:d}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eV,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(z,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(z,{value:e.api_base,maxWidth:I.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),h&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eW,{label:j,maskedCount:g})})]})})}),(0,t.jsx)(eU,{logEntry:e,metadata:n}),(0,t.jsx)(L.CostBreakdownViewer,{costBreakdown:n?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit,rawInputTokens:n?.additional_usage_values?.prompt_tokens_details?.text_tokens,cacheReadTokens:n?.additional_usage_values?.cache_read_input_tokens,cacheCreationTokens:n?.additional_usage_values?.cache_creation_input_tokens}),(0,t.jsx)(eu,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(M.ConfigInfoMessage,{show:x,onOpenSettings:s})}),a?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eG,{hasResponse:m,hasError:o,getRawRequest:()=>Z(e.proxy_server_request||e.messages),getFormattedResponse:()=>o&&d?{error:{message:d.error_message||"An error occurred",type:d.error_class||"error",code:d.error_code||"unknown",param:null}}:Z(e.response),logEntry:e}),h&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:u,accessToken:l??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),b&&(0,t.jsx)(D,{data:n.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eQ,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:I.DRAWER_CONTENT_PADDING}})]})}function eK({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eV({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(e$,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:I.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eW({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:I.SPACING_MEDIUM,children:[(0,t.jsx)("a",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{cursor:"pointer"},children:e}),s>0&&(0,t.jsxs)(j.Tag,{color:"blue",children:[s," masked"]})]})}function eU({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default",o=function(e){let t=e?.additional_usage_values?.prompt_tokens_details?.text_tokens??e?.usage_object?.prompt_tokens_details?.text_tokens;if(null==t)return;let s=Number(t);return Number.isFinite(s)?s:void 0}(s),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Input Tokens",children:(0,C.formatNumberWithCommas)(o)}),(0,t.jsx)(f.Descriptions.Item,{label:"Output Tokens",children:(0,C.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(P,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.Descriptions.Item,{label:"Duration",children:[null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):"-"," s"]}),null!=l&&l>0&&(0,t.jsxs)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.Descriptions.Item,{label:"Retries",children:s?.attempted_retries!==void 0&&s?.attempted_retries!==null?s.attempted_retries>0?(0,t.jsxs)(t.Fragment,{children:[s.attempted_retries,void 0!==s.max_retries&&null!==s.max_retries?` / ${s.max_retries}`:""]}):(0,t.jsx)(j.Tag,{color:"green",children:"None"}):"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eG({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(I.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),m=i.spend??0,x=i.prompt_tokens||0,u=i.completion_tokens||0,p=x+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?m*x/p:0,y=g?h.output_cost??0:p>0?m*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},onClick:e=>{e.target.closest(".ant-radio-group")&&e.stopPropagation()},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",style:{margin:0},children:"Request & Response"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(eH,{request:l(),response:r(),metrics:{prompt_tokens:x,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(n===I.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===I.TAB_RESPONSE&&!e&&!a}),items:[{key:I.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:(0,t.jsx)(X,{data:l(),mode:"formatted"})})},{key:I.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:e||a?(0,t.jsx)(X,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eJ({guardrailEntries:e}){let s=e.every(e=>{let t=e?.guardrail_status||e?.status;return"pass"===t||"passed"===t||"success"===t});return(0,t.jsx)("div",{style:{textAlign:"left",marginBottom:12},children:(0,t.jsxs)("div",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 12px",borderRadius:16,cursor:"pointer",fontSize:13,fontWeight:500,backgroundColor:s?"#f0fdf4":"#fef2f2",color:s?"#15803d":"#b91c1c",border:`1px solid ${s?"#bbf7d0":"#fecaca"}`},children:[s?"✓":"✗"," ",e.length," guardrail",1!==e.length?"s":""," evaluated",(0,t.jsx)("span",{style:{fontSize:11,opacity:.7},children:"↓"})]})})}function eQ({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Metadata"}),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:8},children:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:I.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:I.FONT_SIZE_SMALL,fontFamily:I.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eX=e.i(764205),eZ=e.i(266027),e0=e.i(135214);function e1({row:e,isSelected:s,onClick:a}){let l=x.MCP_CALL_TYPES.includes(e.call_type),r=x.AGENT_CALL_TYPES.includes(e.call_type),i=null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):e.startTime&&e.endTime?((Date.parse(e.endTime)-Date.parse(e.startTime))/1e3).toFixed(3):"-";return(0,t.jsxs)("button",{type:"button",className:`w-full text-left pl-8 pr-2 py-1 transition-colors ${s?"bg-blue-50":"hover:bg-slate-100"}`,onClick:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(m.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(0,t.jsxs)("div",{className:"text-[10px] text-slate-500 mt-0 flex items-center gap-1.5 font-mono",children:[(0,t.jsxs)("span",{children:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.getSpendString)(e.spend)})]}):null,e.total_tokens?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[e.total_tokens," tok"]})]}):null]})]})}function e2({open:e,onClose:d,logEntry:c,sessionId:m,accessToken:u,onOpenSettings:g,allLogs:f=[],onSelectLog:y,startTime:j}){let b=!!m,[v,_]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),{data:T=[]}=(0,eZ.useQuery)({queryKey:["sessionLogs",m],queryFn:async()=>{if(!m||!u)return[];let e=await (0,eX.sessionSpendLogsCall)(u,m);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!x.MCP_CALL_TYPES.includes(e.call_type),a=+!!x.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&b&&m&&u)}),L=(0,s.useMemo)(()=>b?T.length?v?T.find(e=>e.request_id===v)||T[0]:c?.request_id&&T.find(e=>e.request_id===c.request_id)||T[0]:null:c,[b,c,v,T]);(0,s.useEffect)(()=>{b&&T.length&&(v&&T.some(e=>e.request_id===v)||_(c?.request_id&&T.some(e=>e.request_id===c.request_id)?c.request_id:T[0].request_id))},[b,c,v,T]),(0,s.useEffect)(()=>{e?w(!1):(b&&_(null),k(!1))},[e,b]);let{selectNextLog:M,selectPreviousLog:A}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:L,allLogs:b?T:f,onClose:d,onSelectLog:e=>{b&&_(e.request_id),y?.(e)}}),D=((e,t,s)=>{let{accessToken:a}=(0,e0.default)();return(0,eZ.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eX.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(L?.request_id,j,e&&!!L?.request_id),E=D.data,O=D.isLoading,z=(0,s.useMemo)(()=>L?{...L,messages:E?.messages||L.messages,response:E?.response||L.response,proxy_server_request:E?.proxy_server_request||L.proxy_server_request}:null,[L,E]),R=L?.metadata||{},P="failure"===R.status?"Failure":"Success",B="failure"===R.status?"error":"success",F=R?.user_api_key_team_alias||"default",q=T.reduce((e,t)=>e+(t.spend||0),0),H=T.length>0?new Date(Math.min(...T.map(e=>new Date(e.startTime).getTime()))):null,$=T.length>0?new Date(Math.max(...T.map(e=>new Date(e.endTime).getTime()))):null,Y=H&&$?(($.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=T.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,V=T.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,W=T.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length,U=b?T:L?[L]:[],G=b?m||"":L?.request_id||"",J=G.length>14?`${G.slice(0,11)}...`:G,Q=async()=>{if(G)try{await navigator.clipboard.writeText(G),k(!0),setTimeout(()=>k(!1),1200)}catch{}};return L&&z?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:I.DRAWER_WIDTH,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,overflow:"hidden"},header:{display:"none"}},children:(0,t.jsxs)("div",{style:{height:"100%"},className:"flex relative",children:[N?(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>w(!1),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Expand trace sidebar"}):(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>w(!0),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Collapse trace sidebar"}),!N&&(0,t.jsxs)("div",{className:"border-r border-slate-200 bg-slate-50 flex flex-col",style:{width:224},children:[(0,t.jsxs)("div",{className:"pl-12 pr-3 py-2 border-b border-slate-200 bg-white",children:[(0,t.jsx)("div",{className:"flex items-start justify-between gap-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:b?"Session":"Trace"}),(0,t.jsxs)("div",{className:"font-mono text-[12px] text-slate-900 leading-tight flex items-center gap-1",children:[(0,t.jsx)("span",{className:"truncate",children:J}),(0,t.jsx)("button",{type:"button",onClick:Q,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:S?(0,t.jsx)(r.CheckOutlined,{className:"text-[11px]"}):(0,t.jsx)(i.CopyOutlined,{className:"text-[11px]"})})]})]})}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500 font-mono",children:[U.length," req",[b?K:U.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?V:U.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?W:U.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),b?(0,C.getSpendString)(q):(0,C.getSpendString)(L.spend||0),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),Y,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[ee(R?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eJ,{guardrailEntries:ee(R?.guardrail_information)})}),b?(0,t.jsx)("div",{className:"py-1",children:(0,t.jsxs)("div",{className:"relative pl-2",children:[(0,t.jsx)("div",{className:"absolute left-4 top-1 bottom-1 border-l border-slate-300"}),U.map((e,s)=>{let a=s===U.length-1;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute left-4 top-3 w-3 border-t border-slate-300"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>{_(e.request_id),y?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:U.map(e=>(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>y?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:L,onClose:d,onPrevious:A,onNext:M,statusLabel:P,statusColor:B,environment:F}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eY,{logEntry:z,onOpenSettings:g,isLoadingDetails:O,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e2],502626),e.s([],3565)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},93648,245767,313793,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(207082),l=e.i(500330),r=e.i(871943),i=e.i(360820),n=e.i(94629),o=e.i(152990),d=e.i(682830),c=e.i(269200),m=e.i(942232),x=e.i(977572),u=e.i(427612),p=e.i(64848),h=e.i(496020),g=e.i(592968);function f({keys:e,totalCount:a,isLoading:f,isFetching:y,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,l.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,l.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,o.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,d.getCoreRowModel)(),getSortedRowModel:(0,d.getSortedRowModel)(),getPaginationRowModel:(0,d.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[f||y?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[f||y?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:f||y||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:f||y||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(u.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(h.TableRow,{children:e.headers.map(e=>(0,t.jsx)(p.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,o.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(i.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(r.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(m.TableBody,{children:f||y?(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(h.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(x.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,o.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function y(){let[e,l]=(0,s.useState)(0),[r]=(0,s.useState)(50),{data:i,isPending:n,isFetching:o}=(0,a.useDeletedKeys)(e+1,r);return(0,t.jsx)(f,{keys:i?.keys||[],totalCount:i?.total_count||0,isLoading:n,isFetching:o,pageIndex:e,pageSize:r,onPageChange:l})}e.s(["default",()=>y],93648);var j=e.i(785242),b=e.i(389083),v=e.i(599724),_=e.i(355619);function N({teams:e,isLoading:a,isFetching:f}){let[y,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),N=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,l.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,l.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(b.Badge,{size:"xs",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(b.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(v.Text,{children:e.length>30?`${(0,_.getModelDisplayName)(e).slice(0,30)}...`:(0,_.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(b.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(v.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(b.Badge,{size:"xs",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],w=(0,o.useReactTable)({data:e,columns:N,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:y},onSortingChange:j,getCoreRowModel:(0,d.getCoreRowModel)(),getSortedRowModel:(0,d.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||f?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:w.getCenterTotalSize()},children:[(0,t.jsx)(u.TableHead,{children:w.getHeaderGroups().map(e=>(0,t.jsx)(h.TableRow,{children:e.headers.map(e=>(0,t.jsx)(p.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,o.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(i.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(r.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${w.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(m.TableBody,{children:a||f?(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{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:"🚅 Loading teams..."})})})}):e.length>0?w.getRowModel().rows.map(e=>(0,t.jsx)(h.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(x.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,o.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{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:"No deleted teams found"})})})})})]})})})})]})})}function w(){let{data:e,isPending:s,isFetching:a}=(0,j.useDeletedTeams)(1,100);return(0,t.jsx)(N,{teams:e||[],isLoading:s,isFetching:a})}e.s(["default",()=>w],245767);var S=e.i(663435);e.s(["default",0,({value:e,onChange:s})=>(0,t.jsx)(S.default,{value:e,onChange:s})],313793);var k=e.i(625901),C=e.i(56456),T=e.i(152473),L=e.i(199133),M=e.i(770914);let{Text:A}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[m,x]=(0,T.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,k.useInfiniteModelInfo)(i,m||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(L.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),x(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(C.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(M.Space,{direction:"vertical",children:[(0,t.jsxs)(M.Space,{direction:"horizontal",children:[(0,t.jsx)(A,{strong:!0,children:"Model name:"}),(0,t.jsx)(A,{ellipsis:!0,children:s})]}),(0,t.jsxs)(A,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(A,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(C.LoadingOutlined,{spin:!0})})]})})}],291950)},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),m=e.i(482725),x=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.jsx)("pre",{className:"p-3 bg-white text-xs font-mono overflow-auto max-h-96 whitespace-pre-wrap break-all m-0",children:JSON.stringify(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function D({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,D]=(0,s.useState)(""),[E,I]=(0,s.useState)(""),[O,z]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,E,O,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:E||void 0,action:O||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../ui/assets/audit-logs-preview.png",alt:"Audit Logs Preview",style:{maxWidth:"100%",maxHeight:"700px",borderRadius:"8px",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",margin:"0 auto"},onError:e=>{e.target.style.display="none"}})]});let K=$.data?.audit_logs??[],V=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{D(e),_(1)},onChange:e=>{e.target.value||(D(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{z(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{label:"Keys",value:"LiteLLM_VerificationToken"},{label:"Teams",value:"LiteLLM_TeamTable"},{label:"Users",value:"LiteLLM_UserTable"},{label:"Organizations",value:"LiteLLM_OrganizationTable"},{label:"Models",value:"LiteLLM_ProxyModelTable"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(x.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:V,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(m.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>D],942161)},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.jsx)("path",{d:"M12 3l1.912 5.813a2 2 0 0 0 1.275 1.275L21 12l-5.813 1.912a2 2 0 0 0-1.275 1.275L12 21l-1.912-5.813a2 2 0 0 0-1.275-1.275L3 12l5.813-1.912a2 2 0 0 0 1.275-1.275L12 3z"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.jsx)("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),m=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),x=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-amber-50 text-amber-700 border border-amber-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-violet-50 text-violet-700 border border-violet-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(m,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(x,{});let f=(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(m,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",m="Model",x="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[m]:"",[x]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[D,E]=(0,t.useState)(null),I=(0,t.useRef)(0),O=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[x]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[m]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&E({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),E({data:[],total:0,page:1,page_size:v,total_pages:0})}},[y,j,b,_,v,k,C]),z=(0,t.useMemo)(()=>(0,i.default)((e,t)=>O(e,t),300),[O]);(0,t.useEffect)(()=>()=>z.cancel(),[z]);let R=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[x]||M[u]||M[g]||M[f]||M[m]),[M]);(0,t.useEffect)(()=>{R&&y&&(z.cancel(),O(M,T))},[k,C,T,j,b,_]);let P=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:v,total_pages:0};if(R)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[m]&&(t=t.filter(e=>e.model_id===M[m])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,R]),B=(0,t.useMemo)(()=>R?null!==D?D:{data:[],total:0,page:1,page_size:v,total_pages:0}:P,[R,D,P]),{data:F}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y});return{filters:M,filteredLogs:B,hasBackendFilters:R,allTeams:F,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),E(null),z(s,1)),s})},handleFilterReset:()=>{A(L),E(null),z.cancel(),N(1)}}}e.s(["useLogFilterLogic",()=>y],504809)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(313603),o=e.i(772345),d=e.i(793130),c=e.i(197647),m=e.i(653824),x=e.i(881073),u=e.i(404206),p=e.i(723731),h=e.i(464571),g=e.i(708347),f=e.i(93648),y=e.i(245767),j=e.i(313793),b=e.i(50882),v=e.i(291950),_=e.i(969550),N=e.i(764205),w=e.i(20147),S=e.i(942161),k=e.i(245099);e.i(70969);var C=e.i(97859);e.i(70635),e.i(339086);var T=e.i(504809);e.i(3565);var L=e.i(502626),M=e.i(727749);e.i(867612);var A=e.i(153472),D=e.i(954616),E=e.i(135214);let I=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=s?`${s}/config/update`:"/config/update",l=await fetch(a,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:t.store_prompts_in_spend_logs,...t.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:t.maximum_spend_logs_retention_period}}})});if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update spend logs settings")}return await l.json()};var O=e.i(190702),z=e.i(637235),R=e.i(808613),P=e.i(311451),B=e.i(212931),F=e.i(981339),q=e.i(770914),H=e.i(790848),$=e.i(898586);let Y=({isVisible:e,onCancel:s,onSuccess:a})=>{let[l]=R.Form.useForm(),{mutateAsync:r,isPending:n}=(()=>{let{accessToken:e}=(0,E.default)();return(0,D.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await I(e,t)}})})(),{mutateAsync:o,isPending:d}=(0,A.useDeleteProxyConfigField)(),{data:c,isLoading:m,refetch:x}=(0,A.useProxyConfig)(A.ConfigType.GENERAL_SETTINGS),u=R.Form.useWatch("store_prompts_in_spend_logs",l);(0,i.useEffect)(()=>{e&&x()},[e,x]);let p=(0,i.useMemo)(()=>{if(!c)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let e=c.find(e=>"store_prompts_in_spend_logs"===e.field_name),t=c.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:e?.field_value??!1,maximum_spend_logs_retention_period:t?.field_value??void 0}},[c]),g=async e=>{try{let t=e.maximum_spend_logs_retention_period;if(!t||"string"==typeof t&&""===t.trim())try{await o({config_type:A.ConfigType.GENERAL_SETTINGS,field_name:A.GeneralSettingsFieldName.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD})}catch(e){console.warn("Failed to delete retention period field (may not exist):",e)}let s={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...t&&"string"==typeof t&&""!==t.trim()&&{maximum_spend_logs_retention_period:t}};await r(s,{onSuccess:()=>{M.default.success("Spend logs settings updated successfully"),x(),a?.()},onError:e=>{M.default.fromBackend("Failed to save spend logs settings: "+(0,O.parseErrorMessage)(e))}})}catch(e){M.default.fromBackend("Failed to save spend logs settings: "+(0,O.parseErrorMessage)(e))}},f=()=>{l.resetFields(),s()};return(0,t.jsx)(B.Modal,{title:(0,t.jsx)($.Typography.Title,{level:5,children:"Spend Logs Settings"}),open:e,footer:(0,t.jsxs)(q.Space,{children:[(0,t.jsx)(h.Button,{onClick:f,disabled:n||d||m,children:"Cancel"}),(0,t.jsx)(h.Button,{type:"primary",loading:n||d,disabled:m,onClick:()=>l.submit(),children:n||d?"Saving...":"Save Settings"})]}),onCancel:f,children:(0,t.jsxs)(R.Form,{form:l,layout:"horizontal",onFinish:g,initialValues:p,children:[(0,t.jsx)(R.Form.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:c?.find(e=>"store_prompts_in_spend_logs"===e.field_name)?.field_description||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:(0,t.jsx)("div",{children:m?(0,t.jsx)(F.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(H.Switch,{checked:u??!1,onChange:e=>l.setFieldValue("store_prompts_in_spend_logs",e)})})}),(0,t.jsx)(R.Form.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:c?.find(e=>"maximum_spend_logs_retention_period"===e.field_name)?.field_description||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:m?(0,t.jsx)(F.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(P.Input,{placeholder:"e.g., 7d, 30d",prefix:(0,t.jsx)(z.ClockCircleOutlined,{})})})]},c?JSON.stringify(p):"loading")})};var K=e.i(149121);function V({accessToken:e,token:M,userRole:A,userID:D,premiumUser:E}){let[I,O]=(0,i.useState)(""),[z,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),$=(0,i.useRef)(null),V=(0,i.useRef)(null),W=(0,i.useRef)(null),[U,G]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(null),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(""),[eb,ev]=(0,i.useState)(A&&g.internalUserRoles.includes(A)),[e_,eN]=(0,i.useState)("request logs"),[ew,eS]=(0,i.useState)(null),[ek,eC]=(0,i.useState)(!1),[eT,eL]=(0,i.useState)(null),[eM,eA]=(0,i.useState)(!1),[eD,eE]=(0,i.useState)("startTime"),[eI,eO]=(0,i.useState)("desc"),[ez,eR]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eP,eB]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eP))},[eP]);let[eF,eq]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{ep&&e&&eu({...(await (0,N.keyInfoV1Call)(e,ep)).info,token:ep,api_key:ep})})()},[ep,e]),(0,i.useEffect)(()=>{function e(e){$.current&&!$.current.contains(e.target)&&B(!1),V.current&&!V.current.contains(e.target)&&R(!1),W.current&&!W.current.contains(e.target)&&et(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{A&&g.internalUserRoles.includes(A)&&ev(!0)},[A]);let eH=(0,a.useQuery)({queryKey:["logs","table",F,H,U,J,ei,eo,eb?D:null,eg,ec,eD,eI],queryFn:async()=>{if(!e||!M||!A||!D)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"),s=X?(0,r.default)(J).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,N.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:eo||void 0,team_id:ei||void 0,user_id:eb?D??void 0:void 0,end_user:ey||void 0,status_filter:eg||void 0,model_id:ec||void 0,sort_by:eD,sort_order:eI}})},enabled:!!e&&!!M&&!!A&&!!D&&"request logs"===e_&&ez,refetchInterval:!!eP&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),e$=(0,i.useDeferredValue)(eH.isFetching),eY=eH.isFetching||e$,eK=eH.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eV,filteredLogs:eW,hasBackendFilters:eU,allTeams:eG,handleFilterChange:eJ,handleFilterReset:eQ}=(0,T.useLogFilterLogic)({logs:eK,accessToken:e,startTime:U,endTime:J,pageSize:H,isCustomDate:X,setCurrentPage:q,userID:D,userRole:A,sortBy:eD,sortOrder:eI,currentPage:F}),eX=(0,i.useCallback)(()=>{eQ(),G((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),Z(!1),eq({value:24,unit:"hours"}),q(1)},[eQ]);if((0,i.useEffect)(()=>{eR(!eU)},[eU]),(0,i.useEffect)(()=>{e&&(eV["Team ID"]?en(eV["Team ID"]):en(""),ef(eV.Status||""),em(eV.Model||""),ej(eV["End User"]||""),ed(eV["Key Hash"]||""))},[eV,e]),!e||!M||!A||!D)return null;let eZ=eW.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),e0=eZ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),C.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:C.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),e1=new Map;for(let e of eZ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=C.MCP_CALL_TYPES.includes(e.call_type),s=e1.get(e.session_id);s&&(!s.isMcp||t)||e1.set(e.session_id,{requestId:e.request_id,isMcp:t})}let e2=eZ.map(e=>{let t=e.session_id?e0[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eh(e),onSessionClick:t=>{t&&(eL(t),eS(e),eC(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||e1.get(e.session_id)?.requestId===e.request_id)||[],e5=[{name:"Team ID",label:"Team ID",customComponent:j.default},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:v.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:b.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,N.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return C.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=C.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!C.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e4=C.QUICK_SELECT_OPTIONS.find(e=>e.value===eF.value&&e.unit===eF.unit),e6=X?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"minutes");if(i>=0&&i<2)return"Last 1 Minute";if(i>=2&&i<16)return"Last 15 Minutes";if(i>=16&&i<61)return"Last Hour";let n=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(X,U,J):e4?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(m.TabGroup,{defaultIndex:0,onIndexChange:e=>eN(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(c.Tab,{children:"Request Logs"}),(0,t.jsx)(c.Tab,{children:"Audit Logs"}),(0,t.jsx)(c.Tab,{children:"Deleted Keys"}),(0,t.jsx)(c.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsxs)(u.TabPanel,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"}),(0,t.jsx)(h.Button,{icon:(0,t.jsx)(n.SettingOutlined,{}),onClick:()=>eA(!0),title:"Spend Logs Settings"})]}),ex&&ep&&ex.api_key===ep?(0,t.jsx)(w.default,{keyId:ep,keyData:ex,teams:eG??[],onClose:()=>eh(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.default,{options:e5,onApplyFilters:eJ,onResetFilters:eX}),(0,t.jsx)(Y,{isVisible:eM,onCancel:()=>eA(!1),onSuccess:()=>eA(!1)}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>O(e.target.value)}),(0,t.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,t.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,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:W,children:[(0,t.jsxs)("button",{onClick:()=>et(!ee),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e6]}),ee&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[C.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e6===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),G((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eq({value:e.value,unit:e.unit}),Z(!1),et(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${X?"bg-blue-50 text-blue-600":""}`,onClick:()=>Z(!X),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(d.Switch,{color:"green",checked:eP,defaultChecked:!0,onChange:eB})]}),{}),(0,t.jsx)(h.Button,{type:"default",icon:(0,t.jsx)(o.SyncOutlined,{spin:eY}),onClick:()=>{eH.refetch()},disabled:eY,title:"Fetch data",children:eY?"Fetching":"Fetch"})]}),X&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:J,onChange:e=>{Q(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eH.isLoading?"...":eW?(F-1)*H+1:0," -"," ",eH.isLoading?"...":eW?Math.min(F*H,eW.total):0," ","of ",eH.isLoading?"...":eW?eW.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eH.isLoading?"...":F," of"," ",eH.isLoading?"...":eW?eW.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eH.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(eW.total_pages||1,e+1)),disabled:eH.isLoading||F===(eW.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eP&&1===F&&ez&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>eB(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(K.DataTable,{columns:(0,k.createColumns)({sortBy:eD,sortOrder:eI,onSortChange:(e,t)=>{eE(e),eO(t),q(1)}}),data:e2,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eL(e.session_id),eS(e),eC(!0);return}eL(null),eS(e),eC(!0)},isLoading:eH.isLoading})]})]})]}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(S.default,{userID:D,userRole:A,token:M,accessToken:e,isActive:"audit logs"===e_,premiumUser:E})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(f.default,{})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(y.default,{})})]})]}),(0,t.jsx)(L.LogDetailsDrawer,{open:ek,onClose:()=>{eC(!1),eL(null)},logEntry:ew,sessionId:eT,accessToken:e,onOpenSettings:()=>eA(!0),allLogs:e2,onSelectLog:e=>{eS(e)},startTime:(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>V],936190)}]); \ No newline at end of file + store_prompts_in_spend_logs: true`}),(0,t.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change."})]})]}):null])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),m=e.i(195116),x=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(70635),M=e.i(70969),A=e.i(916925);function E({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Vector Store Requests"}),children:(0,t.jsx)("div",{className:"p-4",children:e.map((e,s)=>{var i,n;return(0,t.jsxs)("div",{className:"mb-6 last:mb-0",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border p-4 mb-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Query:"}),(0,t.jsx)("span",{className:"font-mono",children:e.query})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Vector Store ID:"}),(0,t.jsx)("span",{className:"font-mono",children:e.vector_store_id})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,t.jsx)("span",{className:"flex items-center",children:(()=>{let{logo:s,displayName:a}=(0,A.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,t.jsx)("span",{children:r(e.start_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,t.jsx)("span",{children:r(e.end_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,t.jsx)("span",{children:(i=e.start_time,n=e.end_time,`${((n-i)*1e3).toFixed(2)}ms`)})]})]})]})}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Search Results"}),(0,t.jsx)("div",{className:"space-y-2",children:e.vector_store_search_response.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center p-3 bg-gray-50 cursor-pointer",onClick:()=>{let e;return e=`${s}-${r}`,void l(t=>({...t,[e]:!t[e]}))},children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+1]}),(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["Score: ",(0,t.jsx)("span",{className:"font-mono",children:e.score.toFixed(4)})]})]})]}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:e.content.map((e,s)=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:e.type}),(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all bg-gray-50 p-2 rounded",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>E],331052);var D=e.i(592968),I=e.i(207066);let{Text:O}=g.Typography;function z({value:e,maxWidth:s=I.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(D.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:I.FONT_FAMILY_MONO,fontSize:I.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:R}=g.Typography;function P({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(R,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let B=e=>!!e&&e instanceof Date,F=e=>"object"==typeof e&&null!==e,q=e=>!!e&&e instanceof Object&&"function"==typeof e;function H(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function $(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:m,outerRef:x,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},H(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!x.current)return;let s=x.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=x.current)?void 0:e.querySelector('[role=button][tabindex="0"]');s&&(s.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,s.createElement)("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},(0,s.createElement)("span",{className:j,onClick:S,onKeyDown:w,role:"button","aria-label":b,"aria-expanded":h,"aria-controls":h?y:void 0,ref:f,tabIndex:0===o?0:-1}),(t||""===t)&&(m?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},H(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},H(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(W,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:m,beforeExpandChange:u,outerRef:x}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function Y(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function K(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function V(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=B(l)?l.toISOString():q(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},H(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function W(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(K,Object.assign({},e)):!F(t)||B(t)||q(t)?(0,s.createElement)(V,Object.assign({},e)):(0,s.createElement)(Y,Object.assign({},e))}let U={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},G=()=>!0,J=e=>{let{data:t,style:a=U,shouldExpandNode:l=G,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&F(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(W,{key:t,field:t,value:n,style:{...U,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(W,{value:t,style:{...U,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>J,"defaultStyles",()=>U],867612);let{Text:Q}=g.Typography;function X({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:I.JSON_MAX_HEIGHT,overflow:"auto",background:I.COLOR_BG_LIGHT,padding:I.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(J,{data:e,style:U,clickToExpandNode:!0})})}):(0,t.jsx)(Q,{type:"secondary",children:"No data"})}function Z(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function ee(e){return Array.isArray(e)?e:e?[e]:[]}function et(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var es=e.i(366308),ea=e.i(755151),el=e.i(291542);let{Text:er}=g.Typography;function ei({tool:e}){let s=Object.entries(e.parameters?.properties||{}).map(([t,s])=>({key:t,name:t,type:s.type||"any",description:s.description||"-",required:e.parameters?.required?.includes(t)||!1})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(er,{code:!0,children:[e,s.required&&(0,t.jsx)(er,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(er,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(er,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(er,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(el.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Called With"}),(0,t.jsx)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:4,padding:12},children:(0,t.jsx)("pre",{style:{margin:0,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(e.callData.arguments,null,2)})})]})]})}function en({tool:e}){let s={type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}};return(0,t.jsx)("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12,background:"#fafafa",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(s,null,2)})}let{Text:eo}=g.Typography;function ed({tool:e}){let[a,l]=(0,s.useState)("formatted");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12},children:[(0,t.jsx)(eo,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(ei,{tool:e}):(0,t.jsx)(en,{tool:e})]})}let{Text:ec}=g.Typography;function em({tool:e}){let[a,l]=(0,s.useState)(!1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(es.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ec,{style:{fontSize:14},children:[e.index,". ",e.name]})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(j.Tag,{color:e.called?"blue":"default",children:e.called?"called":"not called"}),a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ed,{tool:e})})]})}let{Text:ex}=g.Typography;function eu({log:e}){let s=function(e){let t,s=!(t=et(e.proxy_server_request||e.messages))||Array.isArray(t)?[]:"object"==typeof t&&t.tools&&Array.isArray(t.tools)?t.tools:[];if(0===s.length)return[];let a=function(e){let t=et(e.response);if(!t||"object"!=typeof t)return[];let s=t.choices;if(Array.isArray(s)&&s.length>0){let e=s[0].message;if(e&&Array.isArray(e.tool_calls))return e.tool_calls}if(Array.isArray(t.content)){let e=t.content.filter(e=>"tool_use"===e.type);if(e.length>0)return e.map(e=>({id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.input||{})}}))}if(Array.isArray(t.tool_calls))return t.tool_calls;if(Array.isArray(t.results)){let e=[];for(let s of t.results)if("response.done"===s.type&&s.response?.output)for(let t of s.response.output)"function_call"===t.type&&e.push({id:t.call_id||"",type:"function",function:{name:t.name||"",arguments:t.arguments||"{}"}});if(e.length>0)return e}return[]}(e),l=new Set(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.set(t,{id:e.id,name:t,arguments:function(e){try{return JSON.parse(e)}catch{return{}}}(e.function?.arguments||"{}")})}),s.map((e,t)=>{let s=e.function?.name||e.name||`Tool ${t+1}`;return{index:t+1,name:s,description:e.function?.description||e.description||"",parameters:e.function?.parameters||e.input_schema||{},called:l.has(s),callData:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Tools"}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let ep=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eh=e.i(888259),eg=e.i(264843),ef=e.i(624001);let{Text:ey}=g.Typography;function ej({type:e,tokens:s,cost:l,onCopy:r,isCollapsed:n,onToggleCollapse:o,turnCount:d}){return(0,t.jsxs)("div",{onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:n?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:o?"pointer":"default",transition:"background 0.15s ease"},onMouseEnter:e=>{o&&(e.currentTarget.style.background="#f5f5f5")},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[o&&(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:n?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ey,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(D.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:eb}=g.Typography;function ev({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(eb,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(eb,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(0,t.jsx)("div",{style:{maxHeight:r?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!r},children:(0,t.jsx)("div",{style:{paddingLeft:16,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:e_}=g.Typography;function eN({tool:e,compact:s=!1}){return(0,t.jsxs)("div",{style:{background:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:6,padding:s?"6px 10px":"10px 14px",marginTop:8,fontFamily:"monospace",fontSize:12,position:"relative"},children:[(0,t.jsx)("div",{style:{position:"absolute",top:-8,left:12,background:"#fff",padding:"0 6px",fontSize:10,color:"#8c8c8c",border:"1px solid #e9ecef",borderRadius:3},children:"function"}),(0,t.jsx)(e_,{strong:!0,style:{fontSize:13,display:"block",marginBottom:6},children:e.name}),Object.keys(e.arguments).length>0&&(0,t.jsx)("div",{children:Object.entries(e.arguments).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:2},children:[(0,t.jsxs)(e_,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(e_,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:ew}=g.Typography;function eS({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(ew,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(eN,{tool:e,compact:l},e.id||s))})]}):null}let{Text:ek}=g.Typography;function eC({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:["HISTORY (",e.length," message",1!==e.length?"s":"",")"]})]}),(0,t.jsx)("div",{style:{maxHeight:a?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!a},children:(0,t.jsx)("div",{style:{paddingLeft:16,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(eS,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eT({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=e.find(e=>"system"===e.role),o=e.filter(e=>"system"!==e.role),d=o.length>0?o[o.length-1]:null,c=o.slice(0,-1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eh.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(ev,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eC,{messages:c}),d&&(0,t.jsx)(eS,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eL}=g.Typography;function eM({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eh.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eS,{label:"ASSISTANT",content:e.content,toolCalls:e.toolCalls})})})]}):(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eL,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eA=e.i(782273),eE=e.i(313603),eD=e.i(793916);let{Text:eI}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(ez,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eR,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.length&&(0,t.jsx)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"16px",color:"#8c8c8c",fontStyle:"italic",fontSize:13},children:"No recognized realtime events found"})]})}function ez({session:e,turnCount:a}){let[l,r]=(0,s.useState)(!0);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)("div",{onClick:()=>r(!l),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:l?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:"pointer",transition:"background 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:l?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eE.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(eI,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(eI,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eA.SoundOutlined,{})," ",e.voice]}),e.modalities&&(0,t.jsx)("div",{style:{display:"flex",gap:4},children:e.modalities.map(e=>(0,t.jsxs)(j.Tag,{style:{margin:0},children:["audio"===e?(0,t.jsx)(eD.AudioOutlined,{}):(0,t.jsx)(eg.MessageOutlined,{})," ",e]},e))})]})}),(0,t.jsx)("div",{style:{maxHeight:l?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!l},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 24px",fontSize:13},children:[(0,t.jsx)(eq,{label:"Model",value:e.model}),(0,t.jsx)(eq,{label:"Voice",value:e.voice}),(0,t.jsx)(eq,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eq,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eq,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eq,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eq,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eq,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:4},children:"Instructions"}),(0,t.jsx)("div",{style:{fontSize:12,lineHeight:1.6,color:"#595959",background:"#fafafa",padding:"8px 12px",borderRadius:4,border:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:120,overflowY:"auto"},children:e.instructions})]})]})})]})}function eR({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:l?.completion_tokens??n,cost:l?.output_cost,onCopy:()=>{let t=e.flatMap(e=>(e.output||[]).flatMap(e=>(e.content||[]).map(t=>`${e.role}: ${t.transcript||t.text||""}`))).join("\n");navigator.clipboard.writeText(t)},isCollapsed:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eP,{response:e,index:s},e.id||s))})})]})}function eP({response:e,index:s}){let a=e.output||[],l=e.usage;return(0,t.jsxs)("div",{style:{marginBottom:12,paddingBottom:12,borderBottom:"1px solid #f5f5f5"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)(j.Tag,{color:"completed"===e.status?"green":"orange",style:{margin:0},children:e.status||"unknown"}),l&&(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(D.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eB,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eF,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eF,{label:"Output",details:l.output_token_details})]})}function eB({output:e}){let s=e.content||[];return s.some(e=>e.transcript||e.text)?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eD.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})]},s):null})]}):null}function eF({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:[e," Token Breakdown"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:4},children:a.map(([e,s])=>"number"==typeof s?(0,t.jsxs)(j.Tag,{style:{margin:0},children:[e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),": ",s.toLocaleString()]},e):null)})]})}function eq({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function eH({request:e,response:s,metrics:a}){let l,r,i;if(s&&s.results&&Array.isArray(s.results)&&0!==s.results.length&&s.results.some(e=>"session.created"===e.type||"session.updated"===e.type||"response.done"===e.type))return(0,t.jsx)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&Array.isArray(e.messages)&&e.messages.forEach(e=>{let t;l.push({role:e.role||"user",content:"string"==typeof(t=e.content)?t:Array.isArray(t)?t.map(e=>"string"==typeof e?e:"text"===e.type?e.text:"image_url"===e.type?"[Image]":JSON.stringify(e)).join("\n"):JSON.stringify(t),toolCallId:e.tool_call_id})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:ep(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eT,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eM,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:e$}=g.Typography;function eY({logEntry:e,onOpenSettings:s,isLoadingDetails:a=!1,accessToken:l}){var r,i;let n=e.metadata||{},o="failure"===n.status,d=o?n.error_information:null,c=!!(r=e.messages)&&(Array.isArray(r)?r.length>0:"object"==typeof r&&Object.keys(r).length>0),m=!!(i=e.response)&&Object.keys(Z(i)).length>0,x=!c&&!m&&!o&&!a,u=n?.guardrail_information,p=ee(u),h=p.length>0,g=p.reduce((e,t)=>{let s=t?.masked_entity_count;return s?e+Object.values(s).reduce((e,t)=>"number"==typeof t?e+t:e,0):e},0),j=0===p.length?"-":1===p.length?p[0]?.guardrail_name??"-":`${p.length} guardrails`,b=n.vector_store_request_metadata&&Array.isArray(n.vector_store_request_metadata)&&n.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${I.DRAWER_CONTENT_PADDING} ${I.DRAWER_CONTENT_PADDING} 0`},children:[o&&d&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eK,{errorInfo:d}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eV,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(z,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(z,{value:e.api_base,maxWidth:I.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),h&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eW,{label:j,maskedCount:g})})]})})}),(0,t.jsx)(eU,{logEntry:e,metadata:n}),(0,t.jsx)(L.CostBreakdownViewer,{costBreakdown:n?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit,rawInputTokens:n?.additional_usage_values?.prompt_tokens_details?.text_tokens,cacheReadTokens:n?.additional_usage_values?.cache_read_input_tokens,cacheCreationTokens:n?.additional_usage_values?.cache_creation_input_tokens}),(0,t.jsx)(eu,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(M.ConfigInfoMessage,{show:x,onOpenSettings:s})}),a?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eG,{hasResponse:m,hasError:o,getRawRequest:()=>Z(e.proxy_server_request||e.messages),getFormattedResponse:()=>o&&d?{error:{message:d.error_message||"An error occurred",type:d.error_class||"error",code:d.error_code||"unknown",param:null}}:Z(e.response),logEntry:e}),h&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:u,accessToken:l??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),b&&(0,t.jsx)(E,{data:n.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eQ,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:I.DRAWER_CONTENT_PADDING}})]})}function eK({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eV({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(e$,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:I.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eW({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:I.SPACING_MEDIUM,children:[(0,t.jsx)("a",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{cursor:"pointer"},children:e}),s>0&&(0,t.jsxs)(j.Tag,{color:"blue",children:[s," masked"]})]})}function eU({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default",o=function(e){let t=e?.additional_usage_values?.prompt_tokens_details?.text_tokens??e?.usage_object?.prompt_tokens_details?.text_tokens;if(null==t)return;let s=Number(t);return Number.isFinite(s)?s:void 0}(s),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Input Tokens",children:(0,C.formatNumberWithCommas)(o)}),(0,t.jsx)(f.Descriptions.Item,{label:"Output Tokens",children:(0,C.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(P,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.Descriptions.Item,{label:"Duration",children:[null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):"-"," s"]}),null!=l&&l>0&&(0,t.jsxs)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.Descriptions.Item,{label:"Retries",children:s?.attempted_retries!==void 0&&s?.attempted_retries!==null?s.attempted_retries>0?(0,t.jsxs)(t.Fragment,{children:[s.attempted_retries,void 0!==s.max_retries&&null!==s.max_retries?` / ${s.max_retries}`:""]}):(0,t.jsx)(j.Tag,{color:"green",children:"None"}):"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eG({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(I.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),m=i.spend??0,x=i.prompt_tokens||0,u=i.completion_tokens||0,p=x+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?m*x/p:0,y=g?h.output_cost??0:p>0?m*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},onClick:e=>{e.target.closest(".ant-radio-group")&&e.stopPropagation()},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",style:{margin:0},children:"Request & Response"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(eH,{request:l(),response:r(),metrics:{prompt_tokens:x,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(n===I.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===I.TAB_RESPONSE&&!e&&!a}),items:[{key:I.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:(0,t.jsx)(X,{data:l(),mode:"formatted"})})},{key:I.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:e||a?(0,t.jsx)(X,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eJ({guardrailEntries:e}){let s=e.every(e=>{let t=e?.guardrail_status||e?.status;return"pass"===t||"passed"===t||"success"===t});return(0,t.jsx)("div",{style:{textAlign:"left",marginBottom:12},children:(0,t.jsxs)("div",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 12px",borderRadius:16,cursor:"pointer",fontSize:13,fontWeight:500,backgroundColor:s?"#f0fdf4":"#fef2f2",color:s?"#15803d":"#b91c1c",border:`1px solid ${s?"#bbf7d0":"#fecaca"}`},children:[s?"✓":"✗"," ",e.length," guardrail",1!==e.length?"s":""," evaluated",(0,t.jsx)("span",{style:{fontSize:11,opacity:.7},children:"↓"})]})})}function eQ({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Metadata"}),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:8},children:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:I.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:I.FONT_SIZE_SMALL,fontFamily:I.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eX=e.i(764205),eZ=e.i(266027),e0=e.i(135214);function e1({row:e,isSelected:s,onClick:a}){let l=x.MCP_CALL_TYPES.includes(e.call_type),r=x.AGENT_CALL_TYPES.includes(e.call_type),i=null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):e.startTime&&e.endTime?((Date.parse(e.endTime)-Date.parse(e.startTime))/1e3).toFixed(3):"-";return(0,t.jsxs)("button",{type:"button",className:`w-full text-left pl-8 pr-2 py-1 transition-colors ${s?"bg-blue-50":"hover:bg-slate-100"}`,onClick:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(m.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(0,t.jsxs)("div",{className:"text-[10px] text-slate-500 mt-0 flex items-center gap-1.5 font-mono",children:[(0,t.jsxs)("span",{children:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.getSpendString)(e.spend)})]}):null,e.total_tokens?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[e.total_tokens," tok"]})]}):null]})]})}function e2({open:e,onClose:d,logEntry:c,sessionId:m,accessToken:u,onOpenSettings:g,allLogs:f=[],onSelectLog:y,startTime:j}){let b=!!m,[v,_]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),{data:T=[]}=(0,eZ.useQuery)({queryKey:["sessionLogs",m],queryFn:async()=>{if(!m||!u)return[];let e=await (0,eX.sessionSpendLogsCall)(u,m);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!x.MCP_CALL_TYPES.includes(e.call_type),a=+!!x.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&b&&m&&u)}),L=(0,s.useMemo)(()=>b?T.length?v?T.find(e=>e.request_id===v)||T[0]:c?.request_id&&T.find(e=>e.request_id===c.request_id)||T[0]:null:c,[b,c,v,T]);(0,s.useEffect)(()=>{b&&T.length&&(v&&T.some(e=>e.request_id===v)||_(c?.request_id&&T.some(e=>e.request_id===c.request_id)?c.request_id:T[0].request_id))},[b,c,v,T]),(0,s.useEffect)(()=>{e?w(!1):(b&&_(null),k(!1))},[e,b]);let{selectNextLog:M,selectPreviousLog:A}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:L,allLogs:b?T:f,onClose:d,onSelectLog:e=>{b&&_(e.request_id),y?.(e)}}),E=((e,t,s)=>{let{accessToken:a}=(0,e0.default)();return(0,eZ.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eX.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(L?.request_id,j,e&&!!L?.request_id),D=E.data,O=E.isLoading,z=(0,s.useMemo)(()=>L?{...L,messages:D?.messages||L.messages,response:D?.response||L.response,proxy_server_request:D?.proxy_server_request||L.proxy_server_request}:null,[L,D]),R=L?.metadata||{},P="failure"===R.status?"Failure":"Success",B="failure"===R.status?"error":"success",F=R?.user_api_key_team_alias||"default",q=T.reduce((e,t)=>e+(t.spend||0),0),H=T.length>0?new Date(Math.min(...T.map(e=>new Date(e.startTime).getTime()))):null,$=T.length>0?new Date(Math.max(...T.map(e=>new Date(e.endTime).getTime()))):null,Y=H&&$?(($.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=T.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,V=T.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,W=T.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length,U=b?T:L?[L]:[],G=b?m||"":L?.request_id||"",J=G.length>14?`${G.slice(0,11)}...`:G,Q=async()=>{if(G)try{await navigator.clipboard.writeText(G),k(!0),setTimeout(()=>k(!1),1200)}catch{}};return L&&z?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:I.DRAWER_WIDTH,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,overflow:"hidden"},header:{display:"none"}},children:(0,t.jsxs)("div",{style:{height:"100%"},className:"flex relative",children:[N?(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>w(!1),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Expand trace sidebar"}):(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>w(!0),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Collapse trace sidebar"}),!N&&(0,t.jsxs)("div",{className:"border-r border-slate-200 bg-slate-50 flex flex-col",style:{width:224},children:[(0,t.jsxs)("div",{className:"pl-12 pr-3 py-2 border-b border-slate-200 bg-white",children:[(0,t.jsx)("div",{className:"flex items-start justify-between gap-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:b?"Session":"Trace"}),(0,t.jsxs)("div",{className:"font-mono text-[12px] text-slate-900 leading-tight flex items-center gap-1",children:[(0,t.jsx)("span",{className:"truncate",children:J}),(0,t.jsx)("button",{type:"button",onClick:Q,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:S?(0,t.jsx)(r.CheckOutlined,{className:"text-[11px]"}):(0,t.jsx)(i.CopyOutlined,{className:"text-[11px]"})})]})]})}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500 font-mono",children:[U.length," req",[b?K:U.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?V:U.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?W:U.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),b?(0,C.getSpendString)(q):(0,C.getSpendString)(L.spend||0),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),Y,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[ee(R?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eJ,{guardrailEntries:ee(R?.guardrail_information)})}),b?(0,t.jsx)("div",{className:"py-1",children:(0,t.jsxs)("div",{className:"relative pl-2",children:[(0,t.jsx)("div",{className:"absolute left-4 top-1 bottom-1 border-l border-slate-300"}),U.map((e,s)=>{let a=s===U.length-1;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute left-4 top-3 w-3 border-t border-slate-300"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>{_(e.request_id),y?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:U.map(e=>(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>y?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:L,onClose:d,onPrevious:A,onNext:M,statusLabel:P,statusColor:B,environment:F}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eY,{logEntry:z,onOpenSettings:g,isLoadingDetails:O,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e2],502626),e.s([],3565)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},93648,245767,313793,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(560445),l=e.i(207082),r=e.i(135214),i=e.i(500330),n=e.i(871943),o=e.i(360820),d=e.i(94629),c=e.i(152990),m=e.i(682830),x=e.i(269200),u=e.i(942232),p=e.i(977572),h=e.i(427612),g=e.i(64848),f=e.i(496020),y=e.i(592968);function j({keys:e,totalCount:a,isLoading:l,isFetching:r,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,i.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,c.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,m.getCoreRowModel)(),getSortedRowModel:(0,m.getSortedRowModel)(),getPaginationRowModel:(0,m.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[l||r?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[l||r?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:l||r||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:l||r||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(x.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:l||r?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function b(){let{premiumUser:e}=(0,r.default)(),[i,n]=(0,s.useState)(0),[o]=(0,s.useState)(50),{data:d,isPending:c,isFetching:m}=(0,l.useDeletedKeys)(i+1,o);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.Alert,{type:"info",banner:!0,showIcon:!0,message:"Coming soon to Enterprise",description:"Deleted key auditing is graduating from beta into our Enterprise audit & compliance suite."}),(0,t.jsx)(j,{keys:d?.keys||[],totalCount:d?.total_count||0,isLoading:c,isFetching:m,pageIndex:i,pageSize:o,onPageChange:n})]})}e.s(["default",()=>b],93648);var v=e.i(785242),_=e.i(389083),N=e.i(599724),w=e.i(355619);function S({teams:e,isLoading:a,isFetching:l}){let[r,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),b=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,i.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(_.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,w.getModelDisplayName)(e).slice(0,30)}...`:(0,w.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(_.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(N.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],v=(0,c.useReactTable)({data:e,columns:b,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:r},onSortingChange:j,getCoreRowModel:(0,m.getCoreRowModel)(),getSortedRowModel:(0,m.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||l?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(x.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:v.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:v.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${v.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:a||l?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?v.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function k(){let{premiumUser:e}=(0,r.default)(),{data:s,isPending:l,isFetching:i}=(0,v.useDeletedTeams)(1,100);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.Alert,{type:"info",banner:!0,showIcon:!0,message:"Coming soon to Enterprise",description:"Deleted team auditing is graduating from beta into our Enterprise audit & compliance suite."}),(0,t.jsx)(S,{teams:s||[],isLoading:l,isFetching:i})]})}e.s(["default",()=>k],245767);var C=e.i(663435);e.s(["default",0,({value:e,onChange:s})=>(0,t.jsx)(C.default,{value:e,onChange:s})],313793);var T=e.i(625901),L=e.i(56456),M=e.i(152473),A=e.i(199133),E=e.i(770914);let{Text:D}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[m,x]=(0,M.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,T.useInfiniteModelInfo)(i,m||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(A.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),x(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(L.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(E.Space,{direction:"vertical",children:[(0,t.jsxs)(E.Space,{direction:"horizontal",children:[(0,t.jsx)(D,{strong:!0,children:"Model name:"}),(0,t.jsx)(D,{ellipsis:!0,children:s})]}),(0,t.jsxs)(D,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(D,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(L.LoadingOutlined,{spin:!0})})]})})}],291950)},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),m=e.i(482725),x=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.jsx)("pre",{className:"p-3 bg-white text-xs font-mono overflow-auto max-h-96 whitespace-pre-wrap break-all m-0",children:JSON.stringify(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function E({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,E]=(0,s.useState)(""),[D,I]=(0,s.useState)(""),[O,z]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,D,O,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:D||void 0,action:O||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../ui/assets/audit-logs-preview.png",alt:"Audit Logs Preview",style:{maxWidth:"100%",maxHeight:"700px",borderRadius:"8px",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",margin:"0 auto"},onError:e=>{e.target.style.display="none"}})]});let K=$.data?.audit_logs??[],V=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{E(e),_(1)},onChange:e=>{e.target.value||(E(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{z(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{label:"Keys",value:"LiteLLM_VerificationToken"},{label:"Teams",value:"LiteLLM_TeamTable"},{label:"Users",value:"LiteLLM_UserTable"},{label:"Organizations",value:"LiteLLM_OrganizationTable"},{label:"Models",value:"LiteLLM_ProxyModelTable"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(x.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:V,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(m.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>E],942161)},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.jsx)("path",{d:"M12 3l1.912 5.813a2 2 0 0 0 1.275 1.275L21 12l-5.813 1.912a2 2 0 0 0-1.275 1.275L12 21l-1.912-5.813a2 2 0 0 0-1.275-1.275L3 12l5.813-1.912a2 2 0 0 0 1.275-1.275L12 3z"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.jsx)("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),m=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),x=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-amber-50 text-amber-700 border border-amber-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-violet-50 text-violet-700 border border-violet-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(m,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(x,{});let f=(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(m,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",m="Model",x="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[m]:"",[x]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[E,D]=(0,t.useState)(null),I=(0,t.useRef)(0),O=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[x]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[m]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&D({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),D({data:[],total:0,page:1,page_size:v,total_pages:0})}},[y,j,b,_,v,k,C]),z=(0,t.useMemo)(()=>(0,i.default)((e,t)=>O(e,t),300),[O]);(0,t.useEffect)(()=>()=>z.cancel(),[z]);let R=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[x]||M[u]||M[g]||M[f]||M[m]),[M]);(0,t.useEffect)(()=>{R&&y&&(z.cancel(),O(M,T))},[k,C,T,j,b,_]);let P=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:v,total_pages:0};if(R)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[m]&&(t=t.filter(e=>e.model_id===M[m])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,R]),B=(0,t.useMemo)(()=>R?null!==E?E:{data:[],total:0,page:1,page_size:v,total_pages:0}:P,[R,E,P]),{data:F}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y});return{filters:M,filteredLogs:B,hasBackendFilters:R,allTeams:F,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),D(null),z(s,1)),s})},handleFilterReset:()=>{A(L),D(null),z.cancel(),N(1)}}}e.s(["useLogFilterLogic",()=>y],504809)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(313603),o=e.i(772345),d=e.i(793130),c=e.i(197647),m=e.i(653824),x=e.i(881073),u=e.i(404206),p=e.i(723731),h=e.i(464571),g=e.i(708347),f=e.i(93648),y=e.i(245767),j=e.i(313793),b=e.i(50882),v=e.i(291950),_=e.i(969550),N=e.i(764205),w=e.i(20147),S=e.i(942161),k=e.i(245099);e.i(70969);var C=e.i(97859);e.i(70635),e.i(339086);var T=e.i(504809);e.i(3565);var L=e.i(502626),M=e.i(727749);e.i(867612);var A=e.i(153472),E=e.i(954616),D=e.i(135214);let I=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=s?`${s}/config/update`:"/config/update",l=await fetch(a,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:t.store_prompts_in_spend_logs,...t.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:t.maximum_spend_logs_retention_period}}})});if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update spend logs settings")}return await l.json()};var O=e.i(190702),z=e.i(637235),R=e.i(808613),P=e.i(311451),B=e.i(212931),F=e.i(981339),q=e.i(770914),H=e.i(790848),$=e.i(898586);let Y=({isVisible:e,onCancel:s,onSuccess:a})=>{let[l]=R.Form.useForm(),{mutateAsync:r,isPending:n}=(()=>{let{accessToken:e}=(0,D.default)();return(0,E.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await I(e,t)}})})(),{mutateAsync:o,isPending:d}=(0,A.useDeleteProxyConfigField)(),{data:c,isLoading:m,refetch:x}=(0,A.useProxyConfig)(A.ConfigType.GENERAL_SETTINGS),u=R.Form.useWatch("store_prompts_in_spend_logs",l);(0,i.useEffect)(()=>{e&&x()},[e,x]);let p=(0,i.useMemo)(()=>{if(!c)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let e=c.find(e=>"store_prompts_in_spend_logs"===e.field_name),t=c.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:e?.field_value??!1,maximum_spend_logs_retention_period:t?.field_value??void 0}},[c]),g=async e=>{try{let t=e.maximum_spend_logs_retention_period;if(!t||"string"==typeof t&&""===t.trim())try{await o({config_type:A.ConfigType.GENERAL_SETTINGS,field_name:A.GeneralSettingsFieldName.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD})}catch(e){console.warn("Failed to delete retention period field (may not exist):",e)}let s={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...t&&"string"==typeof t&&""!==t.trim()&&{maximum_spend_logs_retention_period:t}};await r(s,{onSuccess:()=>{M.default.success("Spend logs settings updated successfully"),x(),a?.()},onError:e=>{M.default.fromBackend("Failed to save spend logs settings: "+(0,O.parseErrorMessage)(e))}})}catch(e){M.default.fromBackend("Failed to save spend logs settings: "+(0,O.parseErrorMessage)(e))}},f=()=>{l.resetFields(),s()};return(0,t.jsx)(B.Modal,{title:(0,t.jsx)($.Typography.Title,{level:5,children:"Spend Logs Settings"}),open:e,footer:(0,t.jsxs)(q.Space,{children:[(0,t.jsx)(h.Button,{onClick:f,disabled:n||d||m,children:"Cancel"}),(0,t.jsx)(h.Button,{type:"primary",loading:n||d,disabled:m,onClick:()=>l.submit(),children:n||d?"Saving...":"Save Settings"})]}),onCancel:f,children:(0,t.jsxs)(R.Form,{form:l,layout:"horizontal",onFinish:g,initialValues:p,children:[(0,t.jsx)(R.Form.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:c?.find(e=>"store_prompts_in_spend_logs"===e.field_name)?.field_description||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:(0,t.jsx)("div",{children:m?(0,t.jsx)(F.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(H.Switch,{checked:u??!1,onChange:e=>l.setFieldValue("store_prompts_in_spend_logs",e)})})}),(0,t.jsx)(R.Form.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:c?.find(e=>"maximum_spend_logs_retention_period"===e.field_name)?.field_description||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:m?(0,t.jsx)(F.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(P.Input,{placeholder:"e.g., 7d, 30d",prefix:(0,t.jsx)(z.ClockCircleOutlined,{})})})]},c?JSON.stringify(p):"loading")})};var K=e.i(149121);function V({accessToken:e,token:M,userRole:A,userID:E,premiumUser:D}){let[I,O]=(0,i.useState)(""),[z,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),$=(0,i.useRef)(null),V=(0,i.useRef)(null),W=(0,i.useRef)(null),[U,G]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(null),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(""),[eb,ev]=(0,i.useState)(A&&g.internalUserRoles.includes(A)),[e_,eN]=(0,i.useState)("request logs"),[ew,eS]=(0,i.useState)(null),[ek,eC]=(0,i.useState)(!1),[eT,eL]=(0,i.useState)(null),[eM,eA]=(0,i.useState)(!1),[eE,eD]=(0,i.useState)("startTime"),[eI,eO]=(0,i.useState)("desc"),[ez,eR]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eP,eB]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eP))},[eP]);let[eF,eq]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{ep&&e&&eu({...(await (0,N.keyInfoV1Call)(e,ep)).info,token:ep,api_key:ep})})()},[ep,e]),(0,i.useEffect)(()=>{function e(e){$.current&&!$.current.contains(e.target)&&B(!1),V.current&&!V.current.contains(e.target)&&R(!1),W.current&&!W.current.contains(e.target)&&et(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{A&&g.internalUserRoles.includes(A)&&ev(!0)},[A]);let eH=(0,a.useQuery)({queryKey:["logs","table",F,H,U,J,ei,eo,eb?E:null,eg,ec,eE,eI],queryFn:async()=>{if(!e||!M||!A||!E)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"),s=X?(0,r.default)(J).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,N.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:eo||void 0,team_id:ei||void 0,user_id:eb?E??void 0:void 0,end_user:ey||void 0,status_filter:eg||void 0,model_id:ec||void 0,sort_by:eE,sort_order:eI}})},enabled:!!e&&!!M&&!!A&&!!E&&"request logs"===e_&&ez,refetchInterval:!!eP&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),e$=(0,i.useDeferredValue)(eH.isFetching),eY=eH.isFetching||e$,eK=eH.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eV,filteredLogs:eW,hasBackendFilters:eU,allTeams:eG,handleFilterChange:eJ,handleFilterReset:eQ}=(0,T.useLogFilterLogic)({logs:eK,accessToken:e,startTime:U,endTime:J,pageSize:H,isCustomDate:X,setCurrentPage:q,userID:E,userRole:A,sortBy:eE,sortOrder:eI,currentPage:F}),eX=(0,i.useCallback)(()=>{eQ(),G((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),Z(!1),eq({value:24,unit:"hours"}),q(1)},[eQ]);if((0,i.useEffect)(()=>{eR(!eU)},[eU]),(0,i.useEffect)(()=>{e&&(eV["Team ID"]?en(eV["Team ID"]):en(""),ef(eV.Status||""),em(eV.Model||""),ej(eV["End User"]||""),ed(eV["Key Hash"]||""))},[eV,e]),!e||!M||!A||!E)return null;let eZ=eW.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),e0=eZ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),C.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:C.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),e1=new Map;for(let e of eZ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=C.MCP_CALL_TYPES.includes(e.call_type),s=e1.get(e.session_id);s&&(!s.isMcp||t)||e1.set(e.session_id,{requestId:e.request_id,isMcp:t})}let e2=eZ.map(e=>{let t=e.session_id?e0[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eh(e),onSessionClick:t=>{t&&(eL(t),eS(e),eC(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||e1.get(e.session_id)?.requestId===e.request_id)||[],e5=[{name:"Team ID",label:"Team ID",customComponent:j.default},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:v.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:b.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,N.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return C.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=C.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!C.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e4=C.QUICK_SELECT_OPTIONS.find(e=>e.value===eF.value&&e.unit===eF.unit),e6=X?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"minutes");if(i>=0&&i<2)return"Last 1 Minute";if(i>=2&&i<16)return"Last 15 Minutes";if(i>=16&&i<61)return"Last Hour";let n=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(X,U,J):e4?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(m.TabGroup,{defaultIndex:0,onIndexChange:e=>eN(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(c.Tab,{children:"Request Logs"}),(0,t.jsx)(c.Tab,{children:"Audit Logs"}),(0,t.jsx)(c.Tab,{children:"Deleted Keys"}),(0,t.jsx)(c.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsxs)(u.TabPanel,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"}),(0,t.jsx)(h.Button,{icon:(0,t.jsx)(n.SettingOutlined,{}),onClick:()=>eA(!0),title:"Spend Logs Settings"})]}),ex&&ep&&ex.api_key===ep?(0,t.jsx)(w.default,{keyId:ep,keyData:ex,teams:eG??[],onClose:()=>eh(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.default,{options:e5,onApplyFilters:eJ,onResetFilters:eX}),(0,t.jsx)(Y,{isVisible:eM,onCancel:()=>eA(!1),onSuccess:()=>eA(!1)}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>O(e.target.value)}),(0,t.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,t.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,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:W,children:[(0,t.jsxs)("button",{onClick:()=>et(!ee),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e6]}),ee&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[C.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e6===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),G((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eq({value:e.value,unit:e.unit}),Z(!1),et(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${X?"bg-blue-50 text-blue-600":""}`,onClick:()=>Z(!X),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(d.Switch,{color:"green",checked:eP,defaultChecked:!0,onChange:eB})]}),{}),(0,t.jsx)(h.Button,{type:"default",icon:(0,t.jsx)(o.SyncOutlined,{spin:eY}),onClick:()=>{eH.refetch()},disabled:eY,title:"Fetch data",children:eY?"Fetching":"Fetch"})]}),X&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:J,onChange:e=>{Q(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eH.isLoading?"...":eW?(F-1)*H+1:0," -"," ",eH.isLoading?"...":eW?Math.min(F*H,eW.total):0," ","of ",eH.isLoading?"...":eW?eW.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eH.isLoading?"...":F," of"," ",eH.isLoading?"...":eW?eW.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eH.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(eW.total_pages||1,e+1)),disabled:eH.isLoading||F===(eW.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eP&&1===F&&ez&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>eB(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(K.DataTable,{columns:(0,k.createColumns)({sortBy:eE,sortOrder:eI,onSortChange:(e,t)=>{eD(e),eO(t),q(1)}}),data:e2,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eL(e.session_id),eS(e),eC(!0);return}eL(null),eS(e),eC(!0)},isLoading:eH.isLoading})]})]})]}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(S.default,{userID:E,userRole:A,token:M,accessToken:e,isActive:"audit logs"===e_,premiumUser:D})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(f.default,{})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(y.default,{})})]})]}),(0,t.jsx)(L.LogDetailsDrawer,{open:ek,onClose:()=>{eC(!1),eL(null)},logEntry:ew,sessionId:eT,accessToken:e,onOpenSettings:()=>eA(!0),allLogs:e2,onSelectLog:e=>{eS(e)},startTime:(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>V],936190)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3d6c5ef3dfe50133.js b/litellm/proxy/_experimental/out/_next/static/chunks/3d6c5ef3dfe50133.js deleted file mode 100644 index e85a6b8cf0..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/3d6c5ef3dfe50133.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var r=e.i(135551),a=e.i(201072),n=e.i(121229),l=e.i(726289),i=e.i(864517),o=e.i(343794),s=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),g=e.i(703923),m={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},f=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),a=!1;e.current.forEach(function(e){if(e){a=!0;var n=e.style;n.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(n.transitionDuration="0s, 0s")}}),a&&(r.current=Date.now())}),e.current},p=e.i(410160),b=e.i(392221),h=e.i(654310),$=0,v=(0,h.default)();let y=function(e){var r=t.useState(),a=(0,b.default)(r,2),n=a[0],l=a[1];return t.useEffect(function(){var e;l("rc_progress_".concat((v?(e=$,$+=1):e="TEST_OR_SSR",e)))},[]),e||n};var k=function(e){var r=e.bg,a=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},a)};function C(e,t){return Object.keys(e).map(function(r){var a=parseFloat(r),n="".concat(Math.floor(a*t),"%");return"".concat(e[r]," ").concat(n)})}var x=t.forwardRef(function(e,r){var a=e.prefixCls,n=e.color,l=e.gradientId,i=e.radius,o=e.style,s=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,g=e.gapDegree,m=n&&"object"===(0,p.default)(n),f=u/2,b=t.createElement("circle",{className:"".concat(a,"-circle-path"),r:i,cx:f,cy:f,stroke:m?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==s),style:o,ref:r});if(!m)return b;var h="".concat(l,"-conic"),$=C(n,(360-g)/360),v=C(n,1),y="conic-gradient(from ".concat(g?"".concat(180+g/2,"deg"):"0deg",", ").concat($.join(", "),")"),x="linear-gradient(to ".concat(g?"bottom":"top",", ").concat(v.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:h},b),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(h,")")},t.createElement(k,{bg:x},t.createElement(k,{bg:y}))))}),w=function(e,t,r,a,n,l,i,o,s,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-a)/100*t;return"round"===s&&100!==a&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof o?o:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(n+r/100*360*((360-l)/360)+(0===l?0:({bottom:0,top:180,left:90,right:-90})[i]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},j=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function O(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let E=function(e){var r,a,n,l,i=(0,u.default)((0,u.default)({},m),e),s=i.id,c=i.prefixCls,b=i.steps,h=i.strokeWidth,$=i.trailWidth,v=i.gapDegree,k=void 0===v?0:v,C=i.gapPosition,E=i.trailColor,N=i.strokeLinecap,S=i.style,T=i.className,M=i.strokeColor,R=i.percent,z=(0,g.default)(i,j),A=y(s),I="".concat(A,"-gradient"),B=50-h/2,q=2*Math.PI*B,P=k>0?90+k/2:-90,W=(360-k)/360*q,H="object"===(0,p.default)(b)?b:{count:b,gap:2},L=H.count,D=H.gap,F=O(R),X=O(M),_=X.find(function(e){return e&&"object"===(0,p.default)(e)}),V=_&&"object"===(0,p.default)(_)?"butt":N,Y=w(q,W,0,100,P,k,C,E,V,h),K=f();return t.createElement("svg",(0,d.default)({className:(0,o.default)("".concat(c,"-circle"),T),viewBox:"0 0 ".concat(100," ").concat(100),style:S,id:s,role:"presentation"},z),!L&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:B,cx:50,cy:50,stroke:E,strokeLinecap:V,strokeWidth:$||h,style:Y}),L?(r=Math.round(L*(F[0]/100)),a=100/L,n=0,Array(L).fill(null).map(function(e,l){var i=l<=r-1?X[0]:E,o=i&&"object"===(0,p.default)(i)?"url(#".concat(I,")"):void 0,s=w(q,W,n,a,P,k,C,i,"butt",h,D);return n+=(W-s.strokeDashoffset+D)*100/W,t.createElement("circle",{key:l,className:"".concat(c,"-circle-path"),r:B,cx:50,cy:50,stroke:o,strokeWidth:h,opacity:1,style:s,ref:function(e){K[l]=e}})})):(l=0,F.map(function(e,r){var a=X[r]||X[X.length-1],n=w(q,W,l,e,P,k,C,a,V,h);return l+=e,t.createElement(x,{key:r,color:a,ptg:e,radius:B,prefixCls:c,gradientId:I,style:n,strokeLinecap:V,strokeWidth:h,gapDegree:k,ref:function(e){K[r]=e},size:100})}).reverse()))};var N=e.i(491816);e.i(765846);var S=e.i(896091);function T(e){return!e||e<0?0:e>100?100:e}function M({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let R=(e,t,r)=>{var a,n,l,i;let o=-1,s=-1;if("step"===t){let t=r.steps,a=r.strokeWidth;"string"==typeof e||void 0===e?(o="small"===e?2:14,s=null!=a?a:8):"number"==typeof e?[o,s]=[e,e]:[o=14,s=8]=Array.isArray(e)?e:[e.width,e.height],o*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?s=t||("small"===e?6:8):"number"==typeof e?[o,s]=[e,e]:[o=-1,s=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[o,s]="small"===e?[60,60]:[120,120]:"number"==typeof e?[o,s]=[e,e]:Array.isArray(e)&&(o=null!=(n=null!=(a=e[0])?a:e[1])?n:120,s=null!=(i=null!=(l=e[0])?l:e[1])?i:120));return[o,s]},z=e=>{let{prefixCls:r,trailColor:a=null,strokeLinecap:n="round",gapPosition:l,gapDegree:i,width:s=120,type:c,children:d,success:u,size:g=s,steps:m}=e,[f,p]=R(g,"circle"),{strokeWidth:b}=e;void 0===b&&(b=Math.max(3/f*100,6));let h=t.useMemo(()=>i||0===i?i:"dashboard"===c?75:void 0,[i,c]),$=(({percent:e,success:t,successPercent:r})=>{let a=T(M({success:t,successPercent:r}));return[a,T(T(e)-a)]})(e),v="[object Object]"===Object.prototype.toString.call(e.strokeColor),y=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||S.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),k=(0,o.default)(`${r}-inner`,{[`${r}-circle-gradient`]:v}),C=t.createElement(E,{steps:m,percent:m?$[1]:$,strokeWidth:b,trailWidth:b,strokeColor:m?y[1]:y,strokeLinecap:n,trailColor:a,prefixCls:r,gapDegree:h,gapPosition:l||"dashboard"===c&&"bottom"||void 0}),x=f<=20,w=t.createElement("div",{className:k,style:{width:f,height:p,fontSize:.15*f+6}},C,!x&&d);return x?t.createElement(N.default,{title:d},w):w};e.i(296059);var A=e.i(694758),I=e.i(915654),B=e.i(183293),q=e.i(246422),P=e.i(838378);let W="--progress-line-stroke-color",H="--progress-percent",L=e=>{let t=e?"100%":"-100%";return new A.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},D=(0,q.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,P.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,B.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${W})`]},height:"100%",width:`calc(1 / var(${H}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,I.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:L(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:L(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var F=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let X=e=>{let{prefixCls:r,direction:a,percent:n,size:l,strokeWidth:i,strokeColor:s,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:g,success:m}=e,{align:f,type:p}=g,b=s&&"string"!=typeof s?((e,t)=>{let{from:r=S.presetPrimaryColors.blue,to:a=S.presetPrimaryColors.blue,direction:n="rtl"===t?"to left":"to right"}=e,l=F(e,["from","to","direction"]);if(0!==Object.keys(l).length){let e,t=(e=[],Object.keys(l).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:l[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${n}, ${t})`;return{background:r,[W]:r}}let i=`linear-gradient(${n}, ${r}, ${a})`;return{background:i,[W]:i}})(s,a):{[W]:s,background:s},h="square"===c||"butt"===c?0:void 0,[$,v]=R(null!=l?l:[-1,i||("small"===l?6:8)],"line",{strokeWidth:i}),y=Object.assign(Object.assign({width:`${T(n)}%`,height:v,borderRadius:h},b),{[H]:T(n)/100}),k=M(e),C={width:`${T(k)}%`,height:v,borderRadius:h,backgroundColor:null==m?void 0:m.strokeColor},x=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:h}},t.createElement("div",{className:(0,o.default)(`${r}-bg`,`${r}-bg-${p}`),style:y},"inner"===p&&d),void 0!==k&&t.createElement("div",{className:`${r}-success-bg`,style:C})),w="outer"===p&&"start"===f,j="outer"===p&&"end"===f;return"outer"===p&&"center"===f?t.createElement("div",{className:`${r}-layout-bottom`},x,d):t.createElement("div",{className:`${r}-outer`,style:{width:$<0?"100%":$}},w&&d,x,j&&d)},_=e=>{let{size:r,steps:a,rounding:n=Math.round,percent:l=0,strokeWidth:i=8,strokeColor:s,trailColor:c=null,prefixCls:d,children:u}=e,g=n(l/100*a),[m,f]=R(null!=r?r:["small"===r?2:14,i],"step",{steps:a,strokeWidth:i}),p=m/a,b=Array.from({length:a});for(let e=0;et.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let Y=["normal","exception","active","success"],K=t.forwardRef((e,d)=>{let u,{prefixCls:g,className:m,rootClassName:f,steps:p,strokeColor:b,percent:h=0,size:$="default",showInfo:v=!0,type:y="line",status:k,format:C,style:x,percentPosition:w={}}=e,j=V(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:O="end",type:E="outer"}=w,N=Array.isArray(b)?b[0]:b,S="string"==typeof b||Array.isArray(b)?b:void 0,A=t.useMemo(()=>{if(N){let e="string"==typeof N?N:Object.values(N)[0];return new r.FastColor(e).isLight()}return!1},[b]),I=t.useMemo(()=>{var t,r;let a=M(e);return Number.parseInt(void 0!==a?null==(t=null!=a?a:0)?void 0:t.toString():null==(r=null!=h?h:0)?void 0:r.toString(),10)},[h,e.success,e.successPercent]),B=t.useMemo(()=>!Y.includes(k)&&I>=100?"success":k||"normal",[k,I]),{getPrefixCls:q,direction:P,progress:W}=t.useContext(c.ConfigContext),H=q("progress",g),[L,F,K]=D(H),G="line"===y,U=G&&!p,Q=t.useMemo(()=>{let r;if(!v)return null;let s=M(e),c=C||(e=>`${e}%`),d=G&&A&&"inner"===E;return"inner"===E||C||"exception"!==B&&"success"!==B?r=c(T(h),T(s)):"exception"===B?r=G?t.createElement(l.default,null):t.createElement(i.default,null):"success"===B&&(r=G?t.createElement(a.default,null):t.createElement(n.default,null)),t.createElement("span",{className:(0,o.default)(`${H}-text`,{[`${H}-text-bright`]:d,[`${H}-text-${O}`]:U,[`${H}-text-${E}`]:U}),title:"string"==typeof r?r:void 0},r)},[v,h,I,B,y,H,C]);"line"===y?u=p?t.createElement(_,Object.assign({},e,{strokeColor:S,prefixCls:H,steps:"object"==typeof p?p.count:p}),Q):t.createElement(X,Object.assign({},e,{strokeColor:N,prefixCls:H,direction:P,percentPosition:{align:O,type:E}}),Q):("circle"===y||"dashboard"===y)&&(u=t.createElement(z,Object.assign({},e,{strokeColor:N,prefixCls:H,progressStatus:B}),Q));let J=(0,o.default)(H,`${H}-status-${B}`,{[`${H}-${"dashboard"===y&&"circle"||y}`]:"line"!==y,[`${H}-inline-circle`]:"circle"===y&&R($,"circle")[0]<=20,[`${H}-line`]:U,[`${H}-line-align-${O}`]:U,[`${H}-line-position-${E}`]:U,[`${H}-steps`]:p,[`${H}-show-info`]:v,[`${H}-${$}`]:"string"==typeof $,[`${H}-rtl`]:"rtl"===P},null==W?void 0:W.className,m,f,F,K);return L(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==W?void 0:W.style),x),className:J,role:"progressbar","aria-valuenow":I,"aria-valuemin":0,"aria-valuemax":100},(0,s.default)(j,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,K],309821)},389083,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),n=e.i(480731),l=e.i(95779),i=e.i(444755),o=e.i(673706);let s={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"}},c={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"}},d=(0,o.makeClassName)("Badge"),u=r.default.forwardRef((e,u)=>{let{color:g,icon:m,size:f=n.Sizes.SM,tooltip:p,className:b,children:h}=e,$=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),v=m||null,{tooltipProps:y,getReferenceProps:k}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,y.refs.setReference]),className:(0,i.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",g?(0,i.tremorTwMerge)((0,o.getColorClassNames)(g,l.colorPalette.background).bgColor,(0,o.getColorClassNames)(g,l.colorPalette.iconText).textColor,(0,o.getColorClassNames)(g,l.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,i.tremorTwMerge)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),s[f].paddingX,s[f].paddingY,s[f].fontSize,b)},k,$),r.default.createElement(a.default,Object.assign({text:p},y)),v?r.default.createElement(v,{className:(0,i.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[f].height,c[f].width)}):null,r.default.createElement("span",{className:(0,i.tremorTwMerge)(d("text"),"whitespace-nowrap")},h))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},871943,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let n=(0,e.i(673706).makeClassName)("Table"),l=r.default.forwardRef((e,l)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(n("root"),"overflow-auto",o)},r.default.createElement("table",Object.assign({ref:l,className:(0,a.tremorTwMerge)(n("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});l.displayName="Table",e.s(["Table",()=>l],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let n=(0,e.i(673706).makeClassName)("TableBody"),l=r.default.forwardRef((e,l)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:l,className:(0,a.tremorTwMerge)(n("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",o)},s),i))});l.displayName="TableBody",e.s(["TableBody",()=>l],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let n=(0,e.i(673706).makeClassName)("TableCell"),l=r.default.forwardRef((e,l)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:l,className:(0,a.tremorTwMerge)(n("root"),"align-middle whitespace-nowrap text-left p-4",o)},s),i))});l.displayName="TableCell",e.s(["TableCell",()=>l],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let n=(0,e.i(673706).makeClassName)("TableHead"),l=r.default.forwardRef((e,l)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:l,className:(0,a.tremorTwMerge)(n("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",o)},s),i))});l.displayName="TableHead",e.s(["TableHead",()=>l],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let n=(0,e.i(673706).makeClassName)("TableHeaderCell"),l=r.default.forwardRef((e,l)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:l,className:(0,a.tremorTwMerge)(n("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",o)},s),i))});l.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>l],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let n=(0,e.i(673706).makeClassName)("TableRow"),l=r.default.forwardRef((e,l)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:l,className:(0,a.tremorTwMerge)(n("row"),o)},s),i))});l.displayName="TableRow",e.s(["TableRow",()=>l],496020)},563113,887719,e=>{"use strict";var t=e.i(271645),r=e.i(864517),a=e.i(244009),n=e.i(408850),l=e.i(87414);let i=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(r=>{void 0!==e[r]&&(t[r]=e[r])})}),t};function o(e){if(!e)return;let{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}}function s(e){let{closable:r,closeIcon:a}=e||{};return t.default.useMemo(()=>{if(!r&&(!1===r||!1===a||null===a))return!1;if(void 0===r&&void 0===a)return null;let e={closeIcon:"boolean"!=typeof a&&null!==a?a:void 0};return r&&"object"==typeof r&&(e=Object.assign(Object.assign({},e),r)),e},[r,a])}e.s(["default",0,i],887719);let c={};e.s(["pickClosable",()=>o,"useClosable",0,(e,o,d=c)=>{let u=s(e),g=s(o),[m]=(0,n.useLocale)("global",l.default.global),f="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),p=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(r.default,null)},d),[d]),b=t.default.useMemo(()=>!1!==u&&(u?i(p,g,u):!1!==g&&(g?i(p,g):!!p.closable&&p)),[u,g,p]);return t.default.useMemo(()=>{var e,r;if(!1===b)return[!1,null,f,{}];let{closeIconRender:n}=p,{closeIcon:l}=b,i=l,o=(0,a.default)(b,!0);return null!=i&&(n&&(i=n(l)),i=t.default.isValidElement(i)?t.default.cloneElement(i,Object.assign(Object.assign(Object.assign({},i.props),{"aria-label":null!=(r=null==(e=i.props)?void 0:e["aria-label"])?r:m.close}),o)):t.default.createElement("span",Object.assign({"aria-label":m.close},o),i)),[!0,i,f,o]},[f,m.close,b,p])}],563113)},735049,e=>{"use strict";var t=e.i(654310),r=function(e){if((0,t.default)()&&window.document.documentElement){var r=Array.isArray(e)?e:[e],a=window.document.documentElement;return r.some(function(e){return e in a.style})}return!1},a=function(e,t){if(!r(e))return!1;var a=document.createElement("div"),n=a.style[e];return a.style[e]=t,a.style[e]!==n};function n(e,t){return Array.isArray(e)||void 0===t?r(e):a(e,t)}e.s(["isStyleSupport",()=>n])},190144,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var n=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(n.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],190144)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),n=e.i(529681);let l=e=>{let{prefixCls:a,className:n,style:l,size:i,shape:o}=e,s=(0,r.default)({[`${a}-lg`]:"large"===i,[`${a}-sm`]:"small"===i}),c=(0,r.default)({[`${a}-circle`]:"circle"===o,[`${a}-square`]:"square"===o,[`${a}-round`]:"round"===o}),d=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(a,s,c,n),style:Object.assign(Object.assign({},d),l)})};e.i(296059);var i=e.i(694758),o=e.i(915654),s=e.i(246422),c=e.i(838378);let d=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,o.unit)(e)}),g=e=>Object.assign({width:e},u(e)),m=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),f=e=>Object.assign({width:e},u(e)),p=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),h=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:n,skeletonButtonCls:l,skeletonInputCls:i,skeletonImageCls:o,controlHeight:s,controlHeightLG:c,controlHeightSM:u,gradientFromColor:h,padding:$,marginSM:v,borderRadius:y,titleHeight:k,blockRadius:C,paragraphLiHeight:x,controlHeightXS:w,paragraphMarginTop:j}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:$,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:h},g(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},g(c)),[`${r}-sm`]:Object.assign({},g(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:k,background:h,borderRadius:C,[`+ ${n}`]:{marginBlockStart:u}},[n]:{padding:0,"> li":{width:"100%",height:x,listStyle:"none",background:h,borderRadius:C,"+ li":{marginBlockStart:w}}},[`${n}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${n} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:v,[`+ ${n}`]:{marginBlockStart:j}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:n,controlHeightSM:l,gradientFromColor:i,calc:o}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:o(a).mul(2).equal(),minWidth:o(a).mul(2).equal()},b(a,o))},p(e,a,r)),{[`${r}-lg`]:Object.assign({},b(n,o))}),p(e,n,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(l,o))}),p(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:n,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},g(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},g(n)),[`${t}${t}-sm`]:Object.assign({},g(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:n,controlHeightSM:l,gradientFromColor:i,calc:o}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},m(t,o)),[`${a}-lg`]:Object.assign({},m(n,o)),[`${a}-sm`]:Object.assign({},m(l,o))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:n,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:n},f(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${a}, - ${n} > li, - ${r}, - ${l}, - ${i}, - ${o} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:d,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,c.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),$=e=>{let{prefixCls:a,className:n,style:l,rows:i=0}=e,o=Array.from({length:i}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,n),style:l},o)},v=({prefixCls:e,className:a,width:n,style:l})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:n},l)});function y(e){return e&&"object"==typeof e?e:{}}let k=e=>{let{prefixCls:n,loading:i,className:o,rootClassName:s,style:c,children:d,avatar:u=!1,title:g=!0,paragraph:m=!0,active:f,round:p}=e,{getPrefixCls:b,direction:k,className:C,style:x}=(0,a.useComponentConfig)("skeleton"),w=b("skeleton",n),[j,O,E]=h(w);if(i||!("loading"in e)){let e,a,n=!!u,i=!!g,d=!!m;if(n){let r=Object.assign(Object.assign({prefixCls:`${w}-avatar`},i&&!d?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),y(u));e=t.createElement("div",{className:`${w}-header`},t.createElement(l,Object.assign({},r)))}if(i||d){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${w}-title`},!n&&d?{width:"38%"}:n&&d?{width:"50%"}:{}),y(g));e=t.createElement(v,Object.assign({},r))}if(d){let e,a=Object.assign(Object.assign({prefixCls:`${w}-paragraph`},(e={},n&&i||(e.width="61%"),!n&&i?e.rows=3:e.rows=2,e)),y(m));r=t.createElement($,Object.assign({},a))}a=t.createElement("div",{className:`${w}-content`},e,r)}let b=(0,r.default)(w,{[`${w}-with-avatar`]:n,[`${w}-active`]:f,[`${w}-rtl`]:"rtl"===k,[`${w}-round`]:p},C,o,s,O,E);return j(t.createElement("div",{className:b,style:Object.assign(Object.assign({},x),c)},e,a))}return null!=d?d:null};k.Button=e=>{let{prefixCls:i,className:o,rootClassName:s,active:c,block:d=!1,size:u="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),m=g("skeleton",i),[f,p,b]=h(m),$=(0,n.default)(e,["prefixCls"]),v=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:d},o,s,p,b);return f(t.createElement("div",{className:v},t.createElement(l,Object.assign({prefixCls:`${m}-button`,size:u},$))))},k.Avatar=e=>{let{prefixCls:i,className:o,rootClassName:s,active:c,shape:d="circle",size:u="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),m=g("skeleton",i),[f,p,b]=h(m),$=(0,n.default)(e,["prefixCls","className"]),v=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c},o,s,p,b);return f(t.createElement("div",{className:v},t.createElement(l,Object.assign({prefixCls:`${m}-avatar`,shape:d,size:u},$))))},k.Input=e=>{let{prefixCls:i,className:o,rootClassName:s,active:c,block:d,size:u="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),m=g("skeleton",i),[f,p,b]=h(m),$=(0,n.default)(e,["prefixCls"]),v=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:d},o,s,p,b);return f(t.createElement("div",{className:v},t.createElement(l,Object.assign({prefixCls:`${m}-input`,size:u},$))))},k.Image=e=>{let{prefixCls:n,className:l,rootClassName:i,style:o,active:s}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),d=c("skeleton",n),[u,g,m]=h(d),f=(0,r.default)(d,`${d}-element`,{[`${d}-active`]:s},l,i,g,m);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${d}-image`,l),style:o},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${d}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${d}-image-path`})))))},k.Node=e=>{let{prefixCls:n,className:l,rootClassName:i,style:o,active:s,children:c}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),u=d("skeleton",n),[g,m,f]=h(u),p=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},m,l,i,f);return g(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${u}-image`,l),style:o},c)))},e.s(["default",0,k],185793)},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var n=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(n.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],959013)},68155,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,r],68155)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7dd16a650b98a4c5.js b/litellm/proxy/_experimental/out/_next/static/chunks/3daef8922b68e600.js similarity index 61% rename from litellm/proxy/_experimental/out/_next/static/chunks/7dd16a650b98a4c5.js rename to litellm/proxy/_experimental/out/_next/static/chunks/3daef8922b68e600.js index 417dc37f01..d5645b7a28 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/7dd16a650b98a4c5.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3daef8922b68e600.js @@ -16,9 +16,9 @@ } } } -}`,rows:12,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 font-mono text-sm"})}):null;var eM=e.i(770914),eF=e.i(564897),eE=e.i(646563);let{Panel:eL}=ea.Collapse,eR=({availableAccessGroups:e,mcpServer:s,searchValue:r,setSearchValue:l,getAccessGroupOptions:a})=>{let n=H.Form.useFormInstance();return(0,b.useEffect)(()=>{if(s){if(s.extra_headers&&n.setFieldValue("extra_headers",s.extra_headers),s.static_headers){let e=Object.entries(s.static_headers).map(([e,t])=>({header:e,value:null!=t?String(t):""}));n.setFieldValue("static_headers",e)}"boolean"==typeof s.allow_all_keys&&n.setFieldValue("allow_all_keys",s.allow_all_keys),"boolean"==typeof s.available_on_public_internet&&n.setFieldValue("available_on_public_internet",s.available_on_public_internet)}else n.setFieldValue("allow_all_keys",!1),n.setFieldValue("available_on_public_internet",!0)},[s,n]),(0,t.jsx)(ea.Collapse,{className:"bg-gray-50 border border-gray-200 rounded-lg",expandIconPosition:"end",ghost:!1,children:(0,t.jsx)(eL,{header:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Permission Management / Access Control"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 ml-4",children:"Configure access permissions and security settings (Optional)"})]}),className:"border-0",forceRender:!0,children:(0,t.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Allow All LiteLLM Keys",(0,t.jsx)(g.Tooltip,{title:"When enabled, every API key can access this MCP server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:'Enable if this server should be "public" to all keys.'})]}),(0,t.jsx)(H.Form.Item,{name:"allow_all_keys",valuePropName:"checked",initialValue:s?.allow_all_keys??!1,className:"mb-0",children:(0,t.jsx)(el.Switch,{})})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Internal network only",(0,t.jsx)(g.Tooltip,{title:"When on, only requests from within your internal network are accepted. Turn off to allow external clients (other clusters, ChatGPT, etc). API key authentication is always required regardless of this setting.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:"Turn on to restrict access to callers within your internal network only."})]}),(0,t.jsx)(H.Form.Item,{name:"available_on_public_internet",valuePropName:"checked",getValueProps:e=>({checked:!e}),getValueFromEvent:e=>!e,initialValue:!0,className:"mb-0",children:(0,t.jsx)(el.Switch,{})})]}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["MCP Access Groups",(0,t.jsx)(g.Tooltip,{title:"Specify access groups for this MCP server. Users must be in at least one of these groups to access the server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"mcp_access_groups",className:"mb-4",children:(0,t.jsx)(h.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"value",filterOption:(e,t)=>(t?.value??"").toLowerCase().includes(e.toLowerCase()),onSearch:e=>l(e),tokenSeparators:[","],options:a(),maxTagCount:"responsive",allowClear:!0})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Extra Headers",(0,t.jsx)(g.Tooltip,{title:"Forward custom headers from incoming requests to this MCP server (e.g., Authorization, X-Custom-Header, User-Agent)",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})}),s?.extra_headers&&s.extra_headers.length>0&&(0,t.jsxs)("span",{className:"ml-2 text-xs bg-blue-100 text-blue-700 px-2 py-1 rounded-full",children:[s.extra_headers.length," configured"]})]}),name:"extra_headers",children:(0,t.jsx)(h.Select,{mode:"tags",placeholder:s?.extra_headers&&s.extra_headers.length>0?`Currently: ${s.extra_headers.join(", ")}`:"Enter header names (e.g., Authorization, X-Custom-Header)",className:"rounded-lg",size:"large",tokenSeparators:[","],allowClear:!0})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Static Headers",(0,t.jsx)(g.Tooltip,{title:"Send these key-value headers with every request to this MCP server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),required:!1,children:(0,t.jsx)(H.Form.List,{name:"static_headers",children:(e,{add:s,remove:r})=>(0,t.jsxs)("div",{className:"space-y-3",children:[e.map(({key:e,name:s,...l})=>(0,t.jsxs)(eM.Space,{className:"flex w-full",align:"baseline",size:"middle",children:[(0,t.jsx)(H.Form.Item,{...l,name:[s,"header"],className:"flex-1",rules:[{required:!0,message:"Header name is required"}],children:(0,t.jsx)(D.Input,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header name (e.g., X-API-Key)"})}),(0,t.jsx)(H.Form.Item,{...l,name:[s,"value"],className:"flex-1",rules:[{required:!0,message:"Header value is required"}],children:(0,t.jsx)(D.Input,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header value"})}),(0,t.jsx)(eF.MinusCircleOutlined,{onClick:()=>r(s),className:"text-gray-500 hover:text-red-500 cursor-pointer"})]},e)),(0,t.jsx)(eb.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(eE.PlusOutlined,{}),block:!0,children:"Add Static Header"})]})})})]})},"permissions")})},ez=({accessToken:e,selectedName:s,onSelect:r})=>{let[l,a]=(0,b.useState)([]),[n,i]=(0,b.useState)(!1),[o,c]=(0,b.useState)(new Set);return((0,b.useEffect)(()=>{e&&(i(!0),(0,_.fetchOpenAPIRegistry)(e).then(e=>a(e.apis??[])).catch(()=>a([])).finally(()=>i(!1)))},[e]),n)?(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Popular APIs"}),(0,t.jsx)("div",{className:"flex justify-center py-6",children:(0,t.jsx)(W.Spin,{size:"small"})})]}):0===l.length?null:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Popular APIs"}),(0,t.jsx)("div",{className:"grid grid-cols-5 gap-2",children:l.map(e=>{let l=s===e.name,a=o.has(e.name);return(0,t.jsxs)("button",{type:"button",title:e.description,onClick:()=>r(e),className:`flex flex-col items-center gap-1.5 p-3 rounded-lg border transition-all cursor-pointer +}`,rows:12,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 font-mono text-sm"})}):null;var eM=e.i(770914),eF=e.i(564897),eE=e.i(646563);let{Panel:eL}=ea.Collapse,eR=({availableAccessGroups:e,mcpServer:s,searchValue:r,setSearchValue:l,getAccessGroupOptions:a})=>{let n=H.Form.useFormInstance();return(0,b.useEffect)(()=>{if(s){if(s.static_headers){let e=Object.entries(s.static_headers).map(([e,t])=>({header:e,value:null!=t?String(t):""}));n.setFieldValue("static_headers",e)}"boolean"==typeof s.allow_all_keys&&n.setFieldValue("allow_all_keys",s.allow_all_keys),"boolean"==typeof s.available_on_public_internet&&n.setFieldValue("available_on_public_internet",s.available_on_public_internet)}else n.setFieldValue("allow_all_keys",!1),n.setFieldValue("available_on_public_internet",!0)},[s,n]),(0,t.jsx)(ea.Collapse,{className:"bg-gray-50 border border-gray-200 rounded-lg",expandIconPosition:"end",ghost:!1,children:(0,t.jsx)(eL,{header:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Permission Management / Access Control"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 ml-4",children:"Configure access permissions and security settings (Optional)"})]}),className:"border-0",forceRender:!0,children:(0,t.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Allow All LiteLLM Keys",(0,t.jsx)(g.Tooltip,{title:"When enabled, every API key can access this MCP server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:'Enable if this server should be "public" to all keys.'})]}),(0,t.jsx)(H.Form.Item,{name:"allow_all_keys",valuePropName:"checked",initialValue:s?.allow_all_keys??!1,className:"mb-0",children:(0,t.jsx)(el.Switch,{})})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Internal network only",(0,t.jsx)(g.Tooltip,{title:"When on, only requests from within your internal network are accepted. Turn off to allow external clients (other clusters, ChatGPT, etc). API key authentication is always required regardless of this setting.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:"Turn on to restrict access to callers within your internal network only."})]}),(0,t.jsx)(H.Form.Item,{name:"available_on_public_internet",valuePropName:"checked",getValueProps:e=>({checked:!e}),getValueFromEvent:e=>!e,initialValue:!0,className:"mb-0",children:(0,t.jsx)(el.Switch,{})})]}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["MCP Access Groups",(0,t.jsx)(g.Tooltip,{title:"Specify access groups for this MCP server. Users must be in at least one of these groups to access the server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"mcp_access_groups",className:"mb-4",children:(0,t.jsx)(h.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"value",filterOption:(e,t)=>(t?.value??"").toLowerCase().includes(e.toLowerCase()),onSearch:e=>l(e),tokenSeparators:[","],options:a(),maxTagCount:"responsive",allowClear:!0})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Extra Headers",(0,t.jsx)(g.Tooltip,{title:"Forward custom headers from incoming requests to this MCP server (e.g., Authorization, X-Custom-Header, User-Agent)",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})}),s?.extra_headers&&s.extra_headers.length>0&&(0,t.jsxs)("span",{className:"ml-2 text-xs bg-blue-100 text-blue-700 px-2 py-1 rounded-full",children:[s.extra_headers.length," configured"]})]}),name:"extra_headers",children:(0,t.jsx)(h.Select,{mode:"tags",placeholder:s?.extra_headers&&s.extra_headers.length>0?`Currently: ${s.extra_headers.join(", ")}`:"Enter header names (e.g., Authorization, X-Custom-Header)",className:"rounded-lg",size:"large",tokenSeparators:[","],allowClear:!0})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Static Headers",(0,t.jsx)(g.Tooltip,{title:"Send these key-value headers with every request to this MCP server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),required:!1,children:(0,t.jsx)(H.Form.List,{name:"static_headers",children:(e,{add:s,remove:r})=>(0,t.jsxs)("div",{className:"space-y-3",children:[e.map(({key:e,name:s,...l})=>(0,t.jsxs)(eM.Space,{className:"flex w-full",align:"baseline",size:"middle",children:[(0,t.jsx)(H.Form.Item,{...l,name:[s,"header"],className:"flex-1",rules:[{required:!0,message:"Header name is required"}],children:(0,t.jsx)(D.Input,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header name (e.g., X-API-Key)"})}),(0,t.jsx)(H.Form.Item,{...l,name:[s,"value"],className:"flex-1",rules:[{required:!0,message:"Header value is required"}],children:(0,t.jsx)(D.Input,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header value"})}),(0,t.jsx)(eF.MinusCircleOutlined,{onClick:()=>r(s),className:"text-gray-500 hover:text-red-500 cursor-pointer"})]},e)),(0,t.jsx)(eb.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(eE.PlusOutlined,{}),block:!0,children:"Add Static Header"})]})})})]})},"permissions")})},ez=({accessToken:e,selectedName:s,onSelect:r})=>{let[l,a]=(0,b.useState)([]),[n,i]=(0,b.useState)(!1),[o,c]=(0,b.useState)(new Set);return((0,b.useEffect)(()=>{e&&(i(!0),(0,_.fetchOpenAPIRegistry)(e).then(e=>a(e.apis??[])).catch(()=>a([])).finally(()=>i(!1)))},[e]),n)?(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Popular APIs"}),(0,t.jsx)("div",{className:"flex justify-center py-6",children:(0,t.jsx)(W.Spin,{size:"small"})})]}):0===l.length?null:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Popular APIs"}),(0,t.jsx)("div",{className:"grid grid-cols-5 gap-2",children:l.map(e=>{let l=s===e.name,a=o.has(e.name);return(0,t.jsxs)("button",{type:"button",title:e.description,onClick:()=>r(e),className:`flex flex-col items-center gap-1.5 p-3 rounded-lg border transition-all cursor-pointer ${l?"border-blue-500 bg-blue-50 shadow-sm":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[a?(0,t.jsx)("span",{className:"w-7 h-7 rounded-full bg-gray-200 flex items-center justify-center text-sm font-bold text-gray-600",children:e.title.charAt(0)}):(0,t.jsx)("img",{src:e.icon_url,alt:e.title,className:"w-7 h-7 object-contain",onError:()=>{var t;return t=e.name,void c(e=>new Set(e).add(t))}}),(0,t.jsx)("span",{className:"text-xs text-gray-600 text-center leading-tight font-medium",children:e.title})]},e.name)})}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-2",children:"Select an API to pre-fill the spec URL and OAuth 2.0 settings, or enter your own spec URL below."})]})},eU=({form:e,accessToken:s,onValuesChange:r,onKeyToolsChange:l,onLogoUrlChange:a,onOAuthDocsUrlChange:n})=>{let[i,o]=(0,b.useState)(null);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ez,{accessToken:s,selectedName:i,onSelect:t=>{o(t.name),l?.(t.key_tools??[]),a?.(t.icon_url||void 0);let s={spec_path:t.spec_url};t.oauth?(s.auth_type=eo.AUTH_TYPE.OAUTH2,s.oauth_flow_type=eo.OAUTH_FLOW.INTERACTIVE,s.authorization_url=t.oauth.authorization_url,s.token_url=t.oauth.token_url,e.setFieldsValue(s),n?.(t.oauth.docs_url??null)):(e.resetFields(["auth_type","authorization_url","token_url"]),e.setFieldsValue(s),n?.(null)),r(s)}}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OpenAPI Spec URL",(0,t.jsx)(g.Tooltip,{title:"URL to an OpenAPI specification (JSON or YAML). MCP tools will be automatically generated from the API endpoints defined in the spec.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"spec_path",rules:[{required:!0,message:"Please enter an OpenAPI spec URL"}],children:(0,t.jsx)(D.Input,{placeholder:"https://petstore3.swagger.io/api/v3/openapi.json",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",onChange:()=>{o(null),l?.([]),n?.(null)}})})]})};var eB=e.i(596239);let eq="/ui/assets/logos/",eV=[{name:"GitHub",url:`${eq}github.svg`},{name:"Slack",url:`${eq}slack.svg`},{name:"Notion",url:`${eq}notion.svg`},{name:"Linear",url:`${eq}linear.svg`},{name:"Jira",url:`${eq}jira.svg`},{name:"Figma",url:`${eq}figma.svg`},{name:"Gmail",url:`${eq}gmail.svg`},{name:"Google Drive",url:`${eq}google_drive.svg`},{name:"Stripe",url:`${eq}stripe.svg`},{name:"Shopify",url:`${eq}shopify.svg`},{name:"Salesforce",url:`${eq}salesforce.svg`},{name:"HubSpot",url:`${eq}hubspot.svg`},{name:"Twilio",url:`${eq}twilio.svg`},{name:"Cloudflare",url:`${eq}cloudflare.svg`},{name:"Sentry",url:`${eq}sentry.svg`},{name:"PostgreSQL",url:`${eq}postgresql.svg`},{name:"Snowflake",url:`${eq}snowflake.svg`},{name:"Zapier",url:`${eq}zapier.svg`},{name:"Google",url:`${eq}google.svg`},{name:"GitLab",url:`${eq}gitlab.svg`}],e$=({value:e,onChange:s})=>{let[r,l]=(0,b.useState)(new Set);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Logo"}),(0,t.jsx)(g.Tooltip,{title:"Select a well-known logo or paste a URL to any image. The logo is shown on the admin and chat pages.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-blue-400 hover:text-blue-600 cursor-help"})})]}),e&&(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsx)("img",{src:e,alt:"Selected logo",className:"w-10 h-10 object-contain rounded",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e})}),(0,t.jsx)("button",{type:"button",onClick:()=>s?.(void 0),className:"text-xs text-gray-400 hover:text-red-500 cursor-pointer bg-transparent border-none",children:"✕"})]}),(0,t.jsx)("div",{className:"grid grid-cols-10 gap-1.5 mb-3",children:eV.map(a=>{let n=e===a.url;return r.has(a.url)?null:(0,t.jsx)(g.Tooltip,{title:a.name,children:(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=a.url,void s?.(e===t?void 0:t)},className:`flex items-center justify-center p-2 rounded-lg border transition-all cursor-pointer - ${n?"border-blue-500 bg-blue-50 shadow-sm":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,style:{width:40,height:40},children:(0,t.jsx)("img",{src:a.url,alt:a.name,className:"w-5 h-5 object-contain",onError:()=>{var e;return e=a.url,void l(t=>new Set(t).add(e))}})})},a.name)})}),(0,t.jsx)(D.Input,{prefix:(0,t.jsx)(eB.LinkOutlined,{className:"text-gray-400"}),placeholder:"Or paste a custom logo URL...",value:e&&!eV.some(t=>t.url===e)?e:"",onChange:e=>{let t=e.target.value.trim();s?.(t||void 0)},className:"rounded-lg",size:"small"})]})},eH=e=>{try{let t=e.indexOf("/mcp/");if(-1===t)return{token:null,baseUrl:e};let s=e.split("/mcp/");if(2!==s.length)return{token:null,baseUrl:e};let r=s[0]+"/mcp/",l=s[1];if(!l)return{token:null,baseUrl:e};return{token:l,baseUrl:r}}catch(t){return console.error("Error parsing MCP URL:",t),{token:null,baseUrl:e}}},eD=e=>{let{token:t}=eH(e);return{maskedUrl:(e=>{let{token:t,baseUrl:s}=eH(e);return t?s+"...":e})(e),hasToken:!!t}},eK=e=>e?/^https?:\/\/[^\s/$.?#].[^\s]*$/i.test(e)?Promise.resolve():Promise.reject("Please enter a valid URL (e.g., http://service-name.domain:1234/path or https://example.com)"):Promise.resolve(),eW=e=>e&&(e.includes("-")||e.includes(" "))?Promise.reject("Cannot contain '-' (hyphen) or spaces. Please use '_' (underscore) instead."):Promise.resolve();var eJ=e.i(122520),eY=e.i(434166);let eG=e=>{let t=new Uint8Array(e),s="";return t.forEach(e=>s+=String.fromCharCode(e)),btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},eQ=async e=>{let t=new TextEncoder().encode(e);return eG(await window.crypto.subtle.digest("SHA-256",t))},eZ=({accessToken:e,getCredentials:t,getTemporaryPayload:s,onTokenReceived:r,onBeforeRedirect:l})=>{let[a,n]=(0,b.useState)("idle"),[i,o]=(0,b.useState)(null),[c,d]=(0,b.useState)(null),m=(0,b.useRef)(!1),u="litellm-mcp-oauth-flow-state",x="litellm-mcp-oauth-result",p="litellm-mcp-oauth-return-url",h=(e,t)=>{(0,eY.setSecureItem)(e,t)},g=e=>{try{return(0,eY.getSecureItem)(e)}catch(t){return console.warn(`Failed to get storage item ${e}`,t),null}},f=()=>{try{window.sessionStorage.removeItem(u),window.sessionStorage.removeItem(x),window.sessionStorage.removeItem(p),window.localStorage.removeItem(u),window.localStorage.removeItem(x),window.localStorage.removeItem(p)}catch(e){console.warn("Failed to clear OAuth storage",e)}},j=()=>{let e,t,s;return s=((t=(e=window.location.pathname||"").indexOf("/ui"))>=0?e.slice(0,t+3):"").replace(/\/+$/,""),`${window.location.origin}${s}/mcp/oauth/callback`},y=(0,b.useCallback)(async()=>{let r=t()||{};if(!e){o("Missing admin token"),T.default.error("Access token missing. Please re-authenticate and try again.");return}let a=s();if(!a||!a.url||!a.transport){let e="Please complete server URL and transport before starting OAuth.";o(e),T.default.error(e);return}try{let t;n("authorizing"),o(null);let s=await (0,_.cacheTemporaryMcpServer)(e,a),i=s?.server_id?.trim();if(!i)throw Error("Temporary MCP server identifier missing. Please retry.");let c={};if(!(a.credentials?.client_id&&a.credentials?.client_secret)){let t=await (0,_.registerMcpOAuthClient)(e,i,{client_name:a.alias||a.server_name||i,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:a.credentials&&a.credentials.client_secret?"client_secret_post":"none"});c={clientId:t?.client_id,clientSecret:t?.client_secret}}let d=(t=new Uint8Array(32),window.crypto.getRandomValues(t),eG(t.buffer)),m=await eQ(d),x=crypto.randomUUID(),g=c.clientId||r.client_id,f=Array.isArray(r.scopes)?r.scopes.filter(e=>e&&e.trim().length>0).join(" "):void 0,b=(0,_.buildMcpOAuthAuthorizeUrl)({serverId:i,clientId:g,redirectUri:j(),state:x,codeChallenge:m,scope:f}),y={state:x,codeVerifier:d,clientId:g,clientSecret:c.clientSecret||r.client_secret,serverId:i,redirectUri:j()};if(l)try{l()}catch(e){console.error("Failed to prepare for OAuth redirect",e)}try{h(u,JSON.stringify(y)),h(p,window.location.href)}catch(e){throw Error("Unable to access browser storage for OAuth. Please enable storage and retry.")}window.location.href=b}catch(t){console.error("Failed to start OAuth flow",t),n("error");let e=(0,eJ.extractErrorMessage)(t);o(e),T.default.error(e)}},[e,t,s,l]),v=(0,b.useCallback)(async()=>{if(m.current)return;let e=null,t=null;try{let s=g(x);if(!s)return;m.current=!0,e=JSON.parse(s);let r=g(u);t=r?JSON.parse(r):null}catch(e){f(),m.current=!1,o("Failed to resume OAuth flow. Please retry."),n("error"),T.default.error("Failed to resume OAuth flow. Please retry.");return}if(!e){m.current=!1;return}try{window.sessionStorage.removeItem(x),window.localStorage.removeItem(x)}catch(e){}try{if(!t||!t.state||!t.codeVerifier||!t.serverId)throw Error("OAuth session state was lost. This can happen if you have strict browser privacy settings. Please try again and ensure cookies/storage is enabled.");if(!e.state||e.state!==t.state)throw Error("OAuth state mismatch. Please retry.");if(e.error)throw Error(e.error_description||e.error);if(!e.code)throw Error("Authorization code missing in callback.");n("exchanging");let s=await (0,_.exchangeMcpOAuthToken)({serverId:t.serverId,code:e.code,clientId:t.clientId,clientSecret:t.clientSecret,codeVerifier:t.codeVerifier,redirectUri:t.redirectUri});r(s),d(s),n("success"),o(null),T.default.success("OAuth token retrieved successfully")}catch(t){let e=(0,eJ.extractErrorMessage)(t);o(e),n("error"),T.default.error(e)}finally{f(),setTimeout(()=>{m.current=!1},1e3)}},[r]);return(0,b.useEffect)(()=>{v()},[v]),{startOAuthFlow:y,status:a,error:i,tokenResponse:c}},eX="../ui/assets/logos/mcp_logo.png",e0=[eo.AUTH_TYPE.API_KEY,eo.AUTH_TYPE.BEARER_TOKEN,eo.AUTH_TYPE.TOKEN,eo.AUTH_TYPE.BASIC],e2=[...e0,eo.AUTH_TYPE.OAUTH2,eo.AUTH_TYPE.AWS_SIGV4],e1="litellm-mcp-oauth-create-state",e5=e=>Array.isArray(e)?e.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value??""),e},{}):{},e4=({userRole:e,accessToken:r,onCreateSuccess:a,isModalVisible:n,setModalVisible:i,availableAccessGroups:o,prefillData:c,onBackToDiscovery:d})=>{let[m]=H.Form.useForm(),[u,x]=(0,b.useState)(!1),[f,j]=(0,b.useState)({}),[y,v]=(0,b.useState)({}),[N,w]=(0,b.useState)(null),[S,C]=(0,b.useState)(!1),[k,A]=(0,b.useState)([]),[I,P]=(0,b.useState)({}),[O,M]=(0,b.useState)({}),[F,E]=(0,b.useState)(""),[L,R]=(0,b.useState)([]),[z,U]=(0,b.useState)(""),[B,q]=(0,b.useState)(null),[V,$]=(0,b.useState)(void 0),[K,W]=(0,b.useState)(null),{tools:J,isLoadingTools:Y,toolsError:G,toolsErrorStackTrace:Q,canFetchTools:Z,fetchTools:X,clearTools:ee}=ek({accessToken:r,oauthAccessToken:B,formValues:y,enabled:!0}),et=y.auth_type,es=!!et&&e0.includes(et),er=et===eo.AUTH_TYPE.OAUTH2,ec=et===eo.AUTH_TYPE.AWS_SIGV4,ed=er&&y.oauth_flow_type===eo.OAUTH_FLOW.M2M,{startOAuthFlow:em,status:ex,error:ep,tokenResponse:eh}=eZ({accessToken:r,getCredentials:()=>m.getFieldValue("credentials"),getTemporaryPayload:()=>{let e=m.getFieldsValue(!0),t=e.transport||F,s=e.url||(t===eo.TRANSPORT.OPENAPI?e.spec_path:void 0);if(!s||!t)return null;let r=e5(e.static_headers);return{server_id:void 0,server_name:e.server_name,alias:e.alias,description:e.description,url:s,transport:t===eo.TRANSPORT.OPENAPI?"http":t,auth_type:eo.AUTH_TYPE.OAUTH2,credentials:e.credentials,authorization_url:e.authorization_url,token_url:e.token_url,registration_url:e.registration_url,mcp_access_groups:e.mcp_access_groups,static_headers:r,command:e.command,args:e.args,env:e.env}},onTokenReceived:e=>{if(q(e?.access_token??null),e?.access_token){let t={access_token:e.access_token,...e.refresh_token&&{refresh_token:e.refresh_token},...e.expires_in&&{expires_in:e.expires_in},...e.scope&&{scope:e.scope}};m.setFieldsValue({credentials:t}),T.default.success("OAuth authorization successful! Please click 'Create MCP Server' to save the configuration.")}},onBeforeRedirect:()=>{try{let e=m.getFieldsValue(!0);(0,eY.setSecureItem)(e1,JSON.stringify({modalVisible:n,formValues:e,transportType:F,costConfig:f,allowedTools:k,searchValue:z,aliasManuallyEdited:S,logoUrl:V}))}catch(e){console.warn("Failed to persist MCP create state",e)}}});b.default.useEffect(()=>{let e=(0,eY.getSecureItem)(e1);if(e)try{let t=JSON.parse(e);t.modalVisible&&i(!0);let s=t.formValues?.transport||t.transportType||"";s&&E(s),t.formValues&&w({values:t.formValues,transport:s}),t.costConfig&&j(t.costConfig),t.allowedTools&&A(t.allowedTools),t.searchValue&&U(t.searchValue),"boolean"==typeof t.aliasManuallyEdited&&C(t.aliasManuallyEdited),t.logoUrl&&$(t.logoUrl)}catch(e){console.error("Failed to restore MCP create state",e)}finally{window.sessionStorage.removeItem(e1)}},[m,i]),b.default.useEffect(()=>{N&&(F||N.transport,(!N.transport||F)&&(m.setFieldsValue(N.values),v(N.values),w(null)))},[N,m,F]),b.default.useEffect(()=>{if(!n||!c)return;let e=(c.name||"").replace(/[^a-zA-Z0-9_]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,""),t=c.transport||"";E(t);let s={server_name:e,alias:e,description:c.description||"",transport:t};if("stdio"===t){let e={};if(c.command&&(e.command=c.command),c.args&&c.args.length>0&&(e.args=c.args),c.env_vars&&c.env_vars.length>0){let t={};for(let e of c.env_vars)t[e.name]=e.description?`<${e.description}>`:"";e.env=t}Object.keys(e).length>0&&(s.stdio_config=JSON.stringify(e,null,2))}else c.url&&(s.url=c.url);m.setFieldsValue(s),v(s),C(!1)},[n,c,m]);let eg=async e=>{x(!0);try{let{static_headers:t,stdio_config:s,credentials:l,allow_all_keys:n,available_on_public_internet:o,token_validation_json:c,...d}=e,u=d.mcp_access_groups,p=e5(t),h=l&&"object"==typeof l?Object.entries(l).reduce((e,[t,s])=>{if(null==s||""===s)return e;if("scopes"===t){if(Array.isArray(s)){let r=s.filter(e=>null!=e&&""!==e);r.length>0&&(e[t]=r)}}else e[t]=s;return e},{}):void 0,g={};if(s&&"stdio"===F)try{let e=JSON.parse(s),t=e;if(e.mcpServers&&"object"==typeof e.mcpServers){let s=Object.keys(e.mcpServers);if(s.length>0){let r=s[0];t=e.mcpServers[r],d.server_name||(d.server_name=r.replace(/-/g,"_"))}}g={command:t.command,args:t.args,env:t.env},console.log("Parsed stdio config:",g)}catch(e){T.default.fromBackend("Invalid JSON in stdio configuration");return}d.transport===eo.TRANSPORT.OPENAPI&&(d.transport="http");let b=null;if(c&&""!==c.trim())try{b=JSON.parse(c)}catch{T.default.fromBackend("Invalid JSON in Token Validation Rules"),x(!1);return}let y={...d,...g,stdio_config:void 0,mcp_info:{server_name:d.server_name||d.url,description:d.description,logo_url:V||void 0,mcp_server_cost_info:Object.keys(f).length>0?f:null},mcp_access_groups:u,alias:d.alias,allowed_tools:k.length>0?k:null,tool_name_to_display_name:Object.keys(I).length>0?I:null,tool_name_to_description:Object.keys(O).length>0?O:null,allow_all_keys:!!n,available_on_public_internet:!!o,static_headers:p,...null!==b&&{token_validation:b}};if(y.static_headers=p,d.auth_type&&e2.includes(d.auth_type)&&h&&Object.keys(h).length>0&&(y.credentials=h),console.log(`Payload: ${JSON.stringify(y)}`),null!=r){let e=ej?await (0,_.createMCPServer)(r,y):await (0,_.registerMCPServer)(r,y);T.default.success(ej?"MCP Server created successfully":"MCP Server submitted for admin review"),m.resetFields(),j({}),ee(),A([]),C(!1),$(void 0),i(!1),a(e)}}catch(t){let e=t instanceof Error?t.message:String(t);T.default.fromBackend(ej?`Error creating MCP Server: ${e}`:`Error submitting MCP Server: ${e}`)}finally{x(!1)}},eb=()=>{m.resetFields(),j({}),ee(),A([]),C(!1),$(void 0),i(!1)};b.default.useEffect(()=>{if(!S&&y.server_name){let e=y.server_name.replace(/\s+/g,"_");m.setFieldsValue({alias:e}),v(t=>({...t,alias:e}))}},[y.server_name]),b.default.useEffect(()=>{n||v({})},[n]);let ej=(0,s.isAdminRole)(e);return(0,t.jsx)(p.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center pb-4 border-b border-gray-100",style:{gap:12},children:[d&&(0,t.jsx)("button",{onClick:d,className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer bg-transparent border-none",style:{flexShrink:0},children:"←"}),(0,t.jsx)("img",{src:eX,alt:"MCP Logo",className:"w-8 h-8 object-contain",style:{height:"20px",width:"20px",objectFit:"contain"}}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:ej?"Add New MCP Server":"Submit MCP Server for Review"})]}),open:n,width:1e3,onCancel:eb,footer:null,forceRender:!0,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsxs)(H.Form,{form:m,onFinish:eg,onValuesChange:(e,t)=>v(t),layout:"vertical",className:"space-y-6",children:[!ej&&(0,t.jsxs)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800",children:["Your submission will be sent for admin review before it becomes active."," ","Note: the request must be made with a team-scoped API key."]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["MCP Server Name",(0,t.jsx)(g.Tooltip,{title:"Best practice: Use a descriptive name that indicates the server's purpose (e.g., 'GitHub_MCP', 'Email_Service'). Cannot contain spaces or hyphens; use underscores instead. Names must comply with SEP-986 and will be rejected if invalid (https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-names).",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"server_name",rules:[{required:!1,message:"Please enter a server name"},{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(ei.TextInput,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Alias",(0,t.jsx)(g.Tooltip,{title:"A short, unique identifier for this server. Defaults to the server name if not provided. Cannot contain spaces or hyphens; use underscores instead.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"alias",rules:[{required:!1},{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(ei.TextInput,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",onChange:()=>C(!0)})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description"}),name:"description",rules:[{required:!1,message:"Please enter a server description"}],children:(0,t.jsx)(ei.TextInput,{placeholder:"Brief description of what this server does",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(e$,{value:V,onChange:$}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"GitHub / Source URL"}),name:"source_url",children:(0,t.jsx)(ei.TextInput,{placeholder:"https://github.com/org/mcp-server",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Transport Type"}),name:"transport",rules:[{required:!0,message:"Please select a transport type"}],children:(0,t.jsxs)(h.Select,{placeholder:"Select transport",className:"rounded-lg",size:"large",onChange:e=>{E(e),"stdio"===e?m.setFieldsValue({url:void 0,spec_path:void 0,auth_type:void 0,credentials:void 0}):e===eo.TRANSPORT.OPENAPI?m.setFieldsValue({url:void 0,command:void 0,args:void 0,env:void 0}):m.setFieldsValue({spec_path:void 0,command:void 0,args:void 0,env:void 0})},value:F,children:[(0,t.jsx)(h.Select.Option,{value:"http",children:"Streamable HTTP (Recommended)"}),(0,t.jsx)(h.Select.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(h.Select.Option,{value:"stdio",children:"Standard Input/Output (stdio)"}),(0,t.jsx)(h.Select.Option,{value:eo.TRANSPORT.OPENAPI,children:"OpenAPI Spec"})]})}),("http"===F||"sse"===F)&&(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"MCP Server URL"}),name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,t)=>eK(t)}],children:(0,t.jsx)(D.Input,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),F===eo.TRANSPORT.OPENAPI&&(0,t.jsx)(eU,{form:m,accessToken:n?r:null,onValuesChange:e=>v(t=>({...t,...e})),onKeyToolsChange:R,onLogoUrlChange:$,onOAuthDocsUrlChange:W}),F===eo.TRANSPORT.OPENAPI&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:["BYOK (Bring Your Own Key)",(0,t.jsx)(g.Tooltip,{title:"When enabled, each user provides their own API key for this service. Keys are stored per-user and never shared.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"is_byok",valuePropName:"checked",children:(0,t.jsx)(el.Switch,{})}),(0,t.jsx)(H.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.is_byok!==t.is_byok||e.auth_type!==t.auth_type,children:({getFieldValue:e})=>e("is_byok")?(0,t.jsxs)(t.Fragment,{children:[e("auth_type")&&"none"!==e("auth_type")&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg text-sm text-blue-700 flex items-start gap-2",children:[(0,t.jsx)(en.InfoCircleOutlined,{className:"mt-0.5 flex-shrink-0"}),(0,t.jsxs)("span",{children:["User keys will be sent as:"," ",(0,t.jsxs)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:["bearer_token"===e("auth_type")&&"Authorization: Bearer {key}","token"===e("auth_type")&&"Authorization: token {key}","api_key"===e("auth_type")&&"x-api-key: {key}","basic"===e("auth_type")&&"Authorization: Basic {key}","authorization"===e("auth_type")&&"Authorization: {key}"]}),!e("auth_type")&&"Set Authentication Type below to specify the format."]})]}),!e("auth_type")&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-yellow-50 rounded-lg text-sm text-yellow-700 flex items-start gap-2",children:[(0,t.jsx)(en.InfoCircleOutlined,{className:"mt-0.5 flex-shrink-0"}),(0,t.jsxs)("span",{children:["Set the ",(0,t.jsx)("strong",{children:"Authentication Type"})," below to specify how user keys are sent (e.g., Bearer Token, API Key header)."]})]}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Access Description",(0,t.jsx)(g.Tooltip,{title:"List of permissions shown to users in the connection modal (e.g. 'Create and manage Jira issues')",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"byok_description",children:(0,t.jsx)(h.Select,{mode:"tags",placeholder:"Add access description items (press Enter after each)",className:"w-full",tokenSeparators:[","]})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["API Key Help URL",(0,t.jsx)(g.Tooltip,{title:"Optional link shown to users to help them find their API key",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"byok_api_key_help_url",children:(0,t.jsx)(D.Input,{placeholder:"https://docs.example.com/api-keys"})})]}):null})]}),"stdio"!==F&&""!==F&&(0,t.jsx)(ea.Collapse,{defaultActiveKey:["auth"],className:"mb-4",items:[{key:"auth",label:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-700",children:"Authentication"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{name:"auth_type",rules:[{required:!0,message:"Please select an auth type"}],children:(0,t.jsxs)(h.Select,{placeholder:"Select auth type",className:"rounded-lg",size:"large",children:[(0,t.jsx)(h.Select.Option,{value:"none",children:"None"}),(0,t.jsx)(h.Select.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(h.Select.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(h.Select.Option,{value:"token",children:"Token"}),(0,t.jsx)(h.Select.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(h.Select.Option,{value:"oauth2",children:"OAuth"}),(0,t.jsx)(h.Select.Option,{value:"aws_sigv4",children:"AWS SigV4 (Bedrock AgentCore MCPs)"})]})}),es&&(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(g.Tooltip,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","auth_value"],rules:[{validator:(e,t)=>t&&"string"==typeof t&&""===t.trim()?Promise.reject(Error("Authentication value cannot be empty whitespace")):Promise.resolve()}],children:(0,t.jsx)(ei.TextInput,{type:"password",placeholder:"Enter token or secret",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),er&&(0,t.jsx)(eu,{isM2M:ed,initialFlowType:eo.OAUTH_FLOW.INTERACTIVE,docsUrl:K,oauthFlow:{startOAuthFlow:em,status:ex,error:ep,tokenResponse:eh}})]})}]}),"stdio"!==F&&""!==F&&ec&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-2",children:["For MCP servers hosted on AWS Bedrock AgentCore."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/mcp_aws_sigv4",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700",children:"View docs →"})]}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Region",(0,t.jsx)(g.Tooltip,{title:"AWS region for SigV4 signing (e.g., us-east-1)",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_region_name"],rules:[{required:!0,message:"AWS region is required for SigV4 auth"}],children:(0,t.jsx)(D.Input,{placeholder:"us-east-1",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Service Name",(0,t.jsx)(g.Tooltip,{title:"AWS service name for SigV4 signing. Defaults to 'bedrock-agentcore'.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_service_name"],children:(0,t.jsx)(D.Input,{placeholder:"bedrock-agentcore",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Access Key ID",(0,t.jsx)(g.Tooltip,{title:"Optional. If not provided, falls back to the boto3 credential chain (IAM role, env vars, etc.).",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_access_key_id"],dependencies:[["credentials","aws_secret_access_key"]],rules:[({getFieldValue:e})=>({validator:(t,s)=>e(["credentials","aws_secret_access_key"])&&!s?Promise.reject(Error("Access Key ID is required when Secret Access Key is provided")):Promise.resolve()})],children:(0,t.jsx)(D.Input.Password,{placeholder:"AKIA... (optional — uses IAM role if blank)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Secret Access Key",(0,t.jsx)(g.Tooltip,{title:"Optional. Required if AWS Access Key ID is provided.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_secret_access_key"],dependencies:[["credentials","aws_access_key_id"]],rules:[({getFieldValue:e})=>({validator:(t,s)=>e(["credentials","aws_access_key_id"])&&!s?Promise.reject(Error("Secret Access Key is required when Access Key ID is provided")):Promise.resolve()})],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter secret key (optional — uses IAM role if blank)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Token",(0,t.jsx)(g.Tooltip,{title:"Optional. Only needed for temporary STS credentials.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_token"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter session token (optional)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Role ARN",(0,t.jsx)(g.Tooltip,{title:"Optional. IAM role ARN to assume via STS before signing. If set, LiteLLM calls sts:AssumeRole to get temporary credentials. Uses ambient credentials (IAM role, env vars) as the source identity unless explicit keys are also provided.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_role_name"],children:(0,t.jsx)(D.Input,{placeholder:"arn:aws:iam::123456789012:role/MyRole (optional)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Name",(0,t.jsx)(g.Tooltip,{title:"Optional. Session name for the AssumeRole call — appears in CloudTrail logs. Auto-generated if omitted.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_name"],children:(0,t.jsx)(D.Input,{placeholder:"litellm-prod (optional, auto-generated if blank)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsx)(eO,{isVisible:"stdio"===F})]}),(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)(eR,{availableAccessGroups:o,mcpServer:null,searchValue:z,setSearchValue:U,getAccessGroupOptions:()=>{let e=o.map(e=>({value:e,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})}));return z&&!o.some(e=>e.toLowerCase().includes(z.toLowerCase()))&&e.push({value:z,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:z}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-1",children:"create new group"})]})}),e}})}),(0,t.jsx)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:(0,t.jsx)(e_,{formValues:y,tools:J,isLoadingTools:Y,toolsError:G,toolsErrorStackTrace:Q,canFetchTools:Z,fetchTools:X})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(eP,{accessToken:r,oauthAccessToken:B,formValues:y,allowedTools:k,existingAllowedTools:null,onAllowedToolsChange:A,toolNameToDisplayName:I,toolNameToDescription:O,onToolNameToDisplayNameChange:P,onToolNameToDescriptionChange:M,keyTools:L,externalTools:J,externalIsLoading:Y,externalError:G,externalCanFetch:Z})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(ef,{value:f,onChange:j,tools:J.filter(e=>k.includes(e.name)),disabled:!1})}),(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,t.jsx)(l.Button,{variant:"secondary",onClick:eb,children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"primary",loading:u,children:u?"Creating...":"Add MCP Server"})]})]})})})};var e6=e.i(175712),e3=e.i(118366),e7=e.i(475254);let e8=(0,e7.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",()=>e8],758472);let e9=(0,e7.default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),te=(0,e7.default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);var tt=e.i(634831),ts=e.i(438100);let tr=(0,e7.default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var tl=e.i(500330);let{Title:ta,Text:tn}=f.Typography,{Panel:ti}=ea.Collapse,to=({icon:e,title:s,description:r,children:l,serverName:a,accessGroups:n=["dev-group"]})=>{let[i,o]=(0,b.useState)(!1);return(0,t.jsxs)(e6.Card,{className:"border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)("span",{className:"p-2 rounded-lg bg-gray-50",children:e}),(0,t.jsxs)("div",{children:[(0,t.jsx)(ta,{level:5,className:"mb-0",children:s}),(0,t.jsx)(tn,{className:"text-gray-600",children:r})]})]}),a&&("Implementation Example"===s||"Configuration"===s)&&(0,t.jsxs)(H.Form.Item,{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(el.Switch,{size:"small",checked:i,onChange:o}),(0,t.jsxs)(tn,{className:"text-sm",children:["Limit tools to specific MCP servers or MCP groups by passing the ",(0,t.jsx)("code",{children:"x-mcp-servers"})," header"]})]}),i&&(0,t.jsx)(ej.Alert,{className:"mt-2",type:"info",showIcon:!0,message:"Two Options",description:(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Option 1:"})," Get a specific server: ",(0,t.jsxs)("code",{children:['"',a.replace(/\s+/g,"_"),'"']})]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Option 2:"})," Get a group of MCPs: ",(0,t.jsx)("code",{children:'"dev-group"'})]}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-gray-600",children:["You can also mix both: ",(0,t.jsx)("code",{children:'"Server1,dev-group"'})]})]})})]}),b.default.Children.map(l,e=>{if(b.default.isValidElement(e)&&e.props.hasOwnProperty("code")&&e.props.hasOwnProperty("copyKey")){let t=e.props.code;if(t&&t.includes('"headers":'))return b.default.cloneElement(e,{code:t.replace(/"headers":\s*{[^}]*}/,`"headers": ${JSON.stringify((()=>{let e={"x-litellm-api-key":"Bearer YOUR_LITELLM_API_KEY"};if(i&&a){let t=[a.replace(/\s+/g,"_"),...n].join(",");e["x-mcp-servers"]=t}return e})(),null,8)}`)})}return e})]})},tc=({currentServerAccessGroups:e=[]})=>{let s=(0,_.getProxyBaseUrl)(),[r,l]=(0,b.useState)({}),[u,x]=(0,b.useState)({openai:[],litellm:[],cursor:[],http:[]}),[p]=(0,b.useState)("Zapier_MCP"),h=async(e,t)=>{await (0,tl.copyToClipboard)(e)&&(l(e=>({...e,[t]:!0})),setTimeout(()=>{l(e=>({...e,[t]:!1}))},2e3))},g=({code:e,copyKey:s,title:l,className:a=""})=>(0,t.jsxs)("div",{className:"relative group",children:[l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(e8,{size:16,className:"text-blue-600"}),(0,t.jsx)(tn,{strong:!0,className:"text-gray-700",children:l})]}),(0,t.jsxs)(e6.Card,{className:`bg-gray-50 border border-gray-200 relative ${a}`,children:[(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:r[s]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(e3.CopyIcon,{size:12}),onClick:()=>h(e,s),className:`absolute top-2 right-2 z-10 transition-all duration-200 ${r[s]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`}),(0,t.jsx)("pre",{className:"text-sm overflow-x-auto pr-10 text-gray-800 font-mono leading-relaxed",children:e})]})]}),f=({step:e,title:s,children:r})=>(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("div",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-semibold",children:e})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(tn,{strong:!0,className:"text-gray-800 block mb-2",children:s}),r]})]});return(0,t.jsx)("div",{children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Title,{className:"text-3xl font-bold text-gray-900 mb-3",children:"Connect to your MCP client"}),(0,t.jsx)(d.Text,{className:"text-lg text-gray-600",children:"Use tools directly from any MCP client with LiteLLM MCP. Enable your AI assistant to perform real-world tasks through a simple, secure connection."})]}),(0,t.jsxs)(n.TabGroup,{className:"w-full",children:[(0,t.jsx)(i.TabList,{className:"flex justify-start mt-8 mb-6",children:(0,t.jsxs)("div",{className:"flex bg-gray-100 p-1 rounded-lg",children:[(0,t.jsx)(a.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(e8,{size:18}),"OpenAI API"]})}),(0,t.jsx)(a.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(tr,{size:18}),"LiteLLM Proxy"]})}),(0,t.jsx)(a.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(e9,{size:18}),"Cursor"]})}),(0,t.jsx)(a.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(te,{size:18}),"Streamable HTTP"]})})]})}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-blue-50 to-indigo-50 p-6 rounded-lg border border-blue-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(e8,{className:"text-blue-600",size:24}),(0,t.jsx)(ta,{level:4,className:"mb-0 text-blue-900",children:"OpenAI Responses API Integration"})]}),(0,t.jsx)(tn,{className:"text-blue-700",children:"Connect OpenAI Responses API to your LiteLLM MCP server for seamless tool integration"})]}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(to,{icon:(0,t.jsx)(ts.KeyIcon,{className:"text-blue-600",size:16}),title:"API Key Setup",description:"Configure your OpenAI API key for authentication",children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsxs)(tn,{children:["Get your API key from the"," ",(0,t.jsxs)("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-700 inline-flex items-center gap-1",children:["OpenAI platform ",(0,t.jsx)(tt.ExternalLinkIcon,{size:12})]})]})}),(0,t.jsx)(g,{title:"Environment Variable",code:'export OPENAI_API_KEY="sk-..."',copyKey:"openai-env"})]})}),(0,t.jsx)(to,{icon:(0,t.jsx)(P.ServerIcon,{className:"text-blue-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"openai-server-url"})}),(0,t.jsx)(to,{icon:(0,t.jsx)(e8,{className:"text-blue-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the Responses API",serverName:"Zapier Gmail",accessGroups:["dev-group"],children:(0,t.jsx)(g,{code:`curl --location 'https://api.openai.com/v1/responses' \\ + ${n?"border-blue-500 bg-blue-50 shadow-sm":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,style:{width:40,height:40},children:(0,t.jsx)("img",{src:a.url,alt:a.name,className:"w-5 h-5 object-contain",onError:()=>{var e;return e=a.url,void l(t=>new Set(t).add(e))}})})},a.name)})}),(0,t.jsx)(D.Input,{prefix:(0,t.jsx)(eB.LinkOutlined,{className:"text-gray-400"}),placeholder:"Or paste a custom logo URL...",value:e&&!eV.some(t=>t.url===e)?e:"",onChange:e=>{let t=e.target.value.trim();s?.(t||void 0)},className:"rounded-lg",size:"small"})]})},eH=e=>{try{let t=e.indexOf("/mcp/");if(-1===t)return{token:null,baseUrl:e};let s=e.split("/mcp/");if(2!==s.length)return{token:null,baseUrl:e};let r=s[0]+"/mcp/",l=s[1];if(!l)return{token:null,baseUrl:e};return{token:l,baseUrl:r}}catch(t){return console.error("Error parsing MCP URL:",t),{token:null,baseUrl:e}}},eD=e=>{let{token:t}=eH(e);return{maskedUrl:(e=>{let{token:t,baseUrl:s}=eH(e);return t?s+"...":e})(e),hasToken:!!t}},eK=e=>e?/^https?:\/\/[^\s/$.?#].[^\s]*$/i.test(e)?Promise.resolve():Promise.reject("Please enter a valid URL (e.g., http://service-name.domain:1234/path or https://example.com)"):Promise.resolve(),eW=e=>e&&(e.includes("-")||e.includes(" "))?Promise.reject("Cannot contain '-' (hyphen) or spaces. Please use '_' (underscore) instead."):Promise.resolve();var eJ=e.i(122520),eY=e.i(165615),eG=e.i(434166);let eQ=({accessToken:e,getCredentials:t,getTemporaryPayload:s,onTokenReceived:r,onBeforeRedirect:l})=>{let[a,n]=(0,b.useState)("idle"),[i,o]=(0,b.useState)(null),[c,d]=(0,b.useState)(null),m=(0,b.useRef)(!1),u="litellm-mcp-oauth-flow-state",x="litellm-mcp-oauth-result",p="litellm-mcp-oauth-return-url",h=(e,t)=>{(0,eG.setSecureItem)(e,t)},g=e=>{try{return(0,eG.getSecureItem)(e)}catch(t){return console.warn(`Failed to get storage item ${e}`,t),null}},f=()=>{try{window.sessionStorage.removeItem(u),window.sessionStorage.removeItem(x),window.sessionStorage.removeItem(p),window.localStorage.removeItem(u),window.localStorage.removeItem(x),window.localStorage.removeItem(p)}catch(e){console.warn("Failed to clear OAuth storage",e)}},j=()=>{let e,t,s;return s=((t=(e=window.location.pathname||"").indexOf("/ui"))>=0?e.slice(0,t+3):"").replace(/\/+$/,""),`${window.location.origin}${s}/mcp/oauth/callback`},y=(0,b.useCallback)(async()=>{let r=t()||{};if(!e){o("Missing admin token"),T.default.error("Access token missing. Please re-authenticate and try again.");return}let a=s();if(!a||!a.url||!a.transport){let e="Please complete server URL and transport before starting OAuth.";o(e),T.default.error(e);return}try{n("authorizing"),o(null);let t=await (0,_.cacheTemporaryMcpServer)(e,a),s=t?.server_id?.trim();if(!s)throw Error("Temporary MCP server identifier missing. Please retry.");let i={};if(!(a.credentials?.client_id&&a.credentials?.client_secret)){let t=await (0,_.registerMcpOAuthClient)(e,s,{client_name:a.alias||a.server_name||s,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:a.credentials&&a.credentials.client_secret?"client_secret_post":"none"});i={clientId:t?.client_id,clientSecret:t?.client_secret}}let c=(0,eY.generateCodeVerifier)(),d=await (0,eY.generateCodeChallenge)(c),m=crypto.randomUUID(),x=i.clientId||r.client_id,g=Array.isArray(r.scopes)?r.scopes.filter(e=>e&&e.trim().length>0).join(" "):void 0,f=(0,_.buildMcpOAuthAuthorizeUrl)({serverId:s,clientId:x,redirectUri:j(),state:m,codeChallenge:d,scope:g}),b={state:m,codeVerifier:c,clientId:x,clientSecret:i.clientSecret||r.client_secret,serverId:s,redirectUri:j()};if(l)try{l()}catch(e){console.error("Failed to prepare for OAuth redirect",e)}try{h(u,JSON.stringify(b)),h(p,window.location.href)}catch(e){throw Error("Unable to access browser storage for OAuth. Please enable storage and retry.")}window.location.href=f}catch(t){console.error("Failed to start OAuth flow",t),n("error");let e=(0,eJ.extractErrorMessage)(t);o(e),T.default.error(e)}},[e,t,s,l]),v=(0,b.useCallback)(async()=>{if(m.current)return;let e=null,t=null;try{let s=g(x);if(!s)return;m.current=!0,e=JSON.parse(s);let r=g(u);t=r?JSON.parse(r):null}catch(e){f(),m.current=!1,o("Failed to resume OAuth flow. Please retry."),n("error"),T.default.error("Failed to resume OAuth flow. Please retry.");return}if(!e){m.current=!1;return}try{window.sessionStorage.removeItem(x),window.localStorage.removeItem(x)}catch(e){}try{if(!t||!t.state||!t.codeVerifier||!t.serverId)throw Error("OAuth session state was lost. This can happen if you have strict browser privacy settings. Please try again and ensure cookies/storage is enabled.");if(!e.state||e.state!==t.state)throw Error("OAuth state mismatch. Please retry.");if(e.error)throw Error(e.error_description||e.error);if(!e.code)throw Error("Authorization code missing in callback.");n("exchanging");let s=await (0,_.exchangeMcpOAuthToken)({serverId:t.serverId,code:e.code,clientId:t.clientId,clientSecret:t.clientSecret,codeVerifier:t.codeVerifier,redirectUri:t.redirectUri});r(s),d(s),n("success"),o(null),T.default.success("OAuth token retrieved successfully")}catch(t){let e=(0,eJ.extractErrorMessage)(t);o(e),n("error"),T.default.error(e)}finally{f(),setTimeout(()=>{m.current=!1},1e3)}},[r]);return(0,b.useEffect)(()=>{v()},[v]),{startOAuthFlow:y,status:a,error:i,tokenResponse:c}},eZ="../ui/assets/logos/mcp_logo.png",eX=[eo.AUTH_TYPE.API_KEY,eo.AUTH_TYPE.BEARER_TOKEN,eo.AUTH_TYPE.TOKEN,eo.AUTH_TYPE.BASIC],e0=[...eX,eo.AUTH_TYPE.OAUTH2,eo.AUTH_TYPE.AWS_SIGV4],e2="litellm-mcp-oauth-create-state",e1=e=>Array.isArray(e)?e.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value??""),e},{}):{},e5=({userRole:e,accessToken:r,onCreateSuccess:a,isModalVisible:n,setModalVisible:i,availableAccessGroups:o,prefillData:c,onBackToDiscovery:d})=>{let[m]=H.Form.useForm(),[u,x]=(0,b.useState)(!1),[f,j]=(0,b.useState)({}),[y,v]=(0,b.useState)({}),[N,w]=(0,b.useState)(null),[S,C]=(0,b.useState)(!1),[k,A]=(0,b.useState)([]),[I,P]=(0,b.useState)({}),[O,M]=(0,b.useState)({}),[F,E]=(0,b.useState)(""),[L,R]=(0,b.useState)([]),[z,U]=(0,b.useState)(""),[B,q]=(0,b.useState)(null),[V,$]=(0,b.useState)(void 0),[K,W]=(0,b.useState)(null),{tools:J,isLoadingTools:Y,toolsError:G,toolsErrorStackTrace:Q,canFetchTools:Z,fetchTools:X,clearTools:ee}=ek({accessToken:r,oauthAccessToken:B,formValues:y,enabled:!0}),et=y.auth_type,es=!!et&&eX.includes(et),er=et===eo.AUTH_TYPE.OAUTH2,ec=et===eo.AUTH_TYPE.AWS_SIGV4,ed=er&&y.oauth_flow_type===eo.OAUTH_FLOW.M2M,{startOAuthFlow:em,status:ex,error:ep,tokenResponse:eh}=eQ({accessToken:r,getCredentials:()=>m.getFieldValue("credentials"),getTemporaryPayload:()=>{let e=m.getFieldsValue(!0),t=e.transport||F,s=e.url||(t===eo.TRANSPORT.OPENAPI?e.spec_path:void 0);if(!s||!t)return null;let r=e1(e.static_headers);return{server_id:void 0,server_name:e.server_name,alias:e.alias,description:e.description,url:s,transport:t===eo.TRANSPORT.OPENAPI?"http":t,auth_type:eo.AUTH_TYPE.OAUTH2,credentials:e.credentials,authorization_url:e.authorization_url,token_url:e.token_url,registration_url:e.registration_url,mcp_access_groups:e.mcp_access_groups,static_headers:r,command:e.command,args:e.args,env:e.env}},onTokenReceived:e=>{if(q(e?.access_token??null),e?.access_token){let t={access_token:e.access_token,...e.refresh_token&&{refresh_token:e.refresh_token},...e.expires_in&&{expires_in:e.expires_in},...e.scope&&{scope:e.scope}};m.setFieldsValue({credentials:t}),T.default.success("OAuth authorization successful! Please click 'Create MCP Server' to save the configuration.")}},onBeforeRedirect:()=>{try{let e=m.getFieldsValue(!0);(0,eG.setSecureItem)(e2,JSON.stringify({modalVisible:n,formValues:e,transportType:F,costConfig:f,allowedTools:k,searchValue:z,aliasManuallyEdited:S,logoUrl:V}))}catch(e){console.warn("Failed to persist MCP create state",e)}}});b.default.useEffect(()=>{let e=(0,eG.getSecureItem)(e2);if(e)try{let t=JSON.parse(e);t.modalVisible&&i(!0);let s=t.formValues?.transport||t.transportType||"";s&&E(s),t.formValues&&w({values:t.formValues,transport:s}),t.costConfig&&j(t.costConfig),t.allowedTools&&A(t.allowedTools),t.searchValue&&U(t.searchValue),"boolean"==typeof t.aliasManuallyEdited&&C(t.aliasManuallyEdited),t.logoUrl&&$(t.logoUrl)}catch(e){console.error("Failed to restore MCP create state",e)}finally{window.sessionStorage.removeItem(e2)}},[m,i]),b.default.useEffect(()=>{N&&(F||N.transport,(!N.transport||F)&&(m.setFieldsValue(N.values),v(N.values),w(null)))},[N,m,F]),b.default.useEffect(()=>{if(!n||!c)return;let e=(c.name||"").replace(/[^a-zA-Z0-9_]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,""),t=c.transport||"";E(t);let s={server_name:e,alias:e,description:c.description||"",transport:t};if("stdio"===t){let e={};if(c.command&&(e.command=c.command),c.args&&c.args.length>0&&(e.args=c.args),c.env_vars&&c.env_vars.length>0){let t={};for(let e of c.env_vars)t[e.name]=e.description?`<${e.description}>`:"";e.env=t}Object.keys(e).length>0&&(s.stdio_config=JSON.stringify(e,null,2))}else c.url&&(s.url=c.url);m.setFieldsValue(s),v(s),C(!1)},[n,c,m]);let eg=async e=>{x(!0);try{let{static_headers:t,stdio_config:s,credentials:l,allow_all_keys:n,available_on_public_internet:o,token_validation_json:c,...d}=e,u=d.mcp_access_groups,p=e1(t),h=l&&"object"==typeof l?Object.entries(l).reduce((e,[t,s])=>{if(null==s||""===s)return e;if("scopes"===t){if(Array.isArray(s)){let r=s.filter(e=>null!=e&&""!==e);r.length>0&&(e[t]=r)}}else e[t]=s;return e},{}):void 0,g={};if(s&&"stdio"===F)try{let e=JSON.parse(s),t=e;if(e.mcpServers&&"object"==typeof e.mcpServers){let s=Object.keys(e.mcpServers);if(s.length>0){let r=s[0];t=e.mcpServers[r],d.server_name||(d.server_name=r.replace(/-/g,"_"))}}g={command:t.command,args:t.args,env:t.env},console.log("Parsed stdio config:",g)}catch(e){T.default.fromBackend("Invalid JSON in stdio configuration");return}d.transport===eo.TRANSPORT.OPENAPI&&(d.transport="http");let b=null;if(c&&""!==c.trim())try{b=JSON.parse(c)}catch{T.default.fromBackend("Invalid JSON in Token Validation Rules"),x(!1);return}let y={...d,...g,stdio_config:void 0,mcp_info:{server_name:d.server_name||d.url,description:d.description,logo_url:V||void 0,mcp_server_cost_info:Object.keys(f).length>0?f:null},mcp_access_groups:u,alias:d.alias,allowed_tools:k.length>0?k:null,tool_name_to_display_name:Object.keys(I).length>0?I:null,tool_name_to_description:Object.keys(O).length>0?O:null,allow_all_keys:!!n,available_on_public_internet:!!o,static_headers:p,...null!==b&&{token_validation:b}};if(y.static_headers=p,d.auth_type&&e0.includes(d.auth_type)&&h&&Object.keys(h).length>0&&(y.credentials=h),console.log(`Payload: ${JSON.stringify(y)}`),null!=r){let e=ej?await (0,_.createMCPServer)(r,y):await (0,_.registerMCPServer)(r,y);T.default.success(ej?"MCP Server created successfully":"MCP Server submitted for admin review"),m.resetFields(),j({}),ee(),A([]),C(!1),$(void 0),i(!1),a(e)}}catch(t){let e=t instanceof Error?t.message:String(t);T.default.fromBackend(ej?`Error creating MCP Server: ${e}`:`Error submitting MCP Server: ${e}`)}finally{x(!1)}},eb=()=>{m.resetFields(),j({}),ee(),A([]),C(!1),$(void 0),i(!1)};b.default.useEffect(()=>{if(!S&&y.server_name){let e=y.server_name.replace(/\s+/g,"_");m.setFieldsValue({alias:e}),v(t=>({...t,alias:e}))}},[y.server_name]),b.default.useEffect(()=>{n||v({})},[n]);let ej=(0,s.isAdminRole)(e);return(0,t.jsx)(p.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center pb-4 border-b border-gray-100",style:{gap:12},children:[d&&(0,t.jsx)("button",{onClick:d,className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer bg-transparent border-none",style:{flexShrink:0},children:"←"}),(0,t.jsx)("img",{src:eZ,alt:"MCP Logo",className:"w-8 h-8 object-contain",style:{height:"20px",width:"20px",objectFit:"contain"}}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:ej?"Add New MCP Server":"Submit MCP Server for Review"})]}),open:n,width:1e3,onCancel:eb,footer:null,forceRender:!0,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsxs)(H.Form,{form:m,onFinish:eg,onValuesChange:(e,t)=>v(t),layout:"vertical",className:"space-y-6",children:[!ej&&(0,t.jsxs)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800",children:["Your submission will be sent for admin review before it becomes active."," ","Note: the request must be made with a team-scoped API key."]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["MCP Server Name",(0,t.jsx)(g.Tooltip,{title:"Best practice: Use a descriptive name that indicates the server's purpose (e.g., 'GitHub_MCP', 'Email_Service'). Cannot contain spaces or hyphens; use underscores instead. Names must comply with SEP-986 and will be rejected if invalid (https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-names).",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"server_name",rules:[{required:!1,message:"Please enter a server name"},{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(ei.TextInput,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Alias",(0,t.jsx)(g.Tooltip,{title:"A short, unique identifier for this server. Defaults to the server name if not provided. Cannot contain spaces or hyphens; use underscores instead.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"alias",rules:[{required:!1},{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(ei.TextInput,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",onChange:()=>C(!0)})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description"}),name:"description",rules:[{required:!1,message:"Please enter a server description"}],children:(0,t.jsx)(ei.TextInput,{placeholder:"Brief description of what this server does",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(e$,{value:V,onChange:$}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"GitHub / Source URL"}),name:"source_url",children:(0,t.jsx)(ei.TextInput,{placeholder:"https://github.com/org/mcp-server",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Transport Type"}),name:"transport",rules:[{required:!0,message:"Please select a transport type"}],children:(0,t.jsxs)(h.Select,{placeholder:"Select transport",className:"rounded-lg",size:"large",onChange:e=>{E(e),"stdio"===e?m.setFieldsValue({url:void 0,spec_path:void 0,auth_type:void 0,credentials:void 0}):e===eo.TRANSPORT.OPENAPI?m.setFieldsValue({url:void 0,command:void 0,args:void 0,env:void 0}):m.setFieldsValue({spec_path:void 0,command:void 0,args:void 0,env:void 0})},value:F,children:[(0,t.jsx)(h.Select.Option,{value:"http",children:"Streamable HTTP (Recommended)"}),(0,t.jsx)(h.Select.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(h.Select.Option,{value:"stdio",children:"Standard Input/Output (stdio)"}),(0,t.jsx)(h.Select.Option,{value:eo.TRANSPORT.OPENAPI,children:"OpenAPI Spec"})]})}),("http"===F||"sse"===F)&&(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"MCP Server URL"}),name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,t)=>eK(t)}],children:(0,t.jsx)(D.Input,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),F===eo.TRANSPORT.OPENAPI&&(0,t.jsx)(eU,{form:m,accessToken:n?r:null,onValuesChange:e=>v(t=>({...t,...e})),onKeyToolsChange:R,onLogoUrlChange:$,onOAuthDocsUrlChange:W}),F===eo.TRANSPORT.OPENAPI&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:["BYOK (Bring Your Own Key)",(0,t.jsx)(g.Tooltip,{title:"When enabled, each user provides their own API key for this service. Keys are stored per-user and never shared.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"is_byok",valuePropName:"checked",children:(0,t.jsx)(el.Switch,{})}),(0,t.jsx)(H.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.is_byok!==t.is_byok||e.auth_type!==t.auth_type,children:({getFieldValue:e})=>e("is_byok")?(0,t.jsxs)(t.Fragment,{children:[e("auth_type")&&"none"!==e("auth_type")&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg text-sm text-blue-700 flex items-start gap-2",children:[(0,t.jsx)(en.InfoCircleOutlined,{className:"mt-0.5 flex-shrink-0"}),(0,t.jsxs)("span",{children:["User keys will be sent as:"," ",(0,t.jsxs)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:["bearer_token"===e("auth_type")&&"Authorization: Bearer {key}","token"===e("auth_type")&&"Authorization: token {key}","api_key"===e("auth_type")&&"x-api-key: {key}","basic"===e("auth_type")&&"Authorization: Basic {key}","authorization"===e("auth_type")&&"Authorization: {key}"]}),!e("auth_type")&&"Set Authentication Type below to specify the format."]})]}),!e("auth_type")&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-yellow-50 rounded-lg text-sm text-yellow-700 flex items-start gap-2",children:[(0,t.jsx)(en.InfoCircleOutlined,{className:"mt-0.5 flex-shrink-0"}),(0,t.jsxs)("span",{children:["Set the ",(0,t.jsx)("strong",{children:"Authentication Type"})," below to specify how user keys are sent (e.g., Bearer Token, API Key header)."]})]}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Access Description",(0,t.jsx)(g.Tooltip,{title:"List of permissions shown to users in the connection modal (e.g. 'Create and manage Jira issues')",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"byok_description",children:(0,t.jsx)(h.Select,{mode:"tags",placeholder:"Add access description items (press Enter after each)",className:"w-full",tokenSeparators:[","]})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["API Key Help URL",(0,t.jsx)(g.Tooltip,{title:"Optional link shown to users to help them find their API key",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"byok_api_key_help_url",children:(0,t.jsx)(D.Input,{placeholder:"https://docs.example.com/api-keys"})})]}):null})]}),"stdio"!==F&&""!==F&&(0,t.jsx)(ea.Collapse,{defaultActiveKey:["auth"],className:"mb-4",items:[{key:"auth",label:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-700",children:"Authentication"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{name:"auth_type",rules:[{required:!0,message:"Please select an auth type"}],children:(0,t.jsxs)(h.Select,{placeholder:"Select auth type",className:"rounded-lg",size:"large",children:[(0,t.jsx)(h.Select.Option,{value:"none",children:"None"}),(0,t.jsx)(h.Select.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(h.Select.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(h.Select.Option,{value:"token",children:"Token"}),(0,t.jsx)(h.Select.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(h.Select.Option,{value:"oauth2",children:"OAuth"}),(0,t.jsx)(h.Select.Option,{value:"aws_sigv4",children:"AWS SigV4 (Bedrock AgentCore MCPs)"})]})}),es&&(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(g.Tooltip,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","auth_value"],rules:[{validator:(e,t)=>t&&"string"==typeof t&&""===t.trim()?Promise.reject(Error("Authentication value cannot be empty whitespace")):Promise.resolve()}],children:(0,t.jsx)(ei.TextInput,{type:"password",placeholder:"Enter token or secret",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),er&&(0,t.jsx)(eu,{isM2M:ed,initialFlowType:eo.OAUTH_FLOW.INTERACTIVE,docsUrl:K,oauthFlow:{startOAuthFlow:em,status:ex,error:ep,tokenResponse:eh}})]})}]}),"stdio"!==F&&""!==F&&ec&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-2",children:["For MCP servers hosted on AWS Bedrock AgentCore."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/mcp_aws_sigv4",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700",children:"View docs →"})]}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Region",(0,t.jsx)(g.Tooltip,{title:"AWS region for SigV4 signing (e.g., us-east-1)",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_region_name"],rules:[{required:!0,message:"AWS region is required for SigV4 auth"}],children:(0,t.jsx)(D.Input,{placeholder:"us-east-1",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Service Name",(0,t.jsx)(g.Tooltip,{title:"AWS service name for SigV4 signing. Defaults to 'bedrock-agentcore'.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_service_name"],children:(0,t.jsx)(D.Input,{placeholder:"bedrock-agentcore",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Access Key ID",(0,t.jsx)(g.Tooltip,{title:"Optional. If not provided, falls back to the boto3 credential chain (IAM role, env vars, etc.).",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_access_key_id"],dependencies:[["credentials","aws_secret_access_key"]],rules:[({getFieldValue:e})=>({validator:(t,s)=>e(["credentials","aws_secret_access_key"])&&!s?Promise.reject(Error("Access Key ID is required when Secret Access Key is provided")):Promise.resolve()})],children:(0,t.jsx)(D.Input.Password,{placeholder:"AKIA... (optional — uses IAM role if blank)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Secret Access Key",(0,t.jsx)(g.Tooltip,{title:"Optional. Required if AWS Access Key ID is provided.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_secret_access_key"],dependencies:[["credentials","aws_access_key_id"]],rules:[({getFieldValue:e})=>({validator:(t,s)=>e(["credentials","aws_access_key_id"])&&!s?Promise.reject(Error("Secret Access Key is required when Access Key ID is provided")):Promise.resolve()})],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter secret key (optional — uses IAM role if blank)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Token",(0,t.jsx)(g.Tooltip,{title:"Optional. Only needed for temporary STS credentials.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_token"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter session token (optional)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Role ARN",(0,t.jsx)(g.Tooltip,{title:"Optional. IAM role ARN to assume via STS before signing. If set, LiteLLM calls sts:AssumeRole to get temporary credentials. Uses ambient credentials (IAM role, env vars) as the source identity unless explicit keys are also provided.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_role_name"],children:(0,t.jsx)(D.Input,{placeholder:"arn:aws:iam::123456789012:role/MyRole (optional)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Name",(0,t.jsx)(g.Tooltip,{title:"Optional. Session name for the AssumeRole call — appears in CloudTrail logs. Auto-generated if omitted.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_name"],children:(0,t.jsx)(D.Input,{placeholder:"litellm-prod (optional, auto-generated if blank)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsx)(eO,{isVisible:"stdio"===F})]}),(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)(eR,{availableAccessGroups:o,mcpServer:null,searchValue:z,setSearchValue:U,getAccessGroupOptions:()=>{let e=o.map(e=>({value:e,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})}));return z&&!o.some(e=>e.toLowerCase().includes(z.toLowerCase()))&&e.push({value:z,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:z}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-1",children:"create new group"})]})}),e}})}),(0,t.jsx)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:(0,t.jsx)(e_,{formValues:y,tools:J,isLoadingTools:Y,toolsError:G,toolsErrorStackTrace:Q,canFetchTools:Z,fetchTools:X})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(eP,{accessToken:r,oauthAccessToken:B,formValues:y,allowedTools:k,existingAllowedTools:null,onAllowedToolsChange:A,toolNameToDisplayName:I,toolNameToDescription:O,onToolNameToDisplayNameChange:P,onToolNameToDescriptionChange:M,keyTools:L,externalTools:J,externalIsLoading:Y,externalError:G,externalCanFetch:Z})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(ef,{value:f,onChange:j,tools:J.filter(e=>k.includes(e.name)),disabled:!1})}),(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,t.jsx)(l.Button,{variant:"secondary",onClick:eb,children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"primary",loading:u,children:u?"Creating...":"Add MCP Server"})]})]})})})};var e4=e.i(175712),e6=e.i(118366),e3=e.i(475254);let e7=(0,e3.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",()=>e7],758472);let e8=(0,e3.default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),e9=(0,e3.default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);var te=e.i(634831),tt=e.i(438100);let ts=(0,e3.default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var tr=e.i(500330);let{Title:tl,Text:ta}=f.Typography,{Panel:tn}=ea.Collapse,ti=({icon:e,title:s,description:r,children:l,serverName:a,accessGroups:n=["dev-group"]})=>{let[i,o]=(0,b.useState)(!1);return(0,t.jsxs)(e4.Card,{className:"border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)("span",{className:"p-2 rounded-lg bg-gray-50",children:e}),(0,t.jsxs)("div",{children:[(0,t.jsx)(tl,{level:5,className:"mb-0",children:s}),(0,t.jsx)(ta,{className:"text-gray-600",children:r})]})]}),a&&("Implementation Example"===s||"Configuration"===s)&&(0,t.jsxs)(H.Form.Item,{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(el.Switch,{size:"small",checked:i,onChange:o}),(0,t.jsxs)(ta,{className:"text-sm",children:["Limit tools to specific MCP servers or MCP groups by passing the ",(0,t.jsx)("code",{children:"x-mcp-servers"})," header"]})]}),i&&(0,t.jsx)(ej.Alert,{className:"mt-2",type:"info",showIcon:!0,message:"Two Options",description:(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Option 1:"})," Get a specific server: ",(0,t.jsxs)("code",{children:['"',a.replace(/\s+/g,"_"),'"']})]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Option 2:"})," Get a group of MCPs: ",(0,t.jsx)("code",{children:'"dev-group"'})]}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-gray-600",children:["You can also mix both: ",(0,t.jsx)("code",{children:'"Server1,dev-group"'})]})]})})]}),b.default.Children.map(l,e=>{if(b.default.isValidElement(e)&&e.props.hasOwnProperty("code")&&e.props.hasOwnProperty("copyKey")){let t=e.props.code;if(t&&t.includes('"headers":'))return b.default.cloneElement(e,{code:t.replace(/"headers":\s*{[^}]*}/,`"headers": ${JSON.stringify((()=>{let e={"x-litellm-api-key":"Bearer YOUR_LITELLM_API_KEY"};if(i&&a){let t=[a.replace(/\s+/g,"_"),...n].join(",");e["x-mcp-servers"]=t}return e})(),null,8)}`)})}return e})]})},to=({currentServerAccessGroups:e=[]})=>{let s=(0,_.getProxyBaseUrl)(),[r,l]=(0,b.useState)({}),[u,x]=(0,b.useState)({openai:[],litellm:[],cursor:[],http:[]}),[p]=(0,b.useState)("Zapier_MCP"),h=async(e,t)=>{await (0,tr.copyToClipboard)(e)&&(l(e=>({...e,[t]:!0})),setTimeout(()=>{l(e=>({...e,[t]:!1}))},2e3))},g=({code:e,copyKey:s,title:l,className:a=""})=>(0,t.jsxs)("div",{className:"relative group",children:[l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(e7,{size:16,className:"text-blue-600"}),(0,t.jsx)(ta,{strong:!0,className:"text-gray-700",children:l})]}),(0,t.jsxs)(e4.Card,{className:`bg-gray-50 border border-gray-200 relative ${a}`,children:[(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:r[s]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(e6.CopyIcon,{size:12}),onClick:()=>h(e,s),className:`absolute top-2 right-2 z-10 transition-all duration-200 ${r[s]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`}),(0,t.jsx)("pre",{className:"text-sm overflow-x-auto pr-10 text-gray-800 font-mono leading-relaxed",children:e})]})]}),f=({step:e,title:s,children:r})=>(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("div",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-semibold",children:e})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(ta,{strong:!0,className:"text-gray-800 block mb-2",children:s}),r]})]});return(0,t.jsx)("div",{children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Title,{className:"text-3xl font-bold text-gray-900 mb-3",children:"Connect to your MCP client"}),(0,t.jsx)(d.Text,{className:"text-lg text-gray-600",children:"Use tools directly from any MCP client with LiteLLM MCP. Enable your AI assistant to perform real-world tasks through a simple, secure connection."})]}),(0,t.jsxs)(n.TabGroup,{className:"w-full",children:[(0,t.jsx)(i.TabList,{className:"flex justify-start mt-8 mb-6",children:(0,t.jsxs)("div",{className:"flex bg-gray-100 p-1 rounded-lg",children:[(0,t.jsx)(a.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(e7,{size:18}),"OpenAI API"]})}),(0,t.jsx)(a.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(ts,{size:18}),"LiteLLM Proxy"]})}),(0,t.jsx)(a.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(e8,{size:18}),"Cursor"]})}),(0,t.jsx)(a.Tab,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(e9,{size:18}),"Streamable HTTP"]})})]})}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-blue-50 to-indigo-50 p-6 rounded-lg border border-blue-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(e7,{className:"text-blue-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-blue-900",children:"OpenAI Responses API Integration"})]}),(0,t.jsx)(ta,{className:"text-blue-700",children:"Connect OpenAI Responses API to your LiteLLM MCP server for seamless tool integration"})]}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(ti,{icon:(0,t.jsx)(tt.KeyIcon,{className:"text-blue-600",size:16}),title:"API Key Setup",description:"Configure your OpenAI API key for authentication",children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsxs)(ta,{children:["Get your API key from the"," ",(0,t.jsxs)("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-700 inline-flex items-center gap-1",children:["OpenAI platform ",(0,t.jsx)(te.ExternalLinkIcon,{size:12})]})]})}),(0,t.jsx)(g,{title:"Environment Variable",code:'export OPENAI_API_KEY="sk-..."',copyKey:"openai-env"})]})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(P.ServerIcon,{className:"text-blue-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"openai-server-url"})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e7,{className:"text-blue-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the Responses API",serverName:"Zapier Gmail",accessGroups:["dev-group"],children:(0,t.jsx)(g,{code:`curl --location 'https://api.openai.com/v1/responses' \\ --header 'Content-Type: application/json' \\ --header "Authorization: Bearer $OPENAI_API_KEY" \\ --data '{ @@ -37,7 +37,7 @@ ], "input": "Run available tools", "tool_choice": "required" -}'`,copyKey:"openai-curl",className:"text-xs"})})]})]}),{})}),(0,t.jsx)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-emerald-50 to-green-50 p-6 rounded-lg border border-emerald-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(tr,{className:"text-emerald-600",size:24}),(0,t.jsx)(ta,{level:4,className:"mb-0 text-emerald-900",children:"LiteLLM Proxy API Integration"})]}),(0,t.jsx)(tn,{className:"text-emerald-700",children:"Connect to LiteLLM Proxy Responses API for seamless tool integration with multiple model providers"})]}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(to,{icon:(0,t.jsx)(ts.KeyIcon,{className:"text-emerald-600",size:16}),title:"Virtual Key Setup",description:"Configure your LiteLLM Proxy Virtual Key for authentication",children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(tn,{children:"Get your Virtual Key from your LiteLLM Proxy dashboard or contact your administrator"})}),(0,t.jsx)(g,{title:"Environment Variable",code:'export LITELLM_API_KEY="sk-..."',copyKey:"litellm-env"})]})}),(0,t.jsx)(to,{icon:(0,t.jsx)(P.ServerIcon,{className:"text-emerald-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"litellm-server-url"})}),(0,t.jsx)(to,{icon:(0,t.jsx)(e8,{className:"text-emerald-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the LiteLLM Proxy Responses API",serverName:p,accessGroups:["dev-group"],children:(0,t.jsx)(g,{code:`curl --location '${s}/v1/responses' \\ +}'`,copyKey:"openai-curl",className:"text-xs"})})]})]}),{})}),(0,t.jsx)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-emerald-50 to-green-50 p-6 rounded-lg border border-emerald-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(ts,{className:"text-emerald-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-emerald-900",children:"LiteLLM Proxy API Integration"})]}),(0,t.jsx)(ta,{className:"text-emerald-700",children:"Connect to LiteLLM Proxy Responses API for seamless tool integration with multiple model providers"})]}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(ti,{icon:(0,t.jsx)(tt.KeyIcon,{className:"text-emerald-600",size:16}),title:"Virtual Key Setup",description:"Configure your LiteLLM Proxy Virtual Key for authentication",children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(ta,{children:"Get your Virtual Key from your LiteLLM Proxy dashboard or contact your administrator"})}),(0,t.jsx)(g,{title:"Environment Variable",code:'export LITELLM_API_KEY="sk-..."',copyKey:"litellm-env"})]})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(P.ServerIcon,{className:"text-emerald-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"litellm-server-url"})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e7,{className:"text-emerald-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the LiteLLM Proxy Responses API",serverName:p,accessGroups:["dev-group"],children:(0,t.jsx)(g,{code:`curl --location '${s}/v1/responses' \\ --header 'Content-Type: application/json' \\ --header "Authorization: Bearer $LITELLM_VIRTUAL_KEY" \\ --data '{ @@ -56,7 +56,7 @@ ], "input": "Run available tools", "tool_choice": "required" -}'`,copyKey:"litellm-curl",className:"text-xs"})})]})]}),{})}),(0,t.jsx)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-purple-50 to-blue-50 p-6 rounded-lg border border-purple-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(e9,{className:"text-purple-600",size:24}),(0,t.jsx)(ta,{level:4,className:"mb-0 text-purple-900",children:"Cursor IDE Integration"})]}),(0,t.jsx)(tn,{className:"text-purple-700",children:"Use tools directly from Cursor IDE with LiteLLM MCP. Enable your AI assistant to perform real-world tasks without leaving your coding environment."})]}),(0,t.jsxs)(e6.Card,{className:"border border-gray-200",children:[(0,t.jsx)(ta,{level:5,className:"mb-4 text-gray-800",children:"Setup Instructions"}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(f,{step:1,title:"Open Cursor Settings",children:(0,t.jsxs)(tn,{className:"text-gray-600",children:["Use the keyboard shortcut ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"⇧+⌘+J"})," (Mac) or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+Shift+J"})," (Windows/Linux)"]})}),(0,t.jsx)(f,{step:2,title:"Navigate to MCP Tools",children:(0,t.jsx)(tn,{className:"text-gray-600",children:'Go to the "MCP Tools" tab and click "New MCP Server"'})}),(0,t.jsxs)(f,{step:3,title:"Add Configuration",children:[(0,t.jsxs)(tn,{className:"text-gray-600 mb-3",children:["Copy the JSON configuration below and paste it into Cursor, then save with"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Cmd+S"})," or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+S"})]}),(0,t.jsx)(to,{icon:(0,t.jsx)(e8,{className:"text-purple-600",size:16}),title:"Configuration",description:"Cursor MCP configuration",serverName:"Zapier Gmail",accessGroups:["dev-group"],children:(0,t.jsx)(g,{code:`{ +}'`,copyKey:"litellm-curl",className:"text-xs"})})]})]}),{})}),(0,t.jsx)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-purple-50 to-blue-50 p-6 rounded-lg border border-purple-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(e8,{className:"text-purple-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-purple-900",children:"Cursor IDE Integration"})]}),(0,t.jsx)(ta,{className:"text-purple-700",children:"Use tools directly from Cursor IDE with LiteLLM MCP. Enable your AI assistant to perform real-world tasks without leaving your coding environment."})]}),(0,t.jsxs)(e4.Card,{className:"border border-gray-200",children:[(0,t.jsx)(tl,{level:5,className:"mb-4 text-gray-800",children:"Setup Instructions"}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(f,{step:1,title:"Open Cursor Settings",children:(0,t.jsxs)(ta,{className:"text-gray-600",children:["Use the keyboard shortcut ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"⇧+⌘+J"})," (Mac) or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+Shift+J"})," (Windows/Linux)"]})}),(0,t.jsx)(f,{step:2,title:"Navigate to MCP Tools",children:(0,t.jsx)(ta,{className:"text-gray-600",children:'Go to the "MCP Tools" tab and click "New MCP Server"'})}),(0,t.jsxs)(f,{step:3,title:"Add Configuration",children:[(0,t.jsxs)(ta,{className:"text-gray-600 mb-3",children:["Copy the JSON configuration below and paste it into Cursor, then save with"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Cmd+S"})," or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+S"})]}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e7,{className:"text-purple-600",size:16}),title:"Configuration",description:"Cursor MCP configuration",serverName:"Zapier Gmail",accessGroups:["dev-group"],children:(0,t.jsx)(g,{code:`{ "mcpServers": { "Zapier_MCP": { "url": "${s}/mcp", @@ -66,9 +66,9 @@ } } } -}`,copyKey:"cursor-config",className:"text-xs"})})]})]})]})]}),{})}),(0,t.jsx)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-green-50 to-teal-50 p-6 rounded-lg border border-green-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(te,{className:"text-green-600",size:24}),(0,t.jsx)(ta,{level:4,className:"mb-0 text-green-900",children:"Streamable HTTP Transport"})]}),(0,t.jsx)(tn,{className:"text-green-700",children:"Connect to LiteLLM MCP using HTTP transport. Compatible with any MCP client that supports HTTP streaming."})]}),(0,t.jsx)(to,{icon:(0,t.jsx)(te,{className:"text-green-600",size:16}),title:"Universal MCP Connection",description:"Use this URL with any MCP client that supports HTTP transport",children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(tn,{children:"Each MCP client supports different transports. Refer to your client documentation to determine the appropriate transport method."})}),(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"http-server-url"}),(0,t.jsx)(g,{title:"Headers Configuration",code:JSON.stringify({"x-litellm-api-key":"Bearer YOUR_LITELLM_API_KEY"},null,2),copyKey:"http-headers"}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(eb.Button,{type:"link",className:"p-0 h-auto text-blue-600 hover:text-blue-700",href:"https://modelcontextprotocol.io/docs/concepts/transports",icon:(0,t.jsx)(tt.ExternalLinkIcon,{size:14}),children:"Learn more about MCP transports"})})]})})]}),{})})]})]})]})})};var td=e.i(752978),tm=e.i(591935),tu=e.i(492030);let tx=({server:e,isLoadingHealth:s,isRechecking:r,onRecheck:l})=>{let[a,n]=(0,b.useState)(!1),i=e.status||"unknown",o=e.last_health_check,c=e.health_check_error;if(s||r)return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-400 px-2 py-0.5 rounded-full bg-gray-50 border border-gray-100",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-gray-300 animate-pulse"}),"Checking"]});let d=!!l,m=(0,t.jsxs)("div",{className:"max-w-xs",children:[(0,t.jsxs)("div",{className:"font-semibold mb-1",children:["Health Status: ",i]}),o&&(0,t.jsxs)("div",{className:"text-xs mb-1",children:["Last Check: ",new Date(o).toLocaleString()]}),c&&(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"font-medium text-red-400 mb-1",children:"Error:"}),(0,t.jsx)("div",{className:"break-words",children:c})]}),!o&&!c&&(0,t.jsx)("div",{className:"text-xs text-gray-400",children:"No health check data available"}),d&&(0,t.jsx)("div",{className:"text-xs text-gray-400 mt-1",children:"Click to recheck"})]});return(0,t.jsx)(g.Tooltip,{title:m,placement:"top",children:(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full ${(e=>{switch(e){case"healthy":return"text-green-700 bg-green-50 border border-green-200";case"unhealthy":return"text-red-700 bg-red-50 border border-red-200";default:return"text-gray-600 bg-gray-50 border border-gray-200"}})(i)} ${d?"cursor-pointer hover:opacity-80":"cursor-default"}`,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onClick:d?()=>l(e.server_id):void 0,children:[(0,t.jsx)("span",{children:a&&d?"↻":(e=>{switch(e){case"healthy":return"✓";case"unhealthy":return"✗";default:return"?"}})(i)}),a&&d?"Recheck":i.charAt(0).toUpperCase()+i.slice(1)]})})};var tp=e.i(530212),th=e.i(848725);let tg=b.forwardRef(function(e,t){return b.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),b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}))});var tf=e.i(350967),tb=e.i(954616);function tj(e){if(!e)return[];if(Array.isArray(e))return e.map(e=>ty(e)).filter(e=>void 0!==e);let t=ty(e);return void 0===t?[]:[t]}function ty(e,t){if(!e)return;let s=void 0!==t?t:e.default;if("object"===e.type){let t="object"!=typeof s||null===s||Array.isArray(s)?{}:{...s};return e.properties&&Object.entries(e.properties).forEach(([e,s])=>{t[e]=ty(s,t[e])}),t}if("array"===e.type){if(Array.isArray(s)){let t=e.items;if(!t)return s;if(0===s.length){let e=tj(t);return e.length?e:s}return Array.isArray(t)?s.map((e,s)=>ty(t[s]??t[t.length-1],e)):s.map(e=>ty(t,e))}return void 0!==s?s:tj(e.items)}if(void 0!==s)return s;switch(e.type){case"integer":case"number":return 0;case"boolean":return!1;default:return""}}let tv=e=>{let t=ty(e);if("object"===e.type||"array"===e.type){let s="array"===e.type?[]:{};return JSON.stringify(t??s,null,2)}return t};function tN({tool:e,onSubmit:s,isLoading:r,result:a,error:n,onClose:i}){let[o]=H.Form.useForm(),[c,d]=b.default.useState("formatted"),[m,u]=b.default.useState(null),[x,p]=b.default.useState(null),h=b.default.useMemo(()=>"string"==typeof e.inputSchema?{type:"object",properties:{input:{type:"string",description:"Input for this tool"}},required:["input"]}:e.inputSchema,[e.inputSchema]),f=b.default.useMemo(()=>h.properties&&h.properties.params&&"object"===h.properties.params.type&&h.properties.params.properties?{type:"object",properties:h.properties.params.properties,required:h.properties.params.required||[]}:h,[h]);b.default.useEffect(()=>{if(o.resetFields(),!f.properties)return;let e={};Object.entries(f.properties).forEach(([t,s])=>{e[t]=tv(s)}),o.setFieldsValue(e)},[o,f,e]),b.default.useEffect(()=>{m&&(a||n)&&p(Date.now()-m)},[a,n,m]);let j=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let s=document.execCommand("copy");if(document.body.removeChild(t),!s)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},y=async()=>{await j(JSON.stringify(a,null,2))?T.default.success("Result copied to clipboard"):T.default.fromBackend("Failed to copy result")},v=async()=>{await j(e.name)?T.default.success("Tool name copied to clipboard"):T.default.fromBackend("Failed to copy tool name")};return(0,t.jsxs)("div",{className:"space-y-4 h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[e.mcp_info.logo_url&&(0,t.jsx)("img",{src:e.mcp_info.logo_url,alt:`${e.mcp_info.server_name} logo`,className:"w-6 h-6 object-contain"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Tool:"}),(0,t.jsxs)("div",{className:"group inline-flex items-center space-x-1 bg-slate-50 hover:bg-slate-100 px-3 py-1 rounded-md cursor-pointer transition-colors border border-slate-200",onClick:v,title:"Click to copy tool name",children:[(0,t.jsx)("span",{className:"font-mono text-slate-700 font-medium text-sm",children:e.name}),(0,t.jsx)("svg",{className:"w-3 h-3 text-slate-400 group-hover:text-slate-600 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]}),(0,t.jsx)("p",{className:"text-xs text-gray-600",children:e.description}),(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:["Provider: ",e.mcp_info.server_name]})]})]}),(0,t.jsx)(l.Button,{onClick:i,variant:"light",size:"sm",className:"text-gray-500 hover:text-gray-700",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 h-full",children:[(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-4 py-2",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Input Parameters"}),(0,t.jsx)(g.Tooltip,{title:"Configure the input parameters for this tool call",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)(H.Form,{form:o,onFinish:e=>{u(Date.now()),p(null);let t={};Object.entries(e).forEach(([e,s])=>{let r=f.properties?.[e];if(r&&null!=s&&""!==s)switch(r.type){case"boolean":t[e]="true"===s||!0===s;break;case"number":case"integer":{let l=Number(s);t[e]=Number.isNaN(l)?s:"integer"===r.type?Math.trunc(l):l;break}case"object":case"array":try{let l="string"==typeof s?JSON.parse(s):s,a="object"===r.type&&null!==l&&"object"==typeof l&&!Array.isArray(l),n="array"===r.type&&Array.isArray(l);"object"===r.type&&a||"array"===r.type&&n?t[e]=l:t[e]=s}catch(r){t[e]=s}break;case"string":t[e]=String(s);break;default:t[e]=s}else null!=s&&""!==s&&(t[e]=s)}),s(h.properties&&h.properties.params&&"object"===h.properties.params.type&&h.properties.params.properties?{params:t}:t)},layout:"vertical",className:"space-y-3",children:["string"==typeof e.inputSchema?(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Input ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),name:"input",rules:[{required:!0,message:"Please enter input for this tool"}],className:"mb-3",children:(0,t.jsx)(ei.TextInput,{placeholder:"Enter input for this tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})}):void 0===f.properties?(0,t.jsx)("div",{className:"text-center py-6 bg-gray-50 rounded-lg border border-gray-200",children:(0,t.jsxs)("div",{className:"max-w-sm mx-auto",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-1",children:"No Parameters Required"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This tool can be called without any input parameters."})]})}):(0,t.jsx)("div",{className:"space-y-3",children:Object.entries(f.properties).map(([s,r])=>{let l=tv(r),a=`${e.name}-${s}`;return(0,t.jsxs)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[s," ",f.required?.includes(s)&&(0,t.jsx)("span",{className:"text-red-500",children:"*"}),r.description&&(0,t.jsx)(g.Tooltip,{title:r.description,children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:s,initialValue:l,rules:[{required:f.required?.includes(s),message:`Please enter ${s}`},..."object"===r.type||"array"===r.type?[{validator:(e,t)=>{if((null==t||""===t)&&!f.required?.includes(s))return Promise.resolve();try{let e="string"==typeof t?JSON.parse(t):t,s="object"===r.type&&null!==e&&"object"==typeof e&&!Array.isArray(e),l="array"===r.type&&Array.isArray(e);if("object"===r.type&&s||"array"===r.type&&l)return Promise.resolve();return Promise.reject(Error("object"===r.type?"Please enter a JSON object":"Please enter a JSON array"))}catch(e){return Promise.reject(Error("Invalid JSON"))}}}]:[]],className:"mb-3",children:["string"===r.type&&r.enum&&(0,t.jsxs)("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors",defaultValue:l??"",children:[!f.required?.includes(s)&&(0,t.jsxs)("option",{value:"",children:["Select ",s]}),r.enum.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),"string"===r.type&&!r.enum&&(0,t.jsx)(ei.TextInput,{placeholder:r.description||`Enter ${s}`,defaultValue:l??"",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"}),("number"===r.type||"integer"===r.type)&&(0,t.jsx)("input",{type:"number",step:"integer"===r.type?1:"any",placeholder:r.description||`Enter ${s}`,defaultValue:l??0,className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors"}),"boolean"===r.type&&(0,t.jsxs)("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors",defaultValue:(l??!1).toString(),children:[!f.required?.includes(s)&&(0,t.jsxs)("option",{value:"",children:["Select ",s]}),(0,t.jsx)("option",{value:"true",children:"True"}),(0,t.jsx)("option",{value:"false",children:"False"})]}),("object"===r.type||"array"===r.type)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("textarea",{rows:"object"===r.type?6:4,placeholder:r.description||("object"===r.type?`Enter JSON object for ${s}`:`Enter JSON array for ${s}`),defaultValue:l??("object"===r.type?"{}":"[]"),spellCheck:!1,"data-testid":`textarea-${s}`,className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm font-mono"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"object"===r.type?"Provide a valid JSON object.":"Provide a valid JSON array."})]})]},a)})}),(0,t.jsx)("div",{className:"pt-3 border-t border-gray-100",children:(0,t.jsx)(l.Button,{onClick:()=>o.submit(),disabled:r,variant:"primary",className:"w-full",loading:r,children:r?"Calling Tool...":a||n?"Call Again":"Call Tool"})})]})})]}),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-4 py-2",children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Tool Result"})}),(0,t.jsx)("div",{className:"p-4",children:a||n||r?(0,t.jsxs)("div",{className:"space-y-3",children:[a&&!r&&!n&&(0,t.jsx)("div",{className:"p-2 bg-green-50 border border-green-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("svg",{className:"h-4 w-4 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)("h4",{className:"text-xs font-medium text-green-900",children:"Tool executed successfully"}),null!==x&&(0,t.jsxs)("span",{className:"text-xs text-green-600 ml-1",children:["• ",(x/1e3).toFixed(2),"s"]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,t.jsxs)("div",{className:"flex bg-white rounded border border-green-300 p-0.5",children:[(0,t.jsx)("button",{onClick:()=>d("formatted"),className:`px-2 py-1 text-xs font-medium rounded transition-colors ${"formatted"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"}`,children:"Formatted"}),(0,t.jsx)("button",{onClick:()=>d("json"),className:`px-2 py-1 text-xs font-medium rounded transition-colors ${"json"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"}`,children:"JSON"})]}),(0,t.jsx)("button",{onClick:y,className:"p-1 hover:bg-green-100 rounded text-green-700",title:"Copy response",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]})]})}),(0,t.jsxs)("div",{className:"max-h-96 overflow-y-auto",children:[r&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center h-48 text-gray-500",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-sm font-medium mt-3",children:"Calling tool..."}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Please wait while we process your request"})]}),n&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("svg",{className:"h-4 w-4 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-red-900",children:"Tool Call Failed"}),null!==x&&(0,t.jsxs)("span",{className:"text-xs text-red-600",children:["• ",(x/1e3).toFixed(2),"s"]})]}),(0,t.jsx)("div",{className:"bg-white border border-red-200 rounded p-2 max-h-48 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-xs whitespace-pre-wrap text-red-700 font-mono",children:n.message})})]})]})}),a&&!r&&!n&&(0,t.jsx)("div",{className:"space-y-3",children:"formatted"===c?a.map((e,s)=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:["text"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Text Response"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsx)("div",{className:"bg-white rounded border border-gray-200 max-h-64 overflow-y-auto",children:(0,t.jsx)("div",{className:"p-3 space-y-2",children:e.text.split("\n\n").map((e,s)=>{if(""===e.trim())return null;if(e.startsWith("##")){let r=e.replace(/^#+\s/,"");return(0,t.jsx)("div",{className:"border-b border-gray-200 pb-1 mb-2",children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:r})},s)}let r=/(https?:\/\/[^\s\)]+)/g;if(r.test(e)){let l=e.split(r);return(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded p-2",children:(0,t.jsx)("div",{className:"text-xs text-gray-700 leading-relaxed whitespace-pre-wrap",children:l.map((e,s)=>r.test(e)?(0,t.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline break-all",children:e},s):e)})},s)}return e.includes("Score:")?(0,t.jsx)("div",{className:"bg-green-50 border-l-4 border-green-400 p-2 rounded-r",children:(0,t.jsx)("p",{className:"text-xs text-green-800 font-medium whitespace-pre-wrap",children:e})},s):(0,t.jsx)("div",{className:"bg-gray-50 rounded p-2 border border-gray-200",children:(0,t.jsx)("div",{className:"text-xs text-gray-700 leading-relaxed whitespace-pre-wrap font-mono",children:e})},s)}).filter(Boolean)})})})]}),"image"===e.type&&e.url&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Image Response"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded p-3 border border-gray-200",children:(0,t.jsx)("img",{src:e.url,alt:"Tool result",className:"max-w-full h-auto rounded shadow-sm"})})})]}),"embedded_resource"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Embedded Resource"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2 p-3 bg-blue-50 border border-blue-200 rounded",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("p",{className:"text-xs font-medium text-blue-900",children:["Resource Type: ",e.resource_type]}),e.url&&(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-xs text-blue-600 hover:text-blue-800 hover:underline mt-1 transition-colors",children:["View Resource",(0,t.jsxs)("svg",{className:"ml-1 h-3 w-3",fill:"currentColor",viewBox:"0 0 20 20",children:[(0,t.jsx)("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),(0,t.jsx)("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"})]})]})]})]})})]})]},s)):(0,t.jsx)("div",{className:"bg-white rounded border border-gray-200",children:(0,t.jsx)("div",{className:"p-3 overflow-auto max-h-80 bg-gray-50",children:(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all text-gray-800",children:JSON.stringify(a,null,2)})})})})]})]}):(0,t.jsx)("div",{className:"flex flex-col justify-center items-center h-48 text-gray-500",children:(0,t.jsxs)("div",{className:"text-center max-w-sm",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-1",children:"Ready to Call Tool"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 leading-relaxed",children:'Configure the input parameters and click "Call Tool" to see the results here.'})]})})})]})]})]})}var t_=e.i(983561),tw=e.i(438957);let tS=({serverId:e,accessToken:s,auth_type:r,userRole:l,userID:a,serverAlias:n,extraHeaders:i})=>{let[o,c]=(0,b.useState)(null),[u,x]=(0,b.useState)(null),[p,h]=(0,b.useState)(null),[g,f]=(0,b.useState)(""),[j,v]=(0,b.useState)({}),[N,w]=(0,b.useState)(!1),S=i&&i.length>0,T=()=>{if(!n||!S)return;let e={};return Object.entries(j).forEach(([t,s])=>{s&&s.trim()&&(e[`x-mcp-${n}-${t.toLowerCase()}`]=s)}),Object.keys(e).length>0?e:void 0},{data:C,isLoading:k,error:A,refetch:I}=(0,y.useQuery)({queryKey:["mcpTools",e,j],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,_.listMCPTools)(s,e,T())},enabled:!!s,staleTime:3e4}),{mutate:P,isPending:O}=(0,tb.useMutation)({mutationFn:async t=>{if(!s)throw Error("Access Token required");try{return await (0,_.callMCPTool)(s,e,t.tool.name,t.arguments,{customHeaders:T()})}catch(e){throw e}},onSuccess:e=>{x(e.content),h(null)},onError:e=>{h(e),x(null)}}),M=C?.tools||[],F=M.filter(e=>{let t=g.toLowerCase();return e.name.toLowerCase().includes(t)||e.description&&e.description.toLowerCase().includes(t)||e.mcp_info.server_name&&e.mcp_info.server_name.toLowerCase().includes(t)});return(0,t.jsx)("div",{className:"w-full h-screen p-4 bg-white",children:(0,t.jsx)(eg.Card,{className:"w-full rounded-xl shadow-md overflow-hidden",children:(0,t.jsxs)("div",{className:"flex h-auto w-full gap-4",children:[(0,t.jsxs)("div",{className:"w-1/4 p-4 bg-gray-50 flex flex-col",children:[(0,t.jsx)(m.Title,{className:"text-xl font-semibold mb-6 mt-2",children:"MCP Tools"}),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[S&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(tw.KeyOutlined,{className:"text-blue-600 mr-2"}),(0,t.jsx)(d.Text,{className:"text-sm font-medium text-blue-800",children:"Additional Headers"})]}),(0,t.jsx)(eb.Button,{size:"small",type:"link",onClick:()=>w(!N),className:"text-blue-700 p-0 h-auto",children:N?"Hide":"Configure"})]}),!N&&0===Object.keys(j).length&&(0,t.jsx)(d.Text,{className:"text-xs text-blue-700",children:'This server requires additional headers. Click "Configure" to provide values.'}),N&&(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[i?.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:e}),(0,t.jsx)(D.Input,{size:"small",placeholder:`Enter ${e}`,value:j[e]||"",onChange:t=>{v({...j,[e]:t.target.value})},prefix:(0,t.jsx)(tw.KeyOutlined,{className:"text-gray-400"}),className:"rounded"})]},e)),(0,t.jsx)(eb.Button,{size:"small",type:"primary",onClick:()=>{I(),w(!1)},disabled:Object.values(j).every(e=>!e||!e.trim()),className:"w-full mt-2",children:"Load Tools"})]}),!N&&Object.keys(j).length>0&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)(d.Text,{className:"text-xs text-green-700 flex items-center",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 bg-green-500 rounded-full mr-2"}),Object.keys(j).length," header(s) configured"]})})]}),(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)(d.Text,{className:"font-medium block mb-3 text-gray-700 flex items-center",children:[(0,t.jsx)(eh.ToolOutlined,{className:"mr-2"})," Available Tools",M.length>0&&(0,t.jsx)("span",{className:"ml-2 bg-blue-100 text-blue-800 text-xs font-medium px-2 py-0.5 rounded-full",children:M.length})]}),M.length>0&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(D.Input,{placeholder:"Search tools...",prefix:(0,t.jsx)(ew.SearchOutlined,{className:"text-gray-400"}),value:g,onChange:e=>f(e.target.value),allowClear:!0,className:"rounded-lg",size:"middle"})}),k&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 bg-white border border-gray-200 rounded-lg",children:[(0,t.jsxs)("div",{className:"relative mb-3",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700",children:"Loading tools..."})]}),C?.error&&!k&&!M.length&&(0,t.jsx)("div",{className:"p-3 text-xs text-red-800 rounded-lg bg-red-50 border border-red-200",children:(0,t.jsxs)("p",{className:"font-medium",children:["Error: ",C.message]})}),!k&&!C?.error&&(!M||0===M.length)&&(0,t.jsxs)("div",{className:"p-4 text-center bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"mx-auto w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center mb-2",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 8.172V5L8 4z"})})}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 mb-1",children:"No tools available"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"No tools found for this server"})]}),!k&&!C?.error&&M.length>0&&(0,t.jsx)(t.Fragment,{children:0===F.length?(0,t.jsxs)("div",{className:"p-4 text-center bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)(ew.SearchOutlined,{className:"text-2xl text-gray-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 mb-1",children:"No tools found"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:['No tools match "',g,'"']})]}):(0,t.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto min-h-0 mcp-tools-scrollable",style:{maxHeight:"400px",scrollbarWidth:"auto",scrollbarColor:"#cbd5e0 #f7fafc"},children:F.map(e=>(0,t.jsxs)("div",{className:`border rounded-lg p-3 cursor-pointer transition-all hover:shadow-sm ${o?.name===e.name?"border-blue-500 bg-blue-50 ring-1 ring-blue-200":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>{c(e),x(null),h(null)},children:[(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[e.mcp_info.logo_url&&(0,t.jsx)("img",{src:e.mcp_info.logo_url,alt:`${e.mcp_info.server_name} logo`,className:"w-4 h-4 object-contain flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"font-mono text-xs font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 truncate",children:e.mcp_info.server_name}),(0,t.jsx)("p",{className:"text-xs text-gray-600 mt-1 line-clamp-2 leading-relaxed",children:e.description})]})]}),o?.name===e.name&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-blue-200",children:(0,t.jsxs)("div",{className:"flex items-center text-xs font-medium text-blue-700",children:[(0,t.jsx)("svg",{className:"w-3 h-3 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Selected"]})})]},e.name))})})]})]})]}),(0,t.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,t.jsx)(m.Title,{className:"text-xl font-semibold mb-0",children:"Tool Testing Playground"})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto p-4",children:o?(0,t.jsx)("div",{className:"h-full",children:(0,t.jsx)(tN,{tool:o,onSubmit:e=>{P({tool:o,arguments:e})},result:u,error:p,isLoading:O,onClose:()=>c(null)})}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(t_.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)(d.Text,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select a Tool to Test"}),(0,t.jsx)(d.Text,{className:"text-center text-gray-500 max-w-md",children:"Choose a tool from the left sidebar to start testing its functionality with custom inputs."})]})})]})]})})})},tT=[eo.AUTH_TYPE.API_KEY,eo.AUTH_TYPE.BEARER_TOKEN,eo.AUTH_TYPE.TOKEN,eo.AUTH_TYPE.BASIC],tC=[...tT,eo.AUTH_TYPE.OAUTH2,eo.AUTH_TYPE.AWS_SIGV4],tk="litellm-mcp-oauth-edit-state",tA=({mcpServer:e,accessToken:s,onCancel:r,onSuccess:d,availableAccessGroups:m})=>{let[u]=H.Form.useForm(),[x,p]=(0,b.useState)({}),[f,j]=(0,b.useState)([]),[y,v]=(0,b.useState)(!1),[N,w]=(0,b.useState)(""),[S,C]=(0,b.useState)(!1),[k,A]=(0,b.useState)([]),[I,P]=(0,b.useState)({}),[O,M]=(0,b.useState)({}),[F,E]=(0,b.useState)(null),[L,R]=(0,b.useState)(e.mcp_info?.logo_url||void 0),z=H.Form.useWatch("auth_type",u),U=H.Form.useWatch("transport",u),B="stdio"===U,q=U===eo.TRANSPORT.OPENAPI,V=!!z&&tT.includes(z),$=z===eo.AUTH_TYPE.OAUTH2,K=z===eo.AUTH_TYPE.AWS_SIGV4,W=H.Form.useWatch("oauth_flow_type",u),J=$&&W===eo.OAUTH_FLOW.M2M,[Y,G]=(0,b.useState)(null),Q=H.Form.useWatch("url",u),Z=H.Form.useWatch("spec_path",u),X=H.Form.useWatch("server_name",u),ee=H.Form.useWatch("auth_type",u),et=H.Form.useWatch("static_headers",u),es=H.Form.useWatch("credentials",u),er=H.Form.useWatch("authorization_url",u),el=H.Form.useWatch("token_url",u),ea=H.Form.useWatch("registration_url",u),{startOAuthFlow:ei,status:ed,error:em,tokenResponse:eu}=eZ({accessToken:s,getCredentials:()=>u.getFieldValue("credentials"),getTemporaryPayload:()=>{let t=u.getFieldsValue(!0),s=t.url||e.url,r=t.transport||e.transport;if(!s||!r)return null;let l=Array.isArray(t.static_headers)?t.static_headers.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value??""),e},{}):{};return{server_id:e.server_id,server_name:t.server_name||e.server_name||e.alias,alias:t.alias||e.alias,description:t.description||e.description,url:s,transport:r,auth_type:eo.AUTH_TYPE.OAUTH2,credentials:t.credentials,mcp_access_groups:t.mcp_access_groups||e.mcp_access_groups,static_headers:l,command:t.command,args:t.args,env:t.env}},onTokenReceived:e=>{if(G(e?.access_token??null),e?.access_token){let t={access_token:e.access_token,...e.refresh_token&&{refresh_token:e.refresh_token},...e.expires_in&&{expires_in:e.expires_in},...e.scope&&{scope:e.scope}};u.setFieldsValue({credentials:t}),T.default.success("OAuth authorization successful! Please click 'Update MCP Server' to save the credentials.")}},onBeforeRedirect:()=>{try{let t=u.getFieldsValue(!0);(0,eY.setSecureItem)(tk,JSON.stringify({serverId:e.server_id,formValues:t,costConfig:x,allowedTools:k,searchValue:N,aliasManuallyEdited:S}))}catch(e){console.warn("Failed to persist MCP edit state",e)}}}),ex=b.default.useMemo(()=>e.static_headers?Object.entries(e.static_headers).map(([e,t])=>({header:e,value:null!=t?String(t):""})):[],[e.static_headers]),ep=b.default.useMemo(()=>{let t=e.env??void 0;if(!t||0===Object.keys(t).length)return"";try{return JSON.stringify(t,null,2)}catch{return""}},[e.env]),eh=b.default.useMemo(()=>e.spec_path&&"stdio"!==e.transport?eo.TRANSPORT.OPENAPI:e.transport,[e]),eg=b.default.useMemo(()=>({...e,transport:eh,static_headers:ex,oauth_flow_type:e.token_url?eo.OAUTH_FLOW.M2M:eo.OAUTH_FLOW.INTERACTIVE,token_validation_json:e.token_validation?JSON.stringify(e.token_validation,null,2):void 0}),[e,eh,ex,ep]);(0,b.useEffect)(()=>{e.mcp_info?.mcp_server_cost_info&&p(e.mcp_info.mcp_server_cost_info)},[e]),(0,b.useEffect)(()=>{e.allowed_tools&&A(e.allowed_tools),P(e.tool_name_to_display_name??{}),M(e.tool_name_to_description??{})},[e]),(0,b.useEffect)(()=>{let t=(0,eY.getSecureItem)(tk);if(t)try{let s=JSON.parse(t);if(!s||s.serverId!==e.server_id)return;s.formValues&&E({...e,...s.formValues}),s.costConfig&&p(s.costConfig),s.allowedTools&&A(s.allowedTools),s.searchValue&&w(s.searchValue),"boolean"==typeof s.aliasManuallyEdited&&C(s.aliasManuallyEdited)}catch(e){console.error("Failed to restore MCP edit state",e)}finally{window.sessionStorage.removeItem(tk)}},[u,e]),(0,b.useEffect)(()=>{if(!F)return;let t=F.transport||e.transport;t&&t!==u.getFieldValue("transport")?u.setFieldsValue({transport:t}):(u.setFieldsValue(F),E(null))},[F,u,e.transport]),(0,b.useEffect)(()=>{if(e.mcp_access_groups){let t=e.mcp_access_groups.map(e=>"string"==typeof e?e:e.name||String(e));u.setFieldValue("mcp_access_groups",t)}},[e]),(0,b.useEffect)(()=>{e.server_id&&""!==e.server_id.trim()&&ej()},[e,s,Y]);let ej=async()=>{if(!s||"stdio"!==e.transport&&!e.url&&!e.spec_path)return;let t=e.auth_type===eo.AUTH_TYPE.OAUTH2&&!!e.token_url;if(e.auth_type!==eo.AUTH_TYPE.OAUTH2||t||Y){v(!0);try{let t={server_id:e.server_id,server_name:e.server_name,url:e.url,transport:e.transport,auth_type:e.auth_type,mcp_info:e.mcp_info,authorization_url:e.authorization_url,token_url:e.token_url,registration_url:e.registration_url,command:e.command,args:e.args,env:e.env},r=await (0,_.testMCPToolsListRequest)(s,t,Y);r.tools&&!r.error?j(r.tools):(console.error("Failed to fetch tools:",r.message),j([]))}catch(e){console.error("Tools fetch error:",e),j([])}finally{v(!1)}}},ey=async t=>{if(s)try{let{static_headers:r,credentials:l,stdio_config:a,env_json:n,command:i,args:o,allow_all_keys:c,available_on_public_internet:m,token_validation_json:u,...p}=t,h=(p.mcp_access_groups||[]).map(e=>"string"==typeof e?e:e.name||String(e)),g=Array.isArray(r)?r.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value??""),e},{}):{},f=l&&"object"==typeof l?Object.entries(l).reduce((e,[t,s])=>{if(null==s||""===s)return e;if("scopes"===t){if(Array.isArray(s)){let r=s.filter(e=>null!=e&&""!==e);r.length>0&&(e[t]=r)}}else e[t]=s;return e},{}):void 0,b={};if("stdio"===p.transport)if(a)try{let e=JSON.parse(a),t=e;if(e?.mcpServers&&"object"==typeof e.mcpServers){let s=Object.keys(e.mcpServers);s.length>0&&(t=e.mcpServers[s[0]])}let s=Array.isArray(t?.args)?t.args.map(e=>String(e)).filter(e=>""!==e.trim()):[],r=t?.env&&"object"==typeof t.env&&!Array.isArray(t.env)?Object.entries(t.env).reduce((e,[t,s])=>(null==t||""===String(t).trim()||(e[String(t)]=null==s?"":String(s)),e),{}):{};if(!(b={command:t?.command?String(t.command):void 0,args:s,env:r}).command)return void T.default.fromBackend("Stdio configuration must include a command")}catch{T.default.fromBackend("Invalid JSON in stdio configuration");return}else{let e={};if(n)try{let t=JSON.parse(n);t&&"object"==typeof t&&!Array.isArray(t)&&(e=Object.entries(t).reduce((e,[t,s])=>(null==t||""===String(t).trim()||(e[String(t)]=null==s?"":String(s)),e),{}))}catch{T.default.fromBackend("Invalid JSON in stdio env configuration");return}let t=Array.isArray(o)?o.map(e=>String(e)).filter(e=>""!==e.trim()):[],s=i?String(i).trim():"";if(!s)return void T.default.fromBackend("Stdio transport requires a command");b={command:s,args:t,env:e}}p.transport===eo.TRANSPORT.OPENAPI&&(p.transport="http");let j=null;if(u&&""!==u.trim())try{j=JSON.parse(u)}catch{T.default.fromBackend("Invalid JSON in Token Validation Rules");return}let y=p.server_name||p.url||e.server_name||e.url||p.alias||e.alias||"unknown",v={...p,...b,stdio_config:void 0,env_json:void 0,server_id:e.server_id,mcp_info:{server_name:y,description:p.description,logo_url:L||void 0,mcp_server_cost_info:Object.keys(x).length>0?x:null},mcp_access_groups:h,alias:p.alias,extra_headers:p.extra_headers||[],allowed_tools:k.length>0?k:null,tool_name_to_display_name:Object.keys(I).length>0?I:null,tool_name_to_description:Object.keys(O).length>0?O:null,disallowed_tools:p.disallowed_tools||[],static_headers:g,allow_all_keys:!!(c??e.allow_all_keys),available_on_public_internet:!!(m??e.available_on_public_internet),...null!==j||e.token_validation?{token_validation:j}:{}};p.auth_type&&tC.includes(p.auth_type)&&f&&Object.keys(f).length>0&&(v.credentials=f);let N=await (0,_.updateMCPServer)(s,v);T.default.success("MCP Server updated successfully"),d(N)}catch(e){T.default.fromBackend("Failed to update MCP Server"+(e?.message?`: ${e.message}`:""))}};return(0,t.jsxs)(n.TabGroup,{children:[(0,t.jsxs)(i.TabList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(a.Tab,{children:"Server Configuration"}),(0,t.jsx)(a.Tab,{children:"Cost Configuration"})]}),(0,t.jsxs)(c.TabPanels,{className:"mt-6",children:[(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)(H.Form,{form:u,onFinish:ey,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(H.Form.Item,{label:"MCP Server Name",name:"server_name",rules:[{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(D.Input,{className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:"Alias",name:"alias",rules:[{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(D.Input,{onChange:()=>C(!0),className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(D.Input,{className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(e$,{value:L,onChange:R}),(0,t.jsx)(H.Form.Item,{label:"Transport Type",name:"transport",rules:[{required:!0}],children:(0,t.jsxs)(h.Select,{onChange:e=>{"stdio"===e?u.setFieldsValue({url:void 0,spec_path:void 0,auth_type:void 0,credentials:void 0,authorization_url:void 0,token_url:void 0,registration_url:void 0}):e===eo.TRANSPORT.OPENAPI?u.setFieldsValue({url:void 0,command:void 0,args:void 0,env_json:void 0,stdio_config:void 0}):u.setFieldsValue({spec_path:void 0,command:void 0,args:void 0,env_json:void 0,stdio_config:void 0})},children:[(0,t.jsx)(h.Select.Option,{value:"http",children:"Streamable HTTP (Recommended)"}),(0,t.jsx)(h.Select.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(h.Select.Option,{value:"stdio",children:"Standard Input/Output (stdio)"}),(0,t.jsx)(h.Select.Option,{value:eo.TRANSPORT.OPENAPI,children:"OpenAPI Spec"})]})}),!B&&!q&&(0,t.jsx)(H.Form.Item,{label:"MCP Server URL",name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,t)=>eK(t)}],children:(0,t.jsx)(D.Input,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),q&&(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OpenAPI Spec URL",(0,t.jsx)(g.Tooltip,{title:"URL to an OpenAPI specification (JSON or YAML). MCP tools will be automatically generated from the API endpoints defined in the spec.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"spec_path",rules:[{required:!0,message:"Please enter an OpenAPI spec URL"}],children:(0,t.jsx)(D.Input,{placeholder:"https://petstore3.swagger.io/api/v3/openapi.json",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!B&&(0,t.jsx)(H.Form.Item,{label:"Authentication",name:"auth_type",rules:[{required:!0}],children:(0,t.jsxs)(h.Select,{children:[(0,t.jsx)(h.Select.Option,{value:"none",children:"None"}),(0,t.jsx)(h.Select.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(h.Select.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(h.Select.Option,{value:"token",children:"Token"}),(0,t.jsx)(h.Select.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(h.Select.Option,{value:"oauth2",children:"OAuth"}),(0,t.jsx)(h.Select.Option,{value:"aws_sigv4",children:"AWS SigV4 (Bedrock AgentCore MCPs)"})]})}),B&&(0,t.jsxs)("div",{className:"rounded-lg border border-gray-200 p-4 space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Configure the stdio transport used to launch the MCP server process. You can either fill in the fields below or paste a JSON configuration."}),(0,t.jsx)(H.Form.Item,{label:"Command",name:"command",rules:[{required:!0,message:"Please enter a command for stdio transport"}],children:(0,t.jsx)(D.Input,{placeholder:"e.g., npx",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:"Args",name:"args",children:(0,t.jsx)(h.Select,{mode:"tags",size:"large",tokenSeparators:[","],placeholder:"Add args (press enter or comma)",className:"rounded-lg"})}),(0,t.jsx)(H.Form.Item,{label:"Environment (JSON object)",name:"env_json",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if(e&&"object"==typeof e&&!Array.isArray(e))return Promise.resolve();return Promise.reject(Error("Env must be a JSON object"))}catch{return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(D.Input.TextArea,{rows:6,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 font-mono text-sm",placeholder:`{ +}`,copyKey:"cursor-config",className:"text-xs"})})]})]})]})]}),{})}),(0,t.jsx)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-green-50 to-teal-50 p-6 rounded-lg border border-green-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(e9,{className:"text-green-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-green-900",children:"Streamable HTTP Transport"})]}),(0,t.jsx)(ta,{className:"text-green-700",children:"Connect to LiteLLM MCP using HTTP transport. Compatible with any MCP client that supports HTTP streaming."})]}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e9,{className:"text-green-600",size:16}),title:"Universal MCP Connection",description:"Use this URL with any MCP client that supports HTTP transport",children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(ta,{children:"Each MCP client supports different transports. Refer to your client documentation to determine the appropriate transport method."})}),(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"http-server-url"}),(0,t.jsx)(g,{title:"Headers Configuration",code:JSON.stringify({"x-litellm-api-key":"Bearer YOUR_LITELLM_API_KEY"},null,2),copyKey:"http-headers"}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(eb.Button,{type:"link",className:"p-0 h-auto text-blue-600 hover:text-blue-700",href:"https://modelcontextprotocol.io/docs/concepts/transports",icon:(0,t.jsx)(te.ExternalLinkIcon,{size:14}),children:"Learn more about MCP transports"})})]})})]}),{})})]})]})]})})};var tc=e.i(752978),td=e.i(591935),tm=e.i(492030);let tu=({server:e,isLoadingHealth:s,isRechecking:r,onRecheck:l})=>{let[a,n]=(0,b.useState)(!1),i=e.status||"unknown",o=e.last_health_check,c=e.health_check_error;if(s||r)return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-400 px-2 py-0.5 rounded-full bg-gray-50 border border-gray-100",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-gray-300 animate-pulse"}),"Checking"]});let d=!!l,m=(0,t.jsxs)("div",{className:"max-w-xs",children:[(0,t.jsxs)("div",{className:"font-semibold mb-1",children:["Health Status: ",i]}),o&&(0,t.jsxs)("div",{className:"text-xs mb-1",children:["Last Check: ",new Date(o).toLocaleString()]}),c&&(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"font-medium text-red-400 mb-1",children:"Error:"}),(0,t.jsx)("div",{className:"break-words",children:c})]}),!o&&!c&&(0,t.jsx)("div",{className:"text-xs text-gray-400",children:"No health check data available"}),d&&(0,t.jsx)("div",{className:"text-xs text-gray-400 mt-1",children:"Click to recheck"})]});return(0,t.jsx)(g.Tooltip,{title:m,placement:"top",children:(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full ${(e=>{switch(e){case"healthy":return"text-green-700 bg-green-50 border border-green-200";case"unhealthy":return"text-red-700 bg-red-50 border border-red-200";default:return"text-gray-600 bg-gray-50 border border-gray-200"}})(i)} ${d?"cursor-pointer hover:opacity-80":"cursor-default"}`,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onClick:d?()=>l(e.server_id):void 0,children:[(0,t.jsx)("span",{children:a&&d?"↻":(e=>{switch(e){case"healthy":return"✓";case"unhealthy":return"✗";default:return"?"}})(i)}),a&&d?"Recheck":i.charAt(0).toUpperCase()+i.slice(1)]})})};var tx=e.i(530212),tp=e.i(848725);let th=b.forwardRef(function(e,t){return b.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),b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}))});var tg=e.i(350967),tf=e.i(954616);function tb(e){if(!e)return[];if(Array.isArray(e))return e.map(e=>tj(e)).filter(e=>void 0!==e);let t=tj(e);return void 0===t?[]:[t]}function tj(e,t){if(!e)return;let s=void 0!==t?t:e.default;if("object"===e.type){let t="object"!=typeof s||null===s||Array.isArray(s)?{}:{...s};return e.properties&&Object.entries(e.properties).forEach(([e,s])=>{t[e]=tj(s,t[e])}),t}if("array"===e.type){if(Array.isArray(s)){let t=e.items;if(!t)return s;if(0===s.length){let e=tb(t);return e.length?e:s}return Array.isArray(t)?s.map((e,s)=>tj(t[s]??t[t.length-1],e)):s.map(e=>tj(t,e))}return void 0!==s?s:tb(e.items)}if(void 0!==s)return s;switch(e.type){case"integer":case"number":return 0;case"boolean":return!1;default:return""}}let ty=e=>{let t=tj(e);if("object"===e.type||"array"===e.type){let s="array"===e.type?[]:{};return JSON.stringify(t??s,null,2)}return t};function tv({tool:e,onSubmit:s,isLoading:r,result:a,error:n,onClose:i}){let[o]=H.Form.useForm(),[c,d]=b.default.useState("formatted"),[m,u]=b.default.useState(null),[x,p]=b.default.useState(null),f=b.default.useMemo(()=>"string"==typeof e.inputSchema?{type:"object",properties:{input:{type:"string",description:"Input for this tool"}},required:["input"]}:e.inputSchema,[e.inputSchema]),j=b.default.useMemo(()=>f.properties&&f.properties.params&&"object"===f.properties.params.type&&f.properties.params.properties?{type:"object",properties:f.properties.params.properties,required:f.properties.params.required||[]}:f,[f]);b.default.useEffect(()=>{if(o.resetFields(),!j.properties)return;let e={};Object.entries(j.properties).forEach(([t,s])=>{e[t]=ty(s)}),o.setFieldsValue(e)},[o,j,e]),b.default.useEffect(()=>{m&&(a||n)&&p(Date.now()-m)},[a,n,m]);let y=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let s=document.execCommand("copy");if(document.body.removeChild(t),!s)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},v=async()=>{await y(JSON.stringify(a,null,2))?T.default.success("Result copied to clipboard"):T.default.fromBackend("Failed to copy result")},N=async()=>{await y(e.name)?T.default.success("Tool name copied to clipboard"):T.default.fromBackend("Failed to copy tool name")};return(0,t.jsxs)("div",{className:"space-y-4 h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[e.mcp_info.logo_url&&(0,t.jsx)("img",{src:e.mcp_info.logo_url,alt:`${e.mcp_info.server_name} logo`,className:"w-6 h-6 object-contain"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Tool:"}),(0,t.jsxs)("div",{className:"group inline-flex items-center space-x-1 bg-slate-50 hover:bg-slate-100 px-3 py-1 rounded-md cursor-pointer transition-colors border border-slate-200",onClick:N,title:"Click to copy tool name",children:[(0,t.jsx)("span",{className:"font-mono text-slate-700 font-medium text-sm",children:e.name}),(0,t.jsx)("svg",{className:"w-3 h-3 text-slate-400 group-hover:text-slate-600 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]}),(0,t.jsx)("p",{className:"text-xs text-gray-600",children:e.description}),(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:["Provider: ",e.mcp_info.server_name]})]})]}),(0,t.jsx)(l.Button,{onClick:i,variant:"light",size:"sm",className:"text-gray-500 hover:text-gray-700",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 h-full",children:[(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-4 py-2",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Input Parameters"}),(0,t.jsx)(g.Tooltip,{title:"Configure the input parameters for this tool call",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)(H.Form,{form:o,onFinish:e=>{u(Date.now()),p(null);let t={};Object.entries(e).forEach(([e,s])=>{let r=j.properties?.[e];if(r&&null!=s&&""!==s)switch(r.type){case"boolean":t[e]="true"===s||!0===s;break;case"number":case"integer":{let l=Number(s);t[e]=Number.isNaN(l)?s:"integer"===r.type?Math.trunc(l):l;break}case"object":case"array":try{let l="string"==typeof s?JSON.parse(s):s,a="object"===r.type&&null!==l&&"object"==typeof l&&!Array.isArray(l),n="array"===r.type&&Array.isArray(l);"object"===r.type&&a||"array"===r.type&&n?t[e]=l:t[e]=s}catch(r){t[e]=s}break;case"string":t[e]=String(s);break;default:t[e]=s}else null!=s&&""!==s&&(t[e]=s)}),s(f.properties&&f.properties.params&&"object"===f.properties.params.type&&f.properties.params.properties?{params:t}:t)},layout:"vertical",className:"space-y-3",children:["string"==typeof e.inputSchema?(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Input ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),name:"input",rules:[{required:!0,message:"Please enter input for this tool"}],className:"mb-3",children:(0,t.jsx)(ei.TextInput,{placeholder:"Enter input for this tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})}):void 0===j.properties?(0,t.jsx)("div",{className:"text-center py-6 bg-gray-50 rounded-lg border border-gray-200",children:(0,t.jsxs)("div",{className:"max-w-sm mx-auto",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-1",children:"No Parameters Required"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This tool can be called without any input parameters."})]})}):(0,t.jsx)("div",{className:"space-y-3",children:Object.entries(j.properties).map(([s,r])=>{let l=ty(r),a=`${e.name}-${s}`;return(0,t.jsxs)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[s," ",j.required?.includes(s)&&(0,t.jsx)("span",{className:"text-red-500",children:"*"}),r.description&&(0,t.jsx)(g.Tooltip,{title:r.description,children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:s,initialValue:l,rules:[{required:j.required?.includes(s),message:`Please enter ${s}`},..."object"===r.type||"array"===r.type?[{validator:(e,t)=>{if((null==t||""===t)&&!j.required?.includes(s))return Promise.resolve();try{let e="string"==typeof t?JSON.parse(t):t,s="object"===r.type&&null!==e&&"object"==typeof e&&!Array.isArray(e),l="array"===r.type&&Array.isArray(e);if("object"===r.type&&s||"array"===r.type&&l)return Promise.resolve();return Promise.reject(Error("object"===r.type?"Please enter a JSON object":"Please enter a JSON array"))}catch(e){return Promise.reject(Error("Invalid JSON"))}}}]:[]],className:"mb-3",children:["string"===r.type&&r.enum&&(0,t.jsxs)("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors",defaultValue:l??"",children:[!j.required?.includes(s)&&(0,t.jsxs)("option",{value:"",children:["Select ",s]}),r.enum.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),"string"===r.type&&!r.enum&&(0,t.jsx)(ei.TextInput,{placeholder:r.description||`Enter ${s}`,defaultValue:l??"",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"}),("number"===r.type||"integer"===r.type)&&(0,t.jsx)("input",{type:"number",step:"integer"===r.type?1:"any",placeholder:r.description||`Enter ${s}`,defaultValue:l??0,className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors"}),"boolean"===r.type&&(0,t.jsxs)(h.Select,{placeholder:`Select ${s}`,allowClear:!j.required?.includes(s),className:"w-full",children:[(0,t.jsx)(h.Select.Option,{value:!0,children:"True"}),(0,t.jsx)(h.Select.Option,{value:!1,children:"False"})]}),("object"===r.type||"array"===r.type)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("textarea",{rows:"object"===r.type?6:4,placeholder:r.description||("object"===r.type?`Enter JSON object for ${s}`:`Enter JSON array for ${s}`),defaultValue:l??("object"===r.type?"{}":"[]"),spellCheck:!1,"data-testid":`textarea-${s}`,className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm font-mono"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"object"===r.type?"Provide a valid JSON object.":"Provide a valid JSON array."})]})]},a)})}),(0,t.jsx)("div",{className:"pt-3 border-t border-gray-100",children:(0,t.jsx)(l.Button,{onClick:()=>o.submit(),disabled:r,variant:"primary",className:"w-full",loading:r,children:r?"Calling Tool...":a||n?"Call Again":"Call Tool"})})]})})]}),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-4 py-2",children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Tool Result"})}),(0,t.jsx)("div",{className:"p-4",children:a||n||r?(0,t.jsxs)("div",{className:"space-y-3",children:[a&&!r&&!n&&(0,t.jsx)("div",{className:"p-2 bg-green-50 border border-green-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("svg",{className:"h-4 w-4 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)("h4",{className:"text-xs font-medium text-green-900",children:"Tool executed successfully"}),null!==x&&(0,t.jsxs)("span",{className:"text-xs text-green-600 ml-1",children:["• ",(x/1e3).toFixed(2),"s"]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,t.jsxs)("div",{className:"flex bg-white rounded border border-green-300 p-0.5",children:[(0,t.jsx)("button",{onClick:()=>d("formatted"),className:`px-2 py-1 text-xs font-medium rounded transition-colors ${"formatted"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"}`,children:"Formatted"}),(0,t.jsx)("button",{onClick:()=>d("json"),className:`px-2 py-1 text-xs font-medium rounded transition-colors ${"json"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"}`,children:"JSON"})]}),(0,t.jsx)("button",{onClick:v,className:"p-1 hover:bg-green-100 rounded text-green-700",title:"Copy response",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]})]})}),(0,t.jsxs)("div",{className:"max-h-96 overflow-y-auto",children:[r&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center h-48 text-gray-500",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-sm font-medium mt-3",children:"Calling tool..."}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Please wait while we process your request"})]}),n&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("svg",{className:"h-4 w-4 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-red-900",children:"Tool Call Failed"}),null!==x&&(0,t.jsxs)("span",{className:"text-xs text-red-600",children:["• ",(x/1e3).toFixed(2),"s"]})]}),(0,t.jsx)("div",{className:"bg-white border border-red-200 rounded p-2 max-h-48 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-xs whitespace-pre-wrap text-red-700 font-mono",children:n.message})})]})]})}),a&&!r&&!n&&(0,t.jsx)("div",{className:"space-y-3",children:"formatted"===c?a.map((e,s)=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:["text"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Text Response"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsx)("div",{className:"bg-white rounded border border-gray-200 max-h-64 overflow-y-auto",children:(0,t.jsx)("div",{className:"p-3 space-y-2",children:e.text.split("\n\n").map((e,s)=>{if(""===e.trim())return null;if(e.startsWith("##")){let r=e.replace(/^#+\s/,"");return(0,t.jsx)("div",{className:"border-b border-gray-200 pb-1 mb-2",children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:r})},s)}let r=/(https?:\/\/[^\s\)]+)/g;if(r.test(e)){let l=e.split(r);return(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded p-2",children:(0,t.jsx)("div",{className:"text-xs text-gray-700 leading-relaxed whitespace-pre-wrap",children:l.map((e,s)=>r.test(e)?(0,t.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline break-all",children:e},s):e)})},s)}return e.includes("Score:")?(0,t.jsx)("div",{className:"bg-green-50 border-l-4 border-green-400 p-2 rounded-r",children:(0,t.jsx)("p",{className:"text-xs text-green-800 font-medium whitespace-pre-wrap",children:e})},s):(0,t.jsx)("div",{className:"bg-gray-50 rounded p-2 border border-gray-200",children:(0,t.jsx)("div",{className:"text-xs text-gray-700 leading-relaxed whitespace-pre-wrap font-mono",children:e})},s)}).filter(Boolean)})})})]}),"image"===e.type&&e.url&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Image Response"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded p-3 border border-gray-200",children:(0,t.jsx)("img",{src:e.url,alt:"Tool result",className:"max-w-full h-auto rounded shadow-sm"})})})]}),"embedded_resource"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Embedded Resource"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2 p-3 bg-blue-50 border border-blue-200 rounded",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("p",{className:"text-xs font-medium text-blue-900",children:["Resource Type: ",e.resource_type]}),e.url&&(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-xs text-blue-600 hover:text-blue-800 hover:underline mt-1 transition-colors",children:["View Resource",(0,t.jsxs)("svg",{className:"ml-1 h-3 w-3",fill:"currentColor",viewBox:"0 0 20 20",children:[(0,t.jsx)("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),(0,t.jsx)("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"})]})]})]})]})})]})]},s)):(0,t.jsx)("div",{className:"bg-white rounded border border-gray-200",children:(0,t.jsx)("div",{className:"p-3 overflow-auto max-h-80 bg-gray-50",children:(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all text-gray-800",children:JSON.stringify(a,null,2)})})})})]})]}):(0,t.jsx)("div",{className:"flex flex-col justify-center items-center h-48 text-gray-500",children:(0,t.jsxs)("div",{className:"text-center max-w-sm",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-1",children:"Ready to Call Tool"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 leading-relaxed",children:'Configure the input parameters and click "Call Tool" to see the results here.'})]})})})]})]})]})}var tN=e.i(983561),t_=e.i(438957);let tw=({serverId:e,accessToken:s,auth_type:r,userRole:l,userID:a,serverAlias:n,extraHeaders:i})=>{let[o,c]=(0,b.useState)(null),[u,x]=(0,b.useState)(null),[p,h]=(0,b.useState)(null),[g,f]=(0,b.useState)(""),[j,v]=(0,b.useState)({}),[N,w]=(0,b.useState)(!1),S=i&&i.length>0,T=()=>{if(!n||!S)return;let e={};return Object.entries(j).forEach(([t,s])=>{s&&s.trim()&&(e[`x-mcp-${n}-${t.toLowerCase()}`]=s)}),Object.keys(e).length>0?e:void 0},{data:C,isLoading:k,error:A,refetch:I}=(0,y.useQuery)({queryKey:["mcpTools",e,j],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,_.listMCPTools)(s,e,T())},enabled:!!s,staleTime:3e4}),{mutate:P,isPending:O}=(0,tf.useMutation)({mutationFn:async t=>{if(!s)throw Error("Access Token required");try{return await (0,_.callMCPTool)(s,e,t.tool.name,t.arguments,{customHeaders:T()})}catch(e){throw e}},onSuccess:e=>{x(e.content),h(null)},onError:e=>{h(e),x(null)}}),M=C?.tools||[],F=M.filter(e=>{let t=g.toLowerCase();return e.name.toLowerCase().includes(t)||e.description&&e.description.toLowerCase().includes(t)||e.mcp_info.server_name&&e.mcp_info.server_name.toLowerCase().includes(t)});return(0,t.jsx)("div",{className:"w-full h-screen p-4 bg-white",children:(0,t.jsx)(eg.Card,{className:"w-full rounded-xl shadow-md overflow-hidden",children:(0,t.jsxs)("div",{className:"flex h-auto w-full gap-4",children:[(0,t.jsxs)("div",{className:"w-1/4 p-4 bg-gray-50 flex flex-col",children:[(0,t.jsx)(m.Title,{className:"text-xl font-semibold mb-6 mt-2",children:"MCP Tools"}),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[S&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(t_.KeyOutlined,{className:"text-blue-600 mr-2"}),(0,t.jsx)(d.Text,{className:"text-sm font-medium text-blue-800",children:"Additional Headers"})]}),(0,t.jsx)(eb.Button,{size:"small",type:"link",onClick:()=>w(!N),className:"text-blue-700 p-0 h-auto",children:N?"Hide":"Configure"})]}),!N&&0===Object.keys(j).length&&(0,t.jsx)(d.Text,{className:"text-xs text-blue-700",children:'This server requires additional headers. Click "Configure" to provide values.'}),N&&(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[i?.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:e}),(0,t.jsx)(D.Input,{size:"small",placeholder:`Enter ${e}`,value:j[e]||"",onChange:t=>{v({...j,[e]:t.target.value})},prefix:(0,t.jsx)(t_.KeyOutlined,{className:"text-gray-400"}),className:"rounded"})]},e)),(0,t.jsx)(eb.Button,{size:"small",type:"primary",onClick:()=>{I(),w(!1)},disabled:Object.values(j).every(e=>!e||!e.trim()),className:"w-full mt-2",children:"Load Tools"})]}),!N&&Object.keys(j).length>0&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)(d.Text,{className:"text-xs text-green-700 flex items-center",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 bg-green-500 rounded-full mr-2"}),Object.keys(j).length," header(s) configured"]})})]}),(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)(d.Text,{className:"font-medium block mb-3 text-gray-700 flex items-center",children:[(0,t.jsx)(eh.ToolOutlined,{className:"mr-2"})," Available Tools",M.length>0&&(0,t.jsx)("span",{className:"ml-2 bg-blue-100 text-blue-800 text-xs font-medium px-2 py-0.5 rounded-full",children:M.length})]}),M.length>0&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(D.Input,{placeholder:"Search tools...",prefix:(0,t.jsx)(ew.SearchOutlined,{className:"text-gray-400"}),value:g,onChange:e=>f(e.target.value),allowClear:!0,className:"rounded-lg",size:"middle"})}),k&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 bg-white border border-gray-200 rounded-lg",children:[(0,t.jsxs)("div",{className:"relative mb-3",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700",children:"Loading tools..."})]}),C?.error&&!k&&!M.length&&(0,t.jsx)("div",{className:"p-3 text-xs text-red-800 rounded-lg bg-red-50 border border-red-200",children:(0,t.jsxs)("p",{className:"font-medium",children:["Error: ",C.message]})}),!k&&!C?.error&&(!M||0===M.length)&&(0,t.jsxs)("div",{className:"p-4 text-center bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"mx-auto w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center mb-2",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 8.172V5L8 4z"})})}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 mb-1",children:"No tools available"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"No tools found for this server"})]}),!k&&!C?.error&&M.length>0&&(0,t.jsx)(t.Fragment,{children:0===F.length?(0,t.jsxs)("div",{className:"p-4 text-center bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)(ew.SearchOutlined,{className:"text-2xl text-gray-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 mb-1",children:"No tools found"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:['No tools match "',g,'"']})]}):(0,t.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto min-h-0 mcp-tools-scrollable",style:{maxHeight:"400px",scrollbarWidth:"auto",scrollbarColor:"#cbd5e0 #f7fafc"},children:F.map(e=>(0,t.jsxs)("div",{className:`border rounded-lg p-3 cursor-pointer transition-all hover:shadow-sm ${o?.name===e.name?"border-blue-500 bg-blue-50 ring-1 ring-blue-200":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>{c(e),x(null),h(null)},children:[(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[e.mcp_info.logo_url&&(0,t.jsx)("img",{src:e.mcp_info.logo_url,alt:`${e.mcp_info.server_name} logo`,className:"w-4 h-4 object-contain flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"font-mono text-xs font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 truncate",children:e.mcp_info.server_name}),(0,t.jsx)("p",{className:"text-xs text-gray-600 mt-1 line-clamp-2 leading-relaxed",children:e.description})]})]}),o?.name===e.name&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-blue-200",children:(0,t.jsxs)("div",{className:"flex items-center text-xs font-medium text-blue-700",children:[(0,t.jsx)("svg",{className:"w-3 h-3 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Selected"]})})]},e.name))})})]})]})]}),(0,t.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,t.jsx)(m.Title,{className:"text-xl font-semibold mb-0",children:"Tool Testing Playground"})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto p-4",children:o?(0,t.jsx)("div",{className:"h-full",children:(0,t.jsx)(tv,{tool:o,onSubmit:e=>{P({tool:o,arguments:e})},result:u,error:p,isLoading:O,onClose:()=>c(null)})}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(tN.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)(d.Text,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select a Tool to Test"}),(0,t.jsx)(d.Text,{className:"text-center text-gray-500 max-w-md",children:"Choose a tool from the left sidebar to start testing its functionality with custom inputs."})]})})]})]})})})},tS=[eo.AUTH_TYPE.API_KEY,eo.AUTH_TYPE.BEARER_TOKEN,eo.AUTH_TYPE.TOKEN,eo.AUTH_TYPE.BASIC],tT=[...tS,eo.AUTH_TYPE.OAUTH2,eo.AUTH_TYPE.AWS_SIGV4],tC="litellm-mcp-oauth-edit-state",tk=({mcpServer:e,accessToken:s,onCancel:r,onSuccess:d,availableAccessGroups:m})=>{let[u]=H.Form.useForm(),[x,p]=(0,b.useState)({}),[f,j]=(0,b.useState)([]),[y,v]=(0,b.useState)(!1),[N,w]=(0,b.useState)(""),[S,C]=(0,b.useState)(!1),[k,A]=(0,b.useState)([]),[I,P]=(0,b.useState)({}),[O,M]=(0,b.useState)({}),[F,E]=(0,b.useState)(null),[L,R]=(0,b.useState)(e.mcp_info?.logo_url||void 0),z=H.Form.useWatch("auth_type",u),U=H.Form.useWatch("transport",u),B="stdio"===U,q=U===eo.TRANSPORT.OPENAPI,V=!!z&&tS.includes(z),$=z===eo.AUTH_TYPE.OAUTH2,K=z===eo.AUTH_TYPE.AWS_SIGV4,W=H.Form.useWatch("oauth_flow_type",u),J=$&&W===eo.OAUTH_FLOW.M2M,[Y,G]=(0,b.useState)(null),Q=H.Form.useWatch("url",u),Z=H.Form.useWatch("spec_path",u),X=H.Form.useWatch("server_name",u),ee=H.Form.useWatch("auth_type",u),et=H.Form.useWatch("static_headers",u),es=H.Form.useWatch("credentials",u),er=H.Form.useWatch("authorization_url",u),el=H.Form.useWatch("token_url",u),ea=H.Form.useWatch("registration_url",u),{startOAuthFlow:ei,status:ed,error:em,tokenResponse:eu}=eQ({accessToken:s,getCredentials:()=>u.getFieldValue("credentials"),getTemporaryPayload:()=>{let t=u.getFieldsValue(!0),s=t.url||e.url,r=t.transport||e.transport;if(!s||!r)return null;let l=Array.isArray(t.static_headers)?t.static_headers.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value??""),e},{}):{};return{server_id:e.server_id,server_name:t.server_name||e.server_name||e.alias,alias:t.alias||e.alias,description:t.description||e.description,url:s,transport:r,auth_type:eo.AUTH_TYPE.OAUTH2,credentials:t.credentials,mcp_access_groups:t.mcp_access_groups||e.mcp_access_groups,static_headers:l,command:t.command,args:t.args,env:t.env}},onTokenReceived:e=>{if(G(e?.access_token??null),e?.access_token){let t={access_token:e.access_token,...e.refresh_token&&{refresh_token:e.refresh_token},...e.expires_in&&{expires_in:e.expires_in},...e.scope&&{scope:e.scope}};u.setFieldsValue({credentials:t}),T.default.success("OAuth authorization successful! Please click 'Update MCP Server' to save the credentials.")}},onBeforeRedirect:()=>{try{let t=u.getFieldsValue(!0);(0,eG.setSecureItem)(tC,JSON.stringify({serverId:e.server_id,formValues:t,costConfig:x,allowedTools:k,searchValue:N,aliasManuallyEdited:S}))}catch(e){console.warn("Failed to persist MCP edit state",e)}}}),ex=b.default.useMemo(()=>e.static_headers?Object.entries(e.static_headers).map(([e,t])=>({header:e,value:null!=t?String(t):""})):[],[e.static_headers]),ep=b.default.useMemo(()=>{let t=e.env??void 0;if(!t||0===Object.keys(t).length)return"";try{return JSON.stringify(t,null,2)}catch{return""}},[e.env]),eh=b.default.useMemo(()=>e.spec_path&&"stdio"!==e.transport?eo.TRANSPORT.OPENAPI:e.transport,[e]),eg=b.default.useMemo(()=>({...e,transport:eh,static_headers:ex,extra_headers:e.extra_headers||[],oauth_flow_type:e.token_url?eo.OAUTH_FLOW.M2M:eo.OAUTH_FLOW.INTERACTIVE,token_validation_json:e.token_validation?JSON.stringify(e.token_validation,null,2):void 0}),[e,eh,ex,ep]);(0,b.useEffect)(()=>{e.mcp_info?.mcp_server_cost_info&&p(e.mcp_info.mcp_server_cost_info)},[e]),(0,b.useEffect)(()=>{e.allowed_tools&&A(e.allowed_tools),P(e.tool_name_to_display_name??{}),M(e.tool_name_to_description??{})},[e]),(0,b.useEffect)(()=>{let t=(0,eG.getSecureItem)(tC);if(t)try{let s=JSON.parse(t);if(!s||s.serverId!==e.server_id)return;s.formValues&&E({...e,...s.formValues}),s.costConfig&&p(s.costConfig),s.allowedTools&&A(s.allowedTools),s.searchValue&&w(s.searchValue),"boolean"==typeof s.aliasManuallyEdited&&C(s.aliasManuallyEdited)}catch(e){console.error("Failed to restore MCP edit state",e)}finally{window.sessionStorage.removeItem(tC)}},[u,e]),(0,b.useEffect)(()=>{if(!F)return;let t=F.transport||e.transport;t&&t!==u.getFieldValue("transport")?u.setFieldsValue({transport:t}):(u.setFieldsValue(F),E(null))},[F,u,e.transport]),(0,b.useEffect)(()=>{if(e.mcp_access_groups){let t=e.mcp_access_groups.map(e=>"string"==typeof e?e:e.name||String(e));u.setFieldValue("mcp_access_groups",t)}},[e]),(0,b.useEffect)(()=>{e.server_id&&""!==e.server_id.trim()&&ej()},[e,s,Y]);let ej=async()=>{if(!s||"stdio"!==e.transport&&!e.url&&!e.spec_path)return;let t=e.auth_type===eo.AUTH_TYPE.OAUTH2&&!!e.token_url;if(e.auth_type!==eo.AUTH_TYPE.OAUTH2||t||Y){v(!0);try{let t={server_id:e.server_id,server_name:e.server_name,url:e.url,transport:e.transport,auth_type:e.auth_type,mcp_info:e.mcp_info,authorization_url:e.authorization_url,token_url:e.token_url,registration_url:e.registration_url,command:e.command,args:e.args,env:e.env},r=await (0,_.testMCPToolsListRequest)(s,t,Y);r.tools&&!r.error?j(r.tools):(console.error("Failed to fetch tools:",r.message),j([]))}catch(e){console.error("Tools fetch error:",e),j([])}finally{v(!1)}}},ey=async t=>{if(s)try{let{static_headers:r,credentials:l,stdio_config:a,env_json:n,command:i,args:o,allow_all_keys:c,available_on_public_internet:m,token_validation_json:u,...p}=t,h=(p.mcp_access_groups||[]).map(e=>"string"==typeof e?e:e.name||String(e)),g=Array.isArray(r)?r.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value??""),e},{}):{},f=l&&"object"==typeof l?Object.entries(l).reduce((e,[t,s])=>{if(null==s||""===s)return e;if("scopes"===t){if(Array.isArray(s)){let r=s.filter(e=>null!=e&&""!==e);r.length>0&&(e[t]=r)}}else e[t]=s;return e},{}):void 0,b={};if("stdio"===p.transport)if(a)try{let e=JSON.parse(a),t=e;if(e?.mcpServers&&"object"==typeof e.mcpServers){let s=Object.keys(e.mcpServers);s.length>0&&(t=e.mcpServers[s[0]])}let s=Array.isArray(t?.args)?t.args.map(e=>String(e)).filter(e=>""!==e.trim()):[],r=t?.env&&"object"==typeof t.env&&!Array.isArray(t.env)?Object.entries(t.env).reduce((e,[t,s])=>(null==t||""===String(t).trim()||(e[String(t)]=null==s?"":String(s)),e),{}):{};if(!(b={command:t?.command?String(t.command):void 0,args:s,env:r}).command)return void T.default.fromBackend("Stdio configuration must include a command")}catch{T.default.fromBackend("Invalid JSON in stdio configuration");return}else{let e={};if(n)try{let t=JSON.parse(n);t&&"object"==typeof t&&!Array.isArray(t)&&(e=Object.entries(t).reduce((e,[t,s])=>(null==t||""===String(t).trim()||(e[String(t)]=null==s?"":String(s)),e),{}))}catch{T.default.fromBackend("Invalid JSON in stdio env configuration");return}let t=Array.isArray(o)?o.map(e=>String(e)).filter(e=>""!==e.trim()):[],s=i?String(i).trim():"";if(!s)return void T.default.fromBackend("Stdio transport requires a command");b={command:s,args:t,env:e}}p.transport===eo.TRANSPORT.OPENAPI&&(p.transport="http");let j=null;if(u&&""!==u.trim())try{j=JSON.parse(u)}catch{T.default.fromBackend("Invalid JSON in Token Validation Rules");return}let y=p.server_name||p.url||e.server_name||e.url||p.alias||e.alias||"unknown",v={...p,...b,stdio_config:void 0,env_json:void 0,server_id:e.server_id,mcp_info:{server_name:y,description:p.description,logo_url:L||void 0,mcp_server_cost_info:Object.keys(x).length>0?x:null},mcp_access_groups:h,alias:p.alias,extra_headers:p.extra_headers||[],allowed_tools:k.length>0?k:null,tool_name_to_display_name:Object.keys(I).length>0?I:null,tool_name_to_description:Object.keys(O).length>0?O:null,disallowed_tools:p.disallowed_tools||[],static_headers:g,allow_all_keys:!!(c??e.allow_all_keys),available_on_public_internet:!!(m??e.available_on_public_internet),...null!==j||e.token_validation?{token_validation:j}:{}};p.auth_type&&tT.includes(p.auth_type)&&f&&Object.keys(f).length>0&&(v.credentials=f);let N=await (0,_.updateMCPServer)(s,v);T.default.success("MCP Server updated successfully"),d(N)}catch(e){T.default.fromBackend("Failed to update MCP Server"+(e?.message?`: ${e.message}`:""))}};return(0,t.jsxs)(n.TabGroup,{children:[(0,t.jsxs)(i.TabList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(a.Tab,{children:"Server Configuration"}),(0,t.jsx)(a.Tab,{children:"Cost Configuration"})]}),(0,t.jsxs)(c.TabPanels,{className:"mt-6",children:[(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)(H.Form,{form:u,onFinish:ey,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(H.Form.Item,{label:"MCP Server Name",name:"server_name",rules:[{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(D.Input,{className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:"Alias",name:"alias",rules:[{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(D.Input,{onChange:()=>C(!0),className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(D.Input,{className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(e$,{value:L,onChange:R}),(0,t.jsx)(H.Form.Item,{label:"Transport Type",name:"transport",rules:[{required:!0}],children:(0,t.jsxs)(h.Select,{onChange:e=>{"stdio"===e?u.setFieldsValue({url:void 0,spec_path:void 0,auth_type:void 0,credentials:void 0,authorization_url:void 0,token_url:void 0,registration_url:void 0}):e===eo.TRANSPORT.OPENAPI?u.setFieldsValue({url:void 0,command:void 0,args:void 0,env_json:void 0,stdio_config:void 0}):u.setFieldsValue({spec_path:void 0,command:void 0,args:void 0,env_json:void 0,stdio_config:void 0})},children:[(0,t.jsx)(h.Select.Option,{value:"http",children:"Streamable HTTP (Recommended)"}),(0,t.jsx)(h.Select.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(h.Select.Option,{value:"stdio",children:"Standard Input/Output (stdio)"}),(0,t.jsx)(h.Select.Option,{value:eo.TRANSPORT.OPENAPI,children:"OpenAPI Spec"})]})}),!B&&!q&&(0,t.jsx)(H.Form.Item,{label:"MCP Server URL",name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,t)=>eK(t)}],children:(0,t.jsx)(D.Input,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),q&&(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OpenAPI Spec URL",(0,t.jsx)(g.Tooltip,{title:"URL to an OpenAPI specification (JSON or YAML). MCP tools will be automatically generated from the API endpoints defined in the spec.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"spec_path",rules:[{required:!0,message:"Please enter an OpenAPI spec URL"}],children:(0,t.jsx)(D.Input,{placeholder:"https://petstore3.swagger.io/api/v3/openapi.json",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!B&&(0,t.jsx)(H.Form.Item,{label:"Authentication",name:"auth_type",rules:[{required:!0}],children:(0,t.jsxs)(h.Select,{children:[(0,t.jsx)(h.Select.Option,{value:"none",children:"None"}),(0,t.jsx)(h.Select.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(h.Select.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(h.Select.Option,{value:"token",children:"Token"}),(0,t.jsx)(h.Select.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(h.Select.Option,{value:"oauth2",children:"OAuth"}),(0,t.jsx)(h.Select.Option,{value:"aws_sigv4",children:"AWS SigV4 (Bedrock AgentCore MCPs)"})]})}),B&&(0,t.jsxs)("div",{className:"rounded-lg border border-gray-200 p-4 space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Configure the stdio transport used to launch the MCP server process. You can either fill in the fields below or paste a JSON configuration."}),(0,t.jsx)(H.Form.Item,{label:"Command",name:"command",rules:[{required:!0,message:"Please enter a command for stdio transport"}],children:(0,t.jsx)(D.Input,{placeholder:"e.g., npx",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:"Args",name:"args",children:(0,t.jsx)(h.Select,{mode:"tags",size:"large",tokenSeparators:[","],placeholder:"Add args (press enter or comma)",className:"rounded-lg"})}),(0,t.jsx)(H.Form.Item,{label:"Environment (JSON object)",name:"env_json",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if(e&&"object"==typeof e&&!Array.isArray(e))return Promise.resolve();return Promise.reject(Error("Env must be a JSON object"))}catch{return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(D.Input.TextArea,{rows:6,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 font-mono text-sm",placeholder:`{ "KEY": "value" -}`})}),(0,t.jsx)(eO,{isVisible:!0,required:!1})]}),!B&&V&&(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(g.Tooltip,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","auth_value"],rules:[{validator:(e,t)=>t&&"string"==typeof t&&""===t.trim()?Promise.reject(Error("Authentication value cannot be empty")):Promise.resolve()}],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter token or secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!B&&$&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client ID (optional)",(0,t.jsx)(g.Tooltip,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_id"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter OAuth client ID (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client Secret (optional)",(0,t.jsx)(g.Tooltip,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_secret"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter OAuth client secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Scopes (optional)",(0,t.jsx)(g.Tooltip,{title:"Add scopes to override the default scope list used for this MCP server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","scopes"],children:(0,t.jsx)(h.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authorization URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the authorization endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"authorization_url",children:(0,t.jsx)(D.Input,{placeholder:"https://example.com/oauth/authorize",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the token endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_url",children:(0,t.jsx)(D.Input,{placeholder:"https://example.com/oauth/token",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Registration URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the dynamic client registration endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"registration_url",children:(0,t.jsx)(D.Input,{placeholder:"https://example.com/oauth/register",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!J&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token Validation Rules (optional)",(0,t.jsx)(g.Tooltip,{title:'JSON object of key-value rules checked against the OAuth token response before storing. Supports dot-notation for nested fields (e.g. {"organization": "my-org", "team.id": "123"}). Tokens that fail validation are rejected with HTTP 403.',children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_validation_json",rules:[{validator:(e,t)=>{if(!t||""===t.trim())return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject(Error("Must be valid JSON"))}}}],children:(0,t.jsx)(D.Input.TextArea,{placeholder:'{\n "organization": "my-org",\n "team.id": "123"\n}',rows:4,className:"font-mono text-sm rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token Storage TTL (seconds, optional)",(0,t.jsx)(g.Tooltip,{title:"How long to cache each user's OAuth access token in Redis before evicting it (regardless of the token's own expires_in). Leave blank to derive the TTL from the token's expires_in, or fall back to the 12-hour default.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_storage_ttl_seconds",children:(0,t.jsx)(ec.InputNumber,{min:1,placeholder:"e.g. 3600",style:{width:"100%"},className:"rounded-lg"})})]}),(0,t.jsxs)("div",{className:"rounded-lg border border-dashed border-gray-300 p-4 space-y-2",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Use OAuth to fetch a fresh access token and temporarily save it in the session as the authentication value."}),(0,t.jsx)(l.Button,{variant:"secondary",onClick:ei,disabled:"authorizing"===ed||"exchanging"===ed,children:"authorizing"===ed?"Waiting for authorization...":"exchanging"===ed?"Exchanging authorization code...":"Authorize & Fetch Token"}),em&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:em}),"success"===ed&&eu?.access_token&&(0,t.jsxs)("p",{className:"text-sm text-green-600",children:["Token fetched. Expires in ",eu.expires_in??"?"," seconds."]})]})]}),!B&&K&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-2",children:["For MCP servers hosted on AWS Bedrock AgentCore."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/mcp_aws_sigv4",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700",children:"View docs →"})]}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Region",(0,t.jsx)(g.Tooltip,{title:"AWS region for SigV4 signing (e.g., us-east-1)",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_region_name"],rules:[],children:(0,t.jsx)(D.Input,{placeholder:"us-east-1 (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Service Name",(0,t.jsx)(g.Tooltip,{title:"AWS service name for SigV4 signing. Defaults to 'bedrock-agentcore'.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_service_name"],children:(0,t.jsx)(D.Input,{placeholder:"bedrock-agentcore (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Access Key ID",(0,t.jsx)(g.Tooltip,{title:"Optional. If not provided, falls back to the boto3 credential chain (IAM role, env vars, etc.).",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_access_key_id"],rules:[],children:(0,t.jsx)(D.Input.Password,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Secret Access Key",(0,t.jsx)(g.Tooltip,{title:"Optional. Required if AWS Access Key ID is provided.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_secret_access_key"],rules:[],children:(0,t.jsx)(D.Input.Password,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Token",(0,t.jsx)(g.Tooltip,{title:"Optional. Only needed for temporary STS credentials.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_token"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Role ARN",(0,t.jsx)(g.Tooltip,{title:"Optional. IAM role ARN to assume via STS before signing. If set, LiteLLM calls sts:AssumeRole to get temporary credentials.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_role_name"],children:(0,t.jsx)(D.Input,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Name",(0,t.jsx)(g.Tooltip,{title:"Optional. Session name for the AssumeRole call — appears in CloudTrail logs. Auto-generated if omitted.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_name"],children:(0,t.jsx)(D.Input,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(eR,{availableAccessGroups:m,mcpServer:e,searchValue:N,setSearchValue:w,getAccessGroupOptions:()=>{let e=m.map(e=>({value:e,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})}));return N&&!m.some(e=>e.toLowerCase().includes(N.toLowerCase()))&&e.push({value:N,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:N}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-1",children:"create new group"})]})}),e}})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(eP,{accessToken:s,oauthAccessToken:Y,formValues:{server_id:e.server_id,server_name:X??e.server_name,url:Q??e.url,spec_path:Z??e.spec_path,transport:U??e.transport,auth_type:ee??e.auth_type,mcp_info:e.mcp_info,oauth_flow_type:el??e.token_url?eo.OAUTH_FLOW.M2M:eo.OAUTH_FLOW.INTERACTIVE,static_headers:et??e.static_headers,credentials:es,authorization_url:er??e.authorization_url,token_url:el??e.token_url,registration_url:ea??e.registration_url},allowedTools:k,existingAllowedTools:e.allowed_tools||null,onAllowedToolsChange:A,toolNameToDisplayName:I,toolNameToDescription:O,onToolNameToDisplayNameChange:P,onToolNameToDescriptionChange:M})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(eb.Button,{onClick:r,children:"Cancel"}),(0,t.jsx)(l.Button,{type:"submit",children:"Save Changes"})]})]})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(ef,{value:x,onChange:p,tools:f,disabled:y}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(eb.Button,{onClick:r,children:"Cancel"}),(0,t.jsx)(l.Button,{onClick:()=>u.submit(),children:"Save Changes"})]})]})})]})]})},tI=({costConfig:e})=>{let s=e?.default_cost_per_query!==void 0&&e?.default_cost_per_query!==null,r=e?.tool_name_to_cost_per_query&&Object.keys(e.tool_name_to_cost_per_query).length>0;return s||r?(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200",children:(0,t.jsxs)("div",{className:"space-y-4",children:[s&&e?.default_cost_per_query!==void 0&&e?.default_cost_per_query!==null&&(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"font-medium",children:"Default Cost per Query"}),(0,t.jsxs)("div",{className:"text-green-600 font-mono",children:["$",e.default_cost_per_query.toFixed(4)]})]}),r&&e?.tool_name_to_cost_per_query&&(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"font-medium",children:"Tool-Specific Costs"}),(0,t.jsx)("div",{className:"mt-2 space-y-2",children:Object.entries(e.tool_name_to_cost_per_query).map(([e,s])=>null!=s&&(0,t.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,t.jsx)(d.Text,{className:"font-medium",children:e}),(0,t.jsxs)(d.Text,{className:"text-green-600 font-mono",children:["$",s.toFixed(4)," per query"]})]},e))})]}),(0,t.jsxs)("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsx)(d.Text,{className:"text-blue-800 font-medium",children:"Cost Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[s&&e?.default_cost_per_query!==void 0&&e?.default_cost_per_query!==null&&(0,t.jsxs)(d.Text,{className:"text-blue-700",children:["• Default cost: $",e.default_cost_per_query.toFixed(4)," per query"]}),r&&e?.tool_name_to_cost_per_query&&(0,t.jsxs)(d.Text,{className:"text-blue-700",children:["• ",Object.keys(e.tool_name_to_cost_per_query).length," tool(s) with custom pricing"]})]})]})]})}):(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200",children:(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsx)("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded-lg",children:(0,t.jsx)(d.Text,{className:"text-gray-600",children:"No cost configuration set for this server. Tool calls will be charged at $0.00 per tool call."})})})})},tP=({mcpServer:e,onBack:s,isEditing:r,isProxyAdmin:u,accessToken:x,userRole:p,userID:h,availableAccessGroups:g})=>{let[f,j]=(0,b.useState)(r),[y,v]=(0,b.useState)(!1),[N,_]=(0,b.useState)({}),[w,S]=(0,b.useState)(0),T=e.url??"",{maskedUrl:C,hasToken:A}=T?eD(T):{maskedUrl:"—",hasToken:!1},I=(e,t)=>e?A?t?e:C:e:"—",P=async(e,t)=>{await (0,tl.copyToClipboard)(e)&&(_(e=>({...e,[t]:!0})),setTimeout(()=>{_(e=>({...e,[t]:!1}))},2e3))},O=e=>{let s=e.toUpperCase();return(0,t.jsx)("span",{className:"inline-flex items-center text-sm font-medium px-2.5 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:s})},M=e=>(0,t.jsx)("span",{className:"inline-flex items-center text-sm font-medium px-2.5 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:e});return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(l.Button,{icon:tp.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Servers"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(m.Title,{className:"text-2xl",children:e.server_name||e.alias||"Unnamed Server"}),(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:N["mcp-server_name"]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(e3.CopyIcon,{size:12}),onClick:()=>P(e.server_name||e.alias,"mcp-server_name"),className:`transition-all duration-200 ${N["mcp-server_name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`}),e.alias&&e.server_name&&e.alias!==e.server_name&&(0,t.jsx)("span",{className:"ml-2 inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-gray-100 text-gray-600 border border-gray-200 font-mono",children:e.alias})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[(0,t.jsx)(d.Text,{className:"text-gray-400 font-mono text-xs",children:e.server_id}),(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:N["mcp-server-id"]?(0,t.jsx)(k.CheckIcon,{size:10}):(0,t.jsx)(e3.CopyIcon,{size:10}),onClick:()=>P(e.server_id,"mcp-server-id"),className:`transition-all duration-200 ${N["mcp-server-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-300 hover:text-gray-500 hover:bg-gray-50"}`})]}),e.description&&(0,t.jsx)(d.Text,{className:"text-gray-500 mt-2",children:e.description})]}),(0,t.jsxs)(n.TabGroup,{index:w,onIndexChange:S,children:[(0,t.jsx)(i.TabList,{className:"mb-4",children:[(0,t.jsx)(a.Tab,{children:"Overview"},"overview"),(0,t.jsx)(a.Tab,{children:"MCP Tools"},"tools"),...u?[(0,t.jsx)(a.Tab,{children:"Settings"},"settings")]:[]]}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsxs)(o.TabPanel,{children:[(0,t.jsxs)(tf.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-4",children:[(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Transport"}),(0,t.jsx)("div",{className:"mt-3",children:O((0,eo.handleTransport)(e.transport??void 0,e.spec_path??void 0))})]}),(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Authentication"}),(0,t.jsx)("div",{className:"mt-3",children:M((0,eo.handleAuth)(e.auth_type??void 0))})]}),(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Host URL"}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(d.Text,{className:"break-all overflow-wrap-anywhere font-mono text-sm",children:I(e.url,y)}),A&&(0,t.jsx)("button",{onClick:()=>v(!y),className:"p-1 hover:bg-gray-100 rounded flex-shrink-0",children:(0,t.jsx)(td.Icon,{icon:y?tg:th.EyeIcon,size:"sm",className:"text-gray-500"})})]})]})]}),(0,t.jsxs)(eg.Card,{className:"mt-4 p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Cost Configuration"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(tI,{costConfig:e.mcp_info?.mcp_server_cost_info})})]})]}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tS,{serverId:e.server_id,accessToken:x,auth_type:e.auth_type,userRole:p,userID:h,serverAlias:e.alias,extraHeaders:e.extra_headers})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)(eg.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(m.Title,{children:"MCP Server Settings"}),f?null:(0,t.jsx)(l.Button,{variant:"light",onClick:()=>j(!0),children:"Edit Settings"})]}),f?(0,t.jsx)(tA,{mcpServer:e,accessToken:x,onCancel:()=>j(!1),onSuccess:e=>{j(!1),s()},availableAccessGroups:g}):(0,t.jsxs)("div",{className:"divide-y divide-gray-100",children:[(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Server Name"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.server_name||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Alias"}),(0,t.jsx)("div",{className:"col-span-2 text-sm font-mono text-gray-900",children:e.alias||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Description"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.description||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"URL"}),(0,t.jsxs)("div",{className:"col-span-2 text-sm font-mono text-gray-900 break-all flex items-center gap-2",children:[I(e.url,y),A&&(0,t.jsx)("button",{onClick:()=>v(!y),className:"p-1 hover:bg-gray-100 rounded flex-shrink-0",children:(0,t.jsx)(td.Icon,{icon:y?tg:th.EyeIcon,size:"sm",className:"text-gray-500"})})]})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Transport"}),(0,t.jsx)("div",{className:"col-span-2",children:O((0,eo.handleTransport)(e.transport,e.spec_path))})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Authentication"}),(0,t.jsx)("div",{className:"col-span-2",children:M((0,eo.handleAuth)(e.auth_type))})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Extra Headers"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.extra_headers&&e.extra_headers.length>0?e.extra_headers.join(", "):(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Allow All Keys"}),(0,t.jsx)("div",{className:"col-span-2",children:e.allow_all_keys?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Enabled"]}):(0,t.jsx)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-gray-50 text-gray-600 rounded-full border border-gray-200 text-xs font-medium",children:"Disabled"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Network Access"}),(0,t.jsx)("div",{className:"col-span-2",children:e.available_on_public_internet?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Public"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-orange-50 text-orange-700 rounded-full border border-orange-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-orange-500"}),"Internal only"]})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Access Groups"}),(0,t.jsx)("div",{className:"col-span-2",children:e.mcp_access_groups&&e.mcp_access_groups.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.mcp_access_groups.map((e,s)=>(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-gray-100 text-gray-700 border border-gray-200",children:"string"==typeof e?e:e?.name??""},s))}):(0,t.jsx)("span",{className:"text-sm text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Allowed Tools"}),(0,t.jsx)("div",{className:"col-span-2",children:e.allowed_tools&&e.allowed_tools.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.allowed_tools.map((e,s)=>(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-mono font-medium px-2 py-0.5 rounded bg-blue-50 text-blue-700 border border-blue-200",children:e},s))}):(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-green-50 text-green-700 border border-green-200",children:"All tools enabled"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Cost"}),(0,t.jsx)("div",{className:"col-span-2",children:(0,t.jsx)(tI,{costConfig:e.mcp_info?.mcp_server_cost_info})})]})]})]})})]})]})]})},tO=(0,N.createQueryKeys)("mcpSemanticFilterSettings"),tM=(0,N.createQueryKeys)("mcpSemanticFilterSettings");var tF=e.i(178654),tE=e.i(621192),tL=e.i(981339),tR=e.i(850627),tz=e.i(987432),tU=e.i(689020),tB=e.i(245094),tq=e.i(788191),tV=e.i(653496),t$=e.i(992619);function tH({accessToken:e,testQuery:s,setTestQuery:r,testModel:l,setTestModel:a,isTesting:n,onTest:i,filterEnabled:o,testResult:c,curlCommand:d}){return(0,t.jsx)(e6.Card,{title:"Test Configuration",style:{marginBottom:16},children:(0,t.jsx)(tV.Tabs,{defaultActiveKey:"test",items:[{key:"test",label:"Test",children:(0,t.jsxs)(eM.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:[(0,t.jsx)(tq.PlayCircleOutlined,{})," Test Query"]}),(0,t.jsx)(D.Input.TextArea,{placeholder:"Enter a test query to see which tools would be selected...",value:s,onChange:e=>r(e.target.value),rows:4,disabled:n})]}),(0,t.jsx)("div",{children:(0,t.jsx)(t$.default,{accessToken:e||"",value:l,onChange:a,disabled:n,showLabel:!0,labelText:"Select Model"})}),(0,t.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tq.PlayCircleOutlined,{}),onClick:i,loading:n,disabled:!s||!l||!o,block:!0,children:"Test Filter"}),!o&&(0,t.jsx)(ej.Alert,{type:"warning",message:"Semantic filtering is disabled",description:"Enable semantic filtering and save settings to test the filter.",showIcon:!0}),c&&(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Typography.Title,{level:5,children:"Results"}),(0,t.jsx)(ej.Alert,{type:"success",message:`${c.selectedTools} tools selected`,description:`Filtered from ${c.totalTools} available tools`,showIcon:!0,style:{marginBottom:16}}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:"Selected Tools:"}),(0,t.jsx)("ul",{style:{paddingLeft:20,margin:0},children:c.tools.map((e,s)=>(0,t.jsx)("li",{style:{marginBottom:4},children:(0,t.jsx)(f.Typography.Text,{children:e})},s))})]})]})]})},{key:"api",label:"API Usage",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(eM.Space,{style:{marginBottom:8},children:[(0,t.jsx)(tB.CodeOutlined,{}),(0,t.jsx)(f.Typography.Text,{strong:!0,children:"API Usage"})]}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block",marginBottom:8},children:"Use this curl command to test the semantic filter with your current configuration."}),(0,t.jsx)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:"Response headers to check:"}),(0,t.jsxs)("ul",{style:{paddingLeft:20,margin:"0 0 12px 0"},children:[(0,t.jsxs)("li",{children:[(0,t.jsx)(f.Typography.Text,{children:"x-litellm-semantic-filter: shows total tools → selected tools"}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block"},children:"Example: 10→3"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)(f.Typography.Text,{children:"x-litellm-semantic-filter-tools: CSV of selected tool names"}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block"},children:"Example: wikipedia-fetch,github-search,slack-post"})]})]}),(0,t.jsx)("pre",{style:{background:"#f5f5f5",padding:12,borderRadius:4,overflow:"auto",fontSize:12,margin:0},children:d})]})}]})})}let tD=async({accessToken:e,testModel:t,testQuery:s,setIsTesting:r,setTestResult:l})=>{if(!s||!t||!e)return void T.default.error("Please enter a query and select a model");r(!0),l(null);try{let{headers:r}=await (0,_.testMCPSemanticFilter)(e,t,s),a=(e=>{if(!e.filter)return null;let[t,s]=e.filter.split("->").map(Number);return{totalTools:t,selectedTools:s,tools:e.tools?e.tools.split(",").map(e=>e.trim()):[]}})(r);if(!a)return void T.default.warning("Semantic filter is not enabled or no tools were filtered");l(a),T.default.success("Semantic filter test completed successfully")}catch(e){console.error("Test failed:",e),T.default.error("Failed to test semantic filter")}finally{r(!1)}};function tK({accessToken:e}){var s;let l,{data:a,isLoading:n,isError:i,error:o}=(()=>{let{accessToken:e}=(0,w.default)();return(0,y.useQuery)({queryKey:tO.list({}),queryFn:async()=>await (0,_.getMCPSemanticFilterSettings)(e),enabled:!!e,staleTime:36e5,gcTime:36e5})})(),{mutate:c,isPending:d,error:m}=(s=e||"",l=(0,v.useQueryClient)(),(0,tb.useMutation)({mutationFn:async e=>{if(!s)throw Error("Access token is required");return(0,_.updateMCPSemanticFilterSettings)(s,e)},onSuccess:()=>{l.invalidateQueries({queryKey:tM.all})}})),[u]=H.Form.useForm(),[x,p]=(0,b.useState)(!1),[j,N]=(0,b.useState)(!1),[S,C]=(0,b.useState)([]),[k,A]=(0,b.useState)(!0),[I,P]=(0,b.useState)(""),[O,M]=(0,b.useState)("gpt-4o"),[F,E]=(0,b.useState)(null),[L,R]=(0,b.useState)(!1),z=a?.field_schema,U=a?.values??{};(0,b.useEffect)(()=>{(async()=>{if(e)try{A(!0);let t=(await (0,tU.fetchAvailableModels)(e)).filter(e=>"embedding"===e.mode);C(t)}catch(e){console.error("Error fetching embedding models:",e)}finally{A(!1)}})()},[e]),(0,b.useEffect)(()=>{U&&(u.setFieldsValue({enabled:U.enabled??!1,embedding_model:U.embedding_model??"text-embedding-3-small",top_k:U.top_k??10,similarity_threshold:U.similarity_threshold??.3}),N(!1))},[U,u]);let B=async()=>{try{let e=await u.validateFields();c(e,{onSuccess:()=>{N(!1),p(!0),setTimeout(()=>p(!1),3e3),T.default.success("Settings updated successfully. Changes will be applied across all pods within 10 seconds.")},onError:e=>{T.default.fromBackend(e)}})}catch(e){console.error("Form validation failed:",e)}},q=async()=>{e&&await tD({accessToken:e,testModel:O,testQuery:I,setIsTesting:R,setTestResult:E})};return e?(0,t.jsx)("div",{style:{width:"100%"},children:n?(0,t.jsx)(tL.Skeleton,{active:!0}):i?(0,t.jsx)(ej.Alert,{type:"error",message:"Could not load MCP Semantic Filter settings",description:o instanceof Error?o.message:void 0,style:{marginBottom:24}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ej.Alert,{type:"info",message:"Semantic Tool Filtering",description:"Filter MCP tools semantically based on query relevance. This reduces context window size and improves tool selection accuracy. Click 'Save Settings' to apply changes across all pods (takes effect within 10 seconds).",showIcon:!0,style:{marginBottom:24}}),x&&(0,t.jsx)(ej.Alert,{type:"success",message:"Settings saved successfully",icon:(0,t.jsx)(ey.CheckCircleOutlined,{}),showIcon:!0,closable:!0,style:{marginBottom:16}}),m&&(0,t.jsx)(ej.Alert,{type:"error",message:"Could not update settings",description:m instanceof Error?m.message:void 0,style:{marginBottom:16}}),(0,t.jsxs)(tE.Row,{gutter:24,children:[(0,t.jsx)(tF.Col,{xs:24,lg:12,children:(0,t.jsxs)(H.Form,{form:u,layout:"vertical",disabled:d,onValuesChange:()=>{N(!0)},children:[(0,t.jsxs)(e6.Card,{style:{marginBottom:16},children:[(0,t.jsx)(H.Form.Item,{name:"enabled",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Enable Semantic Filtering"}),(0,t.jsx)(g.Tooltip,{title:"When enabled, only the most relevant MCP tools will be included in requests based on semantic similarity",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),valuePropName:"checked",children:(0,t.jsx)(el.Switch,{disabled:d})}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block",marginTop:-16,marginBottom:16},children:z?.properties?.enabled?.description})]}),(0,t.jsxs)(e6.Card,{title:"Configuration",style:{marginBottom:16},children:[(0,t.jsx)(H.Form.Item,{name:"embedding_model",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Embedding Model"}),(0,t.jsx)(g.Tooltip,{title:"The model used to generate embeddings for semantic matching",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(h.Select,{options:S.map(e=>({label:e.model_group,value:e.model_group})),placeholder:k?"Loading models...":"Select embedding model",showSearch:!0,disabled:d||k,loading:k,notFoundContent:k?"Loading...":"No embedding models available"})}),(0,t.jsx)(H.Form.Item,{name:"top_k",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Top K Results"}),(0,t.jsx)(g.Tooltip,{title:"Maximum number of tools to return after filtering",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(ec.InputNumber,{min:1,max:100,style:{width:"100%"},disabled:d})}),(0,t.jsx)(H.Form.Item,{name:"similarity_threshold",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Similarity Threshold"}),(0,t.jsx)(g.Tooltip,{title:"Minimum similarity score (0-1) for a tool to be included",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(tR.Slider,{min:0,max:1,step:.05,marks:{0:"0.0",.3:"0.3",.5:"0.5",.7:"0.7",1:"1.0"},disabled:d})})]}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,t.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tz.SaveOutlined,{}),onClick:B,loading:d,disabled:!j,children:"Save Settings"})})]})}),(0,t.jsx)(tF.Col,{xs:24,lg:12,children:(0,t.jsx)(tH,{accessToken:e,testQuery:I,setTestQuery:P,testModel:O,setTestModel:M,isTesting:L,onTest:q,filterEnabled:!!U.enabled,testResult:F,curlCommand:`curl --location 'http://localhost:4000/v1/responses' \\ +}`})}),(0,t.jsx)(eO,{isVisible:!0,required:!1})]}),!B&&V&&(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(g.Tooltip,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","auth_value"],rules:[{validator:(e,t)=>t&&"string"==typeof t&&""===t.trim()?Promise.reject(Error("Authentication value cannot be empty")):Promise.resolve()}],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter token or secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!B&&$&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client ID (optional)",(0,t.jsx)(g.Tooltip,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_id"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter OAuth client ID (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client Secret (optional)",(0,t.jsx)(g.Tooltip,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_secret"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter OAuth client secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Scopes (optional)",(0,t.jsx)(g.Tooltip,{title:"Add scopes to override the default scope list used for this MCP server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","scopes"],children:(0,t.jsx)(h.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authorization URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the authorization endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"authorization_url",children:(0,t.jsx)(D.Input,{placeholder:"https://example.com/oauth/authorize",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the token endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_url",children:(0,t.jsx)(D.Input,{placeholder:"https://example.com/oauth/token",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Registration URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the dynamic client registration endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"registration_url",children:(0,t.jsx)(D.Input,{placeholder:"https://example.com/oauth/register",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!J&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token Validation Rules (optional)",(0,t.jsx)(g.Tooltip,{title:'JSON object of key-value rules checked against the OAuth token response before storing. Supports dot-notation for nested fields (e.g. {"organization": "my-org", "team.id": "123"}). Tokens that fail validation are rejected with HTTP 403.',children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_validation_json",rules:[{validator:(e,t)=>{if(!t||""===t.trim())return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject(Error("Must be valid JSON"))}}}],children:(0,t.jsx)(D.Input.TextArea,{placeholder:'{\n "organization": "my-org",\n "team.id": "123"\n}',rows:4,className:"font-mono text-sm rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token Storage TTL (seconds, optional)",(0,t.jsx)(g.Tooltip,{title:"How long to cache each user's OAuth access token in Redis before evicting it (regardless of the token's own expires_in). Leave blank to derive the TTL from the token's expires_in, or fall back to the 12-hour default.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_storage_ttl_seconds",children:(0,t.jsx)(ec.InputNumber,{min:1,placeholder:"e.g. 3600",style:{width:"100%"},className:"rounded-lg"})})]}),(0,t.jsxs)("div",{className:"rounded-lg border border-dashed border-gray-300 p-4 space-y-2",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Use OAuth to fetch a fresh access token and temporarily save it in the session as the authentication value."}),(0,t.jsx)(l.Button,{variant:"secondary",onClick:ei,disabled:"authorizing"===ed||"exchanging"===ed,children:"authorizing"===ed?"Waiting for authorization...":"exchanging"===ed?"Exchanging authorization code...":"Authorize & Fetch Token"}),em&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:em}),"success"===ed&&eu?.access_token&&(0,t.jsxs)("p",{className:"text-sm text-green-600",children:["Token fetched. Expires in ",eu.expires_in??"?"," seconds."]})]})]}),!B&&K&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-2",children:["For MCP servers hosted on AWS Bedrock AgentCore."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/mcp_aws_sigv4",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700",children:"View docs →"})]}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Region",(0,t.jsx)(g.Tooltip,{title:"AWS region for SigV4 signing (e.g., us-east-1)",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_region_name"],rules:[],children:(0,t.jsx)(D.Input,{placeholder:"us-east-1 (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Service Name",(0,t.jsx)(g.Tooltip,{title:"AWS service name for SigV4 signing. Defaults to 'bedrock-agentcore'.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_service_name"],children:(0,t.jsx)(D.Input,{placeholder:"bedrock-agentcore (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Access Key ID",(0,t.jsx)(g.Tooltip,{title:"Optional. If not provided, falls back to the boto3 credential chain (IAM role, env vars, etc.).",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_access_key_id"],rules:[],children:(0,t.jsx)(D.Input.Password,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Secret Access Key",(0,t.jsx)(g.Tooltip,{title:"Optional. Required if AWS Access Key ID is provided.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_secret_access_key"],rules:[],children:(0,t.jsx)(D.Input.Password,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Token",(0,t.jsx)(g.Tooltip,{title:"Optional. Only needed for temporary STS credentials.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_token"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Role ARN",(0,t.jsx)(g.Tooltip,{title:"Optional. IAM role ARN to assume via STS before signing. If set, LiteLLM calls sts:AssumeRole to get temporary credentials.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_role_name"],children:(0,t.jsx)(D.Input,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Session Name",(0,t.jsx)(g.Tooltip,{title:"Optional. Session name for the AssumeRole call — appears in CloudTrail logs. Auto-generated if omitted.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_name"],children:(0,t.jsx)(D.Input,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(eR,{availableAccessGroups:m,mcpServer:e,searchValue:N,setSearchValue:w,getAccessGroupOptions:()=>{let e=m.map(e=>({value:e,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})}));return N&&!m.some(e=>e.toLowerCase().includes(N.toLowerCase()))&&e.push({value:N,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:N}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-1",children:"create new group"})]})}),e}})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(eP,{accessToken:s,oauthAccessToken:Y,formValues:{server_id:e.server_id,server_name:X??e.server_name,url:Q??e.url,spec_path:Z??e.spec_path,transport:U??e.transport,auth_type:ee??e.auth_type,mcp_info:e.mcp_info,oauth_flow_type:el??e.token_url?eo.OAUTH_FLOW.M2M:eo.OAUTH_FLOW.INTERACTIVE,static_headers:et??e.static_headers,credentials:es,authorization_url:er??e.authorization_url,token_url:el??e.token_url,registration_url:ea??e.registration_url},allowedTools:k,existingAllowedTools:e.allowed_tools||null,onAllowedToolsChange:A,toolNameToDisplayName:I,toolNameToDescription:O,onToolNameToDisplayNameChange:P,onToolNameToDescriptionChange:M})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(eb.Button,{onClick:r,children:"Cancel"}),(0,t.jsx)(l.Button,{type:"submit",children:"Save Changes"})]})]})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(ef,{value:x,onChange:p,tools:f,disabled:y}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(eb.Button,{onClick:r,children:"Cancel"}),(0,t.jsx)(l.Button,{onClick:()=>u.submit(),children:"Save Changes"})]})]})})]})]})},tA=({costConfig:e})=>{let s=e?.default_cost_per_query!==void 0&&e?.default_cost_per_query!==null,r=e?.tool_name_to_cost_per_query&&Object.keys(e.tool_name_to_cost_per_query).length>0;return s||r?(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200",children:(0,t.jsxs)("div",{className:"space-y-4",children:[s&&e?.default_cost_per_query!==void 0&&e?.default_cost_per_query!==null&&(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"font-medium",children:"Default Cost per Query"}),(0,t.jsxs)("div",{className:"text-green-600 font-mono",children:["$",e.default_cost_per_query.toFixed(4)]})]}),r&&e?.tool_name_to_cost_per_query&&(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"font-medium",children:"Tool-Specific Costs"}),(0,t.jsx)("div",{className:"mt-2 space-y-2",children:Object.entries(e.tool_name_to_cost_per_query).map(([e,s])=>null!=s&&(0,t.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,t.jsx)(d.Text,{className:"font-medium",children:e}),(0,t.jsxs)(d.Text,{className:"text-green-600 font-mono",children:["$",s.toFixed(4)," per query"]})]},e))})]}),(0,t.jsxs)("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsx)(d.Text,{className:"text-blue-800 font-medium",children:"Cost Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[s&&e?.default_cost_per_query!==void 0&&e?.default_cost_per_query!==null&&(0,t.jsxs)(d.Text,{className:"text-blue-700",children:["• Default cost: $",e.default_cost_per_query.toFixed(4)," per query"]}),r&&e?.tool_name_to_cost_per_query&&(0,t.jsxs)(d.Text,{className:"text-blue-700",children:["• ",Object.keys(e.tool_name_to_cost_per_query).length," tool(s) with custom pricing"]})]})]})]})}):(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200",children:(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsx)("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded-lg",children:(0,t.jsx)(d.Text,{className:"text-gray-600",children:"No cost configuration set for this server. Tool calls will be charged at $0.00 per tool call."})})})})},tI=({mcpServer:e,onBack:s,isEditing:r,isProxyAdmin:u,accessToken:x,userRole:p,userID:h,availableAccessGroups:g})=>{let[f,j]=(0,b.useState)(r),[y,v]=(0,b.useState)(!1),[N,_]=(0,b.useState)({}),[w,S]=(0,b.useState)(0),T=e.url??"",{maskedUrl:C,hasToken:A}=T?eD(T):{maskedUrl:"—",hasToken:!1},I=(e,t)=>e?A?t?e:C:e:"—",P=async(e,t)=>{await (0,tr.copyToClipboard)(e)&&(_(e=>({...e,[t]:!0})),setTimeout(()=>{_(e=>({...e,[t]:!1}))},2e3))},O=e=>{let s=e.toUpperCase();return(0,t.jsx)("span",{className:"inline-flex items-center text-sm font-medium px-2.5 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:s})},M=e=>(0,t.jsx)("span",{className:"inline-flex items-center text-sm font-medium px-2.5 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:e});return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(l.Button,{icon:tx.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Servers"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(m.Title,{className:"text-2xl",children:e.server_name||e.alias||"Unnamed Server"}),(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:N["mcp-server_name"]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(e6.CopyIcon,{size:12}),onClick:()=>P(e.server_name||e.alias,"mcp-server_name"),className:`transition-all duration-200 ${N["mcp-server_name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`}),e.alias&&e.server_name&&e.alias!==e.server_name&&(0,t.jsx)("span",{className:"ml-2 inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-gray-100 text-gray-600 border border-gray-200 font-mono",children:e.alias})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[(0,t.jsx)(d.Text,{className:"text-gray-400 font-mono text-xs",children:e.server_id}),(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:N["mcp-server-id"]?(0,t.jsx)(k.CheckIcon,{size:10}):(0,t.jsx)(e6.CopyIcon,{size:10}),onClick:()=>P(e.server_id,"mcp-server-id"),className:`transition-all duration-200 ${N["mcp-server-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-300 hover:text-gray-500 hover:bg-gray-50"}`})]}),e.description&&(0,t.jsx)(d.Text,{className:"text-gray-500 mt-2",children:e.description})]}),(0,t.jsxs)(n.TabGroup,{index:w,onIndexChange:S,children:[(0,t.jsx)(i.TabList,{className:"mb-4",children:[(0,t.jsx)(a.Tab,{children:"Overview"},"overview"),(0,t.jsx)(a.Tab,{children:"MCP Tools"},"tools"),...u?[(0,t.jsx)(a.Tab,{children:"Settings"},"settings")]:[]]}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsxs)(o.TabPanel,{children:[(0,t.jsxs)(tg.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-4",children:[(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Transport"}),(0,t.jsx)("div",{className:"mt-3",children:O((0,eo.handleTransport)(e.transport??void 0,e.spec_path??void 0))})]}),(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Authentication"}),(0,t.jsx)("div",{className:"mt-3",children:M((0,eo.handleAuth)(e.auth_type??void 0))})]}),(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Host URL"}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(d.Text,{className:"break-all overflow-wrap-anywhere font-mono text-sm",children:I(e.url,y)}),A&&(0,t.jsx)("button",{onClick:()=>v(!y),className:"p-1 hover:bg-gray-100 rounded flex-shrink-0",children:(0,t.jsx)(tc.Icon,{icon:y?th:tp.EyeIcon,size:"sm",className:"text-gray-500"})})]})]})]}),(0,t.jsxs)(eg.Card,{className:"mt-4 p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Cost Configuration"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(tA,{costConfig:e.mcp_info?.mcp_server_cost_info})})]})]}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tw,{serverId:e.server_id,accessToken:x,auth_type:e.auth_type,userRole:p,userID:h,serverAlias:e.alias,extraHeaders:e.extra_headers})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)(eg.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(m.Title,{children:"MCP Server Settings"}),f?null:(0,t.jsx)(l.Button,{variant:"light",onClick:()=>j(!0),children:"Edit Settings"})]}),f?(0,t.jsx)(tk,{mcpServer:e,accessToken:x,onCancel:()=>j(!1),onSuccess:e=>{j(!1),s()},availableAccessGroups:g}):(0,t.jsxs)("div",{className:"divide-y divide-gray-100",children:[(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Server Name"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.server_name||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Alias"}),(0,t.jsx)("div",{className:"col-span-2 text-sm font-mono text-gray-900",children:e.alias||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Description"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.description||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"URL"}),(0,t.jsxs)("div",{className:"col-span-2 text-sm font-mono text-gray-900 break-all flex items-center gap-2",children:[I(e.url,y),A&&(0,t.jsx)("button",{onClick:()=>v(!y),className:"p-1 hover:bg-gray-100 rounded flex-shrink-0",children:(0,t.jsx)(tc.Icon,{icon:y?th:tp.EyeIcon,size:"sm",className:"text-gray-500"})})]})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Transport"}),(0,t.jsx)("div",{className:"col-span-2",children:O((0,eo.handleTransport)(e.transport,e.spec_path))})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Authentication"}),(0,t.jsx)("div",{className:"col-span-2",children:M((0,eo.handleAuth)(e.auth_type))})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Extra Headers"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.extra_headers&&e.extra_headers.length>0?e.extra_headers.join(", "):(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Allow All Keys"}),(0,t.jsx)("div",{className:"col-span-2",children:e.allow_all_keys?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Enabled"]}):(0,t.jsx)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-gray-50 text-gray-600 rounded-full border border-gray-200 text-xs font-medium",children:"Disabled"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Network Access"}),(0,t.jsx)("div",{className:"col-span-2",children:e.available_on_public_internet?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Public"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-orange-50 text-orange-700 rounded-full border border-orange-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-orange-500"}),"Internal only"]})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Access Groups"}),(0,t.jsx)("div",{className:"col-span-2",children:e.mcp_access_groups&&e.mcp_access_groups.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.mcp_access_groups.map((e,s)=>(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-gray-100 text-gray-700 border border-gray-200",children:"string"==typeof e?e:e?.name??""},s))}):(0,t.jsx)("span",{className:"text-sm text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Allowed Tools"}),(0,t.jsx)("div",{className:"col-span-2",children:e.allowed_tools&&e.allowed_tools.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.allowed_tools.map((e,s)=>(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-mono font-medium px-2 py-0.5 rounded bg-blue-50 text-blue-700 border border-blue-200",children:e},s))}):(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-green-50 text-green-700 border border-green-200",children:"All tools enabled"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Cost"}),(0,t.jsx)("div",{className:"col-span-2",children:(0,t.jsx)(tA,{costConfig:e.mcp_info?.mcp_server_cost_info})})]})]})]})})]})]})]})},tP=(0,N.createQueryKeys)("mcpSemanticFilterSettings"),tO=(0,N.createQueryKeys)("mcpSemanticFilterSettings");var tM=e.i(178654),tF=e.i(621192),tE=e.i(981339),tL=e.i(850627),tR=e.i(987432),tz=e.i(689020),tU=e.i(245094),tB=e.i(788191),tq=e.i(653496),tV=e.i(992619);function t$({accessToken:e,testQuery:s,setTestQuery:r,testModel:l,setTestModel:a,isTesting:n,onTest:i,filterEnabled:o,testResult:c,curlCommand:d}){return(0,t.jsx)(e4.Card,{title:"Test Configuration",style:{marginBottom:16},children:(0,t.jsx)(tq.Tabs,{defaultActiveKey:"test",items:[{key:"test",label:"Test",children:(0,t.jsxs)(eM.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:[(0,t.jsx)(tB.PlayCircleOutlined,{})," Test Query"]}),(0,t.jsx)(D.Input.TextArea,{placeholder:"Enter a test query to see which tools would be selected...",value:s,onChange:e=>r(e.target.value),rows:4,disabled:n})]}),(0,t.jsx)("div",{children:(0,t.jsx)(tV.default,{accessToken:e||"",value:l,onChange:a,disabled:n,showLabel:!0,labelText:"Select Model"})}),(0,t.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tB.PlayCircleOutlined,{}),onClick:i,loading:n,disabled:!s||!l||!o,block:!0,children:"Test Filter"}),!o&&(0,t.jsx)(ej.Alert,{type:"warning",message:"Semantic filtering is disabled",description:"Enable semantic filtering and save settings to test the filter.",showIcon:!0}),c&&(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Typography.Title,{level:5,children:"Results"}),(0,t.jsx)(ej.Alert,{type:"success",message:`${c.selectedTools} tools selected`,description:`Filtered from ${c.totalTools} available tools`,showIcon:!0,style:{marginBottom:16}}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:"Selected Tools:"}),(0,t.jsx)("ul",{style:{paddingLeft:20,margin:0},children:c.tools.map((e,s)=>(0,t.jsx)("li",{style:{marginBottom:4},children:(0,t.jsx)(f.Typography.Text,{children:e})},s))})]})]})]})},{key:"api",label:"API Usage",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(eM.Space,{style:{marginBottom:8},children:[(0,t.jsx)(tU.CodeOutlined,{}),(0,t.jsx)(f.Typography.Text,{strong:!0,children:"API Usage"})]}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block",marginBottom:8},children:"Use this curl command to test the semantic filter with your current configuration."}),(0,t.jsx)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:"Response headers to check:"}),(0,t.jsxs)("ul",{style:{paddingLeft:20,margin:"0 0 12px 0"},children:[(0,t.jsxs)("li",{children:[(0,t.jsx)(f.Typography.Text,{children:"x-litellm-semantic-filter: shows total tools → selected tools"}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block"},children:"Example: 10→3"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)(f.Typography.Text,{children:"x-litellm-semantic-filter-tools: CSV of selected tool names"}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block"},children:"Example: wikipedia-fetch,github-search,slack-post"})]})]}),(0,t.jsx)("pre",{style:{background:"#f5f5f5",padding:12,borderRadius:4,overflow:"auto",fontSize:12,margin:0},children:d})]})}]})})}let tH=async({accessToken:e,testModel:t,testQuery:s,setIsTesting:r,setTestResult:l})=>{if(!s||!t||!e)return void T.default.error("Please enter a query and select a model");r(!0),l(null);try{let{headers:r}=await (0,_.testMCPSemanticFilter)(e,t,s),a=(e=>{if(!e.filter)return null;let[t,s]=e.filter.split("->").map(Number);return{totalTools:t,selectedTools:s,tools:e.tools?e.tools.split(",").map(e=>e.trim()):[]}})(r);if(!a)return void T.default.warning("Semantic filter is not enabled or no tools were filtered");l(a),T.default.success("Semantic filter test completed successfully")}catch(e){console.error("Test failed:",e),T.default.error("Failed to test semantic filter")}finally{r(!1)}};function tD({accessToken:e}){var s;let l,{data:a,isLoading:n,isError:i,error:o}=(()=>{let{accessToken:e}=(0,w.default)();return(0,y.useQuery)({queryKey:tP.list({}),queryFn:async()=>await (0,_.getMCPSemanticFilterSettings)(e),enabled:!!e,staleTime:36e5,gcTime:36e5})})(),{mutate:c,isPending:d,error:m}=(s=e||"",l=(0,v.useQueryClient)(),(0,tf.useMutation)({mutationFn:async e=>{if(!s)throw Error("Access token is required");return(0,_.updateMCPSemanticFilterSettings)(s,e)},onSuccess:()=>{l.invalidateQueries({queryKey:tO.all})}})),[u]=H.Form.useForm(),[x,p]=(0,b.useState)(!1),[j,N]=(0,b.useState)(!1),[S,C]=(0,b.useState)([]),[k,A]=(0,b.useState)(!0),[I,P]=(0,b.useState)(""),[O,M]=(0,b.useState)("gpt-4o"),[F,E]=(0,b.useState)(null),[L,R]=(0,b.useState)(!1),z=a?.field_schema,U=a?.values??{};(0,b.useEffect)(()=>{(async()=>{if(e)try{A(!0);let t=(await (0,tz.fetchAvailableModels)(e)).filter(e=>"embedding"===e.mode);C(t)}catch(e){console.error("Error fetching embedding models:",e)}finally{A(!1)}})()},[e]),(0,b.useEffect)(()=>{U&&(u.setFieldsValue({enabled:U.enabled??!1,embedding_model:U.embedding_model??"text-embedding-3-small",top_k:U.top_k??10,similarity_threshold:U.similarity_threshold??.3}),N(!1))},[U,u]);let B=async()=>{try{let e=await u.validateFields();c(e,{onSuccess:()=>{N(!1),p(!0),setTimeout(()=>p(!1),3e3),T.default.success("Settings updated successfully. Changes will be applied across all pods within 10 seconds.")},onError:e=>{T.default.fromBackend(e)}})}catch(e){console.error("Form validation failed:",e)}},q=async()=>{e&&await tH({accessToken:e,testModel:O,testQuery:I,setIsTesting:R,setTestResult:E})};return e?(0,t.jsx)("div",{style:{width:"100%"},children:n?(0,t.jsx)(tE.Skeleton,{active:!0}):i?(0,t.jsx)(ej.Alert,{type:"error",message:"Could not load MCP Semantic Filter settings",description:o instanceof Error?o.message:void 0,style:{marginBottom:24}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ej.Alert,{type:"info",message:"Semantic Tool Filtering",description:"Filter MCP tools semantically based on query relevance. This reduces context window size and improves tool selection accuracy. Click 'Save Settings' to apply changes across all pods (takes effect within 10 seconds).",showIcon:!0,style:{marginBottom:24}}),x&&(0,t.jsx)(ej.Alert,{type:"success",message:"Settings saved successfully",icon:(0,t.jsx)(ey.CheckCircleOutlined,{}),showIcon:!0,closable:!0,style:{marginBottom:16}}),m&&(0,t.jsx)(ej.Alert,{type:"error",message:"Could not update settings",description:m instanceof Error?m.message:void 0,style:{marginBottom:16}}),(0,t.jsxs)(tF.Row,{gutter:24,children:[(0,t.jsx)(tM.Col,{xs:24,lg:12,children:(0,t.jsxs)(H.Form,{form:u,layout:"vertical",disabled:d,onValuesChange:()=>{N(!0)},children:[(0,t.jsxs)(e4.Card,{style:{marginBottom:16},children:[(0,t.jsx)(H.Form.Item,{name:"enabled",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Enable Semantic Filtering"}),(0,t.jsx)(g.Tooltip,{title:"When enabled, only the most relevant MCP tools will be included in requests based on semantic similarity",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),valuePropName:"checked",children:(0,t.jsx)(el.Switch,{disabled:d})}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block",marginTop:-16,marginBottom:16},children:z?.properties?.enabled?.description})]}),(0,t.jsxs)(e4.Card,{title:"Configuration",style:{marginBottom:16},children:[(0,t.jsx)(H.Form.Item,{name:"embedding_model",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Embedding Model"}),(0,t.jsx)(g.Tooltip,{title:"The model used to generate embeddings for semantic matching",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(h.Select,{options:S.map(e=>({label:e.model_group,value:e.model_group})),placeholder:k?"Loading models...":"Select embedding model",showSearch:!0,disabled:d||k,loading:k,notFoundContent:k?"Loading...":"No embedding models available"})}),(0,t.jsx)(H.Form.Item,{name:"top_k",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Top K Results"}),(0,t.jsx)(g.Tooltip,{title:"Maximum number of tools to return after filtering",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(ec.InputNumber,{min:1,max:100,style:{width:"100%"},disabled:d})}),(0,t.jsx)(H.Form.Item,{name:"similarity_threshold",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Similarity Threshold"}),(0,t.jsx)(g.Tooltip,{title:"Minimum similarity score (0-1) for a tool to be included",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(tL.Slider,{min:0,max:1,step:.05,marks:{0:"0.0",.3:"0.3",.5:"0.5",.7:"0.7",1:"1.0"},disabled:d})})]}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,t.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tR.SaveOutlined,{}),onClick:B,loading:d,disabled:!j,children:"Save Settings"})})]})}),(0,t.jsx)(tM.Col,{xs:24,lg:12,children:(0,t.jsx)(t$,{accessToken:e,testQuery:I,setTestQuery:P,testModel:O,setTestModel:M,isTesting:L,onTest:q,filterEnabled:!!U.enabled,testResult:F,curlCommand:`curl --location 'http://localhost:4000/v1/responses' \\ --header 'Content-Type: application/json' \\ --header 'Authorization: Bearer sk-1234' \\ --data '{ @@ -88,4 +88,4 @@ } ], "tool_choice": "required" -}'`})})]})]})}):(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Please log in to configure semantic filter settings."})}var tW=e.i(262218);let{Text:tJ}=f.Typography,tY=({accessToken:e})=>{let s,[r,l]=(0,b.useState)(!0),[a,n]=(0,b.useState)(!1),[i,o]=(0,b.useState)([]),[c,d]=(0,b.useState)(null);(0,b.useEffect)(()=>{m(),u()},[e]);let m=async()=>{if(e){l(!0);try{for(let t of(await (0,_.getGeneralSettingsCall)(e)))"mcp_internal_ip_ranges"===t.field_name&&t.field_value&&o(t.field_value)}catch(e){console.error("Failed to load MCP network settings:",e)}finally{l(!1)}}},u=async()=>{if(!e)return;let t=await (0,_.fetchMCPClientIp)(e);t&&d(t)},x=async()=>{if(e){n(!0);try{i.length>0?await (0,_.updateConfigFieldSetting)(e,"mcp_internal_ip_ranges",i):await (0,_.deleteConfigFieldSetting)(e,"mcp_internal_ip_ranges")}catch(e){console.error("Failed to save MCP network settings:",e)}finally{n(!1)}}};if(r)return(0,t.jsx)("div",{className:"flex justify-center py-12",children:(0,t.jsx)(W.Spin,{})});let p=c?4!==(s=c.split(".")).length?c+"/32":`${s[0]}.${s[1]}.${s[2]}.0/24`:null;return(0,t.jsxs)("div",{className:"space-y-6 p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(tJ,{className:"text-lg font-semibold",children:"Private IP Ranges"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:'Define which IP ranges are part of your private network. Callers from these IPs can see all MCP servers. Callers from any other IP can only see servers marked "Available on Public Internet".'})]}),(0,t.jsxs)(e6.Card,{children:[c&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg",children:[(0,t.jsxs)(tJ,{className:"text-sm text-blue-700",children:["Your current IP: ",(0,t.jsx)("span",{className:"font-mono font-medium",children:c})]}),p&&!i.includes(p)&&(0,t.jsxs)("div",{className:"mt-1",children:[(0,t.jsx)(tJ,{className:"text-sm text-blue-600",children:"Suggested range: "}),(0,t.jsx)(tW.Tag,{className:"cursor-pointer font-mono",color:"blue",icon:(0,t.jsx)(eE.PlusOutlined,{}),onClick:()=>{!i.includes(p)&&o([...i,p])},children:p})]})]}),(0,t.jsx)("div",{className:"flex items-center mb-2",children:(0,t.jsx)(tJ,{className:"font-medium",children:"Your Private Network Ranges"})}),(0,t.jsx)(h.Select,{mode:"tags",value:i,onChange:o,placeholder:"Leave empty to use defaults: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8",tokenSeparators:[","],className:"w-full",size:"large",allowClear:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-2",children:"Enter CIDR ranges (e.g., 10.0.0.0/8). When empty, standard private IP ranges are used."})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tz.SaveOutlined,{}),onClick:x,loading:a,children:"Save"})})]})},{Search:tG}=D.Input,{Text:tQ}=f.Typography,tZ=["#3B82F6","#10B981","#F59E0B","#EF4444","#8B5CF6","#EC4899","#06B6D4","#84CC16"],tX=({isVisible:e,onClose:s,onSelectServer:r,onCustomServer:l,accessToken:a})=>{let[n,i]=(0,b.useState)([]),[o,c]=(0,b.useState)([]),[d,m]=(0,b.useState)(!1),[u,x]=(0,b.useState)(null),[h,g]=(0,b.useState)(""),[f,j]=(0,b.useState)("All");(0,b.useEffect)(()=>{e&&a&&(m(!0),x(null),(0,_.fetchDiscoverableMCPServers)(a).then(e=>{i(e.servers||[]),c(e.categories||[])}).catch(e=>{x(e.message||"Failed to load MCP servers")}).finally(()=>{m(!1)}))},[e,a]),(0,b.useEffect)(()=>{e&&(g(""),j("All"))},[e]);let y=(0,b.useMemo)(()=>{let e=n;if("All"!==f&&(e=e.filter(e=>e.category===f)),h.trim()){let t=h.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.title.toLowerCase().includes(t)||e.description.toLowerCase().includes(t))}return e},[n,f,h]),v=(0,b.useMemo)(()=>{let e={};for(let t of y){let s=t.category||"Other";e[s]||(e[s]=[]),e[s].push(t)}return e},[y]);return(0,t.jsxs)(p.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center justify-between pb-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("img",{src:eX,alt:"MCP Logo",className:"w-8 h-8 object-contain",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"}}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add MCP Server"})]}),(0,t.jsx)("button",{onClick:l,className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer bg-transparent border-none font-medium",children:"+ Custom Server"})]}),open:e,onCancel:s,footer:null,width:1e3,className:"top-8",styles:{body:{padding:"24px",maxHeight:"70vh",overflowY:"auto"},header:{padding:"24px 24px 0 24px",border:"none"}},children:[(0,t.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:12},children:["All",...o].map(e=>{let s=f===e;return(0,t.jsx)("button",{onClick:()=>j(e),style:{padding:"4px 12px",borderRadius:4,border:s?"1px solid #111827":"1px solid #e5e7eb",background:s?"#111827":"#fff",color:s?"#fff":"#4b5563",cursor:"pointer",fontSize:12,fontWeight:s?500:400,lineHeight:"20px"},children:e},e)})}),(0,t.jsx)(tG,{placeholder:"Search servers...",value:h,onChange:e=>g(e.target.value),style:{marginBottom:16},allowClear:!0}),d&&(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:Array.from({length:8}).map((e,s)=>(0,t.jsx)("div",{style:{height:36,borderRadius:6,background:"#f9fafb"}},s))}),u&&(0,t.jsx)("div",{style:{textAlign:"center",padding:"32px 0",color:"#9ca3af"},children:(0,t.jsxs)(tQ,{children:["Failed to load servers: ",u]})}),!d&&!u&&0===y.length&&(0,t.jsx)("div",{style:{textAlign:"center",padding:"32px 0",color:"#9ca3af"},children:(0,t.jsxs)(tQ,{children:["No servers found."," ",(0,t.jsx)("a",{onClick:l,style:{color:"#2563eb",cursor:"pointer"},children:"Add a custom server"})]})}),!d&&!u&&Object.entries(v).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:500,color:"#9ca3af",textTransform:"uppercase",letterSpacing:"0.05em",padding:"6px 0",borderBottom:"1px solid #f3f4f6",marginBottom:4},children:e}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0 16px"},children:s.map(e=>{var s;let l,a,n=(l=(s=e.title||e.name).charAt(0).toUpperCase(),a=s.split("").reduce((e,t)=>e+t.charCodeAt(0),0)%tZ.length,{initial:l,backgroundColor:tZ[a]});return(0,t.jsxs)("div",{onClick:()=>r(e),style:{display:"flex",alignItems:"center",padding:"8px 10px",borderRadius:6,cursor:"pointer",transition:"background 0.1s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f9fafb"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:[e.icon_url?(0,t.jsx)("img",{src:e.icon_url,alt:e.title,style:{width:20,height:20,objectFit:"contain",flexShrink:0,marginRight:12},onError:e=>{let t=e.currentTarget;t.style.display="none";let s=t.nextElementSibling;s&&(s.style.display="flex")}}):null,(0,t.jsx)("div",{style:{width:20,height:20,borderRadius:4,backgroundColor:n.backgroundColor,color:"#fff",display:e.icon_url?"none":"flex",alignItems:"center",justifyContent:"center",fontWeight:600,fontSize:11,flexShrink:0,marginRight:12},children:n.initial}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:400,color:"#111827",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title||e.name}),(0,t.jsx)("span",{style:{color:"#d1d5db",fontSize:14,flexShrink:0,marginLeft:8},children:"›"})]},e.name)})})]},e))]})};var t0=e.i(611052);let{Text:t2,Title:t1}=f.Typography,{Option:t5}=h.Select;e.s(["MCPServers",0,({accessToken:e,userRole:f,userID:N})=>{let{data:C,isLoading:k,refetch:A}=(0,j.useMCPServers)(),{data:I,isLoading:P,recheckServerHealth:O,recheckingServerIds:M}=(()=>{let{accessToken:e}=(0,w.default)(),t=(0,v.useQueryClient)(),[s,r]=(0,b.useState)(new Set),l=(0,y.useQuery)({queryKey:S.lists(),queryFn:async()=>await (0,_.fetchMCPServerHealth)(e),enabled:!!e,refetchInterval:3e4}),a=(0,b.useCallback)(async s=>{if(e){r(e=>new Set(e).add(s));try{let r=await (0,_.fetchMCPServerHealth)(e,[s]);t.setQueriesData({queryKey:S.lists()},e=>e?e.map(e=>r.find(t=>t.server_id===e.server_id)??e):r)}finally{r(e=>{let t=new Set(e);return t.delete(s),t})}}},[e,t]);return{...l,recheckServerHealth:a,recheckingServerIds:s}})(),F=(0,b.useMemo)(()=>{if(!C)return[];if(!I)return C;let e=new Map(I.map(e=>[e.server_id,e.status]));return C.map(t=>{let s=e.get(t.server_id);return{...t,status:s||t.status}})},[C,I]),[E,L]=(0,b.useState)(null),[R,z]=(0,b.useState)(!1),[U,B]=(0,b.useState)(null),[q,V]=(0,b.useState)(!1),[H,D]=(0,b.useState)("all"),[K,W]=(0,b.useState)("all"),[J,Y]=(0,b.useState)([]),[Q,X]=(0,b.useState)(!1),[ee,et]=(0,b.useState)(!1),[es,el]=(0,b.useState)(null),[ea,en]=(0,b.useState)(!1),[ei,eo]=(0,b.useState)(null),ec="Internal User"===f;(0,b.useEffect)(()=>{try{let e=(0,eY.getSecureItem)("litellm-mcp-oauth-edit-state");if(!e)return;let t=JSON.parse(e);t?.serverId&&(B(t.serverId),V(!0))}catch(e){console.error("Failed to restore MCP edit view state",e)}},[]);let ed=b.default.useMemo(()=>{if(!F)return[];let e=new Set,t=[];return F.forEach(s=>{s.teams&&s.teams.forEach(s=>{let r=s.team_id;e.has(r)||(e.add(r),t.push(s))})}),t},[F]),em=b.default.useMemo(()=>F?Array.from(new Set(F.flatMap(e=>e.mcp_access_groups).filter(e=>null!=e))):[],[F]),eu=(0,b.useCallback)((e,t)=>{if(!F)return Y([]);let s=F;"personal"===e?Y([]):("all"!==e&&(s=s.filter(t=>t.teams?.some(t=>t.team_id===e))),"all"!==t&&(s=s.filter(e=>e.mcp_access_groups?.some(e=>"string"==typeof e?e===t:e&&e.name===t))),Y([...s].sort((e,t)=>e.created_at||t.created_at?e.created_at?t.created_at?new Date(t.created_at).getTime()-new Date(e.created_at).getTime():-1:1:0)))},[F]);(0,b.useEffect)(()=>{eu(H,K)},[F,H,K,eu]);let ex=b.default.useMemo(()=>{let e,s,r,l;return e=e=>{B(e),V(!1)},s=e=>{B(e),V(!0)},r=ep,l=e=>eo(e),[{accessorKey:"server_id",header:"Server ID",enableSorting:!0,cell:({row:s})=>(0,t.jsxs)("button",{onClick:()=>e(s.original.server_id),className:"font-mono text-blue-600 bg-blue-50 hover:bg-blue-100 text-xs font-medium px-2 py-0.5 rounded-md border border-blue-200 text-left truncate whitespace-nowrap cursor-pointer max-w-[15ch] transition-colors",children:[s.original.server_id.slice(0,7),"..."]})},{accessorKey:"server_name",header:"Name",enableSorting:!0,cell:({row:e})=>{let s=e.original.mcp_info?.logo_url,r=e.original.server_name;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s?(0,t.jsx)("img",{src:s,alt:`${r??"MCP"} logo`,className:"h-5 w-5 rounded object-contain flex-shrink-0",onError:e=>{e.target.style.display="none"}}):null,(0,t.jsx)("span",{children:r})]})}},{accessorKey:"alias",header:"Alias",enableSorting:!0},{id:"url",header:"URL",cell:({row:e})=>{let s=e.original.url;if(!s)return(0,t.jsx)("span",{className:"text-gray-400",children:"—"});let{maskedUrl:r}=eD(s);return(0,t.jsx)("span",{className:"font-mono text-sm",children:r})}},{accessorKey:"transport",header:"Transport",enableSorting:!0,cell:({row:e})=>{let s=e.original.transport||"http",r=(e.original.spec_path&&"stdio"!==s?"OPENAPI":s).toUpperCase();return(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:r})}},{accessorKey:"auth_type",header:"Auth Type",enableSorting:!0,cell:({getValue:e})=>{let s=e()||"none";return(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:s})}},{id:"health_status",header:"Health Status",cell:({row:e})=>(0,t.jsx)(tx,{server:e.original,isLoadingHealth:P,isRechecking:M?.has(e.original.server_id),onRecheck:O})},{id:"mcp_access_groups",header:"Access Groups",cell:({row:e})=>{let s=e.original.mcp_access_groups;if(Array.isArray(s)&&s.length>0&&"string"==typeof s[0]){let e=s.join(", ");return(0,t.jsx)(g.Tooltip,{title:e,children:(0,t.jsxs)("div",{className:"flex items-center gap-1 max-w-[200px]",children:[(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-1.5 py-0.5 rounded bg-gray-100 text-gray-700 border border-gray-200 truncate max-w-[140px]",children:s[0]}),s.length>1&&(0,t.jsxs)("span",{className:"text-xs text-gray-400 font-medium",children:["+",s.length-1]})]})})}return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"})}},{id:"available_on_public_internet",header:"Network Access",cell:({row:e})=>e.original.available_on_public_internet?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Public"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-orange-50 text-orange-700 rounded-full border border-orange-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-orange-500"}),"Internal"]})},{header:"Created",accessorKey:"created_at",enableSorting:!0,sortingFn:"datetime",cell:({row:e})=>{let s=e.original;if(!s.created_at)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"});let r=new Date(s.created_at);return(0,t.jsx)(g.Tooltip,{title:r.toLocaleString(),children:(0,t.jsx)("span",{className:"text-xs text-gray-600",children:r.toLocaleDateString()})})}},{header:"Updated",accessorKey:"updated_at",enableSorting:!0,sortingFn:"datetime",cell:({row:e})=>{let s=e.original;if(!s.updated_at)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"});let r=new Date(s.updated_at);return(0,t.jsx)(g.Tooltip,{title:r.toLocaleString(),children:(0,t.jsx)("span",{className:"text-xs text-gray-600",children:r.toLocaleDateString()})})}},{id:"byok_credential",header:"Credential",cell:({row:e})=>{let s=e.original;return s.is_byok?s.has_user_credential?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full bg-green-50 text-green-700 border border-green-200",children:[(0,t.jsx)(tu.CheckOutlined,{style:{fontSize:10}})," Connected"]}),l&&(0,t.jsx)("button",{className:"text-xs text-gray-400 hover:text-blue-600 transition-colors",onClick:()=>l(s),children:"Update"})]}):l?(0,t.jsx)("button",{className:"text-xs bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded-md font-medium transition-colors shadow-sm",onClick:()=>l(s),children:"Connect"}):null:(0,t.jsx)("span",{className:"text-gray-300 text-xs",children:"—"})}},{id:"actions",header:"Actions",cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(g.Tooltip,{title:"Edit",children:(0,t.jsx)("button",{onClick:()=>s(e.original.server_id),className:"p-1.5 rounded-md text-gray-400 hover:text-blue-600 hover:bg-blue-50 transition-colors",children:(0,t.jsx)(td.Icon,{icon:tm.PencilAltIcon,size:"sm"})})}),(0,t.jsx)(g.Tooltip,{title:"Delete",children:(0,t.jsx)("button",{onClick:()=>r(e.original.server_id),className:"p-1.5 rounded-md text-gray-400 hover:text-red-600 hover:bg-red-50 transition-colors",children:(0,t.jsx)(td.Icon,{icon:G.TrashIcon,size:"sm"})})})]})}]},[f,P,O,M]);function ep(e){L(e),z(!0)}let eh=async()=>{if(null!=E&&null!=e)try{en(!0),await (0,_.deleteMCPServer)(e,E),T.default.success("Deleted MCP Server successfully"),A()}catch(e){console.error("Error deleting the mcp server:",e)}finally{en(!1),z(!1),L(null)}},eg=E?(C||[]).find(e=>e.server_id===E):null,ef=b.default.useMemo(()=>J.find(e=>e.server_id===U)||{server_id:"",server_name:"",alias:"",url:"",transport:"",auth_type:"",created_at:"",created_by:"",updated_at:"",updated_by:""},[J,U]),eb=b.default.useCallback(()=>{V(!1),B(null),A()},[A]);return e&&f&&N?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(p.Modal,{open:R,title:"Delete MCP Server?",onOk:eh,okText:ea?"Deleting...":"Delete",onCancel:()=>{z(!1),L(null)},cancelText:"Cancel",cancelButtonProps:{disabled:ea},okButtonProps:{danger:!0},confirmLoading:ea,children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(t2,{className:"text-gray-600",children:"This action is permanent and cannot be undone. All associated configurations will be removed."}),eg&&(0,t.jsx)("div",{className:"mt-3 p-4 bg-gray-50 rounded-lg border border-gray-200",children:(0,t.jsxs)(x.Descriptions,{column:1,size:"small",colon:!1,children:[eg.server_name&&(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"Name"}),children:(0,t.jsx)(t2,{strong:!0,className:"text-sm",children:eg.server_name})}),(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"ID"}),children:(0,t.jsx)(t2,{code:!0,className:"text-xs",children:eg.server_id})}),eg.url&&(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"URL"}),children:(0,t.jsx)(t2,{code:!0,className:"text-xs break-all",children:eg.url})})]})})]})}),(0,t.jsx)(e4,{userRole:f,accessToken:e,onCreateSuccess:e=>{Y(t=>[...t,e]),X(!1),A()},isModalVisible:Q,setModalVisible:X,availableAccessGroups:em,prefillData:es,onBackToDiscovery:()=>{X(!1),el(null),et(!0)}}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(m.Title,{children:"MCP Servers"}),J.length>0&&(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded-full bg-gray-100 text-gray-600 border border-gray-200",children:J.length})]}),(0,t.jsx)(d.Text,{className:"text-tremor-content mt-1",children:"Configure and manage your MCP servers"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.isAdminRole)(f)&&(0,t.jsx)(l.Button,{className:"flex-shrink-0",onClick:()=>et(!0),children:"+ Add New MCP Server"}),!(0,s.isAdminRole)(f)&&(0,t.jsx)(l.Button,{className:"flex-shrink-0",onClick:()=>{el(null),X(!0)},variant:"secondary",children:"+ Submit MCP Server"})]})]}),(0,t.jsx)(tX,{isVisible:ee,onClose:()=>et(!1),onSelectServer:e=>{el(e),et(!1),X(!0)},onCustomServer:()=>{el(null),et(!1),X(!0)},accessToken:e}),(0,t.jsxs)(n.TabGroup,{className:"w-full h-full",children:[(0,t.jsx)(i.TabList,{className:"flex justify-between mt-2 w-full items-center",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(a.Tab,{children:"All Servers"}),(0,t.jsx)(a.Tab,{children:"Toolsets"}),(0,t.jsx)(a.Tab,{children:"Connect"}),(0,t.jsx)(a.Tab,{children:"Semantic Filter"}),(0,t.jsx)(a.Tab,{children:"Network Settings"}),(0,s.isAdminRole)(f)&&(0,t.jsx)(a.Tab,{children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:["Submitted MCPs ",(0,t.jsx)(u.default,{})]})})]})}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{children:U?(0,t.jsx)(tP,{mcpServer:ef,onBack:eb,isProxyAdmin:(0,s.isAdminRole)(f),isEditing:q,accessToken:e,userID:N,userRole:f,availableAccessGroups:em},U):(0,t.jsxs)("div",{className:"w-full h-full",children:[(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)("div",{className:"flex flex-col space-y-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-6 bg-white rounded-lg px-4 py-3 border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-600 whitespace-nowrap",children:"Team"}),(0,t.jsxs)(h.Select,{value:H,onChange:e=>{D(e),eu(e,K)},style:{width:220},size:"middle",children:[(0,t.jsx)(t5,{value:"all",children:(0,t.jsx)("span",{className:"font-medium",children:ec?"All Available Servers":"All Servers"})}),(0,t.jsx)(t5,{value:"personal",children:(0,t.jsx)("span",{className:"font-medium",children:"Personal"})}),ed.map(e=>(0,t.jsx)(t5,{value:e.team_id,children:(0,t.jsx)("span",{className:"font-medium",children:e.team_alias||e.team_id})},e.team_id))]})]}),(0,t.jsx)("div",{className:"h-6 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(d.Text,{className:"text-sm font-medium text-gray-600 whitespace-nowrap",children:["Access Group",(0,t.jsx)(g.Tooltip,{title:"An MCP Access Group is a set of users or teams that have permission to access specific MCP servers. Use access groups to control and organize who can connect to which servers.",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{marginLeft:4,color:"#9ca3af"}})})]}),(0,t.jsxs)(h.Select,{value:K,onChange:e=>{W(e),eu(H,e)},style:{width:220},size:"middle",children:[(0,t.jsx)(t5,{value:"all",children:(0,t.jsx)("span",{className:"font-medium",children:"All Access Groups"})}),em.map(e=>(0,t.jsx)(t5,{value:e,children:(0,t.jsx)("span",{className:"font-medium",children:e})},e))]})]})]})})}),(0,t.jsx)("div",{className:"w-full mt-6",children:(0,t.jsx)(Z.DataTable,{data:J,columns:ex,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:k,noDataMessage:"No MCP servers configured. Click '+ Add New MCP Server' to get started.",loadingMessage:"Loading MCP servers...",enableSorting:!0})})]})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(er,{accessToken:e,userRole:f})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tc,{})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tK,{accessToken:e})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tY,{accessToken:e})}),(0,s.isAdminRole)(f)&&(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)($,{accessToken:e})})]})]}),ei&&(0,t.jsx)(t0.ByokCredentialModal,{server:ei,open:!!ei,onClose:()=>eo(null),onSuccess:e=>{A(),eo(null)},accessToken:e||""})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:f,userID:N}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))}],280881)}]); \ No newline at end of file +}'`})})]})]})}):(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Please log in to configure semantic filter settings."})}var tK=e.i(262218);let{Text:tW}=f.Typography,tJ=({accessToken:e})=>{let s,[r,l]=(0,b.useState)(!0),[a,n]=(0,b.useState)(!1),[i,o]=(0,b.useState)([]),[c,d]=(0,b.useState)(null);(0,b.useEffect)(()=>{m(),u()},[e]);let m=async()=>{if(e){l(!0);try{for(let t of(await (0,_.getGeneralSettingsCall)(e)))"mcp_internal_ip_ranges"===t.field_name&&t.field_value&&o(t.field_value)}catch(e){console.error("Failed to load MCP network settings:",e)}finally{l(!1)}}},u=async()=>{if(!e)return;let t=await (0,_.fetchMCPClientIp)(e);t&&d(t)},x=async()=>{if(e){n(!0);try{i.length>0?await (0,_.updateConfigFieldSetting)(e,"mcp_internal_ip_ranges",i):await (0,_.deleteConfigFieldSetting)(e,"mcp_internal_ip_ranges")}catch(e){console.error("Failed to save MCP network settings:",e)}finally{n(!1)}}};if(r)return(0,t.jsx)("div",{className:"flex justify-center py-12",children:(0,t.jsx)(W.Spin,{})});let p=c?4!==(s=c.split(".")).length?c+"/32":`${s[0]}.${s[1]}.${s[2]}.0/24`:null;return(0,t.jsxs)("div",{className:"space-y-6 p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(tW,{className:"text-lg font-semibold",children:"Private IP Ranges"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:'Define which IP ranges are part of your private network. Callers from these IPs can see all MCP servers. Callers from any other IP can only see servers marked "Available on Public Internet".'})]}),(0,t.jsxs)(e4.Card,{children:[c&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg",children:[(0,t.jsxs)(tW,{className:"text-sm text-blue-700",children:["Your current IP: ",(0,t.jsx)("span",{className:"font-mono font-medium",children:c})]}),p&&!i.includes(p)&&(0,t.jsxs)("div",{className:"mt-1",children:[(0,t.jsx)(tW,{className:"text-sm text-blue-600",children:"Suggested range: "}),(0,t.jsx)(tK.Tag,{className:"cursor-pointer font-mono",color:"blue",icon:(0,t.jsx)(eE.PlusOutlined,{}),onClick:()=>{!i.includes(p)&&o([...i,p])},children:p})]})]}),(0,t.jsx)("div",{className:"flex items-center mb-2",children:(0,t.jsx)(tW,{className:"font-medium",children:"Your Private Network Ranges"})}),(0,t.jsx)(h.Select,{mode:"tags",value:i,onChange:o,placeholder:"Leave empty to use defaults: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8",tokenSeparators:[","],className:"w-full",size:"large",allowClear:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-2",children:"Enter CIDR ranges (e.g., 10.0.0.0/8). When empty, standard private IP ranges are used."})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tR.SaveOutlined,{}),onClick:x,loading:a,children:"Save"})})]})},{Search:tY}=D.Input,{Text:tG}=f.Typography,tQ=["#3B82F6","#10B981","#F59E0B","#EF4444","#8B5CF6","#EC4899","#06B6D4","#84CC16"],tZ=({isVisible:e,onClose:s,onSelectServer:r,onCustomServer:l,accessToken:a})=>{let[n,i]=(0,b.useState)([]),[o,c]=(0,b.useState)([]),[d,m]=(0,b.useState)(!1),[u,x]=(0,b.useState)(null),[h,g]=(0,b.useState)(""),[f,j]=(0,b.useState)("All");(0,b.useEffect)(()=>{e&&a&&(m(!0),x(null),(0,_.fetchDiscoverableMCPServers)(a).then(e=>{i(e.servers||[]),c(e.categories||[])}).catch(e=>{x(e.message||"Failed to load MCP servers")}).finally(()=>{m(!1)}))},[e,a]),(0,b.useEffect)(()=>{e&&(g(""),j("All"))},[e]);let y=(0,b.useMemo)(()=>{let e=n;if("All"!==f&&(e=e.filter(e=>e.category===f)),h.trim()){let t=h.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.title.toLowerCase().includes(t)||e.description.toLowerCase().includes(t))}return e},[n,f,h]),v=(0,b.useMemo)(()=>{let e={};for(let t of y){let s=t.category||"Other";e[s]||(e[s]=[]),e[s].push(t)}return e},[y]);return(0,t.jsxs)(p.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center justify-between pb-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("img",{src:eZ,alt:"MCP Logo",className:"w-8 h-8 object-contain",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"}}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add MCP Server"})]}),(0,t.jsx)("button",{onClick:l,className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer bg-transparent border-none font-medium",children:"+ Custom Server"})]}),open:e,onCancel:s,footer:null,width:1e3,className:"top-8",styles:{body:{padding:"24px",maxHeight:"70vh",overflowY:"auto"},header:{padding:"24px 24px 0 24px",border:"none"}},children:[(0,t.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:12},children:["All",...o].map(e=>{let s=f===e;return(0,t.jsx)("button",{onClick:()=>j(e),style:{padding:"4px 12px",borderRadius:4,border:s?"1px solid #111827":"1px solid #e5e7eb",background:s?"#111827":"#fff",color:s?"#fff":"#4b5563",cursor:"pointer",fontSize:12,fontWeight:s?500:400,lineHeight:"20px"},children:e},e)})}),(0,t.jsx)(tY,{placeholder:"Search servers...",value:h,onChange:e=>g(e.target.value),style:{marginBottom:16},allowClear:!0}),d&&(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:Array.from({length:8}).map((e,s)=>(0,t.jsx)("div",{style:{height:36,borderRadius:6,background:"#f9fafb"}},s))}),u&&(0,t.jsx)("div",{style:{textAlign:"center",padding:"32px 0",color:"#9ca3af"},children:(0,t.jsxs)(tG,{children:["Failed to load servers: ",u]})}),!d&&!u&&0===y.length&&(0,t.jsx)("div",{style:{textAlign:"center",padding:"32px 0",color:"#9ca3af"},children:(0,t.jsxs)(tG,{children:["No servers found."," ",(0,t.jsx)("a",{onClick:l,style:{color:"#2563eb",cursor:"pointer"},children:"Add a custom server"})]})}),!d&&!u&&Object.entries(v).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:500,color:"#9ca3af",textTransform:"uppercase",letterSpacing:"0.05em",padding:"6px 0",borderBottom:"1px solid #f3f4f6",marginBottom:4},children:e}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0 16px"},children:s.map(e=>{var s;let l,a,n=(l=(s=e.title||e.name).charAt(0).toUpperCase(),a=s.split("").reduce((e,t)=>e+t.charCodeAt(0),0)%tQ.length,{initial:l,backgroundColor:tQ[a]});return(0,t.jsxs)("div",{onClick:()=>r(e),style:{display:"flex",alignItems:"center",padding:"8px 10px",borderRadius:6,cursor:"pointer",transition:"background 0.1s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f9fafb"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:[e.icon_url?(0,t.jsx)("img",{src:e.icon_url,alt:e.title,style:{width:20,height:20,objectFit:"contain",flexShrink:0,marginRight:12},onError:e=>{let t=e.currentTarget;t.style.display="none";let s=t.nextElementSibling;s&&(s.style.display="flex")}}):null,(0,t.jsx)("div",{style:{width:20,height:20,borderRadius:4,backgroundColor:n.backgroundColor,color:"#fff",display:e.icon_url?"none":"flex",alignItems:"center",justifyContent:"center",fontWeight:600,fontSize:11,flexShrink:0,marginRight:12},children:n.initial}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:400,color:"#111827",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title||e.name}),(0,t.jsx)("span",{style:{color:"#d1d5db",fontSize:14,flexShrink:0,marginLeft:8},children:"›"})]},e.name)})})]},e))]})};var tX=e.i(611052);let{Text:t0,Title:t2}=f.Typography,{Option:t1}=h.Select;e.s(["MCPServers",0,({accessToken:e,userRole:f,userID:N})=>{let{data:C,isLoading:k,refetch:A}=(0,j.useMCPServers)(),{data:I,isLoading:P,recheckServerHealth:O,recheckingServerIds:M}=(()=>{let{accessToken:e}=(0,w.default)(),t=(0,v.useQueryClient)(),[s,r]=(0,b.useState)(new Set),l=(0,y.useQuery)({queryKey:S.lists(),queryFn:async()=>await (0,_.fetchMCPServerHealth)(e),enabled:!!e,refetchInterval:3e4}),a=(0,b.useCallback)(async s=>{if(e){r(e=>new Set(e).add(s));try{let r=await (0,_.fetchMCPServerHealth)(e,[s]);t.setQueriesData({queryKey:S.lists()},e=>e?e.map(e=>r.find(t=>t.server_id===e.server_id)??e):r)}finally{r(e=>{let t=new Set(e);return t.delete(s),t})}}},[e,t]);return{...l,recheckServerHealth:a,recheckingServerIds:s}})(),F=(0,b.useMemo)(()=>{if(!C)return[];if(!I)return C;let e=new Map(I.map(e=>[e.server_id,e.status]));return C.map(t=>{let s=e.get(t.server_id);return{...t,status:s||t.status}})},[C,I]),[E,L]=(0,b.useState)(null),[R,z]=(0,b.useState)(!1),[U,B]=(0,b.useState)(null),[q,V]=(0,b.useState)(!1),[H,D]=(0,b.useState)("all"),[K,W]=(0,b.useState)("all"),[J,Y]=(0,b.useState)([]),[Q,X]=(0,b.useState)(!1),[ee,et]=(0,b.useState)(!1),[es,el]=(0,b.useState)(null),[ea,en]=(0,b.useState)(!1),[ei,eo]=(0,b.useState)(null),ec="Internal User"===f;(0,b.useEffect)(()=>{try{let e=(0,eG.getSecureItem)("litellm-mcp-oauth-edit-state");if(!e)return;let t=JSON.parse(e);t?.serverId&&(B(t.serverId),V(!0))}catch(e){console.error("Failed to restore MCP edit view state",e)}},[]);let ed=b.default.useMemo(()=>{if(!F)return[];let e=new Set,t=[];return F.forEach(s=>{s.teams&&s.teams.forEach(s=>{let r=s.team_id;e.has(r)||(e.add(r),t.push(s))})}),t},[F]),em=b.default.useMemo(()=>F?Array.from(new Set(F.flatMap(e=>e.mcp_access_groups).filter(e=>null!=e))):[],[F]),eu=(0,b.useCallback)((e,t)=>{if(!F)return Y([]);let s=F;"personal"===e?Y([]):("all"!==e&&(s=s.filter(t=>t.teams?.some(t=>t.team_id===e))),"all"!==t&&(s=s.filter(e=>e.mcp_access_groups?.some(e=>"string"==typeof e?e===t:e&&e.name===t))),Y([...s].sort((e,t)=>e.created_at||t.created_at?e.created_at?t.created_at?new Date(t.created_at).getTime()-new Date(e.created_at).getTime():-1:1:0)))},[F]);(0,b.useEffect)(()=>{eu(H,K)},[F,H,K,eu]);let ex=b.default.useMemo(()=>{let e,s,r,l;return e=e=>{B(e),V(!1)},s=e=>{B(e),V(!0)},r=ep,l=e=>eo(e),[{accessorKey:"server_id",header:"Server ID",enableSorting:!0,cell:({row:s})=>(0,t.jsxs)("button",{onClick:()=>e(s.original.server_id),className:"font-mono text-blue-600 bg-blue-50 hover:bg-blue-100 text-xs font-medium px-2 py-0.5 rounded-md border border-blue-200 text-left truncate whitespace-nowrap cursor-pointer max-w-[15ch] transition-colors",children:[s.original.server_id.slice(0,7),"..."]})},{accessorKey:"server_name",header:"Name",enableSorting:!0,cell:({row:e})=>{let s=e.original.mcp_info?.logo_url,r=e.original.server_name;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s?(0,t.jsx)("img",{src:s,alt:`${r??"MCP"} logo`,className:"h-5 w-5 rounded object-contain flex-shrink-0",onError:e=>{e.target.style.display="none"}}):null,(0,t.jsx)("span",{children:r})]})}},{accessorKey:"alias",header:"Alias",enableSorting:!0},{id:"url",header:"URL",cell:({row:e})=>{let s=e.original.url;if(!s)return(0,t.jsx)("span",{className:"text-gray-400",children:"—"});let{maskedUrl:r}=eD(s);return(0,t.jsx)("span",{className:"font-mono text-sm",children:r})}},{accessorKey:"transport",header:"Transport",enableSorting:!0,cell:({row:e})=>{let s=e.original.transport||"http",r=(e.original.spec_path&&"stdio"!==s?"OPENAPI":s).toUpperCase();return(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:r})}},{accessorKey:"auth_type",header:"Auth Type",enableSorting:!0,cell:({getValue:e})=>{let s=e()||"none";return(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:s})}},{id:"health_status",header:"Health Status",cell:({row:e})=>(0,t.jsx)(tu,{server:e.original,isLoadingHealth:P,isRechecking:M?.has(e.original.server_id),onRecheck:O})},{id:"mcp_access_groups",header:"Access Groups",cell:({row:e})=>{let s=e.original.mcp_access_groups;if(Array.isArray(s)&&s.length>0&&"string"==typeof s[0]){let e=s.join(", ");return(0,t.jsx)(g.Tooltip,{title:e,children:(0,t.jsxs)("div",{className:"flex items-center gap-1 max-w-[200px]",children:[(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-1.5 py-0.5 rounded bg-gray-100 text-gray-700 border border-gray-200 truncate max-w-[140px]",children:s[0]}),s.length>1&&(0,t.jsxs)("span",{className:"text-xs text-gray-400 font-medium",children:["+",s.length-1]})]})})}return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"})}},{id:"available_on_public_internet",header:"Network Access",cell:({row:e})=>e.original.available_on_public_internet?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Public"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-orange-50 text-orange-700 rounded-full border border-orange-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-orange-500"}),"Internal"]})},{header:"Created",accessorKey:"created_at",enableSorting:!0,sortingFn:"datetime",cell:({row:e})=>{let s=e.original;if(!s.created_at)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"});let r=new Date(s.created_at);return(0,t.jsx)(g.Tooltip,{title:r.toLocaleString(),children:(0,t.jsx)("span",{className:"text-xs text-gray-600",children:r.toLocaleDateString()})})}},{header:"Updated",accessorKey:"updated_at",enableSorting:!0,sortingFn:"datetime",cell:({row:e})=>{let s=e.original;if(!s.updated_at)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"});let r=new Date(s.updated_at);return(0,t.jsx)(g.Tooltip,{title:r.toLocaleString(),children:(0,t.jsx)("span",{className:"text-xs text-gray-600",children:r.toLocaleDateString()})})}},{id:"byok_credential",header:"Credential",cell:({row:e})=>{let s=e.original;return s.is_byok?s.has_user_credential?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full bg-green-50 text-green-700 border border-green-200",children:[(0,t.jsx)(tm.CheckOutlined,{style:{fontSize:10}})," Connected"]}),l&&(0,t.jsx)("button",{className:"text-xs text-gray-400 hover:text-blue-600 transition-colors",onClick:()=>l(s),children:"Update"})]}):l?(0,t.jsx)("button",{className:"text-xs bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded-md font-medium transition-colors shadow-sm",onClick:()=>l(s),children:"Connect"}):null:(0,t.jsx)("span",{className:"text-gray-300 text-xs",children:"—"})}},{id:"actions",header:"Actions",cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(g.Tooltip,{title:"Edit",children:(0,t.jsx)("button",{onClick:()=>s(e.original.server_id),className:"p-1.5 rounded-md text-gray-400 hover:text-blue-600 hover:bg-blue-50 transition-colors",children:(0,t.jsx)(tc.Icon,{icon:td.PencilAltIcon,size:"sm"})})}),(0,t.jsx)(g.Tooltip,{title:"Delete",children:(0,t.jsx)("button",{onClick:()=>r(e.original.server_id),className:"p-1.5 rounded-md text-gray-400 hover:text-red-600 hover:bg-red-50 transition-colors",children:(0,t.jsx)(tc.Icon,{icon:G.TrashIcon,size:"sm"})})})]})}]},[f,P,O,M]);function ep(e){L(e),z(!0)}let eh=async()=>{if(null!=E&&null!=e)try{en(!0),await (0,_.deleteMCPServer)(e,E),T.default.success("Deleted MCP Server successfully"),A()}catch(e){console.error("Error deleting the mcp server:",e)}finally{en(!1),z(!1),L(null)}},eg=E?(C||[]).find(e=>e.server_id===E):null,ef=b.default.useMemo(()=>J.find(e=>e.server_id===U)||{server_id:"",server_name:"",alias:"",url:"",transport:"",auth_type:"",created_at:"",created_by:"",updated_at:"",updated_by:""},[J,U]),eb=b.default.useCallback(()=>{V(!1),B(null),A()},[A]);return e&&f&&N?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(p.Modal,{open:R,title:"Delete MCP Server?",onOk:eh,okText:ea?"Deleting...":"Delete",onCancel:()=>{z(!1),L(null)},cancelText:"Cancel",cancelButtonProps:{disabled:ea},okButtonProps:{danger:!0},confirmLoading:ea,children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(t0,{className:"text-gray-600",children:"This action is permanent and cannot be undone. All associated configurations will be removed."}),eg&&(0,t.jsx)("div",{className:"mt-3 p-4 bg-gray-50 rounded-lg border border-gray-200",children:(0,t.jsxs)(x.Descriptions,{column:1,size:"small",colon:!1,children:[eg.server_name&&(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"Name"}),children:(0,t.jsx)(t0,{strong:!0,className:"text-sm",children:eg.server_name})}),(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"ID"}),children:(0,t.jsx)(t0,{code:!0,className:"text-xs",children:eg.server_id})}),eg.url&&(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"URL"}),children:(0,t.jsx)(t0,{code:!0,className:"text-xs break-all",children:eg.url})})]})})]})}),(0,t.jsx)(e5,{userRole:f,accessToken:e,onCreateSuccess:e=>{Y(t=>[...t,e]),X(!1),A()},isModalVisible:Q,setModalVisible:X,availableAccessGroups:em,prefillData:es,onBackToDiscovery:()=>{X(!1),el(null),et(!0)}}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(m.Title,{children:"MCP Servers"}),J.length>0&&(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded-full bg-gray-100 text-gray-600 border border-gray-200",children:J.length})]}),(0,t.jsx)(d.Text,{className:"text-tremor-content mt-1",children:"Configure and manage your MCP servers"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.isAdminRole)(f)&&(0,t.jsx)(l.Button,{className:"flex-shrink-0",onClick:()=>et(!0),children:"+ Add New MCP Server"}),!(0,s.isAdminRole)(f)&&(0,t.jsx)(l.Button,{className:"flex-shrink-0",onClick:()=>{el(null),X(!0)},variant:"secondary",children:"+ Submit MCP Server"})]})]}),(0,t.jsx)(tZ,{isVisible:ee,onClose:()=>et(!1),onSelectServer:e=>{el(e),et(!1),X(!0)},onCustomServer:()=>{el(null),et(!1),X(!0)},accessToken:e}),(0,t.jsxs)(n.TabGroup,{className:"w-full h-full",children:[(0,t.jsx)(i.TabList,{className:"flex justify-between mt-2 w-full items-center",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(a.Tab,{children:"All Servers"}),(0,t.jsx)(a.Tab,{children:"Toolsets"}),(0,t.jsx)(a.Tab,{children:"Connect"}),(0,t.jsx)(a.Tab,{children:"Semantic Filter"}),(0,t.jsx)(a.Tab,{children:"Network Settings"}),(0,s.isAdminRole)(f)&&(0,t.jsx)(a.Tab,{children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:["Submitted MCPs ",(0,t.jsx)(u.default,{})]})})]})}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{children:U?(0,t.jsx)(tI,{mcpServer:ef,onBack:eb,isProxyAdmin:(0,s.isAdminRole)(f),isEditing:q,accessToken:e,userID:N,userRole:f,availableAccessGroups:em},U):(0,t.jsxs)("div",{className:"w-full h-full",children:[(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)("div",{className:"flex flex-col space-y-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-6 bg-white rounded-lg px-4 py-3 border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-600 whitespace-nowrap",children:"Team"}),(0,t.jsxs)(h.Select,{value:H,onChange:e=>{D(e),eu(e,K)},style:{width:220},size:"middle",children:[(0,t.jsx)(t1,{value:"all",children:(0,t.jsx)("span",{className:"font-medium",children:ec?"All Available Servers":"All Servers"})}),(0,t.jsx)(t1,{value:"personal",children:(0,t.jsx)("span",{className:"font-medium",children:"Personal"})}),ed.map(e=>(0,t.jsx)(t1,{value:e.team_id,children:(0,t.jsx)("span",{className:"font-medium",children:e.team_alias||e.team_id})},e.team_id))]})]}),(0,t.jsx)("div",{className:"h-6 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(d.Text,{className:"text-sm font-medium text-gray-600 whitespace-nowrap",children:["Access Group",(0,t.jsx)(g.Tooltip,{title:"An MCP Access Group is a set of users or teams that have permission to access specific MCP servers. Use access groups to control and organize who can connect to which servers.",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{marginLeft:4,color:"#9ca3af"}})})]}),(0,t.jsxs)(h.Select,{value:K,onChange:e=>{W(e),eu(H,e)},style:{width:220},size:"middle",children:[(0,t.jsx)(t1,{value:"all",children:(0,t.jsx)("span",{className:"font-medium",children:"All Access Groups"})}),em.map(e=>(0,t.jsx)(t1,{value:e,children:(0,t.jsx)("span",{className:"font-medium",children:e})},e))]})]})]})})}),(0,t.jsx)("div",{className:"w-full mt-6",children:(0,t.jsx)(Z.DataTable,{data:J,columns:ex,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:k,noDataMessage:"No MCP servers configured. Click '+ Add New MCP Server' to get started.",loadingMessage:"Loading MCP servers...",enableSorting:!0})})]})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(er,{accessToken:e,userRole:f})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(to,{})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tD,{accessToken:e})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tJ,{accessToken:e})}),(0,s.isAdminRole)(f)&&(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)($,{accessToken:e})})]})]}),ei&&(0,t.jsx)(tX.ByokCredentialModal,{server:ei,open:!!ei,onClose:()=>eo(null),onSuccess:e=>{A(),eo(null)},accessToken:e||""})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:f,userID:N}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))}],280881)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3ff11f4421ec2309.js b/litellm/proxy/_experimental/out/_next/static/chunks/3ff11f4421ec2309.js new file mode 100644 index 0000000000..61b738b9f9 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3ff11f4421ec2309.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,446891,836991,153472,e=>{"use strict";var t,r,a=e.i(843476),l=e.i(464571),s=e.i(326373),n=e.i(94629),i=e.i(360820),o=e.i(871943),c=e.i(271645);let u=c.forwardRef(function(e,t){return c.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),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,u],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let r=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(i.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(u,{className:"h-4 w-4"})}];return(0,a.jsx)(s.Dropdown,{menu:{items:r,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(l.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(i.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var d=e.i(266027),h=e.i(954616),f=e.i(243652),m=e.i(135214),p=e.i(764205),g=((t={}).GENERAL_SETTINGS="general_settings",t),y=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let b=async(e,t)=>{try{let r=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(r,{method:"GET",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},w=(0,f.createQueryKeys)("proxyConfig"),v=async(e,t)=>{try{let r=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(r,{method:"POST",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>g,"GeneralSettingsFieldName",()=>y,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,m.default)();return(0,h.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await v(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,m.default)();return(0,d.useQuery)({queryKey:w.list({filters:{configType:e}}),queryFn:async()=>await b(t,e),enabled:!!t})}],153472)},94629,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>t.default])},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ArrowLeftOutlined",0,s],447566)},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var l=e.i(464571),s=e.i(311451),n=e.i(199133),i=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[h,f]=(0,r.useState)(!1),[m,p]=(0,r.useState)(u),[g,y]=(0,r.useState)({}),[b,w]=(0,r.useState)({}),[v,x]=(0,r.useState)({}),[C,S]=(0,r.useState)({}),j=(0,r.useCallback)((0,i.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){w(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);y(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),y(e=>({...e,[t.name]:[]}))}finally{w(e=>({...e,[t.name]:!1}))}}},300),[]),k=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!C[e.name]){w(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");y(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),y(t=>({...t,[e.name]:[]}))}finally{w(t=>({...t,[e.name]:!1}))}}},[C]);(0,r.useEffect)(()=>{h&&e.forEach(e=>{e.isSearchable&&!C[e.name]&&k(e)})},[h,e,k,C]);let E=(e,t)=>{let r={...m,[e]:t};p(r),o(r)};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.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>f(!h),className:"flex items-center gap-2",children:d}),(0,t.jsx)(l.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),h&&(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","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,l=e.find(e=>e.label===r||e.name===r);return l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:l.label||l.name}),l.isSearchable?(0,t.jsx)(n.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${l.label||l.name}...`,value:m[l.name]||void 0,onChange:e=>E(l.name,e),onOpenChange:e=>{e&&l.isSearchable&&!C[l.name]&&k(l)},onSearch:e=>{x(t=>({...t,[l.name]:e})),l.searchFn&&j(e,l)},filterOption:!1,loading:b[l.name],options:g[l.name]||[],allowClear:!0,notFoundContent:b[l.name]?"Loading...":"No results found"}):l.options?(0,t.jsx)(n.Select,{className:"w-full",placeholder:`Select ${l.label||l.name}...`,value:m[l.name]||void 0,onChange:e=>E(l.name,e),allowClear:!0,children:l.options.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))}):l.customComponent?(a=l.customComponent,(0,t.jsx)(a,{value:m[l.name]||void 0,onChange:e=>E(l.name,e??""),placeholder:`Select ${l.label||l.name}...`,allFilters:m})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${l.label||l.name}...`,value:m[l.name]||"",onChange:e=>E(l.name,e.target.value),allowClear:!0})]},l.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let l of e){let e=l?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=l?.organization_id??l?.org_id;s&&"string"==typeof s&&r.add(s.trim());let n=l?.user_id;if(n&&"string"==typeof n){let e=l?.user?.user_email||n;a.set(n,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let l=new Set,s=new Set,n=new Map,i=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=i?.keys||[],c=i?.total_pages??1;r(o,l,s,n);let u=Math.min(c,10)-1;if(u>0){let i=Array.from({length:u},(r,l)=>(0,t.keyListCall)(e,null,a,null,null,null,l+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(i)))"fulfilled"===e.status&&r(e.value?.keys||[],l,s,n)}return{keyAliases:Array.from(l).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(n.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},l=async(e,r)=>{if(!e)return[];try{let a=[],l=1,s=!0;for(;s;){let n=await (0,t.teamListCall)(e,r||null,null);a=[...a,...n],l{if(!e)return[];try{let r=[],a=1,l=!0;for(;l;){let s=await (0,t.organizationListCall)(e);r=[...r,...s],a{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ReloadOutlined",0,s],91979)},625901,e=>{"use strict";var t=e.i(266027),r=e.i(621482),a=e.i(243652),l=e.i(764205),s=e.i(135214);let n=(0,a.createQueryKeys)("models"),i=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let c=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:r,userRole:a}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,r,a,!0,null,!0,!1,"expand"),enabled:!!(e&&r&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:n,userRole:i}=(0,s.default)();return(0,r.useInfiniteQuery)({queryKey:c.list({filters:{...n&&{userId:n},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:r})=>await (0,l.modelInfoCall)(a,n,i,r,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,r=50,a,i,o,c,u)=>{let{accessToken:d,userId:h,userRole:f}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({filters:{...h&&{userId:h},...f&&{userRole:f},page:e,size:r,...a&&{search:a},...i&&{modelId:i},...o&&{teamId:o},...c&&{sortBy:c},...u&&{sortOrder:u}}}),queryFn:async()=>await (0,l.modelInfoCall)(d,h,f,e,r,a,i,o,c,u),enabled:!!(d&&h&&f)})}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),a=e.i(371330),l=e.i(271645),s=e.i(394487),n=e.i(503269),i=e.i(214520),o=e.i(746725),c=e.i(914189),u=e.i(144279),d=e.i(294316),h=e.i(601893),f=e.i(140721),m=e.i(942803),p=e.i(233538),g=e.i(694421),y=e.i(700020),b=e.i(35889),w=e.i(998348),v=e.i(722678);let x=(0,l.createContext)(null);x.displayName="GroupContext";let C=l.Fragment,S=Object.assign((0,y.forwardRefWithAs)(function(e,t){var C;let S=(0,l.useId)(),j=(0,m.useProvidedId)(),k=(0,h.useDisabled)(),{id:E=j||`headlessui-switch-${S}`,disabled:M=k||!1,checked:N,defaultChecked:O,onChange:R,name:T,value:P,form:D,autoFocus:I=!1,...F}=e,_=(0,l.useContext)(x),[$,L]=(0,l.useState)(null),K=(0,l.useRef)(null),A=(0,d.useSyncRefs)(K,t,null===_?null:_.setSwitch,L),G=(0,i.useDefaultValue)(O),[B,H]=(0,n.useControllable)(N,R,null!=G&&G),q=(0,o.useDisposables)(),[U,z]=(0,l.useState)(!1),Q=(0,c.useEvent)(()=>{z(!0),null==H||H(!B),q.nextFrame(()=>{z(!1)})}),V=(0,c.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),Q()}),W=(0,c.useEvent)(e=>{e.key===w.Keys.Space?(e.preventDefault(),Q()):e.key===w.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),X=(0,c.useEvent)(e=>e.preventDefault()),Y=(0,v.useLabelledBy)(),J=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:I}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:M}),{pressed:ea,pressProps:el}=(0,s.useActivePress)({disabled:M}),es=(0,l.useMemo)(()=>({checked:B,disabled:M,hover:et,focus:Z,active:ea,autofocus:I,changing:U}),[B,et,Z,ea,M,U,I]),en=(0,y.mergeProps)({id:E,ref:A,role:"switch",type:(0,u.useResolveButtonType)(e,$),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":B,"aria-labelledby":Y,"aria-describedby":J,disabled:M||void 0,autoFocus:I,onClick:V,onKeyUp:W,onKeyPress:X},ee,er,el),ei=(0,l.useCallback)(()=>{if(void 0!==G)return null==H?void 0:H(G)},[H,G]),eo=(0,y.useRender)();return l.default.createElement(l.default.Fragment,null,null!=T&&l.default.createElement(f.FormFields,{disabled:M,data:{[T]:P||"on"},overrides:{type:"checkbox",checked:B},form:D,onReset:ei}),eo({ourProps:en,theirProps:F,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,l.useState)(null),[s,n]=(0,v.useLabels)(),[i,o]=(0,b.useDescriptions)(),c=(0,l.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),u=(0,y.useRender)();return l.default.createElement(o,{name:"Switch.Description",value:i},l.default.createElement(n,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},l.default.createElement(x.Provider,{value:c},u({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:v.Label,Description:b.Description});var j=e.i(888288),k=e.i(95779),E=e.i(444755),M=e.i(673706),N=e.i(829087);let O=(0,M.makeClassName)("Switch"),R=l.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:s=!1,onChange:n,color:i,name:o,error:c,errorMessage:u,disabled:d,required:h,tooltip:f,id:m}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:i?(0,M.getColorClassNames)(i,k.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,M.getColorClassNames)(i,k.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[y,b]=(0,j.default)(s,a),[w,v]=(0,l.useState)(!1),{tooltipProps:x,getReferenceProps:C}=(0,N.useTooltip)(300);return l.default.createElement("div",{className:"flex flex-row items-center justify-start"},l.default.createElement(N.default,Object.assign({text:f},x)),l.default.createElement("div",Object.assign({ref:(0,M.mergeRefs)([r,x.refs.setReference]),className:(0,E.tremorTwMerge)(O("root"),"flex flex-row relative h-5")},p,C),l.default.createElement("input",{type:"checkbox",className:(0,E.tremorTwMerge)(O("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:h,checked:y,onChange:e=>{e.preventDefault()}}),l.default.createElement(S,{checked:y,onChange:e=>{b(e),null==n||n(e)},disabled:d,className:(0,E.tremorTwMerge)(O("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:m},l.default.createElement("span",{className:(0,E.tremorTwMerge)(O("sr-only"),"sr-only")},"Switch ",y?"on":"off"),l.default.createElement("span",{"aria-hidden":"true",className:(0,E.tremorTwMerge)(O("background"),y?g.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),l.default.createElement("span",{"aria-hidden":"true",className:(0,E.tremorTwMerge)(O("round"),y?(0,E.tremorTwMerge)(g.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",w?(0,E.tremorTwMerge)("ring-2",g.ringColor):"")}))),c&&u?l.default.createElement("p",{className:(0,E.tremorTwMerge)(O("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});R.displayName="Switch",e.s(["Switch",()=>R],793130)},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),l=e.i(682830),s=e.i(269200),n=e.i(427612),i=e.i(64848),o=e.i(942232),c=e.i(496020),u=e.i(977572);function d({data:e=[],columns:d,onRowClick:h,renderSubComponent:f,renderChildRows:m,getRowCanExpand:p,isLoading:g=!1,loadingMessage:y="🚅 Loading logs...",noDataMessage:b="No logs found",enableSorting:w=!1}){let v=!!(f||m)&&!!p,[x,C]=(0,r.useState)([]),S=(0,a.useReactTable)({data:e,columns:d,...w&&{state:{sorting:x},onSortingChange:C,enableSortingRemoval:!1},...v&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,l.getCoreRowModel)(),...w&&{getSortedRowModel:(0,l.getSortedRowModel)()},...v&&{getExpandedRowModel:(0,l.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(n.TableHead,{children:S.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let r=w&&e.column.getCanSort(),l=e.column.getIsSorted();return(0,t.jsx)(i.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===l?"↑":"desc"===l?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:g?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:y})})})}):S.getRowModel().rows.length>0?S.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${h?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>h?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),v&&e.getIsExpanded()&&m&&m({row:e}),v&&e.getIsExpanded()&&f&&!m&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:f({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})})})]})})}e.s(["DataTable",()=>d])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),l=e.i(915823),s=e.i(619273),n=class extends l.Subscribable{#e;#t=void 0;#r;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,s.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.hashKey)(t.mutationKey)!==(0,s.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#l(),this.#s()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#l(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#s(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},i=e.i(912598);function o(e,r){let l=(0,i.useQueryClient)(r),[o]=t.useState(()=>new n(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(s.noop)},[o]);if(c.error&&(0,s.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},888288,e=>{"use strict";var t=e.i(271645);let r=(e,r)=>{let a=void 0!==r,[l,s]=(0,t.useState)(e);return[a?r:l,e=>{a||s(e)}]};e.s(["default",()=>r])},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:n,accessToken:i,disabled:o})=>{let[c,u]=(0,r.useState)([]),[d,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(i){h(!0);try{let e=await (0,l.getGuardrailsList)(i);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{h(!1)}}})()},[i]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:s,loading:d,className:n,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);function s(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let r=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${r} (${a})${e.description?` — ${e.description}`:""}`,value:"production"===a?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:n,className:i,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,h]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,l.getPoliciesList)(o);e.policies&&(h(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[o,u]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:n,loading:f,className:i,allowClear:!0,options:s(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>s])},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let r=e.i(264042).Row;e.s(["Row",0,r],621192)},214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,l]=(0,t.useState)([]),{accessToken:s,userId:n,userRole:i}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{l(await (0,a.fetchTeams)(s,n,i,null))})()},[s,n,i]),{teams:e,setTeams:l}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let l=t(e);return isNaN(a)?r(e,NaN):(a&&l.setDate(l.getDate()+a),l)}function l(e,a){let l=t(e);if(isNaN(a))return r(e,NaN);if(!a)return l;let s=l.getDate(),n=r(e,l.getTime());return(n.setMonth(l.getMonth()+a+1,0),s>=n.getDate())?n:(l.setFullYear(n.getFullYear(),n.getMonth(),s),l)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>l],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(908286),s=e.i(242064),n=e.i(246422),i=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],u=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],d=function(e,t){let a,l,s;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(l={},u.forEach(r=>{l[`${e}-align-${r}`]=t.align===r}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(s={},c.forEach(r=>{s[`${e}-justify-${r}`]=t.justify===r}),s)))},h=(0,n.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,l=(0,i.mergeToken)(e,{flexGapSM:t,flexGap:r,flexGapLG:a});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(l),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(l),(e=>{let{componentCls:t}=e,r={};return o.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(l)]},()=>({}),{resetStyle:!1});var f=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let m=t.default.forwardRef((e,n)=>{let{prefixCls:i,rootClassName:o,className:c,style:u,flex:m,gap:p,vertical:g=!1,component:y="div",children:b}=e,w=f(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:x,getPrefixCls:C}=t.default.useContext(s.ConfigContext),S=C("flex",i),[j,k,E]=h(S),M=null!=g?g:null==v?void 0:v.vertical,N=(0,r.default)(c,o,null==v?void 0:v.className,S,k,E,d(S,e),{[`${S}-rtl`]:"rtl"===x,[`${S}-gap-${p}`]:(0,l.isPresetSize)(p),[`${S}-vertical`]:M}),O=Object.assign(Object.assign({},null==v?void 0:v.style),u);return m&&(O.flex=m),p&&!(0,l.isPresetSize)(p)&&(O.gap=p),j(t.default.createElement(y,Object.assign({ref:n,className:N,style:O},(0,a.default)(w,["justify","wrap","align"])),b))});e.s(["Flex",0,m],525720)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4296324e252ad4cb.js b/litellm/proxy/_experimental/out/_next/static/chunks/4296324e252ad4cb.js deleted file mode 100644 index 0f8c06994b..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/4296324e252ad4cb.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,262218,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),l=e.i(529681),a=e.i(702779),n=e.i(563113),i=e.i(763731),o=e.i(121872),s=e.i(242064);e.i(296059);var c=e.i(915654);e.i(262370);var d=e.i(135551),u=e.i(183293),g=e.i(246422),m=e.i(838378);let f=e=>{let{lineWidth:t,fontSizeIcon:r,calc:l}=e,a=e.fontSizeSM;return(0,m.mergeToken)(e,{tagFontSize:a,tagLineHeight:(0,c.unit)(l(e.lineHeightSM).mul(a).equal()),tagIconSize:l(r).sub(l(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},b=e=>({defaultBg:new d.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),p=(0,g.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:l,componentCls:a,calc:n}=e,i=n(l).sub(r).equal(),o=n(t).sub(r).equal();return{[a]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-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"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(f(e)),b);var h=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(r[l[a]]=e[l[a]]);return r};let $=t.forwardRef((e,l)=>{let{prefixCls:a,style:n,className:i,checked:o,children:c,icon:d,onChange:u,onClick:g}=e,m=h(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:f,tag:b}=t.useContext(s.ConfigContext),$=f("tag",a),[v,C,k]=p($),w=(0,r.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==b?void 0:b.className,i,C,k);return v(t.createElement("span",Object.assign({},m,{ref:l,style:Object.assign(Object.assign({},n),null==b?void 0:b.style),className:w,onClick:e=>{null==u||u(!o),null==g||g(e)}}),d,t.createElement("span",null,c)))});var v=e.i(403541);let C=(0,g.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=f(e),(0,v.genPresetColor)(t,(e,{textColor:r,lightBorderColor:l,lightColor:a,darkColor:n})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:r,background:a,borderColor:l,"&-inverse":{color:t.colorTextLightSolid,background:n,borderColor:n},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},b),k=(e,t,r)=>{let l="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${l}Bg`],borderColor:e[`color${l}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},w=(0,g.genSubStyleComponent)(["Tag","status"],e=>{let t=f(e);return[k(t,"success","Success"),k(t,"processing","Info"),k(t,"error","Error"),k(t,"warning","Warning")]},b);var y=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(r[l[a]]=e[l[a]]);return r};let O=t.forwardRef((e,c)=>{let{prefixCls:d,className:u,rootClassName:g,style:m,children:f,icon:b,color:h,onClose:$,bordered:v=!0,visible:k}=e,O=y(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:x,direction:j,tag:E}=t.useContext(s.ConfigContext),[N,S]=t.useState(!0),T=(0,l.default)(O,["closeIcon","closable"]);t.useEffect(()=>{void 0!==k&&S(k)},[k]);let B=(0,a.isPresetColor)(h),z=(0,a.isPresetStatusColor)(h),M=B||z,I=Object.assign(Object.assign({backgroundColor:h&&!M?h:void 0},null==E?void 0:E.style),m),R=x("tag",d),[H,q,A]=p(R),P=(0,r.default)(R,null==E?void 0:E.className,{[`${R}-${h}`]:M,[`${R}-has-color`]:h&&!M,[`${R}-hidden`]:!N,[`${R}-rtl`]:"rtl"===j,[`${R}-borderless`]:!v},u,g,q,A),L=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||S(!1)},[,W]=(0,n.useClosable)((0,n.pickClosable)(e),(0,n.pickClosable)(E),{closable:!1,closeIconRender:e=>{let l=t.createElement("span",{className:`${R}-close-icon`,onClick:L},e);return(0,i.replaceElement)(e,l,e=>({onClick:t=>{var r;null==(r=null==e?void 0:e.onClick)||r.call(e,t),L(t)},className:(0,r.default)(null==e?void 0:e.className,`${R}-close-icon`)}))}}),F="function"==typeof O.onClick||f&&"a"===f.type,_=b||null,D=_?t.createElement(t.Fragment,null,_,f&&t.createElement("span",null,f)):f,G=t.createElement("span",Object.assign({},T,{ref:c,className:P,style:I}),D,W,B&&t.createElement(C,{key:"preset",prefixCls:R}),z&&t.createElement(w,{key:"status",prefixCls:R}));return H(F?t.createElement(o.default,{component:"Tag"},G):G)});O.CheckableTag=$,e.s(["Tag",0,O],262218)},801312,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let l={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"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:l}))});e.s(["default",0,n],801312)},475254,e=>{"use strict";var t=e.i(271645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},l=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var a={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 n=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:s,iconNode:c,...d},u)=>(0,t.createElement)("svg",{ref:u,...a,width:r,height:r,stroke:e,strokeWidth:i?24*Number(n)/Number(r):n,className:l("lucide",o),...!s&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(s)?s:[s]])),i=(e,a)=>{let i=(0,t.forwardRef)(({className:i,...o},s)=>(0,t.createElement)(n,{ref:s,iconNode:a,className:l(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,i),...o}));return i.displayName=r(e),i};e.s(["default",()=>i],475254)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),l=e.i(242064),a=e.i(517455);e.i(296059);var n=e.i(915654),i=e.i(183293),o=e.i(246422),s=e.i(838378);let c=(0,o.genStyleHooks)("Divider",e=>{let t=(0,s.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:l,lineWidth:a,textPaddingInline:o,orientationMargin:s,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,i.resetComponent)(e)),{borderBlockStart:`${(0,n.unit)(a)} solid ${l}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,n.unit)(a)} solid ${l}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,n.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,n.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${l}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,n.unit)(a)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${s} * 100%)`},"&::after":{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${s} * 100%)`},"&::after":{width:`calc(${s} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:l,borderStyle:"dashed",borderWidth:`${(0,n.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:l,borderStyle:"dotted",borderWidth:`${(0,n.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var d=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);at.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(r[l[a]]=e[l[a]]);return r};let u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:n,direction:i,className:o,style:s}=(0,l.useComponentConfig)("divider"),{prefixCls:g,type:m="horizontal",orientation:f="center",orientationMargin:b,className:p,rootClassName:h,children:$,dashed:v,variant:C="solid",plain:k,style:w,size:y}=e,O=d(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),x=n("divider",g),[j,E,N]=c(x),S=u[(0,a.default)(y)],T=!!$,B=t.useMemo(()=>"left"===f?"rtl"===i?"end":"start":"right"===f?"rtl"===i?"start":"end":f,[i,f]),z="start"===B&&null!=b,M="end"===B&&null!=b,I=(0,r.default)(x,o,E,N,`${x}-${m}`,{[`${x}-with-text`]:T,[`${x}-with-text-${B}`]:T,[`${x}-dashed`]:!!v,[`${x}-${C}`]:"solid"!==C,[`${x}-plain`]:!!k,[`${x}-rtl`]:"rtl"===i,[`${x}-no-default-orientation-margin-start`]:z,[`${x}-no-default-orientation-margin-end`]:M,[`${x}-${S}`]:!!S},p,h),R=t.useMemo(()=>"number"==typeof b?b:/^\d+$/.test(b)?Number(b):b,[b]);return j(t.createElement("div",Object.assign({className:I,style:Object.assign(Object.assign({},s),w)},O,{role:"separator"}),$&&"vertical"!==m&&t.createElement("span",{className:`${x}-inner-text`,style:{marginInlineStart:z?R:void 0,marginInlineEnd:M?R:void 0}},$)))}],312361)},56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),l=e.i(444755);let a=(0,e.i(673706).makeClassName)("Table"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,l.tremorTwMerge)(a("root"),"overflow-auto",o)},r.default.createElement("table",Object.assign({ref:n,className:(0,l.tremorTwMerge)(a("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});n.displayName="Table",e.s(["Table",()=>n],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),l=e.i(444755);let a=(0,e.i(673706).makeClassName)("TableHead"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:n,className:(0,l.tremorTwMerge)(a("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",o)},s),i))});n.displayName="TableHead",e.s(["TableHead",()=>n],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),l=e.i(444755);let a=(0,e.i(673706).makeClassName)("TableHeaderCell"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:n,className:(0,l.tremorTwMerge)(a("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",o)},s),i))});n.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>n],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),l=e.i(444755);let a=(0,e.i(673706).makeClassName)("TableBody"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:n,className:(0,l.tremorTwMerge)(a("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",o)},s),i))});n.displayName="TableBody",e.s(["TableBody",()=>n],942232)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),l=e.i(444755);let a=(0,e.i(673706).makeClassName)("TableRow"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:n,className:(0,l.tremorTwMerge)(a("row"),o)},s),i))});n.displayName="TableRow",e.s(["TableRow",()=>n],496020)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),l=e.i(444755);let a=(0,e.i(673706).makeClassName)("TableCell"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:n,className:(0,l.tremorTwMerge)(a("root"),"align-middle whitespace-nowrap text-left p-4",o)},s),i))});n.displayName="TableCell",e.s(["TableCell",()=>n],977572)},563113,887719,e=>{"use strict";var t=e.i(271645),r=e.i(864517),l=e.i(244009),a=e.i(408850),n=e.i(87414);let i=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(r=>{void 0!==e[r]&&(t[r]=e[r])})}),t};function o(e){if(!e)return;let{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}}function s(e){let{closable:r,closeIcon:l}=e||{};return t.default.useMemo(()=>{if(!r&&(!1===r||!1===l||null===l))return!1;if(void 0===r&&void 0===l)return null;let e={closeIcon:"boolean"!=typeof l&&null!==l?l:void 0};return r&&"object"==typeof r&&(e=Object.assign(Object.assign({},e),r)),e},[r,l])}e.s(["default",0,i],887719);let c={};e.s(["pickClosable",()=>o,"useClosable",0,(e,o,d=c)=>{let u=s(e),g=s(o),[m]=(0,a.useLocale)("global",n.default.global),f="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),b=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(r.default,null)},d),[d]),p=t.default.useMemo(()=>!1!==u&&(u?i(b,g,u):!1!==g&&(g?i(b,g):!!b.closable&&b)),[u,g,b]);return t.default.useMemo(()=>{var e,r;if(!1===p)return[!1,null,f,{}];let{closeIconRender:a}=b,{closeIcon:n}=p,i=n,o=(0,l.default)(p,!0);return null!=i&&(a&&(i=a(n)),i=t.default.isValidElement(i)?t.default.cloneElement(i,Object.assign(Object.assign(Object.assign({},i.props),{"aria-label":null!=(r=null==(e=i.props)?void 0:e["aria-label"])?r:m.close}),o)):t.default.createElement("span",Object.assign({"aria-label":m.close},o),i)),[!0,i,f,o]},[f,m.close,p,b])}],563113)},735049,e=>{"use strict";var t=e.i(654310),r=function(e){if((0,t.default)()&&window.document.documentElement){var r=Array.isArray(e)?e:[e],l=window.document.documentElement;return r.some(function(e){return e in l.style})}return!1},l=function(e,t){if(!r(e))return!1;var l=document.createElement("div"),a=l.style[e];return l.style[e]=t,l.style[e]!==a};function a(e,t){return Array.isArray(e)||void 0===t?r(e):l(e,t)}e.s(["isStyleSupport",()=>a])},190144,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let l={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"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:l}))});e.s(["default",0,n],190144)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),l=e.i(242064),a=e.i(529681);let n=e=>{let{prefixCls:l,className:a,style:n,size:i,shape:o}=e,s=(0,r.default)({[`${l}-lg`]:"large"===i,[`${l}-sm`]:"small"===i}),c=(0,r.default)({[`${l}-circle`]:"circle"===o,[`${l}-square`]:"square"===o,[`${l}-round`]:"round"===o}),d=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(l,s,c,a),style:Object.assign(Object.assign({},d),n)})};e.i(296059);var i=e.i(694758),o=e.i(915654),s=e.i(246422),c=e.i(838378);let d=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,o.unit)(e)}),g=e=>Object.assign({width:e},u(e)),m=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),f=e=>Object.assign({width:e},u(e)),b=(e,t,r)=>{let{skeletonButtonCls:l}=e;return{[`${r}${l}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${l}-round`]:{borderRadius:t}}},p=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),h=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:l,skeletonParagraphCls:a,skeletonButtonCls:n,skeletonInputCls:i,skeletonImageCls:o,controlHeight:s,controlHeightLG:c,controlHeightSM:u,gradientFromColor:h,padding:$,marginSM:v,borderRadius:C,titleHeight:k,blockRadius:w,paragraphLiHeight:y,controlHeightXS:O,paragraphMarginTop:x}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:$,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:h},g(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},g(c)),[`${r}-sm`]:Object.assign({},g(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[l]:{width:"100%",height:k,background:h,borderRadius:w,[`+ ${a}`]:{marginBlockStart:u}},[a]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:h,borderRadius:w,"+ li":{marginBlockStart:O}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${l}, ${a} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[l]:{marginBlockStart:v,[`+ ${a}`]:{marginBlockStart:x}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:l,controlHeightLG:a,controlHeightSM:n,gradientFromColor:i,calc:o}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:o(l).mul(2).equal(),minWidth:o(l).mul(2).equal()},p(l,o))},b(e,l,r)),{[`${r}-lg`]:Object.assign({},p(a,o))}),b(e,a,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},p(n,o))}),b(e,n,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:l,controlHeightLG:a,controlHeightSM:n}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},g(l)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},g(a)),[`${t}${t}-sm`]:Object.assign({},g(n))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:l,controlHeightLG:a,controlHeightSM:n,gradientFromColor:i,calc:o}=e;return{[l]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},m(t,o)),[`${l}-lg`]:Object.assign({},m(a,o)),[`${l}-sm`]:Object.assign({},m(n,o))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:l,borderRadiusSM:a,calc:n}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:l,borderRadius:a},f(n(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(r)),{maxWidth:n(r).mul(4).equal(),maxHeight:n(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[n]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${l}, - ${a} > li, - ${r}, - ${n}, - ${i}, - ${o} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:d,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,c.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),$=e=>{let{prefixCls:l,className:a,style:n,rows:i=0}=e,o=Array.from({length:i}).map((r,l)=>t.createElement("li",{key:l,style:{width:((e,t)=>{let{width:r,rows:l=2}=t;return Array.isArray(r)?r[e]:l-1===e?r:void 0})(l,e)}}));return t.createElement("ul",{className:(0,r.default)(l,a),style:n},o)},v=({prefixCls:e,className:l,width:a,style:n})=>t.createElement("h3",{className:(0,r.default)(e,l),style:Object.assign({width:a},n)});function C(e){return e&&"object"==typeof e?e:{}}let k=e=>{let{prefixCls:a,loading:i,className:o,rootClassName:s,style:c,children:d,avatar:u=!1,title:g=!0,paragraph:m=!0,active:f,round:b}=e,{getPrefixCls:p,direction:k,className:w,style:y}=(0,l.useComponentConfig)("skeleton"),O=p("skeleton",a),[x,j,E]=h(O);if(i||!("loading"in e)){let e,l,a=!!u,i=!!g,d=!!m;if(a){let r=Object.assign(Object.assign({prefixCls:`${O}-avatar`},i&&!d?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),C(u));e=t.createElement("div",{className:`${O}-header`},t.createElement(n,Object.assign({},r)))}if(i||d){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${O}-title`},!a&&d?{width:"38%"}:a&&d?{width:"50%"}:{}),C(g));e=t.createElement(v,Object.assign({},r))}if(d){let e,l=Object.assign(Object.assign({prefixCls:`${O}-paragraph`},(e={},a&&i||(e.width="61%"),!a&&i?e.rows=3:e.rows=2,e)),C(m));r=t.createElement($,Object.assign({},l))}l=t.createElement("div",{className:`${O}-content`},e,r)}let p=(0,r.default)(O,{[`${O}-with-avatar`]:a,[`${O}-active`]:f,[`${O}-rtl`]:"rtl"===k,[`${O}-round`]:b},w,o,s,j,E);return x(t.createElement("div",{className:p,style:Object.assign(Object.assign({},y),c)},e,l))}return null!=d?d:null};k.Button=e=>{let{prefixCls:i,className:o,rootClassName:s,active:c,block:d=!1,size:u="default"}=e,{getPrefixCls:g}=t.useContext(l.ConfigContext),m=g("skeleton",i),[f,b,p]=h(m),$=(0,a.default)(e,["prefixCls"]),v=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:d},o,s,b,p);return f(t.createElement("div",{className:v},t.createElement(n,Object.assign({prefixCls:`${m}-button`,size:u},$))))},k.Avatar=e=>{let{prefixCls:i,className:o,rootClassName:s,active:c,shape:d="circle",size:u="default"}=e,{getPrefixCls:g}=t.useContext(l.ConfigContext),m=g("skeleton",i),[f,b,p]=h(m),$=(0,a.default)(e,["prefixCls","className"]),v=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c},o,s,b,p);return f(t.createElement("div",{className:v},t.createElement(n,Object.assign({prefixCls:`${m}-avatar`,shape:d,size:u},$))))},k.Input=e=>{let{prefixCls:i,className:o,rootClassName:s,active:c,block:d,size:u="default"}=e,{getPrefixCls:g}=t.useContext(l.ConfigContext),m=g("skeleton",i),[f,b,p]=h(m),$=(0,a.default)(e,["prefixCls"]),v=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:c,[`${m}-block`]:d},o,s,b,p);return f(t.createElement("div",{className:v},t.createElement(n,Object.assign({prefixCls:`${m}-input`,size:u},$))))},k.Image=e=>{let{prefixCls:a,className:n,rootClassName:i,style:o,active:s}=e,{getPrefixCls:c}=t.useContext(l.ConfigContext),d=c("skeleton",a),[u,g,m]=h(d),f=(0,r.default)(d,`${d}-element`,{[`${d}-active`]:s},n,i,g,m);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${d}-image`,n),style:o},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${d}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${d}-image-path`})))))},k.Node=e=>{let{prefixCls:a,className:n,rootClassName:i,style:o,active:s,children:c}=e,{getPrefixCls:d}=t.useContext(l.ConfigContext),u=d("skeleton",a),[g,m,f]=h(u),b=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},m,n,i,f);return g(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${u}-image`,n),style:o},c)))},e.s(["default",0,k],185793)},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let l={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"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:l}))});e.s(["default",0,n],959013)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},871943,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/43a9809839de4e6f.js b/litellm/proxy/_experimental/out/_next/static/chunks/43a9809839de4e6f.js new file mode 100644 index 0000000000..0aadedee47 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/43a9809839de4e6f.js @@ -0,0 +1,179 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,93826,174886,952571,e=>{"use strict";var s=e.i(271645);let t=s.forwardRef(function(e,t){return s.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),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});e.s(["SearchIcon",0,t],93826);var l=e.i(991124);e.s(["Copy",()=>l.default],174886);var a=e.i(879664);e.s(["Info",()=>a.default],952571)},737033,e=>{"use strict";var s=e.i(843476),t=e.i(271645),l=e.i(599724),a=e.i(928685),r=e.i(311451),i=e.i(199133),n=e.i(798496),c=e.i(389083),o=e.i(592968),d=e.i(166406),x=e.i(596239),m=e.i(652272);e.s(["default",0,({skills:e,isLoading:h,isAdmin:u,accessToken:p,publicPage:g=!1,onPublishSuccess:j})=>{let[b,f]=(0,t.useState)(""),[v,y]=(0,t.useState)(void 0),[N,_]=(0,t.useState)(null),T=e.length,S=(0,t.useMemo)(()=>[...new Set(e.map(e=>e.domain).filter(Boolean))],[e]),w=(0,t.useMemo)(()=>[...new Set(e.map(e=>e.namespace).filter(Boolean))],[e]),C=(0,t.useMemo)(()=>{let s=e;if(v&&(s=s.filter(e=>(e.domain||"General")===v)),b.trim()){let e=b.toLowerCase();s=s.filter(s=>s.name.toLowerCase().includes(e)||s.description?.toLowerCase().includes(e)||s.domain?.toLowerCase().includes(e)||s.namespace?.toLowerCase().includes(e)||s.keywords?.some(s=>s.toLowerCase().includes(e)))}return s},[e,b,v]);return N?(0,s.jsx)(m.default,{skill:N,onBack:()=>_(null),isAdmin:u,accessToken:p,onPublishClick:j}):h?(0,s.jsx)("div",{className:"text-center py-16 text-gray-400",children:"Loading skills..."}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Total Skills"}),(0,s.jsx)("div",{className:"text-2xl font-semibold text-gray-900",children:T})]}),(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Namespaces"}),(0,s.jsx)("div",{className:"text-2xl font-semibold text-gray-900",children:w.length})]}),(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Domains"}),(0,s.jsx)("div",{className:"text-2xl font-semibold text-gray-900",children:S.length})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)("h3",{className:"text-sm font-semibold text-gray-700",children:["All ",g?"Public ":"","Skills"]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(i.Select,{placeholder:"All Domains",allowClear:!0,value:v,onChange:e=>y(e),style:{width:160},options:S.map(e=>({label:e,value:e}))}),(0,s.jsx)(r.Input,{prefix:(0,s.jsx)(a.SearchOutlined,{className:"text-gray-400"}),placeholder:"Search by name, namespace, or tag…",value:b,onChange:e=>f(e.target.value),style:{width:280},allowClear:!0})]})]}),(0,s.jsx)(n.ModelDataTable,{columns:((e,t,a=!1)=>[{header:"Skill Name",accessorKey:"name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:a})=>{let r=a.original;return(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("button",{type:"button",className:"font-medium text-sm cursor-pointer text-blue-600 hover:underline bg-transparent border-none p-0",onClick:()=>e(r),children:r.name}),(0,s.jsx)(o.Tooltip,{title:"Copy skill name",children:(0,s.jsx)(d.CopyOutlined,{onClick:()=>t(r.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),r.description&&(0,s.jsx)(l.Text,{className:"text-xs text-gray-500 line-clamp-1 md:hidden",children:r.description})]})}},{header:"Description",accessorKey:"description",enableSorting:!1,cell:({row:e})=>(0,s.jsx)(l.Text,{className:"text-xs line-clamp-2",children:e.original.description||"-"})},{header:"Category",accessorKey:"category",enableSorting:!0,cell:({row:e})=>{let t=e.original.category;return t?(0,s.jsx)(c.Badge,{color:"blue",size:"xs",children:t}):(0,s.jsx)(l.Text,{className:"text-xs text-gray-400",children:"-"})}},{header:"Domain",accessorKey:"domain",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(l.Text,{className:"text-xs",children:e.original.domain||"-"})},{header:"Source",accessorKey:"source",enableSorting:!1,cell:({row:e})=>{let t=e.original.source,a=null,r="-";return(t?.source==="github"&&t.repo?(a=`https://github.com/${t.repo}`,r=t.repo):t?.source==="git-subdir"&&t.url?r=(a=t.path?`${t.url}/tree/main/${t.path}`:t.url).replace("https://github.com/",""):t?.source==="url"&&t.url&&(a=t.url,r=t.url.replace(/^https?:\/\//,"")),a)?(0,s.jsxs)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:underline truncate max-w-[180px]",title:r,children:[(0,s.jsx)("span",{className:"truncate",children:r}),(0,s.jsx)(x.LinkOutlined,{className:"shrink-0",style:{fontSize:10}})]}):(0,s.jsx)(l.Text,{className:"text-xs text-gray-400",children:"-"})}},{header:"Status",accessorKey:"enabled",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(c.Badge,{color:e.original.enabled?"green":"gray",size:"xs",children:e.original.enabled?"Public":"Draft"})}])(e=>_(e),e=>{navigator.clipboard.writeText(e)},g),data:C,isLoading:!1,defaultSorting:[{id:"name",desc:!1}]}),(0,s.jsx)("div",{className:"mt-3 text-center",children:(0,s.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["Showing ",C.length," of ",T," skill",1!==T?"s":""]})})]})]})}],737033)},976883,e=>{"use strict";var s=e.i(843476),t=e.i(275144),l=e.i(434626),a=e.i(93826),r=e.i(994388),i=e.i(304967),n=e.i(599724),c=e.i(629569),o=e.i(212931),d=e.i(199133),x=e.i(653496),m=e.i(262218),h=e.i(592968),u=e.i(174886),p=e.i(952571),g=e.i(271645),j=e.i(798496),b=e.i(727749),f=e.i(402874),v=e.i(764205),y=e.i(737033),N=e.i(190272),_=e.i(785913),T=e.i(916925);let{TabPane:S}=x.Tabs;e.s(["default",0,({accessToken:e,isEmbedded:w=!1})=>{let C,k,A,M,L,P,z,[E,D]=(0,g.useState)(null),[I,O]=(0,g.useState)(null),[K,R]=(0,g.useState)(null),[H,U]=(0,g.useState)("LiteLLM Gateway"),[F,$]=(0,g.useState)(null),[B,W]=(0,g.useState)(""),[q,G]=(0,g.useState)({}),[V,X]=(0,g.useState)(!0),[J,Y]=(0,g.useState)(!0),[Q,Z]=(0,g.useState)(!0),[ee,es]=(0,g.useState)(""),[et,el]=(0,g.useState)(""),[ea,er]=(0,g.useState)(""),[ei,en]=(0,g.useState)([]),[ec,eo]=(0,g.useState)([]),[ed,ex]=(0,g.useState)([]),[em,eh]=(0,g.useState)([]),[eu,ep]=(0,g.useState)([]),[eg,ej]=(0,g.useState)("I'm alive! ✓"),[eb,ef]=(0,g.useState)(!1),[ev,ey]=(0,g.useState)(!1),[eN,e_]=(0,g.useState)(!1),[eT,eS]=(0,g.useState)(null),[ew,eC]=(0,g.useState)(null),[ek,eA]=(0,g.useState)(null),[eM,eL]=(0,g.useState)({}),[eP,ez]=(0,g.useState)("models"),[eE,eD]=(0,g.useState)([]),[eI,eO]=(0,g.useState)(!1);(0,g.useEffect)(()=>{(async()=>{try{await (0,v.getUiConfig)()}catch(e){console.error("Failed to get UI config:",e)}let e=async()=>{try{X(!0);let e=await (0,v.modelHubPublicModelsCall)();console.log("ModelHubData:",e),D(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public model data",e),ej("Service unavailable")}finally{X(!1)}},s=async()=>{try{Y(!0);let e=await (0,v.agentHubPublicModelsCall)();console.log("AgentHubData:",e),O(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public agent data",e)}finally{Y(!1)}},t=async()=>{try{Z(!0);let e=await (0,v.mcpHubPublicServersCall)();console.log("MCPHubData:",e),R(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public MCP server data",e)}finally{Z(!1)}},l=async()=>{try{eO(!0);let e=await (0,v.skillHubPublicCall)();eD(e.plugins??[])}catch(e){console.error("There was an error fetching the public skill data",e)}finally{eO(!1)}};(async()=>{let e=await (0,v.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),U(e.docs_title),$(e.custom_docs_description),W(e.litellm_version),G(e.useful_links||{})})(),e(),s(),t(),l()})()},[]),(0,g.useEffect)(()=>{},[ee,ei,ec,ed]);let eK=(0,g.useMemo)(()=>{if(!E||!Array.isArray(E))return[];let e=E;if(ee.trim()){let s=ee.toLowerCase(),t=s.split(/\s+/),l=E.filter(e=>{let l=e.model_group.toLowerCase();return!!l.includes(s)||t.every(e=>l.includes(e))});l.length>0&&(e=l.sort((e,t)=>{let l=e.model_group.toLowerCase(),a=t.model_group.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=50*!!s.split(/\s+/).every(e=>l.includes(e)),d=50*!!s.split(/\s+/).every(e=>a.includes(e)),x=l.length;return i+c+d+(1e3-a.length)-(r+n+o+(1e3-x))}))}return e.filter(e=>{let s=0===ei.length||ei.some(s=>e.providers.includes(s)),t=0===ec.length||ec.includes(e.mode||""),l=0===ed.length||Object.entries(e).filter(([e,s])=>e.startsWith("supports_")&&!0===s).some(([e])=>{let s=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return ed.includes(s)});return s&&t&&l})},[E,ee,ei,ec,ed]),eR=(0,g.useMemo)(()=>{if(!I||!Array.isArray(I))return[];let e=I;if(et.trim()){let s=et.toLowerCase(),t=s.split(/\s+/);e=(e=I.filter(e=>{let l=e.name.toLowerCase(),a=e.description.toLowerCase();return!!(l.includes(s)||a.includes(s))||t.every(e=>l.includes(e)||a.includes(e))})).sort((e,t)=>{let l=e.name.toLowerCase(),a=t.name.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=r+n+(1e3-l.length);return i+c+(1e3-a.length)-o})}return e.filter(e=>0===em.length||e.skills?.some(e=>e.tags?.some(e=>em.includes(e))))},[I,et,em]),eH=(0,g.useMemo)(()=>{if(!K||!Array.isArray(K))return[];let e=K;if(ea.trim()){let s=ea.toLowerCase(),t=s.split(/\s+/);e=(e=K.filter(e=>{let l=e.server_name.toLowerCase(),a=(e.mcp_info?.description||"").toLowerCase();return!!(l.includes(s)||a.includes(s))||t.every(e=>l.includes(e)||a.includes(e))})).sort((e,t)=>{let l=e.server_name.toLowerCase(),a=t.server_name.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=r+n+(1e3-l.length);return i+c+(1e3-a.length)-o})}return e.filter(e=>0===eu.length||eu.includes(e.transport))},[K,ea,eu]),eU=e=>{navigator.clipboard.writeText(e),b.default.success("Copied to clipboard!")},eF=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),e$=e=>`$${(1e6*e).toFixed(4)}`,eB=e=>e?e>=1e3?`${(e/1e3).toFixed(0)}K`:e.toString():"N/A";return(0,s.jsx)(t.ThemeProvider,{accessToken:e,children:(0,s.jsxs)("div",{className:w?"w-full":"min-h-screen bg-white",children:[!w&&(0,s.jsx)(f.default,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:eL,proxySettings:eM,accessToken:e||null,isPublicPage:!0,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,s.jsxs)("div",{className:w?"w-full p-6":"w-full px-8 py-12",children:[w&&(0,s.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:(0,s.jsx)("p",{className:"text-sm text-gray-700",children:"These are models, agents, and MCP servers your proxy admin has indicated are available in your company."})}),!w&&(0,s.jsxs)(i.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,s.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:F||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,s.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,s.jsxs)("span",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"w-4 h-4 mr-2",children:"🔧"}),"Built with litellm: v",B]})})]}),q&&Object.keys(q).length>0&&(0,s.jsxs)(i.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(q||{}).map(([e,s])=>({title:e,url:"string"==typeof s?s:s.url,index:"string"==typeof s?0:s.index??0})).sort((e,s)=>e.index-s.index).map(({title:e,url:t})=>(0,s.jsxs)("button",{onClick:()=>window.open(t,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,s.jsx)(l.ExternalLinkIcon,{className:"w-4 h-4"}),(0,s.jsx)(n.Text,{className:"text-sm font-medium",children:e})]},e))})]}),!w&&(0,s.jsxs)(i.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,s.jsxs)(n.Text,{className:"text-green-600 font-medium text-sm",children:["Service status: ",eg]})})]}),(0,s.jsx)(i.Card,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:(0,s.jsxs)(x.Tabs,{activeKey:eP,onChange:ez,size:"large",className:"public-hub-tabs",children:[(0,s.jsxs)(S,{tab:"Model Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,s.jsx)(h.Tooltip,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,s.jsx)(p.Info,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(a.SearchIcon,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:ee,onChange:e=>es(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,s.jsx)(d.Select,{mode:"multiple",value:ei,onChange:e=>en(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:t}=(0,T.getProviderLogoAndName)(e.value);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,s.jsx)("img",{src:t,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e.label})]})},children:E&&Array.isArray(E)&&(C=new Set,E.forEach(e=>{(e.providers??[]).forEach(e=>C.add(e))}),Array.from(C)).map(e=>(0,s.jsx)(d.Select.Option,{value:e,children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,s.jsx)(d.Select,{mode:"multiple",value:ec,onChange:e=>eo(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:E&&Array.isArray(E)&&(k=new Set,E.forEach(e=>{e.mode&&k.add(e.mode)}),Array.from(k)).map(e=>(0,s.jsx)(d.Select.Option,{value:e,children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,s.jsx)(d.Select,{mode:"multiple",value:ed,onChange:e=>ex(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:E&&Array.isArray(E)&&(A=new Set,E.forEach(e=>{Object.entries(e).filter(([e,s])=>e.startsWith("supports_")&&!0===s).forEach(([e])=>{let s=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");A.add(s)})}),Array.from(A).sort()).map(e=>(0,s.jsx)(d.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(h.Tooltip,{title:e.original.model_group,children:(0,s.jsx)(r.Button,{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",onClick:()=>{eS(e.original),ef(!0)},children:e.original.model_group})})}),size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:({row:e})=>{let t=e.original.providers??[];return(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>{let{logo:t}=(0,T.getProviderLogoAndName)(e);return(0,s.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[t&&(0,s.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:({row:e})=>{let t=e.original.mode;return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:(e=>{switch(e?.toLowerCase()){case"chat":return"💬";case"rerank":return"🔄";case"embedding":return"📄";default:return"🤖"}})(t||"")}),(0,s.jsx)(n.Text,{children:t||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(n.Text,{className:"text-center",children:eB(e.original.max_input_tokens)}),size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(n.Text,{className:"text-center",children:eB(e.original.max_output_tokens)}),size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:({row:e})=>{let t=e.original.input_cost_per_token;return(0,s.jsx)(n.Text,{className:"text-center",children:t?e$(t):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:({row:e})=>{let t=e.original.output_cost_per_token;return(0,s.jsx)(n.Text,{className:"text-center",children:t?e$(t):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:({row:e})=>{let t=Object.entries(e.original).filter(([e,s])=>e.startsWith("supports_")&&!0===s).map(([e])=>eF(e));return 0===t.length?(0,s.jsx)(n.Text,{className:"text-gray-400",children:"-"}):1===t.length?(0,s.jsx)("div",{className:"h-6 flex items-center",children:(0,s.jsx)(m.Tag,{color:"blue",className:"text-xs",children:t[0]})}):(0,s.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,s.jsx)(m.Tag,{color:"blue",className:"text-xs",children:t[0]}),(0,s.jsx)(h.Tooltip,{title:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"font-medium",children:"All Features:"}),t.map((e,t)=>(0,s.jsxs)("div",{className:"text-xs",children:["• ",e]},t))]}),trigger:"click",placement:"topLeft",children:(0,s.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",t.length-1]})})]})},size:120},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,cell:({row:e})=>{let t=e.original,l="healthy"===t.health_status?"green":"unhealthy"===t.health_status?"red":"default",a=t.health_response_time?`Response Time: ${Number(t.health_response_time).toFixed(2)}ms`:"N/A",r=t.health_checked_at?`Last Checked: ${new Date(t.health_checked_at).toLocaleString()}`:"N/A";return(0,s.jsx)(h.Tooltip,{title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{children:a}),(0,s.jsx)("div",{children:r})]}),children:(0,s.jsx)(m.Tag,{color:l,children:(0,s.jsx)("span",{className:"capitalize",children:t.health_status??"Unknown"})},t.model_group)})},size:100},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:({row:e})=>{var t,l;let a,r=e.original;return(0,s.jsx)(n.Text,{className:"text-xs text-gray-600",children:(t=r.rpm,l=r.tpm,a=[],t&&a.push(`RPM: ${t.toLocaleString()}`),l&&a.push(`TPM: ${l.toLocaleString()}`),a.length>0?a.join(", "):"N/A")})},size:150}],data:eK,isLoading:V,defaultSorting:[{id:"model_group",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(n.Text,{className:"text-sm text-gray-600",children:["Showing ",eK.length," of ",E?.length||0," models"]})})]},"models"),I&&Array.isArray(I)&&I.length>0&&(0,s.jsxs)(S,{tab:"Agent Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Agents"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium text-gray-700",children:"Search Agents:"}),(0,s.jsx)(h.Tooltip,{title:"Search agents by name or description",placement:"top",children:(0,s.jsx)(p.Info,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(a.SearchIcon,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search agent names or descriptions...",value:et,onChange:e=>el(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Skills:"}),(0,s.jsx)(d.Select,{mode:"multiple",value:em,onChange:e=>eh(e),placeholder:"Select skills",className:"w-full",size:"large",allowClear:!0,children:I&&Array.isArray(I)&&(M=new Set,I.forEach(e=>{e.skills?.forEach(e=>{e.tags?.forEach(e=>M.add(e))})}),Array.from(M).sort()).map(e=>(0,s.jsx)(d.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Agent Name",accessorKey:"name",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(h.Tooltip,{title:e.original.name,children:(0,s.jsx)(r.Button,{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",onClick:()=>{eC(e.original),ey(!0)},children:e.original.name})})}),size:150},{header:"Description",accessorKey:"description",enableSorting:!1,cell:({row:e})=>{let t=e.original.description??"",l=t.length>80?t.substring(0,80)+"...":t;return(0,s.jsx)(h.Tooltip,{title:t,children:(0,s.jsx)(n.Text,{className:"text-sm text-gray-700",children:l})})},size:250},{header:"Version",accessorKey:"version",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(n.Text,{className:"text-sm",children:e.original.version}),size:80},{header:"Provider",accessorKey:"provider",enableSorting:!1,cell:({row:e})=>{let t=e.original.provider;return t?(0,s.jsx)("div",{className:"text-sm",children:(0,s.jsx)(n.Text,{className:"font-medium",children:t.organization})}):(0,s.jsx)(n.Text,{className:"text-gray-400",children:"-"})},size:120},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let t=e.original.skills||[];return 0===t.length?(0,s.jsx)(n.Text,{className:"text-gray-400",children:"-"}):1===t.length?(0,s.jsx)("div",{className:"h-6 flex items-center",children:(0,s.jsx)(m.Tag,{color:"purple",className:"text-xs",children:t[0].name})}):(0,s.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,s.jsx)(m.Tag,{color:"purple",className:"text-xs",children:t[0].name}),(0,s.jsx)(h.Tooltip,{title:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"font-medium",children:"All Skills:"}),t.map((e,t)=>(0,s.jsxs)("div",{className:"text-xs",children:["• ",e.name]},t))]}),trigger:"click",placement:"topLeft",children:(0,s.jsxs)("span",{className:"text-xs text-purple-600 cursor-pointer hover:text-purple-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",t.length-1]})})]})},size:150},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let t=Object.entries(e.original.capabilities||{}).filter(([e,s])=>!0===s).map(([e])=>e);return 0===t.length?(0,s.jsx)(n.Text,{className:"text-gray-400",children:"-"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>(0,s.jsx)(m.Tag,{color:"green",className:"text-xs capitalize",children:e},e))})},size:150}],data:eR,isLoading:J,defaultSorting:[{id:"name",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(n.Text,{className:"text-sm text-gray-600",children:["Showing ",eR.length," of ",I?.length||0," agents"]})})]},"agents"),K&&Array.isArray(K)&&K.length>0&&(0,s.jsxs)(S,{tab:"MCP Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available MCP Servers"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium text-gray-700",children:"Search MCP Servers:"}),(0,s.jsx)(h.Tooltip,{title:"Search MCP servers by name or description",placement:"top",children:(0,s.jsx)(p.Info,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(a.SearchIcon,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search MCP server names or descriptions...",value:ea,onChange:e=>er(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Transport:"}),(0,s.jsx)(d.Select,{mode:"multiple",value:eu,onChange:e=>ep(e),placeholder:"Select transport types",className:"w-full",size:"large",allowClear:!0,children:K&&Array.isArray(K)&&(L=new Set,K.forEach(e=>{e.transport&&L.add(e.transport)}),Array.from(L).sort()).map(e=>(0,s.jsx)(d.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(h.Tooltip,{title:e.original.server_name,children:(0,s.jsx)(r.Button,{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",onClick:()=>{eA(e.original),e_(!0)},children:e.original.server_name})})}),size:150},{header:"Description",accessorKey:"mcp_info.description",enableSorting:!1,cell:({row:e})=>{let t=String(e.original.mcp_info?.description??"-"),l=t.length>80?t.substring(0,80)+"...":t;return(0,s.jsx)(h.Tooltip,{title:t,children:(0,s.jsx)(n.Text,{className:"text-sm text-gray-700",children:l})})},size:250},{header:"URL",accessorKey:"url",enableSorting:!1,cell:({row:e})=>{let t=e.original.url??"",l=t.length>40?t.substring(0,40)+"...":t;return(0,s.jsx)(h.Tooltip,{title:t,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(n.Text,{className:"text-xs font-mono",children:l}),(0,s.jsx)(u.Copy,{onClick:()=>eU(t),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-3 h-3"})]})})},size:200},{header:"Transport",accessorKey:"transport",enableSorting:!0,cell:({row:e})=>{let t=e.original.transport;return(0,s.jsx)(m.Tag,{color:"blue",className:"text-xs uppercase",children:t})},size:100},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,cell:({row:e})=>{let t=e.original.auth_type;return(0,s.jsx)(m.Tag,{color:"none"===t?"gray":"green",className:"text-xs capitalize",children:t})},size:100}],data:eH,isLoading:Q,defaultSorting:[{id:"server_name",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(n.Text,{className:"text-sm text-gray-600",children:["Showing ",eH.length," of ",K?.length||0," MCP servers"]})})]},"mcp"),(0,s.jsx)(S,{tab:"Skill Hub",children:(0,s.jsx)(y.default,{skills:eE,isLoading:eI,publicPage:!0})},"skills")]})})]}),(0,s.jsx)(o.Modal,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:eT?.model_group||"Model Details"}),eT&&(0,s.jsx)(h.Tooltip,{title:"Copy model name",children:(0,s.jsx)(u.Copy,{onClick:()=>eU(eT.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:eb,footer:null,onOk:()=>{ef(!1),eS(null)},onCancel:()=>{ef(!1),eS(null)},children:eT&&(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Model Name:"}),(0,s.jsx)(n.Text,{children:eT.model_group})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Mode:"}),(0,s.jsx)(n.Text,{children:eT.mode||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Providers:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(eT.providers??[]).map(e=>{let{logo:t}=(0,T.getProviderLogoAndName)(e);return(0,s.jsx)(m.Tag,{color:"blue",children:(0,s.jsxs)("div",{className:"flex items-center space-x-1",children:[t&&(0,s.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),eT.model_group.includes("*")&&(0,s.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,s.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,s.jsx)(p.Info,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,s.jsxs)(n.Text,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,s.jsxs)(n.Text,{className:"text-sm text-blue-800",children:["For example, with"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:eT.model_group}),", you can use any string (",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:eT.model_group.replaceAll("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,s.jsx)(n.Text,{children:eT.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,s.jsx)(n.Text,{children:eT.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,s.jsx)(n.Text,{children:eT.input_cost_per_token?e$(eT.input_cost_per_token):"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,s.jsx)(n.Text,{children:eT.output_cost_per_token?e$(eT.output_cost_per_token):"Not specified"})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:(P=Object.entries(eT).filter(([e,s])=>e.startsWith("supports_")&&!0===s).map(([e])=>e),z=["green","blue","purple","orange","red","yellow"],0===P.length?(0,s.jsx)(n.Text,{className:"text-gray-500",children:"No special capabilities listed"}):P.map((e,t)=>(0,s.jsx)(m.Tag,{color:z[t%z.length],children:eF(e)},e)))})]}),(eT.tpm||eT.rpm)&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[eT.tpm&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,s.jsx)(n.Text,{children:eT.tpm.toLocaleString()})]}),eT.rpm&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,s.jsx)(n.Text,{children:eT.rpm.toLocaleString()})]})]})]}),eT.supported_openai_params&&eT.supported_openai_params.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:eT.supported_openai_params.map(e=>(0,s.jsx)(m.Tag,{color:"green",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-sm",children:(0,N.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,_.getEndpointType)(eT.mode||"chat"),selectedModel:eT.model_group,selectedSdk:"openai"})})}),(0,s.jsx)("div",{className:"mt-2 text-right",children:(0,s.jsx)("button",{onClick:()=>{eU((0,N.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,_.getEndpointType)(eT.mode||"chat"),selectedModel:eT.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})}),(0,s.jsx)(o.Modal,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:ew?.name||"Agent Details"}),ew&&(0,s.jsx)(h.Tooltip,{title:"Copy agent name",children:(0,s.jsx)(u.Copy,{onClick:()=>eU(ew.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ev,footer:null,onOk:()=>{ey(!1),eC(null)},onCancel:()=>{ey(!1),eC(null)},children:ew&&(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Name:"}),(0,s.jsx)(n.Text,{children:ew.name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Version:"}),(0,s.jsx)(n.Text,{children:ew.version})]}),(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Description:"}),(0,s.jsx)(n.Text,{children:ew.description})]}),ew.url&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"URL:"}),(0,s.jsx)("a",{href:ew.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all",children:ew.url})]})]})]}),ew.capabilities&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(ew.capabilities).filter(([e,s])=>!0===s).map(([e])=>(0,s.jsx)(m.Tag,{color:"green",className:"capitalize",children:e},e))})]}),ew.skills&&ew.skills.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,s.jsx)("div",{className:"space-y-4",children:ew.skills.map((e,t)=>(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium text-base",children:e.name}),(0,s.jsx)(n.Text,{className:"text-sm text-gray-600",children:e.description})]})}),e.tags&&e.tags.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(e=>(0,s.jsx)(m.Tag,{color:"purple",className:"text-xs",children:e},e))})]},t))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Input Modes:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ew.defaultInputModes??[]).map(e=>(0,s.jsx)(m.Tag,{color:"blue",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Output Modes:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ew.defaultOutputModes??[]).map(e=>(0,s.jsx)(m.Tag,{color:"blue",children:e},e))})]})]})]}),ew.documentationUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Documentation"}),(0,s.jsxs)("a",{href:ew.documentationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 flex items-center space-x-2",children:[(0,s.jsx)(l.ExternalLinkIcon,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"View Documentation"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example (A2A Protocol)"}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 1: Retrieve Agent Card"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-xs",children:`base_url = '${ew.url}' + +resolver = A2ACardResolver( + httpx_client=httpx_client, + base_url=base_url, + # agent_card_path uses default, extended_agent_card_path also uses default +) + +# Fetch Public Agent Card and Initialize Client +final_agent_card_to_use: AgentCard | None = None +_public_card = ( + await resolver.get_agent_card() +) # Fetches from default public path - \`/agents/{agent_id}/\` +final_agent_card_to_use = _public_card + +if _public_card.supports_authenticated_extended_card: + try: + auth_headers_dict = { + 'Authorization': 'Bearer dummy-token-for-extended-card' + } + _extended_card = await resolver.get_agent_card( + relative_card_path=EXTENDED_AGENT_CARD_PATH, + http_kwargs={'headers': auth_headers_dict}, + ) + final_agent_card_to_use = ( + _extended_card # Update to use the extended card + ) + except Exception as e_extended: + logger.warning( + f'Failed to fetch extended agent card: {e_extended}. Will proceed with public card.', + exc_info=True, + )`})}),(0,s.jsx)("div",{className:"mt-2 text-right",children:(0,s.jsx)("button",{onClick:()=>{eU(`from a2a.client import A2ACardResolver, A2AClient +from a2a.types import ( + AgentCard, + MessageSendParams, + SendMessageRequest, + SendStreamingMessageRequest, +) +from a2a.utils.constants import ( + AGENT_CARD_WELL_KNOWN_PATH, + EXTENDED_AGENT_CARD_PATH, +) + +base_url = '${ew.url}' + +resolver = A2ACardResolver( + httpx_client=httpx_client, + base_url=base_url, + # agent_card_path uses default, extended_agent_card_path also uses default +) + +# Fetch Public Agent Card and Initialize Client +final_agent_card_to_use: AgentCard | None = None +_public_card = ( + await resolver.get_agent_card() +) # Fetches from default public path - \`/agents/{agent_id}/\` +final_agent_card_to_use = _public_card + +if _public_card.supports_authenticated_extended_card: + try: + auth_headers_dict = { + 'Authorization': 'Bearer dummy-token-for-extended-card' + } + _extended_card = await resolver.get_agent_card( + relative_card_path=EXTENDED_AGENT_CARD_PATH, + http_kwargs={'headers': auth_headers_dict}, + ) + final_agent_card_to_use = ( + _extended_card # Update to use the extended card + ) + except Exception as e_extended: + logger.warning( + f'Failed to fetch extended agent card: {e_extended}. Will proceed with public card.', + exc_info=True, + )`)},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 2: Call the Agent"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-xs",children:`client = A2AClient( + httpx_client=httpx_client, agent_card=final_agent_card_to_use +) + +send_message_payload: dict[str, Any] = { + 'message': { + 'role': 'user', + 'parts': [ + {'kind': 'text', 'text': 'how much is 10 USD in INR?'} + ], + 'messageId': uuid4().hex, + }, +} +request = SendMessageRequest( + id=str(uuid4()), params=MessageSendParams(**send_message_payload) +) + +response = await client.send_message(request) +print(response.model_dump(mode='json', exclude_none=True))`})}),(0,s.jsx)("div",{className:"mt-2 text-right",children:(0,s.jsx)("button",{onClick:()=>{eU(`client = A2AClient( + httpx_client=httpx_client, agent_card=final_agent_card_to_use +) + +send_message_payload: dict[str, Any] = { + 'message': { + 'role': 'user', + 'parts': [ + {'kind': 'text', 'text': 'how much is 10 USD in INR?'} + ], + 'messageId': uuid4().hex, + }, +} +request = SendMessageRequest( + id=str(uuid4()), params=MessageSendParams(**send_message_payload) +) + +response = await client.send_message(request) +print(response.model_dump(mode='json', exclude_none=True))`)},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})]})}),(0,s.jsx)(o.Modal,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:ek?.server_name||"MCP Server Details"}),ek&&(0,s.jsx)(h.Tooltip,{title:"Copy server name",children:(0,s.jsx)(u.Copy,{onClick:()=>eU(ek.server_name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:eN,footer:null,onOk:()=>{e_(!1),eA(null)},onCancel:()=>{e_(!1),eA(null)},children:ek&&(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Server Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Server Name:"}),(0,s.jsx)(n.Text,{children:ek.server_name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Transport:"}),(0,s.jsx)(m.Tag,{color:"blue",children:ek.transport})]}),ek.alias&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Alias:"}),(0,s.jsx)(n.Text,{children:ek.alias})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Auth Type:"}),(0,s.jsx)(m.Tag,{color:"none"===ek.auth_type?"gray":"green",children:ek.auth_type})]}),(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Description:"}),(0,s.jsx)(n.Text,{children:ek.mcp_info?.description||"-"})]}),(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"URL:"}),(0,s.jsxs)("a",{href:ek.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all flex items-center space-x-2",children:[(0,s.jsx)("span",{children:ek.url}),(0,s.jsx)(l.ExternalLinkIcon,{className:"w-4 h-4"})]})]})]})]}),ek.mcp_info&&Object.keys(ek.mcp_info).length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Additional Information"}),(0,s.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,s.jsx)("pre",{className:"text-xs overflow-x-auto",children:JSON.stringify(ek.mcp_info,null,2)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-sm",children:`# Using MCP Server with Python FastMCP + +from fastmcp import Client +import asyncio + +# Standard MCP configuration +config = { + "mcpServers": { + "${ek.server_name}": { + "url": "http://localhost:4000/${ek.server_name}/mcp", + "headers": { + "x-litellm-api-key": "Bearer sk-1234" + } + } + } +} + +# Create a client that connects to the server +client = Client(config) + +async def main(): + async with client: + # List available tools + tools = await client.list_tools() + print(f"Available tools: {[tool.name for tool in tools]}") + + # Call a tool + response = await client.call_tool( + name="tool_name", + arguments={"arg": "value"} + ) + print(f"Response: {response}") + +if __name__ == "__main__": + asyncio.run(main())`})}),(0,s.jsx)("div",{className:"mt-2 text-right",children:(0,s.jsx)("button",{onClick:()=>{eU(`# Using MCP Server with Python FastMCP + +from fastmcp import Client +import asyncio + +# Standard MCP configuration +config = { + "mcpServers": { + "${ek.server_name}": { + "url": "http://localhost:4000/${ek.server_name}/mcp", + "headers": { + "x-litellm-api-key": "Bearer sk-1234" + } + } + } +} + +# Create a client that connects to the server +client = Client(config) + +async def main(): + async with client: + # List available tools + tools = await client.list_tools() + print(f"Available tools: {[tool.name for tool in tools]}") + + # Call a tool + response = await client.call_tool( + name="tool_name", + arguments={"arg": "value"} + ) + print(f"Response: {response}") + +if __name__ == "__main__": + asyncio.run(main())`)},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/443dce180e4b120d.js b/litellm/proxy/_experimental/out/_next/static/chunks/443dce180e4b120d.js deleted file mode 100644 index f35e6e4a38..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/443dce180e4b120d.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(914949),r=e.i(404948);let i=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,i],836938);var s=e.i(613541),n=e.i(763731),o=e.i(242064),d=e.i(491816);e.i(793154);var m=e.i(880476),c=e.i(183293),u=e.i(717356),g=e.i(320560),p=e.i(307358),h=e.i(246422),x=e.i(838378),b=e.i(617933);let _=(0,h.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:l}=e,a=(0,x.mergeToken)(e,{popoverBg:t,popoverColor:l});return[(e=>{let{componentCls:t,popoverColor:l,titleMinWidth:a,fontWeightStrong:r,innerPadding:i,boxShadowSecondary:s,colorTextHeading:n,borderRadiusLG:o,zIndexPopup:d,titleMarginBottom:m,colorBgElevated:u,popoverBg:p,titleBorderBottom:h,innerContentPadding:x,titlePadding:b}=e;return[{[t]:Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":u,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:p,backgroundClip:"padding-box",borderRadius:o,boxShadow:s,padding:i},[`${t}-title`]:{minWidth:a,marginBottom:m,color:n,fontWeight:r,borderBottom:h,padding:b},[`${t}-inner-content`]:{color:l,padding:x}})},(0,g.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:b.PresetColors.map(l=>{let a=e[`${l}6`];return{[`&${t}-${l}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,u.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:l,fontHeight:a,padding:r,wireframe:i,zIndexPopupBase:s,borderRadiusLG:n,marginXS:o,lineType:d,colorSplit:m,paddingSM:c}=e,u=l-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:s+30},(0,p.getArrowToken)(e)),(0,g.getArrowOffsetToken)({contentRadius:n,limitVerticalRadius:!0})),{innerPadding:12*!i,titleMarginBottom:i?0:o,titlePadding:i?`${u/2}px ${r}px ${u/2-t}px`:0,titleBorderBottom:i?`${t}px ${d} ${m}`:"none",innerContentPadding:i?`${c}px ${r}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var f=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rt.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(l[a[r]]=e[a[r]]);return l};let y=({title:e,content:l,prefixCls:a})=>e||l?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),l&&t.createElement("div",{className:`${a}-inner-content`},l)):null,j=e=>{let{hashId:a,prefixCls:r,className:s,style:n,placement:o="top",title:d,content:c,children:u}=e,g=i(d),p=i(c),h=(0,l.default)(a,r,`${r}-pure`,`${r}-placement-${o}`,s);return t.createElement("div",{className:h,style:n},t.createElement("div",{className:`${r}-arrow`}),t.createElement(m.Popup,Object.assign({},e,{className:a,prefixCls:r}),u||t.createElement(y,{prefixCls:r,title:g,content:p})))},v=e=>{let{prefixCls:a,className:r}=e,i=f(e,["prefixCls","className"]),{getPrefixCls:s}=t.useContext(o.ConfigContext),n=s("popover",a),[d,m,c]=_(n);return d(t.createElement(j,Object.assign({},i,{prefixCls:n,hashId:m,className:(0,l.default)(r,c)})))};e.s(["Overlay",0,y,"default",0,v],310730);var w=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rt.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(l[a[r]]=e[a[r]]);return l};let C=t.forwardRef((e,m)=>{var c,u;let{prefixCls:g,title:p,content:h,overlayClassName:x,placement:b="top",trigger:f="hover",children:j,mouseEnterDelay:v=.1,mouseLeaveDelay:C=.1,onOpenChange:N,overlayStyle:k={},styles:S,classNames:T}=e,I=w(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:M,className:O,style:P,classNames:z,styles:F}=(0,o.useComponentConfig)("popover"),A=M("popover",g),[L,D,R]=_(A),E=M(),B=(0,l.default)(x,D,R,O,z.root,null==T?void 0:T.root),V=(0,l.default)(z.body,null==T?void 0:T.body),[U,$]=(0,a.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(u=e.defaultOpen)?u:e.defaultVisible}),K=(e,t)=>{$(e,!0),null==N||N(e,t)},G=i(p),W=i(h);return L(t.createElement(d.default,Object.assign({placement:b,trigger:f,mouseEnterDelay:v,mouseLeaveDelay:C},I,{prefixCls:A,classNames:{root:B,body:V},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},F.root),P),k),null==S?void 0:S.root),body:Object.assign(Object.assign({},F.body),null==S?void 0:S.body)},ref:m,open:U,onOpenChange:e=>{K(e)},overlay:G||W?t.createElement(y,{prefixCls:A,title:G,content:W}):null,transitionName:(0,s.getTransitionName)(E,"zoom-big",I.transitionName),"data-popover-inject":!0}),(0,n.cloneElement)(j,{onKeyDown:e=>{var l,a;(0,t.isValidElement)(j)&&(null==(a=null==j?void 0:(l=j.props).onKeyDown)||a.call(l,e)),e.keyCode===r.default.ESC&&K(!1,e)}})))});C._InternalPanelDoNotUseOrYouWillBeFired=v,e.s(["default",0,C],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};var r=e.i(9583),i=l.forwardRef(function(e,i){return l.createElement(r.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["MinusCircleOutlined",0,i],564897)},551332,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.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:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});e.s(["ClipboardCopyIcon",0,l],551332)},122577,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.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:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,l],122577)},902555,e=>{"use strict";var t=e.i(843476),l=e.i(591935),a=e.i(122577),r=e.i(278587),i=e.i(68155),s=e.i(360820),n=e.i(871943),o=e.i(434626),d=e.i(551332),m=e.i(592968),c=e.i(115504),u=e.i(752978);function g({icon:e,onClick:l,className:a,disabled:r,dataTestId:i}){return r?(0,t.jsx)(u.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":i}):(0,t.jsx)(u.Icon,{icon:e,size:"sm",onClick:l,className:(0,c.cx)("cursor-pointer",a),"data-testid":i})}let p={Edit:{icon:l.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:i.TrashIcon,className:"hover:text-red-600"},Test:{icon:a.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:r.RefreshIcon,className:"hover:text-green-600"},Up:{icon:s.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:n.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function h({onClick:e,tooltipText:l,disabled:a=!1,disabledTooltipText:r,dataTestId:i,variant:s}){let{icon:n,className:o}=p[s];return(0,t.jsx)(m.Tooltip,{title:a?r:l,children:(0,t.jsx)("span",{children:(0,t.jsx)(g,{icon:n,onClick:e,className:o,disabled:a,dataTestId:i})})})}e.s(["default",()=>h],902555)},434626,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.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:l},e),t.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"}))});e.s(["ExternalLinkIcon",0,l],434626)},278587,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.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:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,l],278587)},207670,e=>{"use strict";function t(){for(var e,t,l=0,a="",r=arguments.length;lt,"default",0,t])},728889,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(829087),r=e.i(480731),i=e.i(444755),s=e.i(673706),n=e.i(95779);let o={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},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:""}},c=(0,s.makeClassName)("Icon"),u=l.default.forwardRef((e,u)=>{let{icon:g,variant:p="simple",tooltip:h,size:x=r.Sizes.SM,color:b,className:_}=e,f=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),y=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,s.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,s.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.tremorTwMerge)((0,s.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,s.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.tremorTwMerge)((0,s.getColorClassNames)(t,n.colorPalette.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,s.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,i.tremorTwMerge)((0,s.getColorClassNames)(t,n.colorPalette.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,s.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.tremorTwMerge)((0,s.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,s.getColorClassNames)(t,n.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,i.tremorTwMerge)((0,s.getColorClassNames)(t,n.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(p,b),{tooltipProps:j,getReferenceProps:v}=(0,a.useTooltip)();return l.default.createElement("span",Object.assign({ref:(0,s.mergeRefs)([u,j.refs.setReference]),className:(0,i.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",y.bgColor,y.textColor,y.borderColor,y.ringColor,m[p].rounded,m[p].border,m[p].shadow,m[p].ring,o[x].paddingX,o[x].paddingY,_)},v,f),l.default.createElement(a.default,Object.assign({text:h},j)),l.default.createElement(g,{className:(0,i.tremorTwMerge)(c("icon"),"shrink-0",d[x].height,d[x].width)}))});u.displayName="Icon",e.s(["default",()=>u],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.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:l},e),t.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.s(["PencilAltIcon",0,l],591935)},738014,e=>{"use strict";var t=e.i(135214),l=e.i(764205),a=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:i}=(0,t.default)();return(0,a.useQuery)({queryKey:r.detail(i),queryFn:async()=>await (0,l.userGetInfoV2)(e),enabled:!!(e&&i)})}])},625901,e=>{"use strict";var t=e.i(266027),l=e.i(621482),a=e.i(243652),r=e.i(764205),i=e.i(135214);let s=(0,a.createQueryKeys)("models"),n=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let d=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:l,userRole:a}=(0,i.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,r.modelAvailableCall)(e,l,a,!0,null,!0,!1,"expand"),enabled:!!(e&&l&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:s,userRole:n}=(0,i.default)();return(0,l.useInfiniteQuery)({queryKey:d.list({filters:{...s&&{userId:s},...n&&{userRole:n},size:e,...t&&{search:t}}}),queryFn:async({pageParam:l})=>await (0,r.modelInfoCall)(a,s,n,l,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,r.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,l=50,a,n,o,d,m)=>{let{accessToken:c,userId:u,userRole:g}=(0,i.default)();return(0,t.useQuery)({queryKey:s.list({filters:{...u&&{userId:u},...g&&{userRole:g},page:e,size:l,...a&&{search:a},...n&&{modelId:n},...o&&{teamId:o},...d&&{sortBy:d},...m&&{sortOrder:m}}}),queryFn:async()=>await (0,r.modelInfoCall)(c,u,g,e,l,a,n,o,d,m),enabled:!!(c&&u&&g)})}])},907308,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(212931),r=e.i(808613),i=e.i(464571),s=e.i(199133),n=e.i(592968),o=e.i(213205),d=e.i(374009),m=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:c,onSubmit:u,accessToken:g,title:p="Add Team Member",roles:h=[{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:x="user",teamId:b})=>{let[_]=r.Form.useForm(),[f,y]=(0,l.useState)([]),[j,v]=(0,l.useState)(!1),[w,C]=(0,l.useState)("user_email"),[N,k]=(0,l.useState)(!1),S=async(e,t)=>{if(!e)return void y([]);v(!0);try{let l=new URLSearchParams;if(l.append(t,e),b&&l.append("team_id",b),null==g)return;let a=(await (0,m.userFilterUICall)(g,l)).map(e=>({label:"user_email"===t?`${e.user_email}`:`${e.user_id}`,value:"user_email"===t?e.user_email:e.user_id,user:e}));y(a)}catch(e){console.error("Error fetching users:",e)}finally{v(!1)}},T=(0,l.useCallback)((0,d.default)((e,t)=>S(e,t),300),[]),I=(e,t)=>{C(t),T(e,t)},M=(e,t)=>{let l=t.user;_.setFieldsValue({user_email:l.user_email,user_id:l.user_id,role:_.getFieldValue("role")})},O=async e=>{k(!0);try{await u(e)}finally{k(!1)}};return(0,t.jsx)(a.Modal,{title:p,open:e,onCancel:()=>{_.resetFields(),y([]),c()},footer:null,width:800,maskClosable:!N,children:(0,t.jsxs)(r.Form,{form:_,onFinish:O,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:x},children:[(0,t.jsx)(r.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,t.jsx)(s.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>I(e,"user_email"),onSelect:(e,t)=>M(e,t),options:"user_email"===w?f:[],loading:j,allowClear:!0,"data-testid":"member-email-search"})}),(0,t.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,t.jsx)(r.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(s.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>I(e,"user_id"),onSelect:(e,t)=>M(e,t),options:"user_id"===w?f:[],loading:j,allowClear:!0})}),(0,t.jsx)(r.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(s.Select,{defaultValue:x,children:h.map(e=>(0,t.jsx)(s.Select.Option,{value:e.value,children:(0,t.jsxs)(n.Tooltip,{title:e.description,children:[(0,t.jsx)("span",{className:"font-medium",children:e.label}),(0,t.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(i.Button,{type:"primary",htmlType:"submit",icon:(0,t.jsx)(o.UserAddOutlined,{}),loading:N,children:N?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var t=e.i(843476),l=e.i(625901),a=e.i(109799),r=e.i(785242),i=e.i(738014),s=e.i(199133),n=e.i(981339),o=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},m={label:"No Default Models",value:"no-default-models"},c=[d,m],u={user:({allProxyModels:e,userModels:t,options:l})=>t&&l?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:l})=>t?t.models.includes(d.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:g,organizationID:p,options:h,context:x,dataTestId:b,value:_=[],onChange:f,style:y}=e,{includeUserModels:j,showAllTeamModelsOption:v,showAllProxyModelsOverride:w,includeSpecialOptions:C}=h||{},{data:N,isLoading:k}=(0,l.useAllProxyModels)(),{data:S,isLoading:T}=(0,r.useTeam)(g),{data:I,isLoading:M}=(0,a.useOrganization)(p),{data:O,isLoading:P}=(0,i.useCurrentUser)(),z=e=>c.some(t=>t.value===e),F=_.some(z),A=I?.models.includes(d.value)||I?.models.length===0;if(k||T||M||P)return(0,t.jsx)(n.Skeleton.Input,{active:!0,block:!0});let{wildcard:L,regular:D}=(e=>{let t=[],l=[];for(let a of e)a.endsWith("/*")?t.push(a):l.push(a);return{wildcard:t,regular:l}})(((e,t,l)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return a;let r=u[t.context];return r?r({allProxyModels:a,...l,options:t.options}):[]})(N?.data??[],e,{selectedTeam:S,selectedOrganization:I,userModels:O?.models}));return(0,t.jsx)(s.Select,{"data-testid":b,value:_,onChange:e=>{let t=e.filter(z);f(t.length>0?[t[t.length-1]]:e)},style:y,options:[C?{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...w||A&&C||"global"===x?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:_.length>0&&_.some(e=>z(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:m.value,disabled:_.length>0&&_.some(e=>z(e)&&e!==m.value),key:m.value}]}:[],...L.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:L.map(e=>{let l=e.replace("/*",""),a=l.charAt(0).toUpperCase()+l.slice(1);return{label:(0,t.jsx)("span",{children:`All ${a} models`}),value:e,disabled:F}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:D.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:F}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},276173,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(779241),r=e.i(464571),i=e.i(808613),s=e.i(212931),n=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:m,onSubmit:c,initialData:u,mode:g,config:p})=>{let h,[x]=i.Form.useForm(),[b,_]=(0,o.useState)(!1);console.log("Initial Data:",u),(0,o.useEffect)(()=>{if(e)if("edit"===g&&u){let e={...u,role:u.role||p.defaultRole,max_budget_in_team:u.max_budget_in_team||null,tpm_limit:u.tpm_limit||null,rpm_limit:u.rpm_limit||null};console.log("Setting form values:",e),x.setFieldsValue(e)}else x.resetFields(),x.setFieldsValue({role:p.defaultRole||p.roleOptions[0]?.value})},[e,u,g,x,p.defaultRole,p.roleOptions]);let f=async e=>{try{_(!0);let t=Object.entries(e).reduce((e,[t,l])=>{if("string"==typeof l){let a=l.trim();return""===a&&("max_budget_in_team"===t||"tpm_limit"===t||"rpm_limit"===t)?{...e,[t]:null}:{...e,[t]:a}}return{...e,[t]:l}},{});console.log("Submitting form data:",t),await Promise.resolve(c(t)),x.resetFields()}catch(e){console.error("Form submission error:",e)}finally{_(!1)}};return(0,t.jsx)(s.Modal,{title:p.title||("add"===g?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:m,children:(0,t.jsxs)(i.Form,{form:x,onFinish:f,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[p.showEmail&&(0,t.jsx)(i.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,t.jsx)(a.TextInput,{placeholder:"user@example.com"})}),p.showEmail&&p.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(l.Text,{children:"OR"})}),p.showUserId&&(0,t.jsx)(i.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(a.TextInput,{placeholder:"user_123"})}),(0,t.jsx)(i.Form.Item,{label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Role"}),"edit"===g&&u&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(h=u.role,p.roleOptions.find(e=>e.value===h)?.label||h),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(n.Select,{children:"edit"===g&&u?[...p.roleOptions.filter(e=>e.value===u.role),...p.roleOptions.filter(e=>e.value!==u.role)].map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value)):p.roleOptions.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))})}),p.additionalFields?.map(e=>(0,t.jsx)(i.Form.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:(e=>{switch(e.type){case"input":return(0,t.jsx)(a.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(d.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,t.jsx)(n.Select,{children:e.options?.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(r.Button,{onClick:m,className:"mr-2",disabled:b,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"default",htmlType:"submit",loading:b,children:"add"===g?b?"Adding...":"Add Member":b?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var t=e.i(843476),l=e.i(100486),a=e.i(827252),r=e.i(213205),i=e.i(771674),s=e.i(464571),n=e.i(770914),o=e.i(291542),d=e.i(262218),m=e.i(592968),c=e.i(898586),u=e.i(902555);let{Text:g}=c.Typography;function p({members:e,canEdit:c,onEdit:p,onDelete:h,onAddMember:x,roleColumnTitle:b="Role",roleTooltip:_,extraColumns:f=[],showDeleteForMember:y,emptyText:j}){let v=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,t.jsx)(g,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,t.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(g,{children:e||"-"})},{title:_?(0,t.jsxs)(n.Space,{direction:"horizontal",children:[b,(0,t.jsx)(m.Tooltip,{title:_,children:(0,t.jsx)(a.InfoCircleOutlined,{})})]}):b,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(n.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(l.CrownOutlined,{}):(0,t.jsx)(i.UserOutlined,{}),(0,t.jsx)(g,{style:{textTransform:"capitalize"},children:e||"-"})]})},...f,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,l)=>c?(0,t.jsxs)(n.Space,{children:[(0,t.jsx)(u.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>p(l)}),(!y||y(l))&&(0,t.jsx)(u.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>h(l)})]}):null}];return(0,t.jsxs)(n.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,t.jsx)(o.Table,{columns:v,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:j?{emptyText:j}:void 0}),x&&c&&(0,t.jsx)(s.Button,{icon:(0,t.jsx)(r.UserAddOutlined,{}),type:"primary",onClick:x,children:"Add Member"})]})}e.s(["default",()=>p])},56567,838932,e=>{"use strict";var t=e.i(843476),l=e.i(135214),a=e.i(109799),r=e.i(907308),i=e.i(764205),s=e.i(266027);let n=(0,e.i(243652).createQueryKeys)("guardrails"),o=()=>{let{accessToken:e,userId:t,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:n.list({}),queryFn:async()=>(0,i.getGuardrailsList)(e),enabled:!!(e&&t&&a),select:e=>{let t=e?.guardrails??[],l=new Set,a=new Set;for(let e of t)e.litellm_params?.default_on?l.add(e.guardrail_name):a.add(e.guardrail_name);return{guardrails:t,globalGuardrailNames:l,optionalGuardrailNames:a}}})};e.s(["useGuardrails",0,o],838932);var d=e.i(500330),m=e.i(11751),c=e.i(708347),u=e.i(751904),g=e.i(160818),p=e.i(827252),h=e.i(564897),x=e.i(646563),b=e.i(987432),_=e.i(530212),f=e.i(389083),y=e.i(304967),j=e.i(350967),v=e.i(599724),w=e.i(779241),C=e.i(629569),N=e.i(464571),k=e.i(808613),S=e.i(311451),T=e.i(28651),I=e.i(199133),M=e.i(770914),O=e.i(790848),P=e.i(653496),z=e.i(262218),F=e.i(592968),A=e.i(888259),L=e.i(678784),D=e.i(118366),R=e.i(271645),E=e.i(9314),B=e.i(552130),V=e.i(127952);function U({className:e,value:l,onChange:a}){return(0,t.jsxs)(I.Select,{className:e,value:l,onChange:a,children:[(0,t.jsx)(I.Select.Option,{value:"24h",children:"Daily"}),(0,t.jsx)(I.Select.Option,{value:"7d",children:"Weekly"}),(0,t.jsx)(I.Select.Option,{value:"30d",children:"Monthly"})]})}var $=e.i(844565),K=e.i(355619);let G=function({globalGuardrailNames:e,teamGuardrails:l=[],optedOutGlobalGuardrails:a=[],killSwitchOn:r=!1,variant:i="card",className:s=""}){let n=new Set(a),o=Array.from(e).filter(e=>!n.has(e)),d=l.filter(t=>!e.has(t)),m=r||0!==o.length||0!==d.length?(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"block text-sm font-medium text-gray-700 mb-2",children:[(0,t.jsx)(g.GlobalOutlined,{style:{marginInlineEnd:4},"aria-label":"Global guardrail"}),"Global"]}),r?(0,t.jsx)(z.Tag,{color:"gold",children:"Bypassed for this team"}):o.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,t.jsx)(z.Tag,{color:"blue",children:e},e))}):(0,t.jsx)("span",{className:"block text-sm text-gray-500",children:"None configured"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Team-specific"}),d.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:d.map(e=>(0,t.jsx)(z.Tag,{color:"blue",children:e},e))}):(0,t.jsx)("span",{className:"block text-sm text-gray-500",children:"None configured"})]})]}):(0,t.jsx)("span",{className:"block text-gray-500",children:"No guardrails configured"});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${s}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Guardrails Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Global and team-specific guardrails applied to this team"})]})}),m]}):(0,t.jsxs)("div",{className:`${s}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Guardrails Settings"}),m]})};var W=e.i(643449),q=e.i(75921),H=e.i(390605),Q=e.i(162386),J=e.i(727749),Y=e.i(384767),X=e.i(435451),Z=e.i(916940),ee=e.i(183588),et=e.i(460285),el=e.i(276173),ea=e.i(91979),er=e.i(269200),ei=e.i(942232),es=e.i(977572),en=e.i(427612),eo=e.i(64848),ed=e.i(496020),em=e.i(536916),ec=e.i(21548);let eu={"/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","/team/daily/activity":"Member can view all team usage data (not just their own)","/spend/logs":"Member can view spend logs for the entire team (not just their own)"},eg=({teamId:e,accessToken:l,canEditTeam:a})=>{let[r,s]=(0,R.useState)([]),[n,o]=(0,R.useState)([]),[d,m]=(0,R.useState)(!0),[c,u]=(0,R.useState)(!1),[g,p]=(0,R.useState)(!1),h=async()=>{try{if(m(!0),!l)return;let t=await (0,i.getTeamPermissionsCall)(l,e),a=t.all_available_permissions||[];s(a);let r=t.team_member_permissions||[];o(r),p(!1)}catch(e){J.default.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{m(!1)}};(0,R.useEffect)(()=>{h()},[e,l]);let x=async()=>{try{if(!l)return;u(!0),await (0,i.teamPermissionsUpdateCall)(l,e,n),J.default.success("Permissions updated successfully"),p(!1)}catch(e){J.default.fromBackend("Failed to update permissions"),console.error("Error updating permissions:",e)}finally{u(!1)}};if(d)return(0,t.jsx)("div",{className:"p-6 text-center",children:"Loading permissions..."});let _=r.length>0;return(0,t.jsxs)(y.Card,{className:"bg-white shadow-md rounded-md p-6",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center border-b pb-4 mb-6",children:[(0,t.jsx)(C.Title,{className:"mb-2 sm:mb-0",children:"Member Permissions"}),a&&g&&(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(N.Button,{icon:(0,t.jsx)(ea.ReloadOutlined,{}),onClick:()=>{h()},children:"Reset"}),(0,t.jsx)(N.Button,{onClick:x,loading:c,type:"primary",icon:(0,t.jsx)(b.SaveOutlined,{}),children:"Save Changes"})]})]}),(0,t.jsx)(v.Text,{className:"mb-6 text-gray-600",children:"Control what team members can do when they are not team admins."}),_?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(er.Table,{className:" min-w-full",children:[(0,t.jsx)(en.TableHead,{children:(0,t.jsxs)(ed.TableRow,{children:[(0,t.jsx)(eo.TableHeaderCell,{children:"Method"}),(0,t.jsx)(eo.TableHeaderCell,{children:"Endpoint"}),(0,t.jsx)(eo.TableHeaderCell,{children:"Description"}),(0,t.jsx)(eo.TableHeaderCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:"Allow Access"})]})}),(0,t.jsx)(ei.TableBody,{children:r.map(e=>{let l=(e=>{let t=e.includes("/info")||e.includes("/list")||e.includes("/activity")||"/spend/logs"===e?"GET":"POST",l=eu[e];if(!l){for(let[t,a]of Object.entries(eu))if(e.includes(t)){l=a;break}}return l||(l=`Access ${e}`),{method:t,endpoint:e,description:l,route:e}})(e);return(0,t.jsxs)(ed.TableRow,{className:"hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(es.TableCell,{children:(0,t.jsx)("span",{className:`px-2 py-1 rounded text-xs font-medium ${"GET"===l.method?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800"}`,children:l.method})}),(0,t.jsx)(es.TableCell,{children:(0,t.jsx)("span",{className:"font-mono text-sm text-gray-800",children:l.endpoint})}),(0,t.jsx)(es.TableCell,{className:"text-gray-700",children:l.description}),(0,t.jsx)(es.TableCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,t.jsx)(em.Checkbox,{checked:n.includes(e),onChange:t=>{o(t.target.checked?[...n,e]:n.filter(t=>t!==e)),p(!0)},disabled:!a})})]},e)})})]})}):(0,t.jsx)("div",{className:"py-12",children:(0,t.jsx)(ec.Empty,{description:"No permissions available"})})]})},ep="overview",eh="virtual-keys",ex="members",eb="member-permissions",e_="settings",ef={[ep]:"Overview",[eh]:"Virtual Keys",[ex]:"Members",[eb]:"Member Permissions",[e_]:"Settings"};var ey=e.i(292639),ej=e.i(898586),ev=e.i(294612);function ew({teamData:e,canEditTeam:a,handleMemberDelete:r,setSelectedEditMember:i,setIsEditMemberModalVisible:s,setIsAddMemberModalVisible:n}){let o=e=>{if(null==e)return"0";if("number"==typeof e){let t=Number(e);return t===Math.floor(t)?t.toString():(0,d.formatNumberWithCommas)(t,8).replace(/\.?0+$/,"")}return"0"},{data:m}=(0,ey.useUISettings)(),{userId:u,userRole:g}=(0,l.default)(),h=!!m?.values?.disable_team_admin_delete_team_user,x=(0,c.isUserTeamAdminForSingleTeam)(e.team_info.members_with_roles,u||""),b=(0,c.isProxyAdminRole)(g||""),_=[{title:(0,t.jsxs)(M.Space,{direction:"horizontal",children:["Team Member Spend (USD)",(0,t.jsx)(F.Tooltip,{title:"This is the amount spent by a user in the team.",children:(0,t.jsx)(p.InfoCircleOutlined,{})})]}),key:"spend",render:(l,a)=>(0,t.jsxs)(ej.Typography.Text,{children:["$",(0,d.formatNumberWithCommas)((t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.spend||0})(a.user_id),4)]})},{title:"Team Member Budget (USD)",key:"budget",render:(l,a)=>{let r=(t=>{if(!t)return null;let l=e.team_memberships.find(e=>e.user_id===t),a=l?.litellm_budget_table?.max_budget;return null==a?null:o(a)})(a.user_id);return(0,t.jsx)(ej.Typography.Text,{children:r?`$${(0,d.formatNumberWithCommas)(Number(r),4)}`:"No Limit"})}},{title:(0,t.jsxs)(M.Space,{direction:"horizontal",children:["Team Member Rate Limits",(0,t.jsx)(F.Tooltip,{title:"Rate limits for this member's usage within this team.",children:(0,t.jsx)(p.InfoCircleOutlined,{})})]}),key:"rate_limits",render:(l,a)=>(0,t.jsx)(ej.Typography.Text,{children:(t=>{if(!t)return"No Limits";let l=e.team_memberships.find(e=>e.user_id===t),a=l?.litellm_budget_table?.rpm_limit,r=l?.litellm_budget_table?.tpm_limit,i=[a?`${o(a)} RPM`:null,r?`${o(r)} TPM`:null].filter(Boolean);return i.length>0?i.join(" / "):"No Limits"})(a.user_id)})}];return(0,t.jsx)(ev.default,{members:e.team_info.members_with_roles,canEdit:a,onEdit:t=>{let l=e.team_memberships.find(e=>e.user_id===t.user_id);i({...t,max_budget_in_team:l?.litellm_budget_table?.max_budget||null,tpm_limit:l?.litellm_budget_table?.tpm_limit||null,rpm_limit:l?.litellm_budget_table?.rpm_limit||null}),s(!0)},onDelete:r,onAddMember:()=>n(!0),roleColumnTitle:"Team Role",roleTooltip:"This role applies only to this team and is independent from the user's proxy-level role.",extraColumns:_,showDeleteForMember:()=>b||a&&!x||x&&!h})}var eC=e.i(207082),eN=e.i(871943),ek=e.i(502547),eS=e.i(360820),eT=e.i(94629),eI=e.i(152990),eM=e.i(682830),eO=e.i(994388),eP=e.i(752978),ez=e.i(282786),eF=e.i(981339),eA=e.i(969550),eL=e.i(20147),eD=e.i(633627);function eR({teamId:e,teamAlias:a,organization:r}){let{accessToken:i}=(0,l.default)(),[n,o]=(0,R.useState)(null),[m,c]=(0,R.useState)([{id:"created_at",desc:!0}]),[u,g]=(0,R.useState)({pageIndex:0,pageSize:50}),[h,x]=(0,R.useState)({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),b=m.length>0?m[0].id:"created_at",_=m.length>0?m[0].desc?"desc":"asc":"desc",y=u.pageIndex,j=u.pageSize,{data:w,isPending:C,isFetching:N,refetch:k}=(0,eC.useKeys)(y+1,j,{teamID:e,organizationID:h["Organization ID"]?.trim()||void 0,selectedKeyAlias:h["Key Alias"]?.trim()||void 0,userID:h["User ID"]?.trim()||void 0,sortBy:b||void 0,sortOrder:_||void 0,expand:"user"}),S=(0,R.useMemo)(()=>{let e=w?.keys||[],t=r?.organization_id;return t?e.map(e=>({...e,organization_id:(e.organization_id??e.org_id)||t})):e},[w?.keys,r?.organization_id]),T=w?.total_pages??0,[I,M]=(0,R.useState)({}),O=(0,R.useMemo)(()=>({team_id:e,team_alias:a||e,models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:r?.organization_id||"",created_at:"",keys:[],members_with_roles:[],spend:0}),[e,a,r]),P=(0,s.useQuery)({queryKey:["teamFilterOptions",e,i],queryFn:async()=>(0,eD.fetchTeamFilterOptions)(i,e),enabled:!!i&&!!e,staleTime:3e4}).data||{keyAliases:[],organizationIds:[],userIds:[]},z=(0,R.useCallback)(()=>{k?.()},[k]);(0,R.useEffect)(()=>(window.addEventListener("storage",z),()=>window.removeEventListener("storage",z)),[z]);let A=(0,R.useCallback)((e,t=!1)=>{x(t=>({...t,"Organization ID":e["Organization ID"]??t["Organization ID"],"Key Alias":e["Key Alias"]??t["Key Alias"],"User ID":e["User ID"]??t["User ID"],"Sort By":e["Sort By"]??t["Sort By"]??"created_at","Sort Order":e["Sort Order"]??t["Sort Order"]??"desc"})),t||g(e=>({...e,pageIndex:0}))},[]),L=(0,R.useCallback)(()=>{x({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),g(e=>({...e,pageIndex:0}))},[]),D=(0,R.useMemo)(()=>[{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>{let{organizationIds:t}=P;if(!t.length)return[];let l=e.toLowerCase();return(l?t.filter(e=>e.toLowerCase().includes(l)):t).map(e=>({label:e,value:e}))}},{name:"Key Alias",label:"Key Alias",isSearchable:!0,searchFn:async e=>{let{keyAliases:t}=P,l=e.toLowerCase();return(l?t.filter(e=>e.toLowerCase().includes(l)):t).map(e=>({label:e,value:e}))}},{name:"User ID",label:"User ID",isSearchable:!0,searchFn:async e=>{let{userIds:t}=P,l=e.toLowerCase();return(l?t.filter(e=>e.id.toLowerCase().includes(l)||e.email.toLowerCase().includes(l)):t).map(e=>({label:e.email?`${e.id} (${e.email})`:e.id,value:e.id}))}}],[P]),E=(0,R.useMemo)(()=>[{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(F.Tooltip,{title:l,children:(0,t.jsx)(eO.Button,{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 block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>o(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(F.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"organization_id",accessorKey:"organization_id",header:"Organization ID",size:140,enableSorting:!1,cell:e=>e.getValue()?e.renderValue():"-"},{id:"user_email",accessorKey:"user",header:"User Email",size:160,enableSorting:!1,cell:e=>{let l=e.getValue(),a=l?.user_email,r=e.cell.column.getSize();return(0,t.jsx)(F.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:a??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:70,enableSorting:!1,cell:e=>{let l=e.getValue(),a="default_user_id"===l?"Default Proxy Admin":l,r=e.cell.column.getSize();return(0,t.jsx)(F.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:a??"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:70,enableSorting:!1,cell:e=>{let l=e.getValue(),a="default_user_id"===l?"Default Proxy Admin":l,r=e.cell.column.getSize();return(0,t.jsx)(F.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:a??"-"})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(ez.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(p.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(F.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,d.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,d.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(l)?(0,t.jsx)("div",{className:"flex flex-col",children:0===l.length?(0,t.jsx)(f.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[l.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(eP.Icon,{icon:I[e.row.id]?eN.ChevronDownIcon:ek.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>M(t=>({...t,[e.row.id]:!t[e.row.id]}))})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(f.Badge,{size:"xs",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(f.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(v.Text,{children:e.length>30?`${(0,K.getModelDisplayName)(e).slice(0,30)}...`:(0,K.getModelDisplayName)(e)})},l)),l.length>3&&!I[e.row.id]&&(0,t.jsx)(f.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(v.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),I[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.slice(3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(f.Badge,{size:"xs",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(f.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(v.Text,{children:e.length>30?`${(0,K.getModelDisplayName)(e).slice(0,30)}...`:(0,K.getModelDisplayName)(e)})},l+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==l.tpm_limit?l.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==l.rpm_limit?l.rpm_limit:"Unlimited"]})]})}}],[I]),B=(0,R.useCallback)(e=>{let t="function"==typeof e?e(m):e;if(c(t),t?.length>0){let e=t[0];A({"Sort By":e.id,"Sort Order":e.desc?"desc":"asc"},!0)}},[m,A]),V=(0,eI.useReactTable)({data:S,columns:E,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:u},onSortingChange:B,onPaginationChange:g,getCoreRowModel:(0,eM.getCoreRowModel)(),enableSorting:!0,manualSorting:!0,manualPagination:!0,pageCount:T});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:n?(0,t.jsx)(eL.default,{keyId:n.token,onClose:()=>o(null),keyData:n,teams:[O],onDelete:k}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(eA.default,{options:D,onApplyFilters:A,initialValues:h,onResetFilters:L})}),(0,t.jsx)("div",{className:"flex items-center justify-end w-full mb-4",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[C||N?(0,t.jsx)(eF.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",y+1," of ",V.getPageCount()]}),C||N?(0,t.jsx)(eF.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>V.previousPage(),disabled:C||N||!V.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),C||N?(0,t.jsx)(eF.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>V.nextPage(),disabled:C||N||!V.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(er.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:V.getCenterTotalSize()},children:[(0,t.jsx)(en.TableHead,{children:V.getHeaderGroups().map(e=>(0,t.jsx)(ed.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eo.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eI.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(eS.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(eN.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eT.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${V.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(ei.TableBody,{children:C||N?(0,t.jsx)(ed.TableRow,{children:(0,t.jsx)(es.TableCell,{colSpan:E.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading keys..."})})})}):S.length>0?V.getRowModel().rows.map(e=>(0,t.jsx)(ed.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(es.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,eI.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(ed.TableRow,{children:(0,t.jsx)(es.TableCell,{colSpan:E.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({teamId:e,onClose:s,accessToken:n,is_team_admin:ea,is_proxy_admin:er,is_org_admin:ei=!1,userModels:es,editTeam:en,premiumUser:eo=!1,onUpdate:ed})=>{let em,ec,eu,ey,ej,ev,[eC,eN]=(0,R.useState)(null),[ek,eS]=(0,R.useState)(!0),[eT,eI]=(0,R.useState)(!1),[eM]=k.Form.useForm(),[eO,eP]=(0,R.useState)(!1),[ez,eF]=(0,R.useState)(null),[eA,eL]=(0,R.useState)(!1),[eD,eE]=(0,R.useState)([]),[eB,eV]=(0,R.useState)(!1),[eU,e$]=(0,R.useState)({}),{data:eK,isLoading:eG}=o(),eW=eK?.globalGuardrailNames??new Set,[eq,eH]=(0,R.useState)([]),[eQ,eJ]=(0,R.useState)({}),[eY,eX]=(0,R.useState)(!1),[eZ,e0]=(0,R.useState)(null),[e2,e1]=(0,R.useState)(!1),[e4,e5]=(0,R.useState)(!1),[e6,e3]=(0,R.useState)(!1),e8=R.default.useRef(null),[e7,e9]=(0,R.useState)(null),{userRole:te,userId:tt}=(0,l.default)(),{data:tl=[]}=(0,a.useOrganizations)(),ta=(0,R.useMemo)(()=>{let e=eC?.team_info?.organization_id;if(!e||!tt)return!1;let t=tl.find(t=>t.organization_id===e);return t?.members?.some(e=>e.user_id===tt&&"org_admin"===e.user_role)??!1},[eC,tl,tt]),tr=k.Form.useWatch("models",eM),ti=k.Form.useWatch("disable_global_guardrails",eM),ts=(0,R.useMemo)(()=>{let e=tr??eC?.team_info?.models??[];return e.includes("all-proxy-models")||e.includes("all-team-models")?es:(0,K.unfurlWildcardModelsInList)(e,es)},[tr,eC,es]),tn=ea||er||ei||ta,to=(0,R.useMemo)(()=>{let e;return e=[ep,eh],tn?[...e,ex,eb,e_]:e},[tn]),td=(0,R.useMemo)(()=>en&&tn?e_:ep,[en,tn]),tm=async()=>{try{if(eS(!0),!n)return;let t=await (0,i.teamInfoCall)(n,e);eN(t)}catch(e){J.default.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{eS(!1)}};(0,R.useEffect)(()=>{tm()},[e,n]),(0,R.useEffect)(()=>{(async()=>{if(!n||!eC?.team_info?.organization_id)return e9(null);try{let e=await (0,i.organizationInfoCall)(n,eC.team_info.organization_id);e9(e)}catch(e){console.error("Error fetching organization info:",e),e9(null)}})()},[n,eC?.team_info?.organization_id]),(0,R.useMemo)(()=>{let e;return e=[],e=e7?e7.models.includes("all-proxy-models")?es:e7.models.length>0?e7.models:es:es,(0,K.unfurlWildcardModelsInList)(e,es)},[e7,es]),(0,R.useEffect)(()=>{(async()=>{try{if(!n)return;let e=(await (0,i.getPoliciesList)(n)).policies.map(e=>e.policy_name);eH(e)}catch(e){console.error("Failed to fetch policies:",e)}})()},[n]),(0,R.useEffect)(()=>{(async()=>{if(!n||!eC?.team_info?.policies||0===eC.team_info.policies.length)return;eX(!0);let e={};try{await Promise.all(eC.team_info.policies.map(async t=>{try{let l=await (0,i.getPolicyInfoWithGuardrails)(n,t);e[t]=l.resolved_guardrails||[]}catch(l){console.error(`Failed to fetch guardrails for policy ${t}:`,l),e[t]=[]}})),eJ(e)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eX(!1)}})()},[n,eC?.team_info?.policies]);let tc=async t=>{try{if(null==n)return;let l={user_email:t.user_email,user_id:t.user_id,role:t.role};await (0,i.teamMemberAddCall)(n,e,l),J.default.success("Team member added successfully"),eI(!1),eM.resetFields();let a=await (0,i.teamInfoCall)(n,e);eN(a),ed(a)}catch(t){let e="Failed to add team member";t?.raw?.detail?.error?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),J.default.fromBackend(e),console.error("Error adding team member:",t)}},tu=async t=>{try{if(null==n)return;let l={user_email:t.user_email,user_id:t.user_id,role:t.role,max_budget_in_team:t.max_budget_in_team,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit};A.default.destroy(),await (0,i.teamMemberUpdateCall)(n,e,l),J.default.success("Team member updated successfully"),eP(!1);let a=await (0,i.teamInfoCall)(n,e);eN(a),ed(a)}catch(t){let e="Failed to update team member";t?.raw?.detail?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),eP(!1),A.default.destroy(),J.default.fromBackend(e),console.error("Error updating team member:",t)}},tg=async()=>{if(eZ&&n){e5(!0);try{await (0,i.teamMemberDeleteCall)(n,e,eZ),J.default.success("Team member removed successfully");let t=await (0,i.teamInfoCall)(n,e);eN(t),ed(t)}catch(e){J.default.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}finally{e5(!1),e1(!1),e0(null)}}},tp=async t=>{try{let l;if(!n)return;e3(!0);let a={};try{let{soft_budget_alerting_emails:e,...l}=t.metadata?JSON.parse(t.metadata):{};a=l}catch(e){J.default.fromBackend("Invalid JSON in metadata field");return}if("string"==typeof t.secret_manager_settings&&t.secret_manager_settings.trim().length>0)try{l=JSON.parse(t.secret_manager_settings)}catch(e){J.default.fromBackend("Invalid JSON in secret manager settings");return}let r=e=>null==e||"string"==typeof e&&""===e.trim()||"number"==typeof e&&Number.isNaN(e)?null:e,s={},o={};for(let e of t.modelLimits??[])e?.model&&(null!=e.tpm&&(s[e.model]=e.tpm),null!=e.rpm&&(o[e.model]=e.rpm));let d=!0===t.disable_global_guardrails,c=d?Array.from(eW):Array.from(eW).filter(e=>!(t.guardrails||[]).includes(e)),u={team_id:e,team_alias:t.team_alias,models:t.models,tpm_limit:r(t.tpm_limit),rpm_limit:r(t.rpm_limit),model_tpm_limit:s,model_rpm_limit:o,max_budget:t.max_budget,soft_budget:r(t.soft_budget),budget_duration:t.budget_duration,metadata:{...a,guardrails:(t.guardrails||[]).filter(e=>!eW.has(e)),opted_out_global_guardrails:c,...t.logging_settings?.length>0?{logging:t.logging_settings}:{},disable_global_guardrails:d,soft_budget_alerting_emails:"string"==typeof t.soft_budget_alerting_emails?t.soft_budget_alerting_emails.split(",").map(e=>e.trim()).filter(e=>e.length>0):t.soft_budget_alerting_emails||[],...void 0!==l?{secret_manager_settings:l}:{}},...t.policies?.length>0?{policies:t.policies}:{},...t.organization_id!==th.organization_id?{organization_id:t.organization_id??null}:{}};u.max_budget=(0,m.mapEmptyStringToNull)(u.max_budget),u.team_member_budget_duration=t.team_member_budget_duration,void 0!==t.team_member_budget&&(u.team_member_budget=Number(t.team_member_budget)),void 0!==t.team_member_key_duration&&(u.team_member_key_duration=t.team_member_key_duration),(void 0!==t.team_member_tpm_limit||void 0!==t.team_member_rpm_limit)&&(u.team_member_tpm_limit=r(t.team_member_tpm_limit),u.team_member_rpm_limit=r(t.team_member_rpm_limit));let{servers:g,accessGroups:p,toolsets:h}=t.mcp_servers_and_groups||{servers:[],accessGroups:[],toolsets:[]},x=new Set(g||[]),b=Object.fromEntries(Object.entries(t.mcp_tool_permissions||{}).filter(([e])=>x.has(e)));u.object_permission={},g&&(u.object_permission.mcp_servers=g),p&&(u.object_permission.mcp_access_groups=p),b&&(u.object_permission.mcp_tool_permissions=b),h&&(u.object_permission.mcp_toolsets=h),delete t.mcp_servers_and_groups,delete t.mcp_tool_permissions;let{agents:_,accessGroups:f}=t.agents_and_groups||{agents:[],accessGroups:[]};_&&_.length>0&&(u.object_permission.agents=_),f&&f.length>0&&(u.object_permission.agent_access_groups=f),delete t.agents_and_groups,t.vector_stores&&t.vector_stores.length>0&&(u.object_permission.vector_stores=t.vector_stores),void 0!==t.access_group_ids&&(u.access_group_ids=t.access_group_ids);let y=e8.current?.getValue();if(y?.router_settings){let e=e=>null!=e&&""!==e&&!1!==e&&!(Array.isArray(e)&&0===e.length),t=Object.values(y.router_settings).some(e),l=th.router_settings&&Object.values(th.router_settings).some(e);(t||l)&&(u.router_settings=y.router_settings)}await (0,i.teamUpdateCall)(n,u),J.default.success("Team settings updated successfully"),eL(!1),tm()}catch(e){console.error("Error updating team:",e)}finally{e3(!1)}};if(ek)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!eC?.team_info)return(0,t.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:th}=eC,tx=th.metadata?.disable_global_guardrails===!0,tb=new Set(th.metadata?.opted_out_global_guardrails||[]),t_=(th.metadata?.guardrails||[]).filter(e=>!eW.has(e)),tf=tx?t_:[...Array.from(eW).filter(e=>!tb.has(e)),...t_],ty=e=>{e.preventDefault(),e.stopPropagation()},tj=async(e,t)=>{await (0,d.copyToClipboard)(e)&&(e$(e=>({...e,[t]:!0})),setTimeout(()=>{e$(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Button,{type:"text",icon:(0,t.jsx)(_.ArrowLeftIcon,{className:"h-4 w-4"}),onClick:s,className:"mb-4",children:"Back to Teams"}),(0,t.jsx)(C.Title,{children:th.team_alias}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(v.Text,{className:"text-gray-500 font-mono",children:th.team_id}),(0,t.jsx)(N.Button,{type:"text",size:"small",icon:eU["team-id"]?(0,t.jsx)(L.CheckIcon,{size:12}):(0,t.jsx)(D.CopyIcon,{size:12}),onClick:()=>tj(th.team_id,"team-id"),className:`left-2 z-10 transition-all duration-200 ${eU["team-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsx)(P.Tabs,{defaultActiveKey:td,className:"mb-4",items:[{key:ep,label:ef[ep],children:(0,t.jsxs)(j.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(y.Card,{children:[(0,t.jsx)(v.Text,{children:"Budget Status"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(C.Title,{children:["$",(0,d.formatNumberWithCommas)(th.spend,4)]}),(0,t.jsxs)(v.Text,{children:["of ",null===th.max_budget?"Unlimited":`$${(0,d.formatNumberWithCommas)(th.max_budget,4)}`]}),th.budget_duration&&(0,t.jsxs)(v.Text,{className:"text-gray-500",children:["Reset: ",th.budget_duration]}),(0,t.jsx)("br",{}),th.team_member_budget_table&&(0,t.jsxs)(v.Text,{className:"text-gray-500",children:["Team Member Budget: $",(0,d.formatNumberWithCommas)(th.team_member_budget_table.max_budget,4)]})]})]}),(0,t.jsxs)(y.Card,{children:[(0,t.jsx)(v.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(v.Text,{children:["TPM: ",th.tpm_limit||"Unlimited"]}),(0,t.jsxs)(v.Text,{children:["RPM: ",th.rpm_limit||"Unlimited"]}),th.max_parallel_requests&&(0,t.jsxs)(v.Text,{children:["Max Parallel Requests: ",th.max_parallel_requests]}),(em=th.metadata?.model_tpm_limit??{},ec=th.metadata?.model_rpm_limit??{},0===(eu=Array.from(new Set([...Object.keys(em),...Object.keys(ec)]))).length?null:(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)(v.Text,{className:"text-gray-500",children:"Per-model limits:"}),eu.map(e=>(0,t.jsxs)(v.Text,{className:"text-xs",children:[e,": TPM ",em[e]??"—",", RPM ",ec[e]??"—"]},e))]}))]})]}),(0,t.jsxs)(y.Card,{children:[(0,t.jsx)(v.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===th.models.length||th.models.includes("all-proxy-models")?(0,t.jsx)(f.Badge,{color:"red",children:"All proxy models"}):(0,t.jsxs)(t.Fragment,{children:[th.models.map((e,l)=>(0,t.jsx)(f.Badge,{color:"blue",children:e},`direct-${l}`)),(th.access_group_models||[]).map((e,l)=>(0,t.jsx)(f.Badge,{color:"green",title:"From access group",children:e},`ag-${l}`))]})})]}),(0,t.jsxs)(y.Card,{children:[(0,t.jsx)(v.Text,{className:"font-semibold text-gray-900",children:"Virtual Keys"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(v.Text,{children:["User Keys: ",eC.keys.filter(e=>e.user_id).length]}),(0,t.jsxs)(v.Text,{children:["Service Account Keys: ",eC.keys.filter(e=>!e.user_id).length]}),(0,t.jsxs)(v.Text,{className:"text-gray-500",children:["Total: ",eC.keys.length]})]})]}),(0,t.jsx)(Y.default,{objectPermission:th.object_permission,variant:"card",accessToken:n}),(0,t.jsx)(y.Card,{children:(0,t.jsx)(G,{globalGuardrailNames:eW,teamGuardrails:th.metadata?.guardrails||[],optedOutGlobalGuardrails:th.metadata?.opted_out_global_guardrails||[],killSwitchOn:tx,variant:"inline"})}),(0,t.jsxs)(y.Card,{children:[(0,t.jsx)(v.Text,{className:"font-semibold text-gray-900 mb-3",children:"Policies"}),th.policies&&th.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:th.policies.map((e,l)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f.Badge,{color:"purple",children:e}),eY&&(0,t.jsx)(v.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!eY&&eQ[e]&&eQ[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(v.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eQ[e].map((e,l)=>(0,t.jsx)(f.Badge,{color:"blue",size:"xs",children:e},l))})]})]},l))}):(0,t.jsx)(v.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(W.default,{loggingConfigs:th.metadata?.logging||[],disabledCallbacks:[],variant:"card"})]})},{key:eh,label:ef[eh],children:(0,t.jsx)(eR,{teamId:e,teamAlias:th.team_alias,organization:e7})},{key:ex,label:ef[ex],children:(0,t.jsx)(ew,{teamData:eC,canEditTeam:tn,handleMemberDelete:e=>{e0(e),e1(!0)},setSelectedEditMember:eF,setIsEditMemberModalVisible:eP,setIsAddMemberModalVisible:eI})},{key:eb,label:ef[eb],children:(0,t.jsx)(eg,{teamId:e,accessToken:n,canEditTeam:tn})},{key:e_,label:ef[e_],children:(0,t.jsxs)(y.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(C.Title,{children:"Team Settings"}),tn&&!eA&&(0,t.jsx)(N.Button,{icon:(0,t.jsx)(u.EditOutlined,{className:"h-4 w-4"}),onClick:()=>eL(!0),children:"Edit Settings"})]}),eA&&eG?(0,t.jsx)("div",{className:"p-4",children:"Loading..."}):eA?(0,t.jsxs)(k.Form,{form:eM,onFinish:tp,onValuesChange:e=>{if("disable_global_guardrails"in e){let t=!0===e.disable_global_guardrails,l=(eM.getFieldValue("guardrails")||[]).filter(e=>!eW.has(e));eM.setFieldValue("guardrails",t?l:[...Array.from(eW),...l])}},initialValues:{...th,team_alias:th.team_alias,models:th.models,tpm_limit:th.tpm_limit,rpm_limit:th.rpm_limit,modelLimits:Array.from(new Set([...Object.keys(th.metadata?.model_tpm_limit??{}),...Object.keys(th.metadata?.model_rpm_limit??{})])).map(e=>({model:e,tpm:th.metadata?.model_tpm_limit?.[e],rpm:th.metadata?.model_rpm_limit?.[e]})),max_budget:th.max_budget,soft_budget:th.soft_budget,budget_duration:th.budget_duration,team_member_tpm_limit:th.team_member_budget_table?.tpm_limit,team_member_rpm_limit:th.team_member_budget_table?.rpm_limit,team_member_budget:th.team_member_budget_table?.max_budget,team_member_budget_duration:th.team_member_budget_table?.budget_duration,guardrails:tf,policies:th.policies||[],disable_global_guardrails:th.metadata?.disable_global_guardrails||!1,soft_budget_alerting_emails:Array.isArray(th.metadata?.soft_budget_alerting_emails)?th.metadata.soft_budget_alerting_emails.join(", "):"",metadata:th.metadata?JSON.stringify((({logging:e,secret_manager_settings:t,soft_budget_alerting_emails:l,model_tpm_limit:a,model_rpm_limit:r,...i})=>i)(th.metadata),null,2):"",logging_settings:th.metadata?.logging||[],secret_manager_settings:th.metadata?.secret_manager_settings?JSON.stringify(th.metadata.secret_manager_settings,null,2):"",organization_id:th.organization_id,vector_stores:th.object_permission?.vector_stores||[],mcp_servers:th.object_permission?.mcp_servers||[],mcp_access_groups:th.object_permission?.mcp_access_groups||[],mcp_servers_and_groups:{servers:th.object_permission?.mcp_servers||[],accessGroups:th.object_permission?.mcp_access_groups||[],toolsets:th.object_permission?.mcp_toolsets||[]},mcp_tool_permissions:th.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:th.object_permission?.agents||[],accessGroups:th.object_permission?.agent_access_groups||[]},access_group_ids:th.access_group_ids||[]},layout:"vertical",children:[(0,t.jsx)(k.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(S.Input,{type:""})}),(0,t.jsx)(k.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Please select at least one model"}],children:(0,t.jsx)(Q.ModelSelect,{value:eM.getFieldValue("models")||[],onChange:e=>eM.setFieldValue("models",e),teamID:e,organizationID:eC?.team_info?.organization_id||void 0,options:{includeSpecialOptions:!0,includeUserModels:!eC?.team_info?.organization_id,showAllProxyModelsOverride:(0,c.isProxyAdminRole)(te)&&!eC?.team_info?.organization_id},context:"team",dataTestId:"models-select"})}),(0,t.jsx)(k.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(X.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(k.Form.Item,{label:"Soft Budget (USD)",name:"soft_budget",children:(0,t.jsx)(X.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(k.Form.Item,{label:"Soft Budget Alerting Emails",name:"soft_budget_alerting_emails",tooltip:"Comma-separated email addresses to receive alerts when the soft budget is reached",children:(0,t.jsx)(S.Input,{placeholder:"example1@test.com, example2@test.com"})}),(0,t.jsx)(k.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(X.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(k.Form.Item,{label:"Team Member Budget Duration",name:"team_member_budget_duration",children:(0,t.jsx)(U,{onChange:e=>eM.setFieldValue("team_member_budget_duration",e),value:eM.getFieldValue("team_member_budget_duration")})}),(0,t.jsx)(k.Form.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,t.jsx)(w.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(k.Form.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,t.jsx)(X.default,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,t.jsx)(k.Form.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,t.jsx)(X.default,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})}),(0,t.jsx)(k.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(I.Select,{placeholder:"n/a",children:[(0,t.jsx)(I.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(I.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(I.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(k.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(X.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(k.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(X.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(k.Form.Item,{label:"Model-Specific Rate Limits",tooltip:"Set per-model TPM/RPM limits that apply across the whole team.",children:(0,t.jsx)(k.Form.List,{name:"modelLimits",children:(e,{add:l,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(({key:e,name:l,...r})=>(0,t.jsxs)(M.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(k.Form.Item,{...r,name:[l,"model"],rules:[{required:!0,message:"Missing model"},{validator:(e,t)=>t&&(eM.getFieldValue("modelLimits")??[]).filter(e=>e?.model===t).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],style:{minWidth:240},children:(0,t.jsx)(I.Select,{showSearch:!0,placeholder:"Select model",allowClear:!0,options:ts.map(e=>({value:e,label:e}))})}),(0,t.jsx)(k.Form.Item,{...r,name:[l,"tpm"],rules:[{validator:async(e,t)=>{let a=(eM.getFieldValue("modelLimits")??[])[l]??{};return a.model&&null==t&&null==a.rpm?Promise.reject(Error("Set at least one of TPM or RPM")):Promise.resolve()}}],children:(0,t.jsx)(T.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(k.Form.Item,{...r,name:[l,"rpm"],children:(0,t.jsx)(T.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(h.MinusCircleOutlined,{onClick:()=>a(l),style:{color:"#ef4444"}})]},e)),(0,t.jsx)(k.Form.Item,{children:(0,t.jsx)(N.Button,{type:"dashed",onClick:()=>l(),block:!0,icon:(0,t.jsx)(x.PlusOutlined,{}),children:"Add Model Limit"})})]})})}),(0,t.jsx)(k.Form.Item,{label:"Router Settings",children:(0,t.jsx)(et.default,{ref:e8,accessToken:n||"",value:th.router_settings?{router_settings:th.router_settings}:void 0})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(F.Tooltip,{title:"Select which guardrails apply to this team. Global guardrails are enabled by default — uncheck to opt out. Other guardrails are opt-in.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",children:(0,t.jsxs)(I.Select,{mode:"multiple",placeholder:"Select guardrails",optionLabelProp:"label",tagRender:({label:e,value:l,closable:a,onClose:r})=>{let i=eW.has(l);return(0,t.jsxs)(z.Tag,{color:"blue",closable:a,onClose:r,onMouseDown:ty,style:{marginInlineEnd:4},children:[i&&(0,t.jsx)(g.GlobalOutlined,{style:{marginInlineEnd:4},"aria-label":"Global guardrail"}),e]})},children:[(0,t.jsx)(I.Select.OptGroup,{label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.GlobalOutlined,{style:{marginInlineEnd:4}}),"Global"]}),children:(eK?.guardrails??[]).filter(e=>e.litellm_params?.default_on).map(e=>(0,t.jsx)(I.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,disabled:ti,children:e.guardrail_name},e.guardrail_name))}),(0,t.jsx)(I.Select.OptGroup,{label:"Other",children:(eK?.guardrails??[]).filter(e=>!e.litellm_params?.default_on).map(e=>(0,t.jsx)(I.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,children:e.guardrail_name},e.guardrail_name))})]})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable all global guardrails"," ",(0,t.jsx)(F.Tooltip,{title:"Kill switch: bypass every global guardrail for this team, including any added in the future. For per-guardrail opt-out instead, use the Guardrails dropdown above.",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)(O.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(F.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",children:(0,t.jsx)(I.Select,{mode:"tags",placeholder:"Select or enter policies",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(F.Tooltip,{title:"Assign access groups to this team. Access groups control which models, MCP servers, and agents this team can use",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(E.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{label:"Vector Stores",name:"vector_stores","aria-label":"Vector Stores",children:(0,t.jsx)(Z.default,{onChange:e=>eM.setFieldValue("vector_stores",e),value:eM.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(k.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)($.default,{onChange:e=>eM.setFieldValue("allowed_passthrough_routes",e),value:eM.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:"Select pass through routes"})}),(0,t.jsx)(k.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(q.default,{onChange:e=>eM.setFieldValue("mcp_servers_and_groups",e),value:eM.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(S.Input,{type:"hidden"})}),(0,t.jsx)(k.Form.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:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(H.default,{accessToken:n||"",selectedServers:eM.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:eM.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eM.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(k.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(B.default,{onChange:e=>eM.setFieldValue("agents_and_groups",e),value:eM.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{label:"Organization",name:"organization_id",children:(0,t.jsx)(I.Select,{allowClear:!0,placeholder:"Select an organization",showSearch:!0,optionFilterProp:"label",options:tl.map(e=>({value:e.organization_id,label:e.organization_alias||e.organization_id}))})}),(0,t.jsx)(k.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ee.default,{value:eM.getFieldValue("logging_settings"),onChange:e=>eM.setFieldValue("logging_settings",e)})}),(0,t.jsx)(k.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:eo?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(S.Input.TextArea,{rows:6,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!eo})}),(0,t.jsx)(k.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(S.Input.TextArea,{rows:10})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 pr-0 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(N.Button,{onClick:()=>eL(!1),disabled:e6,children:"Cancel"}),(0,t.jsx)(N.Button,{icon:(0,t.jsx)(b.SaveOutlined,{className:"h-4 w-4"}),type:"primary",htmlType:"submit",loading:e6,children:"Save Changes"})]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Text,{className:"font-medium",children:"Team Name"}),(0,t.jsx)("div",{children:th.team_alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"font-mono",children:th.team_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Text,{className:"font-medium",children:"Created At"}),(0,t.jsx)("div",{children:new Date(th.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:th.models.map((e,l)=>(0,t.jsx)(f.Badge,{color:"red",children:e},l))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",th.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",th.rpm_limit||"Unlimited"]}),(ey=th.metadata?.model_tpm_limit??{},ej=th.metadata?.model_rpm_limit??{},0===(ev=Array.from(new Set([...Object.keys(ey),...Object.keys(ej)]))).length?null:(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(v.Text,{className:"text-gray-500",children:"Per-model limits:"}),ev.map(e=>(0,t.jsxs)("div",{className:"text-xs ml-2",children:[e,": TPM ",ey[e]??"—",", RPM ",ej[e]??"—"]},e))]}))]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Text,{className:"font-medium",children:"Team Budget"}),(0,t.jsxs)("div",{children:["Max Budget:"," ",null!==th.max_budget?`$${(0,d.formatNumberWithCommas)(th.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Soft Budget:"," ",null!==th.soft_budget&&void 0!==th.soft_budget?`$${(0,d.formatNumberWithCommas)(th.soft_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Reset: ",th.budget_duration||"Never"]}),th.metadata?.soft_budget_alerting_emails&&Array.isArray(th.metadata.soft_budget_alerting_emails)&&th.metadata.soft_budget_alerting_emails.length>0&&(0,t.jsxs)("div",{children:["Soft Budget Alerting Emails: ",th.metadata.soft_budget_alerting_emails.join(", ")]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.Text,{className:"font-medium",children:["Team Member Settings"," ",(0,t.jsx)(F.Tooltip,{title:"These are limits on individual team members",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),(0,t.jsxs)("div",{children:["Max Budget: ",th.team_member_budget_table?.max_budget||"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Duration: ",th.team_member_budget_table?.budget_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["Key Duration: ",th.metadata?.team_member_key_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["TPM Limit: ",th.team_member_budget_table?.tpm_limit||"No Limit"]}),(0,t.jsxs)("div",{children:["RPM Limit: ",th.team_member_budget_table?.rpm_limit||"No Limit"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Text,{className:"font-medium",children:"Router Settings"}),th.router_settings&&Object.values(th.router_settings).some(e=>null!=e&&""!==e&&!(Array.isArray(e)&&0===e.length))?(0,t.jsxs)("div",{className:"mt-1 space-y-1",children:[th.router_settings.routing_strategy&&(0,t.jsxs)("div",{children:["Routing Strategy:"," ",(0,t.jsx)(f.Badge,{color:"blue",children:th.router_settings.routing_strategy})]}),null!=th.router_settings.num_retries&&(0,t.jsxs)("div",{children:["Number of Retries: ",th.router_settings.num_retries]}),null!=th.router_settings.allowed_fails&&(0,t.jsxs)("div",{children:["Allowed Failures: ",th.router_settings.allowed_fails]}),null!=th.router_settings.cooldown_time&&(0,t.jsxs)("div",{children:["Cooldown Time: ",th.router_settings.cooldown_time,"s"]}),null!=th.router_settings.timeout&&(0,t.jsxs)("div",{children:["Timeout: ",th.router_settings.timeout,"s"]}),null!=th.router_settings.retry_after&&(0,t.jsxs)("div",{children:["Retry After: ",th.router_settings.retry_after,"s"]}),th.router_settings.fallbacks&&Array.isArray(th.router_settings.fallbacks)&&th.router_settings.fallbacks.length>0&&(0,t.jsxs)("div",{children:["Fallbacks: ",th.router_settings.fallbacks.length," configured"]}),th.router_settings.enable_tag_filtering&&(0,t.jsx)("div",{children:"Tag Filtering: Enabled"})]}):(0,t.jsx)("div",{className:"text-gray-400",children:"No router settings configured"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Text,{className:"font-medium",children:"Organization ID"}),(0,t.jsx)("div",{children:th.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Text,{className:"font-medium",children:"Status"}),(0,t.jsx)(f.Badge,{color:th.blocked?"red":"green",children:th.blocked?"Blocked":"Active"})]}),(0,t.jsx)(Y.default,{objectPermission:th.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:n}),(0,t.jsx)(G,{globalGuardrailNames:eW,teamGuardrails:th.metadata?.guardrails||[],optedOutGlobalGuardrails:th.metadata?.opted_out_global_guardrails||[],killSwitchOn:tx,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsx)(W.default,{loggingConfigs:th.metadata?.logging||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"}),th.metadata?.secret_manager_settings&&(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(v.Text,{className:"font-medium",children:"Secret Manager Settings"}),(0,t.jsx)("pre",{className:"mt-2 bg-gray-50 p-3 rounded text-xs overflow-x-auto",children:JSON.stringify(th.metadata.secret_manager_settings,null,2)})]})]})]})}].filter(e=>to.includes(e.key))}),(0,t.jsx)(el.default,{visible:eO,onCancel:()=>eP(!1),onSubmit:tu,initialData:ez,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,t.jsxs)("span",{children:["Team Member Budget (USD)"," ",(0,t.jsx)(F.Tooltip,{title:"Maximum amount in USD this member can spend within this team. This is separate from any global user budget limits",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:.01,min:0,placeholder:"Budget limit for this member within this team"},{name:"tpm_limit",label:(0,t.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,t.jsx)(F.Tooltip,{title:"Maximum tokens per minute this member can use within this team. This is separate from any global user TPM limit",children:(0,t.jsx)(p.InfoCircleOutlined,{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,t.jsxs)("span",{children:["Team Member RPM Limit"," ",(0,t.jsx)(F.Tooltip,{title:"Maximum requests per minute this member can make within this team. This is separate from any global user RPM limit",children:(0,t.jsx)(p.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Requests per minute limit for this member in this team"}]}}),(0,t.jsx)(r.default,{isVisible:eT,onCancel:()=>eI(!1),onSubmit:tc,accessToken:n,teamId:e}),(0,t.jsx)(V.default,{isOpen:e2,title:"Delete Team Member",alertMessage:"Removing team members will also delete any keys created by or created for this member.",message:"Are you sure you want to remove this member from the team? This action cannot be undone.",resourceInformationTitle:"Team Member Information",resourceInformation:[{label:"User ID",value:eZ?.user_id,code:!0},{label:"Email",value:eZ?.user_email},{label:"Role",value:eZ?.role}],onCancel:()=>{e1(!1),e0(null)},onOk:tg,confirmLoading:e4})]})}],56567)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/46d42331373d9805.js b/litellm/proxy/_experimental/out/_next/static/chunks/46d42331373d9805.js new file mode 100644 index 0000000000..10c1af483d --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/46d42331373d9805.js @@ -0,0 +1,179 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,737033,e=>{"use strict";var s=e.i(843476),t=e.i(271645),l=e.i(599724),a=e.i(928685),r=e.i(311451),i=e.i(199133),n=e.i(798496),c=e.i(389083),o=e.i(592968),d=e.i(166406),x=e.i(596239),m=e.i(652272);e.s(["default",0,({skills:e,isLoading:h,isAdmin:u,accessToken:p,publicPage:g=!1,onPublishSuccess:j})=>{let[b,f]=(0,t.useState)(""),[v,y]=(0,t.useState)(void 0),[N,_]=(0,t.useState)(null),T=e.length,S=(0,t.useMemo)(()=>[...new Set(e.map(e=>e.domain).filter(Boolean))],[e]),w=(0,t.useMemo)(()=>[...new Set(e.map(e=>e.namespace).filter(Boolean))],[e]),C=(0,t.useMemo)(()=>{let s=e;if(v&&(s=s.filter(e=>(e.domain||"General")===v)),b.trim()){let e=b.toLowerCase();s=s.filter(s=>s.name.toLowerCase().includes(e)||s.description?.toLowerCase().includes(e)||s.domain?.toLowerCase().includes(e)||s.namespace?.toLowerCase().includes(e)||s.keywords?.some(s=>s.toLowerCase().includes(e)))}return s},[e,b,v]);return N?(0,s.jsx)(m.default,{skill:N,onBack:()=>_(null),isAdmin:u,accessToken:p,onPublishClick:j}):h?(0,s.jsx)("div",{className:"text-center py-16 text-gray-400",children:"Loading skills..."}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Total Skills"}),(0,s.jsx)("div",{className:"text-2xl font-semibold text-gray-900",children:T})]}),(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Namespaces"}),(0,s.jsx)("div",{className:"text-2xl font-semibold text-gray-900",children:w.length})]}),(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:"Domains"}),(0,s.jsx)("div",{className:"text-2xl font-semibold text-gray-900",children:S.length})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)("h3",{className:"text-sm font-semibold text-gray-700",children:["All ",g?"Public ":"","Skills"]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(i.Select,{placeholder:"All Domains",allowClear:!0,value:v,onChange:e=>y(e),style:{width:160},options:S.map(e=>({label:e,value:e}))}),(0,s.jsx)(r.Input,{prefix:(0,s.jsx)(a.SearchOutlined,{className:"text-gray-400"}),placeholder:"Search by name, namespace, or tag…",value:b,onChange:e=>f(e.target.value),style:{width:280},allowClear:!0})]})]}),(0,s.jsx)(n.ModelDataTable,{columns:((e,t,a=!1)=>[{header:"Skill Name",accessorKey:"name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:a})=>{let r=a.original;return(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("button",{type:"button",className:"font-medium text-sm cursor-pointer text-blue-600 hover:underline bg-transparent border-none p-0",onClick:()=>e(r),children:r.name}),(0,s.jsx)(o.Tooltip,{title:"Copy skill name",children:(0,s.jsx)(d.CopyOutlined,{onClick:()=>t(r.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),r.description&&(0,s.jsx)(l.Text,{className:"text-xs text-gray-500 line-clamp-1 md:hidden",children:r.description})]})}},{header:"Description",accessorKey:"description",enableSorting:!1,cell:({row:e})=>(0,s.jsx)(l.Text,{className:"text-xs line-clamp-2",children:e.original.description||"-"})},{header:"Category",accessorKey:"category",enableSorting:!0,cell:({row:e})=>{let t=e.original.category;return t?(0,s.jsx)(c.Badge,{color:"blue",size:"xs",children:t}):(0,s.jsx)(l.Text,{className:"text-xs text-gray-400",children:"-"})}},{header:"Domain",accessorKey:"domain",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(l.Text,{className:"text-xs",children:e.original.domain||"-"})},{header:"Source",accessorKey:"source",enableSorting:!1,cell:({row:e})=>{let t=e.original.source,a=null,r="-";return(t?.source==="github"&&t.repo?(a=`https://github.com/${t.repo}`,r=t.repo):t?.source==="git-subdir"&&t.url?r=(a=t.path?`${t.url}/tree/main/${t.path}`:t.url).replace("https://github.com/",""):t?.source==="url"&&t.url&&(a=t.url,r=t.url.replace(/^https?:\/\//,"")),a)?(0,s.jsxs)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:underline truncate max-w-[180px]",title:r,children:[(0,s.jsx)("span",{className:"truncate",children:r}),(0,s.jsx)(x.LinkOutlined,{className:"shrink-0",style:{fontSize:10}})]}):(0,s.jsx)(l.Text,{className:"text-xs text-gray-400",children:"-"})}},{header:"Status",accessorKey:"enabled",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(c.Badge,{color:e.original.enabled?"green":"gray",size:"xs",children:e.original.enabled?"Public":"Draft"})}])(e=>_(e),e=>{navigator.clipboard.writeText(e)},g),data:C,isLoading:!1,defaultSorting:[{id:"name",desc:!1}]}),(0,s.jsx)("div",{className:"mt-3 text-center",children:(0,s.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["Showing ",C.length," of ",T," skill",1!==T?"s":""]})})]})]})}],737033)},93826,174886,952571,e=>{"use strict";var s=e.i(271645);let t=s.forwardRef(function(e,t){return s.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),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});e.s(["SearchIcon",0,t],93826);var l=e.i(991124);e.s(["Copy",()=>l.default],174886);var a=e.i(879664);e.s(["Info",()=>a.default],952571)},976883,e=>{"use strict";var s=e.i(843476),t=e.i(275144),l=e.i(434626),a=e.i(93826),r=e.i(994388),i=e.i(304967),n=e.i(599724),c=e.i(629569),o=e.i(212931),d=e.i(199133),x=e.i(653496),m=e.i(262218),h=e.i(592968),u=e.i(174886),p=e.i(952571),g=e.i(271645),j=e.i(798496),b=e.i(727749),f=e.i(402874),v=e.i(764205),y=e.i(737033),N=e.i(190272),_=e.i(785913),T=e.i(916925);let{TabPane:S}=x.Tabs;e.s(["default",0,({accessToken:e,isEmbedded:w=!1})=>{let C,k,A,M,L,P,z,[E,D]=(0,g.useState)(null),[I,O]=(0,g.useState)(null),[K,R]=(0,g.useState)(null),[H,U]=(0,g.useState)("LiteLLM Gateway"),[F,$]=(0,g.useState)(null),[B,W]=(0,g.useState)(""),[q,G]=(0,g.useState)({}),[V,X]=(0,g.useState)(!0),[J,Y]=(0,g.useState)(!0),[Q,Z]=(0,g.useState)(!0),[ee,es]=(0,g.useState)(""),[et,el]=(0,g.useState)(""),[ea,er]=(0,g.useState)(""),[ei,en]=(0,g.useState)([]),[ec,eo]=(0,g.useState)([]),[ed,ex]=(0,g.useState)([]),[em,eh]=(0,g.useState)([]),[eu,ep]=(0,g.useState)([]),[eg,ej]=(0,g.useState)("I'm alive! ✓"),[eb,ef]=(0,g.useState)(!1),[ev,ey]=(0,g.useState)(!1),[eN,e_]=(0,g.useState)(!1),[eT,eS]=(0,g.useState)(null),[ew,eC]=(0,g.useState)(null),[ek,eA]=(0,g.useState)(null),[eM,eL]=(0,g.useState)({}),[eP,ez]=(0,g.useState)("models"),[eE,eD]=(0,g.useState)([]),[eI,eO]=(0,g.useState)(!1);(0,g.useEffect)(()=>{(async()=>{try{await (0,v.getUiConfig)()}catch(e){console.error("Failed to get UI config:",e)}let e=async()=>{try{X(!0);let e=await (0,v.modelHubPublicModelsCall)();console.log("ModelHubData:",e),D(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public model data",e),ej("Service unavailable")}finally{X(!1)}},s=async()=>{try{Y(!0);let e=await (0,v.agentHubPublicModelsCall)();console.log("AgentHubData:",e),O(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public agent data",e)}finally{Y(!1)}},t=async()=>{try{Z(!0);let e=await (0,v.mcpHubPublicServersCall)();console.log("MCPHubData:",e),R(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public MCP server data",e)}finally{Z(!1)}},l=async()=>{try{eO(!0);let e=await (0,v.skillHubPublicCall)();eD(e.plugins??[])}catch(e){console.error("There was an error fetching the public skill data",e)}finally{eO(!1)}};(async()=>{let e=await (0,v.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),U(e.docs_title),$(e.custom_docs_description),W(e.litellm_version),G(e.useful_links||{})})(),e(),s(),t(),l()})()},[]),(0,g.useEffect)(()=>{},[ee,ei,ec,ed]);let eK=(0,g.useMemo)(()=>{if(!E||!Array.isArray(E))return[];let e=E;if(ee.trim()){let s=ee.toLowerCase(),t=s.split(/\s+/),l=E.filter(e=>{let l=e.model_group.toLowerCase();return!!l.includes(s)||t.every(e=>l.includes(e))});l.length>0&&(e=l.sort((e,t)=>{let l=e.model_group.toLowerCase(),a=t.model_group.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=50*!!s.split(/\s+/).every(e=>l.includes(e)),d=50*!!s.split(/\s+/).every(e=>a.includes(e)),x=l.length;return i+c+d+(1e3-a.length)-(r+n+o+(1e3-x))}))}return e.filter(e=>{let s=0===ei.length||ei.some(s=>e.providers.includes(s)),t=0===ec.length||ec.includes(e.mode||""),l=0===ed.length||Object.entries(e).filter(([e,s])=>e.startsWith("supports_")&&!0===s).some(([e])=>{let s=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return ed.includes(s)});return s&&t&&l})},[E,ee,ei,ec,ed]),eR=(0,g.useMemo)(()=>{if(!I||!Array.isArray(I))return[];let e=I;if(et.trim()){let s=et.toLowerCase(),t=s.split(/\s+/);e=(e=I.filter(e=>{let l=e.name.toLowerCase(),a=e.description.toLowerCase();return!!(l.includes(s)||a.includes(s))||t.every(e=>l.includes(e)||a.includes(e))})).sort((e,t)=>{let l=e.name.toLowerCase(),a=t.name.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=r+n+(1e3-l.length);return i+c+(1e3-a.length)-o})}return e.filter(e=>0===em.length||e.skills?.some(e=>e.tags?.some(e=>em.includes(e))))},[I,et,em]),eH=(0,g.useMemo)(()=>{if(!K||!Array.isArray(K))return[];let e=K;if(ea.trim()){let s=ea.toLowerCase(),t=s.split(/\s+/);e=(e=K.filter(e=>{let l=e.server_name.toLowerCase(),a=(e.mcp_info?.description||"").toLowerCase();return!!(l.includes(s)||a.includes(s))||t.every(e=>l.includes(e)||a.includes(e))})).sort((e,t)=>{let l=e.server_name.toLowerCase(),a=t.server_name.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=r+n+(1e3-l.length);return i+c+(1e3-a.length)-o})}return e.filter(e=>0===eu.length||eu.includes(e.transport))},[K,ea,eu]),eU=e=>{navigator.clipboard.writeText(e),b.default.success("Copied to clipboard!")},eF=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),e$=e=>`$${(1e6*e).toFixed(4)}`,eB=e=>e?e>=1e3?`${(e/1e3).toFixed(0)}K`:e.toString():"N/A";return(0,s.jsx)(t.ThemeProvider,{accessToken:e,children:(0,s.jsxs)("div",{className:w?"w-full":"min-h-screen bg-white",children:[!w&&(0,s.jsx)(f.default,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:eL,proxySettings:eM,accessToken:e||null,isPublicPage:!0,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,s.jsxs)("div",{className:w?"w-full p-6":"w-full px-8 py-12",children:[w&&(0,s.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:(0,s.jsx)("p",{className:"text-sm text-gray-700",children:"These are models, agents, and MCP servers your proxy admin has indicated are available in your company."})}),!w&&(0,s.jsxs)(i.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,s.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:F||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,s.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,s.jsxs)("span",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"w-4 h-4 mr-2",children:"🔧"}),"Built with litellm: v",B]})})]}),q&&Object.keys(q).length>0&&(0,s.jsxs)(i.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(q||{}).map(([e,s])=>({title:e,url:"string"==typeof s?s:s.url,index:"string"==typeof s?0:s.index??0})).sort((e,s)=>e.index-s.index).map(({title:e,url:t})=>(0,s.jsxs)("button",{onClick:()=>window.open(t,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,s.jsx)(l.ExternalLinkIcon,{className:"w-4 h-4"}),(0,s.jsx)(n.Text,{className:"text-sm font-medium",children:e})]},e))})]}),!w&&(0,s.jsxs)(i.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,s.jsxs)(n.Text,{className:"text-green-600 font-medium text-sm",children:["Service status: ",eg]})})]}),(0,s.jsx)(i.Card,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:(0,s.jsxs)(x.Tabs,{activeKey:eP,onChange:ez,size:"large",className:"public-hub-tabs",children:[(0,s.jsxs)(S,{tab:"Model Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,s.jsx)(h.Tooltip,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,s.jsx)(p.Info,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(a.SearchIcon,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:ee,onChange:e=>es(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,s.jsx)(d.Select,{mode:"multiple",value:ei,onChange:e=>en(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:t}=(0,T.getProviderLogoAndName)(e.value);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,s.jsx)("img",{src:t,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e.label})]})},children:E&&Array.isArray(E)&&(C=new Set,E.forEach(e=>{(e.providers??[]).forEach(e=>C.add(e))}),Array.from(C)).map(e=>(0,s.jsx)(d.Select.Option,{value:e,children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,s.jsx)(d.Select,{mode:"multiple",value:ec,onChange:e=>eo(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:E&&Array.isArray(E)&&(k=new Set,E.forEach(e=>{e.mode&&k.add(e.mode)}),Array.from(k)).map(e=>(0,s.jsx)(d.Select.Option,{value:e,children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,s.jsx)(d.Select,{mode:"multiple",value:ed,onChange:e=>ex(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:E&&Array.isArray(E)&&(A=new Set,E.forEach(e=>{Object.entries(e).filter(([e,s])=>e.startsWith("supports_")&&!0===s).forEach(([e])=>{let s=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");A.add(s)})}),Array.from(A).sort()).map(e=>(0,s.jsx)(d.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(h.Tooltip,{title:e.original.model_group,children:(0,s.jsx)(r.Button,{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",onClick:()=>{eS(e.original),ef(!0)},children:e.original.model_group})})}),size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:({row:e})=>{let t=e.original.providers??[];return(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>{let{logo:t}=(0,T.getProviderLogoAndName)(e);return(0,s.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[t&&(0,s.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:({row:e})=>{let t=e.original.mode;return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:(e=>{switch(e?.toLowerCase()){case"chat":return"💬";case"rerank":return"🔄";case"embedding":return"📄";default:return"🤖"}})(t||"")}),(0,s.jsx)(n.Text,{children:t||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(n.Text,{className:"text-center",children:eB(e.original.max_input_tokens)}),size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(n.Text,{className:"text-center",children:eB(e.original.max_output_tokens)}),size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:({row:e})=>{let t=e.original.input_cost_per_token;return(0,s.jsx)(n.Text,{className:"text-center",children:t?e$(t):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:({row:e})=>{let t=e.original.output_cost_per_token;return(0,s.jsx)(n.Text,{className:"text-center",children:t?e$(t):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:({row:e})=>{let t=Object.entries(e.original).filter(([e,s])=>e.startsWith("supports_")&&!0===s).map(([e])=>eF(e));return 0===t.length?(0,s.jsx)(n.Text,{className:"text-gray-400",children:"-"}):1===t.length?(0,s.jsx)("div",{className:"h-6 flex items-center",children:(0,s.jsx)(m.Tag,{color:"blue",className:"text-xs",children:t[0]})}):(0,s.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,s.jsx)(m.Tag,{color:"blue",className:"text-xs",children:t[0]}),(0,s.jsx)(h.Tooltip,{title:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"font-medium",children:"All Features:"}),t.map((e,t)=>(0,s.jsxs)("div",{className:"text-xs",children:["• ",e]},t))]}),trigger:"click",placement:"topLeft",children:(0,s.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",t.length-1]})})]})},size:120},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,cell:({row:e})=>{let t=e.original,l="healthy"===t.health_status?"green":"unhealthy"===t.health_status?"red":"default",a=t.health_response_time?`Response Time: ${Number(t.health_response_time).toFixed(2)}ms`:"N/A",r=t.health_checked_at?`Last Checked: ${new Date(t.health_checked_at).toLocaleString()}`:"N/A";return(0,s.jsx)(h.Tooltip,{title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{children:a}),(0,s.jsx)("div",{children:r})]}),children:(0,s.jsx)(m.Tag,{color:l,children:(0,s.jsx)("span",{className:"capitalize",children:t.health_status??"Unknown"})},t.model_group)})},size:100},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:({row:e})=>{var t,l;let a,r=e.original;return(0,s.jsx)(n.Text,{className:"text-xs text-gray-600",children:(t=r.rpm,l=r.tpm,a=[],t&&a.push(`RPM: ${t.toLocaleString()}`),l&&a.push(`TPM: ${l.toLocaleString()}`),a.length>0?a.join(", "):"N/A")})},size:150}],data:eK,isLoading:V,defaultSorting:[{id:"model_group",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(n.Text,{className:"text-sm text-gray-600",children:["Showing ",eK.length," of ",E?.length||0," models"]})})]},"models"),I&&Array.isArray(I)&&I.length>0&&(0,s.jsxs)(S,{tab:"Agent Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Agents"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium text-gray-700",children:"Search Agents:"}),(0,s.jsx)(h.Tooltip,{title:"Search agents by name or description",placement:"top",children:(0,s.jsx)(p.Info,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(a.SearchIcon,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search agent names or descriptions...",value:et,onChange:e=>el(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Skills:"}),(0,s.jsx)(d.Select,{mode:"multiple",value:em,onChange:e=>eh(e),placeholder:"Select skills",className:"w-full",size:"large",allowClear:!0,children:I&&Array.isArray(I)&&(M=new Set,I.forEach(e=>{e.skills?.forEach(e=>{e.tags?.forEach(e=>M.add(e))})}),Array.from(M).sort()).map(e=>(0,s.jsx)(d.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Agent Name",accessorKey:"name",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(h.Tooltip,{title:e.original.name,children:(0,s.jsx)(r.Button,{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",onClick:()=>{eC(e.original),ey(!0)},children:e.original.name})})}),size:150},{header:"Description",accessorKey:"description",enableSorting:!1,cell:({row:e})=>{let t=e.original.description??"",l=t.length>80?t.substring(0,80)+"...":t;return(0,s.jsx)(h.Tooltip,{title:t,children:(0,s.jsx)(n.Text,{className:"text-sm text-gray-700",children:l})})},size:250},{header:"Version",accessorKey:"version",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(n.Text,{className:"text-sm",children:e.original.version}),size:80},{header:"Provider",accessorKey:"provider",enableSorting:!1,cell:({row:e})=>{let t=e.original.provider;return t?(0,s.jsx)("div",{className:"text-sm",children:(0,s.jsx)(n.Text,{className:"font-medium",children:t.organization})}):(0,s.jsx)(n.Text,{className:"text-gray-400",children:"-"})},size:120},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let t=e.original.skills||[];return 0===t.length?(0,s.jsx)(n.Text,{className:"text-gray-400",children:"-"}):1===t.length?(0,s.jsx)("div",{className:"h-6 flex items-center",children:(0,s.jsx)(m.Tag,{color:"purple",className:"text-xs",children:t[0].name})}):(0,s.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,s.jsx)(m.Tag,{color:"purple",className:"text-xs",children:t[0].name}),(0,s.jsx)(h.Tooltip,{title:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"font-medium",children:"All Skills:"}),t.map((e,t)=>(0,s.jsxs)("div",{className:"text-xs",children:["• ",e.name]},t))]}),trigger:"click",placement:"topLeft",children:(0,s.jsxs)("span",{className:"text-xs text-purple-600 cursor-pointer hover:text-purple-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",t.length-1]})})]})},size:150},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let t=Object.entries(e.original.capabilities||{}).filter(([e,s])=>!0===s).map(([e])=>e);return 0===t.length?(0,s.jsx)(n.Text,{className:"text-gray-400",children:"-"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>(0,s.jsx)(m.Tag,{color:"green",className:"text-xs capitalize",children:e},e))})},size:150}],data:eR,isLoading:J,defaultSorting:[{id:"name",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(n.Text,{className:"text-sm text-gray-600",children:["Showing ",eR.length," of ",I?.length||0," agents"]})})]},"agents"),K&&Array.isArray(K)&&K.length>0&&(0,s.jsxs)(S,{tab:"MCP Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available MCP Servers"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium text-gray-700",children:"Search MCP Servers:"}),(0,s.jsx)(h.Tooltip,{title:"Search MCP servers by name or description",placement:"top",children:(0,s.jsx)(p.Info,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(a.SearchIcon,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search MCP server names or descriptions...",value:ea,onChange:e=>er(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Transport:"}),(0,s.jsx)(d.Select,{mode:"multiple",value:eu,onChange:e=>ep(e),placeholder:"Select transport types",className:"w-full",size:"large",allowClear:!0,children:K&&Array.isArray(K)&&(L=new Set,K.forEach(e=>{e.transport&&L.add(e.transport)}),Array.from(L).sort()).map(e=>(0,s.jsx)(d.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(h.Tooltip,{title:e.original.server_name,children:(0,s.jsx)(r.Button,{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",onClick:()=>{eA(e.original),e_(!0)},children:e.original.server_name})})}),size:150},{header:"Description",accessorKey:"mcp_info.description",enableSorting:!1,cell:({row:e})=>{let t=String(e.original.mcp_info?.description??"-"),l=t.length>80?t.substring(0,80)+"...":t;return(0,s.jsx)(h.Tooltip,{title:t,children:(0,s.jsx)(n.Text,{className:"text-sm text-gray-700",children:l})})},size:250},{header:"URL",accessorKey:"url",enableSorting:!1,cell:({row:e})=>{let t=e.original.url??"",l=t.length>40?t.substring(0,40)+"...":t;return(0,s.jsx)(h.Tooltip,{title:t,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(n.Text,{className:"text-xs font-mono",children:l}),(0,s.jsx)(u.Copy,{onClick:()=>eU(t),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-3 h-3"})]})})},size:200},{header:"Transport",accessorKey:"transport",enableSorting:!0,cell:({row:e})=>{let t=e.original.transport;return(0,s.jsx)(m.Tag,{color:"blue",className:"text-xs uppercase",children:t})},size:100},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,cell:({row:e})=>{let t=e.original.auth_type;return(0,s.jsx)(m.Tag,{color:"none"===t?"gray":"green",className:"text-xs capitalize",children:t})},size:100}],data:eH,isLoading:Q,defaultSorting:[{id:"server_name",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(n.Text,{className:"text-sm text-gray-600",children:["Showing ",eH.length," of ",K?.length||0," MCP servers"]})})]},"mcp"),(0,s.jsx)(S,{tab:"Skill Hub",children:(0,s.jsx)(y.default,{skills:eE,isLoading:eI,publicPage:!0})},"skills")]})})]}),(0,s.jsx)(o.Modal,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:eT?.model_group||"Model Details"}),eT&&(0,s.jsx)(h.Tooltip,{title:"Copy model name",children:(0,s.jsx)(u.Copy,{onClick:()=>eU(eT.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:eb,footer:null,onOk:()=>{ef(!1),eS(null)},onCancel:()=>{ef(!1),eS(null)},children:eT&&(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Model Name:"}),(0,s.jsx)(n.Text,{children:eT.model_group})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Mode:"}),(0,s.jsx)(n.Text,{children:eT.mode||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Providers:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(eT.providers??[]).map(e=>{let{logo:t}=(0,T.getProviderLogoAndName)(e);return(0,s.jsx)(m.Tag,{color:"blue",children:(0,s.jsxs)("div",{className:"flex items-center space-x-1",children:[t&&(0,s.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),eT.model_group.includes("*")&&(0,s.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,s.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,s.jsx)(p.Info,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,s.jsxs)(n.Text,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,s.jsxs)(n.Text,{className:"text-sm text-blue-800",children:["For example, with"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:eT.model_group}),", you can use any string (",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:eT.model_group.replaceAll("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,s.jsx)(n.Text,{children:eT.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,s.jsx)(n.Text,{children:eT.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,s.jsx)(n.Text,{children:eT.input_cost_per_token?e$(eT.input_cost_per_token):"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,s.jsx)(n.Text,{children:eT.output_cost_per_token?e$(eT.output_cost_per_token):"Not specified"})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:(P=Object.entries(eT).filter(([e,s])=>e.startsWith("supports_")&&!0===s).map(([e])=>e),z=["green","blue","purple","orange","red","yellow"],0===P.length?(0,s.jsx)(n.Text,{className:"text-gray-500",children:"No special capabilities listed"}):P.map((e,t)=>(0,s.jsx)(m.Tag,{color:z[t%z.length],children:eF(e)},e)))})]}),(eT.tpm||eT.rpm)&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[eT.tpm&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,s.jsx)(n.Text,{children:eT.tpm.toLocaleString()})]}),eT.rpm&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,s.jsx)(n.Text,{children:eT.rpm.toLocaleString()})]})]})]}),eT.supported_openai_params&&eT.supported_openai_params.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:eT.supported_openai_params.map(e=>(0,s.jsx)(m.Tag,{color:"green",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-sm",children:(0,N.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,_.getEndpointType)(eT.mode||"chat"),selectedModel:eT.model_group,selectedSdk:"openai"})})}),(0,s.jsx)("div",{className:"mt-2 text-right",children:(0,s.jsx)("button",{onClick:()=>{eU((0,N.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,_.getEndpointType)(eT.mode||"chat"),selectedModel:eT.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})}),(0,s.jsx)(o.Modal,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:ew?.name||"Agent Details"}),ew&&(0,s.jsx)(h.Tooltip,{title:"Copy agent name",children:(0,s.jsx)(u.Copy,{onClick:()=>eU(ew.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ev,footer:null,onOk:()=>{ey(!1),eC(null)},onCancel:()=>{ey(!1),eC(null)},children:ew&&(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Name:"}),(0,s.jsx)(n.Text,{children:ew.name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Version:"}),(0,s.jsx)(n.Text,{children:ew.version})]}),(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Description:"}),(0,s.jsx)(n.Text,{children:ew.description})]}),ew.url&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"URL:"}),(0,s.jsx)("a",{href:ew.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all",children:ew.url})]})]})]}),ew.capabilities&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(ew.capabilities).filter(([e,s])=>!0===s).map(([e])=>(0,s.jsx)(m.Tag,{color:"green",className:"capitalize",children:e},e))})]}),ew.skills&&ew.skills.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,s.jsx)("div",{className:"space-y-4",children:ew.skills.map((e,t)=>(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium text-base",children:e.name}),(0,s.jsx)(n.Text,{className:"text-sm text-gray-600",children:e.description})]})}),e.tags&&e.tags.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(e=>(0,s.jsx)(m.Tag,{color:"purple",className:"text-xs",children:e},e))})]},t))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Input Modes:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ew.defaultInputModes??[]).map(e=>(0,s.jsx)(m.Tag,{color:"blue",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Output Modes:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ew.defaultOutputModes??[]).map(e=>(0,s.jsx)(m.Tag,{color:"blue",children:e},e))})]})]})]}),ew.documentationUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Documentation"}),(0,s.jsxs)("a",{href:ew.documentationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 flex items-center space-x-2",children:[(0,s.jsx)(l.ExternalLinkIcon,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"View Documentation"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example (A2A Protocol)"}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 1: Retrieve Agent Card"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-xs",children:`base_url = '${ew.url}' + +resolver = A2ACardResolver( + httpx_client=httpx_client, + base_url=base_url, + # agent_card_path uses default, extended_agent_card_path also uses default +) + +# Fetch Public Agent Card and Initialize Client +final_agent_card_to_use: AgentCard | None = None +_public_card = ( + await resolver.get_agent_card() +) # Fetches from default public path - \`/agents/{agent_id}/\` +final_agent_card_to_use = _public_card + +if _public_card.supports_authenticated_extended_card: + try: + auth_headers_dict = { + 'Authorization': 'Bearer dummy-token-for-extended-card' + } + _extended_card = await resolver.get_agent_card( + relative_card_path=EXTENDED_AGENT_CARD_PATH, + http_kwargs={'headers': auth_headers_dict}, + ) + final_agent_card_to_use = ( + _extended_card # Update to use the extended card + ) + except Exception as e_extended: + logger.warning( + f'Failed to fetch extended agent card: {e_extended}. Will proceed with public card.', + exc_info=True, + )`})}),(0,s.jsx)("div",{className:"mt-2 text-right",children:(0,s.jsx)("button",{onClick:()=>{eU(`from a2a.client import A2ACardResolver, A2AClient +from a2a.types import ( + AgentCard, + MessageSendParams, + SendMessageRequest, + SendStreamingMessageRequest, +) +from a2a.utils.constants import ( + AGENT_CARD_WELL_KNOWN_PATH, + EXTENDED_AGENT_CARD_PATH, +) + +base_url = '${ew.url}' + +resolver = A2ACardResolver( + httpx_client=httpx_client, + base_url=base_url, + # agent_card_path uses default, extended_agent_card_path also uses default +) + +# Fetch Public Agent Card and Initialize Client +final_agent_card_to_use: AgentCard | None = None +_public_card = ( + await resolver.get_agent_card() +) # Fetches from default public path - \`/agents/{agent_id}/\` +final_agent_card_to_use = _public_card + +if _public_card.supports_authenticated_extended_card: + try: + auth_headers_dict = { + 'Authorization': 'Bearer dummy-token-for-extended-card' + } + _extended_card = await resolver.get_agent_card( + relative_card_path=EXTENDED_AGENT_CARD_PATH, + http_kwargs={'headers': auth_headers_dict}, + ) + final_agent_card_to_use = ( + _extended_card # Update to use the extended card + ) + except Exception as e_extended: + logger.warning( + f'Failed to fetch extended agent card: {e_extended}. Will proceed with public card.', + exc_info=True, + )`)},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 2: Call the Agent"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-xs",children:`client = A2AClient( + httpx_client=httpx_client, agent_card=final_agent_card_to_use +) + +send_message_payload: dict[str, Any] = { + 'message': { + 'role': 'user', + 'parts': [ + {'kind': 'text', 'text': 'how much is 10 USD in INR?'} + ], + 'messageId': uuid4().hex, + }, +} +request = SendMessageRequest( + id=str(uuid4()), params=MessageSendParams(**send_message_payload) +) + +response = await client.send_message(request) +print(response.model_dump(mode='json', exclude_none=True))`})}),(0,s.jsx)("div",{className:"mt-2 text-right",children:(0,s.jsx)("button",{onClick:()=>{eU(`client = A2AClient( + httpx_client=httpx_client, agent_card=final_agent_card_to_use +) + +send_message_payload: dict[str, Any] = { + 'message': { + 'role': 'user', + 'parts': [ + {'kind': 'text', 'text': 'how much is 10 USD in INR?'} + ], + 'messageId': uuid4().hex, + }, +} +request = SendMessageRequest( + id=str(uuid4()), params=MessageSendParams(**send_message_payload) +) + +response = await client.send_message(request) +print(response.model_dump(mode='json', exclude_none=True))`)},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})]})}),(0,s.jsx)(o.Modal,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:ek?.server_name||"MCP Server Details"}),ek&&(0,s.jsx)(h.Tooltip,{title:"Copy server name",children:(0,s.jsx)(u.Copy,{onClick:()=>eU(ek.server_name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:eN,footer:null,onOk:()=>{e_(!1),eA(null)},onCancel:()=>{e_(!1),eA(null)},children:ek&&(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Server Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Server Name:"}),(0,s.jsx)(n.Text,{children:ek.server_name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Transport:"}),(0,s.jsx)(m.Tag,{color:"blue",children:ek.transport})]}),ek.alias&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Alias:"}),(0,s.jsx)(n.Text,{children:ek.alias})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Auth Type:"}),(0,s.jsx)(m.Tag,{color:"none"===ek.auth_type?"gray":"green",children:ek.auth_type})]}),(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"Description:"}),(0,s.jsx)(n.Text,{children:ek.mcp_info?.description||"-"})]}),(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)(n.Text,{className:"font-medium",children:"URL:"}),(0,s.jsxs)("a",{href:ek.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all flex items-center space-x-2",children:[(0,s.jsx)("span",{children:ek.url}),(0,s.jsx)(l.ExternalLinkIcon,{className:"w-4 h-4"})]})]})]})]}),ek.mcp_info&&Object.keys(ek.mcp_info).length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Additional Information"}),(0,s.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,s.jsx)("pre",{className:"text-xs overflow-x-auto",children:JSON.stringify(ek.mcp_info,null,2)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-sm",children:`# Using MCP Server with Python FastMCP + +from fastmcp import Client +import asyncio + +# Standard MCP configuration +config = { + "mcpServers": { + "${ek.server_name}": { + "url": "http://localhost:4000/${ek.server_name}/mcp", + "headers": { + "x-litellm-api-key": "Bearer sk-1234" + } + } + } +} + +# Create a client that connects to the server +client = Client(config) + +async def main(): + async with client: + # List available tools + tools = await client.list_tools() + print(f"Available tools: {[tool.name for tool in tools]}") + + # Call a tool + response = await client.call_tool( + name="tool_name", + arguments={"arg": "value"} + ) + print(f"Response: {response}") + +if __name__ == "__main__": + asyncio.run(main())`})}),(0,s.jsx)("div",{className:"mt-2 text-right",children:(0,s.jsx)("button",{onClick:()=>{eU(`# Using MCP Server with Python FastMCP + +from fastmcp import Client +import asyncio + +# Standard MCP configuration +config = { + "mcpServers": { + "${ek.server_name}": { + "url": "http://localhost:4000/${ek.server_name}/mcp", + "headers": { + "x-litellm-api-key": "Bearer sk-1234" + } + } + } +} + +# Create a client that connects to the server +client = Client(config) + +async def main(): + async with client: + # List available tools + tools = await client.list_tools() + print(f"Available tools: {[tool.name for tool in tools]}") + + # Call a tool + response = await client.call_tool( + name="tool_name", + arguments={"arg": "value"} + ) + print(f"Response: {response}") + +if __name__ == "__main__": + asyncio.run(main())`)},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/47be83d4515c6599.js b/litellm/proxy/_experimental/out/_next/static/chunks/47be83d4515c6599.js new file mode 100644 index 0000000000..2fa9aaa773 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/47be83d4515c6599.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:g,className:i,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(l.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){return t.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:s},e),t.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"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,s],810757);let l=t.forwardRef(function(e,s){return t.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:s},e),t.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"}))});e.s(["BanIcon",0,l],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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"},{id:"SQS",displayName:"SQS",logo:`${t}aws.svg`,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...x.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:N[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:N[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=e.i(91739),n=e.i(500727),o=e.i(531516),d=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:u,onChange:m,disabled:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.map(e=>e.name)})},disabled:d,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:d,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(r.Spin,{size:"large"}),(0,t.jsx)(a.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!d&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){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),l.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.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,t.jsx)(a.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){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),l.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(h,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(h,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(i).map(([a,i])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.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"===i&&(0,t.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"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),0===e.length&&(0,t.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,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(708347),r=e.i(135214);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&a.all_admin_roles.includes(s||"")})}])},392110,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(a.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),u&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",p," (e.g. 2 ",p,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>w({...v,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,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>w({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(l.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.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,t.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,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(s.Text,{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,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",t);let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===eE,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===eE&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===ti||"read_only"===ti?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:eg?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:ep?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:ep?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/481816c11a5cdf5d.js b/litellm/proxy/_experimental/out/_next/static/chunks/481816c11a5cdf5d.js deleted file mode 100644 index 7e045892ec..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/481816c11a5cdf5d.js +++ /dev/null @@ -1,7 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let r=e.i(264042).Row;e.s(["Row",0,r],621192)},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode: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}};e.s(["fetchAvailableModels",0,r])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>t.default])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var a=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:o}))});e.s(["ArrowLeftOutlined",0,i],447566)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(779241),a=e.i(599724),i=e.i(199133),n=e.i(983561),l=e.i(689020);e.s(["default",0,({accessToken:e,value:s,placeholder:d="Select a Model",onChange:c,disabled:u=!1,style:m,className:p,showLabel:g=!0,labelText:f="Select Model"})=>{let[h,b]=(0,r.useState)(s),[v,x]=(0,r.useState)(!1),[y,C]=(0,r.useState)([]),w=(0,r.useRef)(null);return(0,r.useEffect)(()=>{b(s)},[s]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,l.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&C(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[g&&(0,t.jsxs)(a.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(n.RobotOutlined,{className:"mr-2"})," ",f]}),(0,t.jsx)(i.Select,{value:h,placeholder:d,onChange:e=>{"custom"===e?(x(!0),b(void 0)):(x(!1),b(e),c&&c(e))},options:[...Array.from(new Set(y.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...m},showSearch:!0,className:`rounded-md ${p||""}`,disabled:u}),v&&(0,t.jsx)(o.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{b(e),c&&c(e)},500)},disabled:u})]})}])},244451,e=>{"use strict";let t;e.i(247167);var r=e.i(271645),o=e.i(343794),a=e.i(242064),i=e.i(763731),n=e.i(174428);let l=80*Math.PI,s=e=>{let{dotClassName:t,style:a,hasCircleCls:i}=e;return r.createElement("circle",{className:(0,o.default)(`${t}-circle`,{[`${t}-circle-bg`]:i}),r:40,cx:50,cy:50,strokeWidth:20,style:a})},d=({percent:e,prefixCls:t})=>{let a=`${t}-dot`,i=`${a}-holder`,d=`${i}-hidden`,[c,u]=r.useState(!1);(0,n.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let p={strokeDashoffset:`${l/4}`,strokeDasharray:`${l*m/100} ${l*(100-m)/100}`};return r.createElement("span",{className:(0,o.default)(i,`${a}-progress`,m<=0&&d)},r.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},r.createElement(s,{dotClassName:a,hasCircleCls:!0}),r.createElement(s,{dotClassName:a,style:p})))};function c(e){let{prefixCls:t,percent:a=0}=e,i=`${t}-dot`,n=`${i}-holder`,l=`${n}-hidden`;return r.createElement(r.Fragment,null,r.createElement("span",{className:(0,o.default)(n,a>0&&l)},r.createElement("span",{className:(0,o.default)(i,`${t}-dot-spin`)},[1,2,3,4].map(e=>r.createElement("i",{className:`${t}-dot-item`,key:e})))),r.createElement(d,{prefixCls:t,percent:a}))}function u(e){var t;let{prefixCls:a,indicator:n,percent:l}=e,s=`${a}-dot`;return n&&r.isValidElement(n)?(0,i.cloneElement)(n,{className:(0,o.default)(null==(t=n.props)?void 0:t.className,s),percent:l}):r.createElement(c,{prefixCls:a,percent:l})}e.i(296059);var m=e.i(694758),p=e.i(183293),g=e.i(246422),f=e.i(838378);let h=new m.Keyframes("antSpinMove",{to:{opacity:1}}),b=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),v=(0,g.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:r(r(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:r(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:r(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:r(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),height:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:h,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:b,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal(),height:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,f.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:r}}),x=[[30,.05],[70,.03],[96,.01]];var y=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r};let C=e=>{var i;let{prefixCls:n,spinning:l=!0,delay:s=0,className:d,rootClassName:c,size:m="default",tip:p,wrapperClassName:g,style:f,children:h,fullscreen:b=!1,indicator:C,percent:w}=e,k=y(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:S,direction:$,className:N,style:E,indicator:O}=(0,a.useComponentConfig)("spin"),M=S("spin",n),[T,j,z]=v(M),[P,R]=r.useState(()=>l&&(!l||!s||!!Number.isNaN(Number(s)))),I=function(e,t){let[o,a]=r.useState(0),i=r.useRef(null),n="auto"===t;return r.useEffect(()=>(n&&e&&(a(0),i.current=setInterval(()=>{a(e=>{let t=100-e;for(let r=0;r{i.current&&(clearInterval(i.current),i.current=null)}),[n,e]),n?o:t}(P,w);r.useEffect(()=>{if(l){let e=function(e,t,r){var o,a=r||{},i=a.noTrailing,n=void 0!==i&&i,l=a.noLeading,s=void 0!==l&&l,d=a.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function p(){o&&clearTimeout(o)}function g(){for(var r=arguments.length,a=Array(r),i=0;ie?s?(m=Date.now(),n||(o=setTimeout(c?f:g,e))):g():!0!==n&&(o=setTimeout(c?f:g,void 0===c?e-d:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},g}(s,()=>{R(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}R(!1)},[s,l]);let L=r.useMemo(()=>void 0!==h&&!b,[h,b]),D=(0,o.default)(M,N,{[`${M}-sm`]:"small"===m,[`${M}-lg`]:"large"===m,[`${M}-spinning`]:P,[`${M}-show-text`]:!!p,[`${M}-rtl`]:"rtl"===$},d,!b&&c,j,z),B=(0,o.default)(`${M}-container`,{[`${M}-blur`]:P}),q=null!=(i=null!=C?C:O)?i:t,X=Object.assign(Object.assign({},E),f),H=r.createElement("div",Object.assign({},k,{style:X,className:D,"aria-live":"polite","aria-busy":P}),r.createElement(u,{prefixCls:M,indicator:q,percent:I}),p&&(L||b)?r.createElement("div",{className:`${M}-text`},p):null);return T(L?r.createElement("div",Object.assign({},k,{className:(0,o.default)(`${M}-nested-loading`,g,j,z)}),P&&r.createElement("div",{key:"loading"},H),r.createElement("div",{className:B,key:"container"},h)):b?r.createElement("div",{className:(0,o.default)(`${M}-fullscreen`,{[`${M}-fullscreen-show`]:P},c,j,z)},H):H)};C.setDefaultIndicator=e=>{t=e},e.s(["default",0,C],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},350967,46757,e=>{"use strict";var t=e.i(290571),r=e.i(444755),o=e.i(673706),a=e.i(271645);let i={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},n={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},l={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},s={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},d={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},c={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},u={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},m={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"};e.s(["colSpan",()=>d,"colSpanLg",()=>m,"colSpanMd",()=>u,"colSpanSm",()=>c,"gridCols",()=>i,"gridColsLg",()=>s,"gridColsMd",()=>l,"gridColsSm",()=>n],46757);let p=(0,o.makeClassName)("Grid"),g=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",f=a.default.forwardRef((e,o)=>{let{numItems:d=1,numItemsSm:c,numItemsMd:u,numItemsLg:m,children:f,className:h}=e,b=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),v=g(d,i),x=g(c,n),y=g(u,l),C=g(m,s),w=(0,r.tremorTwMerge)(v,x,y,C);return a.default.createElement("div",Object.assign({ref:o,className:(0,r.tremorTwMerge)(p("root"),"grid",w,h)},b),f)});f.displayName="Grid",e.s(["Grid",()=>f],350967)},530212,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,r],530212)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,o]of Object.entries(t))e in r&&(r[e]=o);return r}let o=(e,t=0,r=!1,o=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!o)return"-";let a={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",a);let i=e<0?"-":"",n=Math.abs(e),l=n,s="";return n>=1e6?(l=n/1e6,s="M"):n>=1e3&&(l=n/1e3,s="K"),`${i}${l.toLocaleString("en-US",a)}${s}`},a=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return i(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),i(e,r)}},i=(e,r)=>{try{let o=document.createElement("textarea");o.value=e,o.style.position="fixed",o.style.left="-999999px",o.style.top="-999999px",o.setAttribute("readonly",""),document.body.appendChild(o),o.focus(),o.select();let a=document.execCommand("copy");if(document.body.removeChild(o),a)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,a,"formatNumberWithCommas",0,o,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=o(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),o=e.i(540143),a=e.i(915823),i=e.i(619273),n=class extends a.Subscribable{#e;#t=void 0;#r;#o;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#i()}mutate(e,t){return this.#o=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#a(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){o.notifyManager.batch(()=>{if(this.#o&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#o.onSuccess?.(e.data,t,r,o)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(e.data,null,t,r,o)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#o.onError?.(e.error,t,r,o)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(void 0,e.error,t,r,o)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},l=e.i(912598);function s(e,r){let a=(0,l.useQueryClient)(r),[s]=t.useState(()=>new n(a,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let d=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(o.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=t.useCallback((e,t)=>{s.mutate(e,t).catch(i.noop)},[s]);if(d.error&&(0,i.shouldThrowError)(s.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>s],954616)},500727,699857,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),o=e.i(764205),a=e.i(135214);let i=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,a.default)();return(0,t.useQuery)({queryKey:i.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,o.fetchMCPServers)(r,e),enabled:!!r})}],500727);let n=(0,r.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,a.default)();return(0,t.useQuery)({queryKey:n.list(),queryFn:async()=>await (0,o.fetchMCPToolsets)(e),enabled:!!e})}],699857);var l=e.i(843476),s=e.i(271645),d=e.i(536916),c=e.i(599724),u=e.i(409797),m=e.i(246349),m=m;let p=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,g=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,f=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,h=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function b(e,t=""){let r=e.toLowerCase();if(h.test(r))return"read";if(p.test(r))return"delete";if(f.test(r))return"update";if(g.test(r))return"create";if(t){let e=t.toLowerCase();if(h.test(e))return"read";if(p.test(e))return"delete";if(f.test(e))return"update";if(g.test(e))return"create"}return"unknown"}function v(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[b(r.name,r.description)].push(r);return t}let x={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,x,"classifyToolOp",()=>b,"groupToolsByCrud",()=>v],696609);let y=["read","create","update","delete","unknown"],C={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},w={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},k={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:o=!1,searchFilter:a=""})=>{let[i,n]=(0,s.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),p=(0,s.useMemo)(()=>v(e),[e]),g=(0,s.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),f=e=>{if(o)return;let t=new Set(g);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,l.jsx)("div",{className:"space-y-3",children:y.map(e=>{let t,s=p[e];if(0===s.length)return null;if(a){let e=a.toLowerCase();if(!s.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let h=x[e],b=(t=p[e]).length>0&&t.every(e=>g.has(e.name)),v=(e=>{let t=p[e];if(0===t.length)return!1;let r=t.filter(e=>g.has(e.name)).length;return r>0&&r{n(t=>({...t,[e]:!t[e]}))},children:[y?(0,l.jsx)(m.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,l.jsx)(u.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,l.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:h.label}),(0,l.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${C[h.risk]}`,children:"high"===h.risk?"High Risk":"medium"===h.risk?"Medium Risk":"low"===h.risk?"Safe":"Unclassified"}),(0,l.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[s.filter(e=>g.has(e.name)).length,"/",s.length," allowed"]})]}),!o&&(0,l.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,l.jsx)(c.Text,{className:"text-xs text-gray-500",children:b?"All on":v?"Partial":"All off"}),(0,l.jsx)(d.Checkbox,{checked:b,indeterminate:v,onChange:t=>((e,t)=>{if(o)return;let a=new Set(g);for(let r of p[e])t?a.add(r.name):a.delete(r.name);r(Array.from(a))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!y&&(0,l.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:h.description}),!y&&(0,l.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:s.filter(e=>!a||e.name.toLowerCase().includes(a.toLowerCase())||(e.description??"").toLowerCase().includes(a.toLowerCase())).map(e=>{let t,r=(t=e.name,g.has(t));return(0,l.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!o?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>f(e.name),children:[(0,l.jsx)(d.Checkbox,{checked:r,onChange:()=>f(e.name),disabled:o,onClick:e=>e.stopPropagation()}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,l.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,l.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},361653,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},91874,e=>{"use strict";var t=e.i(931067),r=e.i(209428),o=e.i(211577),a=e.i(392221),i=e.i(703923),n=e.i(343794),l=e.i(914949),s=e.i(271645),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],c=(0,s.forwardRef)(function(e,c){var u=e.prefixCls,m=void 0===u?"rc-checkbox":u,p=e.className,g=e.style,f=e.checked,h=e.disabled,b=e.defaultChecked,v=e.type,x=void 0===v?"checkbox":v,y=e.title,C=e.onChange,w=(0,i.default)(e,d),k=(0,s.useRef)(null),S=(0,s.useRef)(null),$=(0,l.default)(void 0!==b&&b,{value:f}),N=(0,a.default)($,2),E=N[0],O=N[1];(0,s.useImperativeHandle)(c,function(){return{focus:function(e){var t;null==(t=k.current)||t.focus(e)},blur:function(){var e;null==(e=k.current)||e.blur()},input:k.current,nativeElement:S.current}});var M=(0,n.default)(m,p,(0,o.default)((0,o.default)({},"".concat(m,"-checked"),E),"".concat(m,"-disabled"),h));return s.createElement("span",{className:M,title:y,style:g,ref:S},s.createElement("input",(0,t.default)({},w,{className:"".concat(m,"-input"),ref:k,onChange:function(t){h||("checked"in e||O(t.target.checked),null==C||C({target:(0,r.default)((0,r.default)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:h,checked:!!E,type:x})),s.createElement("span",{className:"".concat(m,"-inner")}))});e.s(["default",0,c])},421512,236836,e=>{"use strict";let t=e.i(271645).default.createContext(null);e.s(["default",0,t],421512),e.i(296059);var r=e.i(915654),o=e.i(183293),a=e.i(246422),i=e.i(838378);function n(e,t){return(e=>{let{checkboxCls:t}=e,a=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,o.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[a]:Object.assign(Object.assign({},(0,o.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${a}`]:{marginInlineStart:0},[`&${a}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,o.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,o.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,r.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,r.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[` - ${a}:not(${a}-disabled), - ${t}:not(${t}-disabled) - `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${a}:not(${a}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[` - ${a}-checked:not(${a}-disabled), - ${t}-checked:not(${t}-disabled) - `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${a}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]})((0,i.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let l=(0,a.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[n(t,e)]);e.s(["default",0,l,"getStyle",()=>n],236836)},681216,e=>{"use strict";var t=e.i(271645),r=e.i(963188);function o(e){let o=t.default.useRef(null),a=()=>{r.default.cancel(o.current),o.current=null};return[()=>{a(),o.current=(0,r.default)(()=>{o.current=null})},t=>{o.current&&(t.stopPropagation(),a()),null==e||e(t)}]}e.s(["default",()=>o])},374276,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(91874),a=e.i(611935),i=e.i(121872),n=e.i(26905),l=e.i(242064),s=e.i(937328),d=e.i(321883),c=e.i(62139),u=e.i(421512),m=e.i(236836),p=e.i(681216),g=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r};let f=t.forwardRef((e,f)=>{var h;let{prefixCls:b,className:v,rootClassName:x,children:y,indeterminate:C=!1,style:w,onMouseEnter:k,onMouseLeave:S,skipGroup:$=!1,disabled:N}=e,E=g(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:O,direction:M,checkbox:T}=t.useContext(l.ConfigContext),j=t.useContext(u.default),{isFormItemInput:z}=t.useContext(c.FormItemInputContext),P=t.useContext(s.default),R=null!=(h=(null==j?void 0:j.disabled)||N)?h:P,I=t.useRef(E.value),L=t.useRef(null),D=(0,a.composeRef)(f,L);t.useEffect(()=>{null==j||j.registerValue(E.value)},[]),t.useEffect(()=>{if(!$)return E.value!==I.current&&(null==j||j.cancelValue(I.current),null==j||j.registerValue(E.value),I.current=E.value),()=>null==j?void 0:j.cancelValue(E.value)},[E.value]),t.useEffect(()=>{var e;(null==(e=L.current)?void 0:e.input)&&(L.current.input.indeterminate=C)},[C]);let B=O("checkbox",b),q=(0,d.default)(B),[X,H,_]=(0,m.default)(B,q),A=Object.assign({},E);j&&!$&&(A.onChange=(...e)=>{E.onChange&&E.onChange.apply(E,e),j.toggleOption&&j.toggleOption({label:y,value:E.value})},A.name=j.name,A.checked=j.value.includes(E.value));let F=(0,r.default)(`${B}-wrapper`,{[`${B}-rtl`]:"rtl"===M,[`${B}-wrapper-checked`]:A.checked,[`${B}-wrapper-disabled`]:R,[`${B}-wrapper-in-form-item`]:z},null==T?void 0:T.className,v,x,_,q,H),K=(0,r.default)({[`${B}-indeterminate`]:C},n.TARGET_CLS,H),[G,U]=(0,p.default)(A.onClick);return X(t.createElement(i.default,{component:"Checkbox",disabled:R},t.createElement("label",{className:F,style:Object.assign(Object.assign({},null==T?void 0:T.style),w),onMouseEnter:k,onMouseLeave:S,onClick:G},t.createElement(o.default,Object.assign({},A,{onClick:U,prefixCls:B,className:K,disabled:R,ref:D})),null!=y&&t.createElement("span",{className:`${B}-label`},y))))});var h=e.i(8211),b=e.i(529681),v=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r};let x=t.forwardRef((e,o)=>{let{defaultValue:a,children:i,options:n=[],prefixCls:s,className:c,rootClassName:p,style:g,onChange:x}=e,y=v(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:C,direction:w}=t.useContext(l.ConfigContext),[k,S]=t.useState(y.value||a||[]),[$,N]=t.useState([]);t.useEffect(()=>{"value"in y&&S(y.value||[])},[y.value]);let E=t.useMemo(()=>n.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[n]),O=e=>{N(t=>t.filter(t=>t!==e))},M=e=>{N(t=>[].concat((0,h.default)(t),[e]))},T=e=>{let t=k.indexOf(e.value),r=(0,h.default)(k);-1===t?r.push(e.value):r.splice(t,1),"value"in y||S(r),null==x||x(r.filter(e=>$.includes(e)).sort((e,t)=>E.findIndex(t=>t.value===e)-E.findIndex(e=>e.value===t)))},j=C("checkbox",s),z=`${j}-group`,P=(0,d.default)(j),[R,I,L]=(0,m.default)(j,P),D=(0,b.default)(y,["value","disabled"]),B=n.length?E.map(e=>t.createElement(f,{prefixCls:j,key:e.value.toString(),disabled:"disabled"in e?e.disabled:y.disabled,value:e.value,checked:k.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${z}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):i,q=t.useMemo(()=>({toggleOption:T,value:k,disabled:y.disabled,name:y.name,registerValue:M,cancelValue:O}),[T,k,y.disabled,y.name,M,O]),X=(0,r.default)(z,{[`${z}-rtl`]:"rtl"===w},c,p,L,P,I);return R(t.createElement("div",Object.assign({className:X,style:g},D,{ref:o}),t.createElement(u.default.Provider,{value:q},B)))});f.Group=x,f.__ANT_CHECKBOX=!0,e.s(["default",0,f],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),o=e.i(673706),a=e.i(271645);let i=a.default.forwardRef((e,i)=>{let{color:n,className:l,children:s}=e;return a.default.createElement("p",{ref:i,className:(0,r.tremorTwMerge)("text-tremor-default",n?(0,o.getColorClassNames)(n,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),l)},s)});i.displayName="Text",e.s(["default",()=>i],936325),e.s(["Text",()=>i],599724)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),o=e.i(271645);let a=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],i=e=>({_s:e,status:a[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),n=e=>e?6:5,l=(e,t,r,o,a)=>{clearTimeout(o.current);let n=i(e);t(n),r.current=n,a&&a({current:n})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let u=e=>{var r=(0,t.__rest)(e,[]);return o.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),o.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),o.default.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 m=e.i(95779);let p={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"}},g=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,m.colorPalette.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},f=(0,c.makeClassName)("Button"),h=({loading:e,iconSize:t,iconPosition:r,Icon:a,needMargin:i,transitionStatus:n})=>{let l=i?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?o.default.createElement(u,{className:(0,d.tremorTwMerge)(f("icon"),"animate-spin shrink-0",l,m.default,m[n]),style:{transition:"width 150ms"}}):o.default.createElement(a,{className:(0,d.tremorTwMerge)(f("icon"),"shrink-0",t,l)})},b=o.default.forwardRef((e,a)=>{let{icon:u,iconPosition:m=s.HorizontalPositions.Left,size:b=s.Sizes.SM,color:v,variant:x="primary",disabled:y,loading:C=!1,loadingText:w,children:k,tooltip:S,className:$}=e,N=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),E=C||y,O=void 0!==u||C,M=C&&w,T=!(!k&&!M),j=(0,d.tremorTwMerge)(p[b].height,p[b].width),z="light"!==x?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",P=g(x,v),R=("light"!==x?{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"}})[b],{tooltipProps:I,getReferenceProps:L}=(0,r.useTooltip)(300),[D,B]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:a,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[p,g]=(0,o.useState)(()=>i(d?2:n(c))),f=(0,o.useRef)(p),h=(0,o.useRef)(0),[b,v]="object"==typeof s?[s.enter,s.exit]:[s,s],x=(0,o.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return n(t)}})(f.current._s,u);e&&l(e,g,f,h,m)},[m,u]);return[p,(0,o.useCallback)(o=>{let i=e=>{switch(l(e,g,f,h,m),e){case 1:b>=0&&(h.current=((...e)=>setTimeout(...e))(x,b));break;case 4:v>=0&&(h.current=((...e)=>setTimeout(...e))(x,v));break;case 0:case 3:h.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||i(e+1)},0)}},s=f.current.isEnter;"boolean"!=typeof o&&(o=!s),o?s||i(e?+!r:2):s&&i(t?a?3:4:n(u))},[x,m,e,t,r,a,b,v,u]),x]})({timeout:50});return(0,o.useEffect)(()=>{B(C)},[C]),o.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([a,I.refs.setReference]),className:(0,d.tremorTwMerge)(f("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",z,R.paddingX,R.paddingY,R.fontSize,P.textColor,P.bgColor,P.borderColor,P.hoverBorderColor,E?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(g(x,v).hoverTextColor,g(x,v).hoverBgColor,g(x,v).hoverBorderColor),$),disabled:E},L,N),o.default.createElement(r.default,Object.assign({text:S},I)),O&&m!==s.HorizontalPositions.Right?o.default.createElement(h,{loading:C,iconSize:j,iconPosition:m,Icon:u,transitionStatus:D.status,needMargin:T}):null,M||k?o.default.createElement("span",{className:(0,d.tremorTwMerge)(f("text"),"text-tremor-default whitespace-nowrap")},M?w:k):null,O&&m===s.HorizontalPositions.Right?o.default.createElement(h,{loading:C,iconSize:j,iconPosition:m,Icon:u,transitionStatus:D.status,needMargin:T}):null)});b.displayName="Button",e.s(["Button",()=>b],994388)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(480731),a=e.i(95779),i=e.i(444755),n=e.i(673706);let l=(0,n.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:d="",decorationColor:c,children:u,className:m}=e,p=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,className:(0,i.tremorTwMerge)(l("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",c?(0,n.getColorClassNames)(c,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case o.HorizontalPositions.Left:return"border-l-4";case o.VerticalPositions.Top:return"border-t-4";case o.HorizontalPositions.Right:return"border-r-4";case o.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),m)},p),u)});s.displayName="Card",e.s(["Card",()=>s],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),o=e.i(444755),a=e.i(673706),i=e.i(271645);let n=i.default.forwardRef((e,n)=>{let{color:l,children:s,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return i.default.createElement("p",Object.assign({ref:n,className:(0,o.tremorTwMerge)("font-medium text-tremor-title",l?(0,a.getColorClassNames)(l,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},c),s)});n.displayName="Title",e.s(["Title",()=>n],629569)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.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"}))});e.s(["PencilIcon",0,r],797672)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/48ee00a104bc4050.js b/litellm/proxy/_experimental/out/_next/static/chunks/48ee00a104bc4050.js deleted file mode 100644 index 1da8d31b3f..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/48ee00a104bc4050.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),p=e.i(948401),x=e.i(72713),g=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:f}=s.Typography;function b({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(f,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(f,{type:"secondary",children:s}),(0,t.jsx)(f,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:k}=s.Typography;function N({data:e,onBack:s,onCreateNew:y,onRegenerate:f,onDelete:N,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:C=!1,regenerateTooltip:I}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(k,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:I||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:f,disabled:C,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:N,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(b,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(p.MailOutlined,{})}),(0,t.jsx)(b,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(b,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(x.CalendarOutlined,{})}),(0,t.jsx)(b,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(b,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(b,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>N],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),C=e.i(271645);let I=C.forwardRef(function(e,t){return C.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),C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),l=e.i(477386),r=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,l)=>{var i;let n=(i=e.callback_name,Object.entries(r.callback_map).find(([e,t])=>t===i)?.[0]||i),o=r.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=r.reverse_callback_map[e]||e,n=r.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),d]})}])},65932,272753,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(492030),d=e.i(166406),c=e.i(772345),m=e.i(560445),u=e.i(464571),p=e.i(178654),x=e.i(525720),g=e.i(808613),h=e.i(311451),j=e.i(28651),_=e.i(212931),y=e.i(621192),f=e.i(770914),b=e.i(898586),v=e.i(439189),k=e.i(497245),N=e.i(96226),T=e.i(435684);function w(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,T.toDate)(e),c=s||a?(0,k.addMonths)(d,s+12*a):d,m=r||l?(0,v.addDays)(c,r+7*l):c;return(0,N.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var S=e.i(271645),C=e.i(237016),I=e.i(727749);let{Text:A}=b.Typography;function F({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[b]=g.Form.useForm(),[v,k]=(0,S.useState)(null),[N,T]=(0,S.useState)(null),[F,M]=(0,S.useState)(null),[L,R]=(0,S.useState)(!1),[D,O]=(0,S.useState)(!1);(0,S.useEffect)(()=>{t&&e&&i&&b.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""})},[t,e,b,i]);let B=e=>{if(!e)return null;try{let t,a=parseInt(e);if(Number.isNaN(a))throw Error("Invalid duration format");let s=new Date;if(e.endsWith("mo"))t=w(s,{months:a});else if(e.endsWith("s"))t=w(s,{seconds:a});else if(e.endsWith("m"))t=w(s,{minutes:a});else if(e.endsWith("h"))t=w(s,{hours:a});else if(e.endsWith("d"))t=w(s,{days:a});else if(e.endsWith("w"))t=w(s,{weeks:a});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,S.useEffect)(()=>{N?.duration?M(B(N.duration)):M(null)},[N?.duration]);let E=async()=>{if(e&&i){R(!0);try{let t=await b.validateFields(),a=await (0,s.regenerateKeyCall)(i,e.token||e.token_id,t);k(a.key),I.default.success("Virtual Key regenerated successfully");let l={...a,token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?B(t.duration)??e.expires:e.expires};r&&r(l),R(!1)}catch(e){console.error("Error regenerating key:",e),I.default.fromBackend(e),R(!1)}}},P=()=>{k(null),R(!1),O(!1),b.resetFields(),a()};return(0,n.jsx)(_.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:P,width:520,maskClosable:!1,footer:v?[(0,n.jsxs)(f.Space,{children:[(0,n.jsx)(u.Button,{onClick:P,children:"Close"}),(0,n.jsx)(C.CopyToClipboard,{text:v,onCopy:()=>{O(!0)},children:(0,n.jsx)(u.Button,{type:"primary",icon:D?(0,n.jsx)(o.CheckOutlined,{}):(0,n.jsx)(d.CopyOutlined,{}),children:D?"Copied":"Copy Key"})})]},"footer-actions")]:[(0,n.jsxs)(f.Space,{children:[(0,n.jsx)(u.Button,{onClick:P,children:"Cancel"}),(0,n.jsx)(u.Button,{type:"primary",icon:(0,n.jsx)(c.SyncOutlined,{}),onClick:E,loading:L,children:"Regenerate"})]},"footer-actions")],children:v?(0,n.jsxs)(x.Flex,{vertical:!0,gap:"middle",children:[(0,n.jsx)(m.Alert,{type:"warning",showIcon:!0,message:"Save it now, you will not see it again"}),(0,n.jsxs)(x.Flex,{vertical:!0,gap:2,children:[(0,n.jsx)(A,{type:"secondary",style:{fontSize:12},children:"Key Alias"}),(0,n.jsx)(A,{children:e?.key_alias||"No alias set"})]}),(0,n.jsxs)(x.Flex,{vertical:!0,gap:6,children:[(0,n.jsx)(A,{type:"secondary",style:{fontSize:12},children:"Virtual Key"}),(0,n.jsx)("div",{style:{background:"#f5f5f5",border:"1px solid #e8e8e8",borderRadius:6,padding:"14px 16px",fontFamily:"SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace",fontSize:16,wordBreak:"break-all",color:"#262626"},children:v})]})]}):(0,n.jsxs)(g.Form,{form:b,layout:"vertical",style:{marginTop:4},onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(g.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(h.Input,{disabled:!0})}),(0,n.jsxs)(y.Row,{gutter:12,children:[(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(j.InputNumber,{step:.01,precision:2,style:{width:"100%"}})})}),(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(j.InputNumber,{style:{width:"100%"}})})}),(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(j.InputNumber,{style:{width:"100%"}})})})]}),(0,n.jsxs)(y.Row,{gutter:12,children:[(0,n.jsx)(p.Col,{span:12,children:(0,n.jsx)(g.Form.Item,{name:"duration",label:"Expire Key",extra:(0,n.jsxs)(x.Flex,{vertical:!0,gap:2,children:[(0,n.jsxs)(A,{type:"secondary",style:{fontSize:12},children:["Current expiry:"," ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),F&&(0,n.jsxs)(A,{type:"success",style:{fontSize:12},children:["New expiry: ",F]})]}),children:(0,n.jsx)(h.Input,{placeholder:"e.g. 30s, 30h, 30d"})})}),(0,n.jsx)(p.Col,{span:12,children:(0,n.jsx)(g.Form.Item,{name:"grace_period",label:"Grace Period",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",extra:(0,n.jsx)(A,{type:"secondary",style:{fontSize:12},children:"Recommended: 24h to 72h for production keys"}),rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(h.Input,{placeholder:"e.g. 24h, 2d"})})})]})]})})}e.s(["RegenerateKeyModal",()=>F],272753)},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),p=e.i(197647),x=e.i(653824),g=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),f=e.i(808613),b=e.i(212931),v=e.i(262218),k=e.i(784647),N=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),C=e.i(127952),I=e.i(721929),A=e.i(643449),F=e.i(727749),M=e.i(764205),L=e.i(65932),R=e.i(384767),D=e.i(272753),O=e.i(190702),B=e.i(891547),E=e.i(109799),P=e.i(921511),z=e.i(827252),K=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[p]=f.Form.useForm(),[x,g]=(0,N.useState)([]),[h,j]=(0,N.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,b]=(0,N.useState)([]),[v,k]=(0,N.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,C]=(0,N.useState)(e.organization_id||null),[A,L]=(0,N.useState)(e.auto_rotate||!1),[R,D]=(0,N.useState)(e.rotation_interval||""),[O,el]=(0,N.useState)(!e.expires),[er,ei]=(0,N.useState)(!1),{data:en,isLoading:eo}=(0,E.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ep=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,N.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,M.modelAvailableCall)(n,o,d)).data.map(e=>e.id);b(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);b(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,M.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,N.useEffect)(()=>{p.setFieldValue("disabled_callbacks",v)},[p,v]);let ex=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...e,token:e.token||e.token_id,budget_duration:ex(e.budget_duration),metadata:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,I.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,N.useEffect)(()=>{p.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:ex(e.budget_duration),metadata:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,I.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,p]),(0,N.useEffect)(()=>{p.setFieldValue("auto_rotate",A)},[A,p]),(0,N.useEffect)(()=>{R&&p.setFieldValue("rotation_interval",R)},[R,p]),(0,N.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,M.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}O&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(f.Form,{form:p,onFinish:eh,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(f.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(f.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(f.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(f.Form.Item,{label:"Key Type",children:(0,t.jsx)(f.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(f.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(f.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(f.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(f.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(f.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(f.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(f.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(f.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(B.default,{onChange:e=>{p.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{p.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(f.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(f.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:x.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(f.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>p.setFieldValue("allowed_passthrough_routes",e),value:p.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(f.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>p.setFieldValue("vector_stores",e),value:p.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(f.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>p.setFieldValue("mcp_servers_and_groups",e),value:p.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(f.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(f.Form.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:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:p.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:p.getFieldValue("mcp_tool_permissions")||{},onChange:e=>p.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(f.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>p.setFieldValue("agents_and_groups",e),value:p.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(f.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{C(e||null),p.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(f.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(C(t.organization_id),p.setFieldValue("organization_id",t.organization_id)):e||(C(null),p.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(f.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ep??"",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:p.getFieldValue("logging_settings"),onChange:e=>p.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{k((0,w.mapInternalToDisplayNames)(e)),p.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(f.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:p,autoRotationEnabled:A,onAutoRotationChange:L,rotationInterval:R,onRotationIntervalChange:D,neverExpire:O,onNeverExpireChange:el}),(0,t.jsx)(f.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(f.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(f.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(f.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(f.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:B,teams:E,onKeyDataUpdate:P,onDelete:z,backButtonText:K="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,N.useState)(!1),[ee]=f.Form.useForm(),[et,ea]=(0,N.useState)(!1),[es,er]=(0,N.useState)(!1),[ei,en]=(0,N.useState)(""),[eo,ed]=(0,N.useState)(!1),[ec,em]=(0,N.useState)(!1),{mutate:eu,isPending:ep}=(0,L.useResetKeySpend)(),[ex,eg]=(0,N.useState)(B),[eh,ej]=(0,N.useState)(null),[e_,ey]=(0,N.useState)(!1),[ef,eb]=(0,N.useState)({}),[ev,ek]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{B&&eg(B)},[B]),(0,N.useEffect)(()=>{(async()=>{let e=ex?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;ek(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,M.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),eb(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ek(!1)}})()},[U,ex?.metadata?.policies]),(0,N.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!ex)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:K}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let eN=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ex.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a,toolsets:s}=e.mcp_servers_and_groups||{servers:[],accessGroups:[],toolsets:[]};e.object_permission={...ex.object_permission,mcp_servers:t||[],mcp_access_groups:a||[],mcp_toolsets:s||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,M.keyUpdateCall)(U,e);eg(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,O.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,M.keyDeleteCall)(U,ex.token||ex.token_id),F.default.success("Key deleted successfully"),z&&z(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ex.team_id)[0]?.members_with_roles,$||"")||$===ex.user_id&&"Internal Viewer"!==G,eC=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ex.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(k.KeyInfoHeader,{data:{keyName:ex.key_alias||"Virtual Key",keyId:ex.token_id||ex.token,userId:ex.user_id||"",userEmail:ex.user_email||"",createdBy:ex.user_email||ex.user_id||"",createdAt:ex.created_at?ew(ex.created_at):"",lastUpdated:ex.updated_at?ew(ex.updated_at):"",lastActive:ex.last_active?ew(ex.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eC?()=>em(!0):void 0,canModifyKey:eS,backButtonText:K,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:ex,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{eg(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(C.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:ex?.key_alias||"-"},{label:"Key ID",value:ex?.token_id||ex?.token||"-",code:!0},{label:"Team ID",value:ex?.team_id||"-",code:!0},{label:"Spend",value:ex?.spend?`$${(0,i.formatNumberWithCommas)(ex.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:ex?.key_alias}),(0,t.jsxs)(b.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(ex.token||ex.token_id,{onSuccess:()=>{eg(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,O.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ep,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:ex?.key_alias||ex?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(p.Tab,{children:"Overview"}),(0,t.jsx)(p.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==ex.max_budget?`$${(0,i.formatNumberWithCommas)(ex.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ex.models&&ex.models.length>0?ex.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:ex.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(ex.metadata?.guardrails)&&ex.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ex.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof ex.metadata?.disable_global_guardrails&&!0===ex.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(ex.metadata?.policies)&&ex.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ex.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&ef[e]&&ef[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:ef[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,I.extractLoggingSettings)(ex.metadata),disabledCallbacks:Array.isArray(ex.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ex.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:ex,onCancel:()=>Z(!1),onSubmit:eN,teams:E,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ex.token_id||ex.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:ex.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ex.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:ex.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:ex.project_id?(V=J?.find(e=>e.project_id===ex.project_id),V?.project_alias?`${V.project_alias} (${ex.project_id})`:ex.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(ex.organization_id??ex.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(ex.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:ex.expires?ew(ex.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==ex.max_budget?`$${(0,i.formatNumberWithCommas)(ex.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ex.metadata?.tags)&&ex.metadata.tags.length>0?ex.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(ex.metadata?.prompts)&&ex.metadata.prompts.length>0?ex.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ex.allowed_routes)&&ex.allowed_routes.length>0?ex.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(ex.metadata?.allowed_passthrough_routes)&&ex.metadata.allowed_passthrough_routes.length>0?ex.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:ex.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ex.models&&ex.models.length>0?ex.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==ex.max_parallel_requests?ex.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",ex.metadata?.model_tpm_limit?JSON.stringify(ex.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",ex.metadata?.model_rpm_limit?JSON.stringify(ex.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(ex.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:ex.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,I.extractLoggingSettings)(ex.metadata),disabledCallbacks:Array.isArray(ex.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ex.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/496544a8be968b8b.js b/litellm/proxy/_experimental/out/_next/static/chunks/496544a8be968b8b.js new file mode 100644 index 0000000000..60971388f3 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/496544a8be968b8b.js @@ -0,0 +1,10 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,869216,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),i=e.i(908206),l=e.i(242064),a=e.i(517455),o=e.i(150073);let r={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var d=e.i(876556),c=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,i=Object.getOwnPropertySymbols(e);lt.indexOf(i[l])&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(n[i[l]]=e[i[l]]);return n},u=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,i=Object.getOwnPropertySymbols(e);lt.indexOf(i[l])&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(n[i[l]]=e[i[l]]);return n};let m=e=>{let{itemPrefixCls:i,component:l,span:a,className:o,style:r,labelStyle:d,contentStyle:c,bordered:u,label:m,content:g,colon:p,type:b,styles:f}=e,{classNames:h}=t.useContext(s),y=Object.assign(Object.assign({},d),null==f?void 0:f.label),v=Object.assign(Object.assign({},c),null==f?void 0:f.content);if(u)return t.createElement(l,{colSpan:a,style:r,className:(0,n.default)(o,{[`${i}-item-${b}`]:"label"===b||"content"===b,[null==h?void 0:h.label]:(null==h?void 0:h.label)&&"label"===b,[null==h?void 0:h.content]:(null==h?void 0:h.content)&&"content"===b})},null!=m&&t.createElement("span",{style:y},m),null!=g&&t.createElement("span",{style:v},g));return t.createElement(l,{colSpan:a,style:r,className:(0,n.default)(`${i}-item`,o)},t.createElement("div",{className:`${i}-item-container`},null!=m&&t.createElement("span",{style:y,className:(0,n.default)(`${i}-item-label`,null==h?void 0:h.label,{[`${i}-item-no-colon`]:!p})},m),null!=g&&t.createElement("span",{style:v,className:(0,n.default)(`${i}-item-content`,null==h?void 0:h.content)},g)))};function g(e,{colon:n,prefixCls:i,bordered:l},{component:a,type:o,showLabel:r,showContent:s,labelStyle:d,contentStyle:c,styles:u}){return e.map(({label:e,children:g,prefixCls:p=i,className:b,style:f,labelStyle:h,contentStyle:y,span:v=1,key:$,styles:S},O)=>"string"==typeof a?t.createElement(m,{key:`${o}-${$||O}`,className:b,style:f,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),h),null==S?void 0:S.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),y),null==S?void 0:S.content)},span:v,colon:n,component:a,itemPrefixCls:p,bordered:l,label:r?e:null,content:s?g:null,type:o}):[t.createElement(m,{key:`label-${$||O}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),f),h),null==S?void 0:S.label),span:1,colon:n,component:a[0],itemPrefixCls:p,bordered:l,label:e,type:"label"}),t.createElement(m,{key:`content-${$||O}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),f),y),null==S?void 0:S.content),span:2*v-1,component:a[1],itemPrefixCls:p,bordered:l,content:g,type:"content"})])}let p=e=>{let n=t.useContext(s),{prefixCls:i,vertical:l,row:a,index:o,bordered:r}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${o}`,className:`${i}-row`},g(a,e,Object.assign({component:"th",type:"label",showLabel:!0},n))),t.createElement("tr",{key:`content-${o}`,className:`${i}-row`},g(a,e,Object.assign({component:"td",type:"content",showContent:!0},n)))):t.createElement("tr",{key:o,className:`${i}-row`},g(a,e,Object.assign({component:r?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},n)))};e.i(296059);var b=e.i(915654),f=e.i(183293),h=e.i(246422),y=e.i(838378);let v=(0,h.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:i,itemPaddingEnd:l,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:r}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,f.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,b.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,b.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,b.unit)(e.padding)} ${(0,b.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,b.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,b.unit)(e.paddingSM)} ${(0,b.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,b.unit)(e.paddingXS)} ${(0,b.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:r},[`${t}-title`]:Object.assign(Object.assign({},f.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:i,paddingInlineEnd:l},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,b.unit)(o)} ${(0,b.unit)(a)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,y.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var $=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,i=Object.getOwnPropertySymbols(e);lt.indexOf(i[l])&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(n[i[l]]=e[i[l]]);return n};let S=e=>{let m,{prefixCls:g,title:b,extra:f,column:h,colon:y=!0,bordered:S,layout:O,children:x,className:j,rootClassName:C,style:w,size:E,labelStyle:z,contentStyle:N,styles:k,items:T,classNames:B}=e,M=$(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:I,direction:L,className:P,style:D,classNames:H,styles:R}=(0,l.useComponentConfig)("descriptions"),G=I("descriptions",g),W=(0,o.default)(),X=t.useMemo(()=>{var e;return"number"==typeof h?h:null!=(e=(0,i.matchScreen)(W,Object.assign(Object.assign({},r),h)))?e:3},[W,h]),A=(m=t.useMemo(()=>T||(0,d.default)(x).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[T,x]),t.useMemo(()=>m.map(e=>{var{span:t}=e,n=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},n),{filled:!0}):Object.assign(Object.assign({},n),{span:"number"==typeof t?t:(0,i.matchScreen)(W,t)})}),[m,W])),q=(0,a.default)(E),F=((e,n)=>{let[i,l]=(0,t.useMemo)(()=>{let t,i,l,a;return t=[],i=[],l=!1,a=0,n.filter(e=>e).forEach(n=>{let{filled:o}=n,r=u(n,["filled"]);if(o){i.push(r),t.push(i),i=[],a=0;return}let s=e-a;(a+=n.span||1)>=e?(a>e?(l=!0,i.push(Object.assign(Object.assign({},r),{span:s}))):i.push(r),t.push(i),i=[],a=0):i.push(r)}),i.length>0&&t.push(i),[t=t.map(t=>{let n=t.reduce((e,t)=>e+(t.span||1),0);if(n({labelStyle:z,contentStyle:N,styles:{content:Object.assign(Object.assign({},R.content),null==k?void 0:k.content),label:Object.assign(Object.assign({},R.label),null==k?void 0:k.label)},classNames:{label:(0,n.default)(H.label,null==B?void 0:B.label),content:(0,n.default)(H.content,null==B?void 0:B.content)}}),[z,N,k,B,H,R]);return K(t.createElement(s.Provider,{value:U},t.createElement("div",Object.assign({className:(0,n.default)(G,P,H.root,null==B?void 0:B.root,{[`${G}-${q}`]:q&&"default"!==q,[`${G}-bordered`]:!!S,[`${G}-rtl`]:"rtl"===L},j,C,_,Q),style:Object.assign(Object.assign(Object.assign(Object.assign({},D),R.root),null==k?void 0:k.root),w)},M),(b||f)&&t.createElement("div",{className:(0,n.default)(`${G}-header`,H.header,null==B?void 0:B.header),style:Object.assign(Object.assign({},R.header),null==k?void 0:k.header)},b&&t.createElement("div",{className:(0,n.default)(`${G}-title`,H.title,null==B?void 0:B.title),style:Object.assign(Object.assign({},R.title),null==k?void 0:k.title)},b),f&&t.createElement("div",{className:(0,n.default)(`${G}-extra`,H.extra,null==B?void 0:B.extra),style:Object.assign(Object.assign({},R.extra),null==k?void 0:k.extra)},f)),t.createElement("div",{className:`${G}-view`},t.createElement("table",null,t.createElement("tbody",null,F.map((e,n)=>t.createElement(p,{key:n,index:n,colon:y,prefixCls:G,vertical:"vertical"===O,bordered:S,row:e}))))))))};S.Item=({children:e})=>e,e.s(["Descriptions",0,S],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var l=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(l.default,(0,t.default)({},e,{ref:a,icon:i}))});e.s(["ExclamationCircleOutlined",0,a],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),i=e.i(529681),l=e.i(242064),a=e.i(517455),o=e.i(185793),r=e.i(721369),s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,i=Object.getOwnPropertySymbols(e);lt.indexOf(i[l])&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(n[i[l]]=e[i[l]]);return n};let d=e=>{var{prefixCls:i,className:a,hoverable:o=!0}=e,r=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("card",i),u=(0,n.default)(`${c}-grid`,a,{[`${c}-grid-hoverable`]:o});return t.createElement("div",Object.assign({},r,{className:u}))};e.i(296059);var c=e.i(915654),u=e.i(183293),m=e.i(246422),g=e.i(838378);let p=(0,m.genStyleHooks)("Card",e=>{let t=(0,g.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:i,colorBorderSecondary:l,boxShadowTertiary:a,bodyPadding:o,extraColor:r}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:(e=>{let{antCls:t,componentCls:n,headerHeight:i,headerPadding:l,tabsMarginBottom:a}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${(0,c.unit)(l)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[` + > ${n}-typography, + > ${n}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:a,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:r,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:i,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${(0,c.unit)(l)} 0 0 0 ${n}, + 0 ${(0,c.unit)(l)} 0 0 ${n}, + ${(0,c.unit)(l)} ${(0,c.unit)(l)} 0 0 ${n}, + ${(0,c.unit)(l)} 0 0 0 ${n} inset, + 0 ${(0,c.unit)(l)} 0 0 ${n} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:i,cardActionsIconSize:l,colorBorderSecondary:a,actionsBg:o}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:o,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${a}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:i,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:l,lineHeight:(0,c.unit)(e.calc(l).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${a}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${l}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:i}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:i,bodyPadding:l}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(i)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(l)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:i,headerHeightSM:l,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:l,padding:`0 ${(0,c.unit)(i)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var b=e.i(792812),f=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,i=Object.getOwnPropertySymbols(e);lt.indexOf(i[l])&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(n[i[l]]=e[i[l]]);return n};let h=e=>{let{actionClasses:n,actions:i=[],actionStyle:l}=e;return t.createElement("ul",{className:n,style:l},i.map((e,n)=>{let l=`action-${n}`;return t.createElement("li",{style:{width:`${100/i.length}%`},key:l},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let c,{prefixCls:u,className:m,rootClassName:g,style:y,extra:v,headStyle:$={},bodyStyle:S={},title:O,loading:x,bordered:j,variant:C,size:w,type:E,cover:z,actions:N,tabList:k,children:T,activeTabKey:B,defaultActiveTabKey:M,tabBarExtraContent:I,hoverable:L,tabProps:P={},classNames:D,styles:H}=e,R=f(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:G,direction:W,card:X}=t.useContext(l.ConfigContext),[A]=(0,b.default)("card",C,j),q=e=>{var t;return(0,n.default)(null==(t=null==X?void 0:X.classNames)?void 0:t[e],null==D?void 0:D[e])},F=e=>{var t;return Object.assign(Object.assign({},null==(t=null==X?void 0:X.styles)?void 0:t[e]),null==H?void 0:H[e])},K=t.useMemo(()=>{let e=!1;return t.Children.forEach(T,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[T]),_=G("card",u),[Q,U,V]=p(_),J=t.createElement(o.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},T),Y=void 0!==B,Z=Object.assign(Object.assign({},P),{[Y?"activeKey":"defaultActiveKey"]:Y?B:M,tabBarExtraContent:I}),ee=(0,a.default)(w),et=ee&&"default"!==ee?ee:"large",en=k?t.createElement(r.default,Object.assign({size:et},Z,{className:`${_}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:k.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(O||v||en){let e=(0,n.default)(`${_}-head`,q("header")),i=(0,n.default)(`${_}-head-title`,q("title")),l=(0,n.default)(`${_}-extra`,q("extra")),a=Object.assign(Object.assign({},$),F("header"));c=t.createElement("div",{className:e,style:a},t.createElement("div",{className:`${_}-head-wrapper`},O&&t.createElement("div",{className:i,style:F("title")},O),v&&t.createElement("div",{className:l,style:F("extra")},v)),en)}let ei=(0,n.default)(`${_}-cover`,q("cover")),el=z?t.createElement("div",{className:ei,style:F("cover")},z):null,ea=(0,n.default)(`${_}-body`,q("body")),eo=Object.assign(Object.assign({},S),F("body")),er=t.createElement("div",{className:ea,style:eo},x?J:T),es=(0,n.default)(`${_}-actions`,q("actions")),ed=(null==N?void 0:N.length)?t.createElement(h,{actionClasses:es,actionStyle:F("actions"),actions:N}):null,ec=(0,i.default)(R,["onTabChange"]),eu=(0,n.default)(_,null==X?void 0:X.className,{[`${_}-loading`]:x,[`${_}-bordered`]:"borderless"!==A,[`${_}-hoverable`]:L,[`${_}-contain-grid`]:K,[`${_}-contain-tabs`]:null==k?void 0:k.length,[`${_}-${ee}`]:ee,[`${_}-type-${E}`]:!!E,[`${_}-rtl`]:"rtl"===W},m,g,U,V),em=Object.assign(Object.assign({},null==X?void 0:X.style),y);return Q(t.createElement("div",Object.assign({ref:s},ec,{className:eu,style:em}),c,el,er,ed))});var v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,i=Object.getOwnPropertySymbols(e);lt.indexOf(i[l])&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(n[i[l]]=e[i[l]]);return n};y.Grid=d,y.Meta=e=>{let{prefixCls:i,className:a,avatar:o,title:r,description:s}=e,d=v(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(l.ConfigContext),u=c("card",i),m=(0,n.default)(`${u}-meta`,a),g=o?t.createElement("div",{className:`${u}-meta-avatar`},o):null,p=r?t.createElement("div",{className:`${u}-meta-title`},r):null,b=s?t.createElement("div",{className:`${u}-meta-description`},s):null,f=p||b?t.createElement("div",{className:`${u}-meta-detail`},p,b):null;return t.createElement("div",Object.assign({},d,{className:m}),g,f)},e.s(["Card",0,y],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),n=e.i(560445),i=e.i(175712),l=e.i(869216),a=e.i(311451),o=e.i(212931),r=e.i(898586);e.i(296059);var s=e.i(868297),d=e.i(732961),c=e.i(289882),u=e.i(170517),m=e.i(628882),g=e.i(320890),p=e.i(104458),b=e.i(722319),f=e.i(8398),h=e.i(279728);e.i(765846);var y=e.i(602716),v=e.i(328052);e.i(262370);var $=e.i(135551);let S=(e,t)=>new $.FastColor(e).setA(t).toRgbString(),O=(e,t)=>new $.FastColor(e).lighten(t).toHexString(),x=e=>{let t=(0,y.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},j=(e,t)=>{let n=e||"#000",i=t||"#fff";return{colorBgBase:n,colorTextBase:i,colorText:S(i,.85),colorTextSecondary:S(i,.65),colorTextTertiary:S(i,.45),colorTextQuaternary:S(i,.25),colorFill:S(i,.18),colorFillSecondary:S(i,.12),colorFillTertiary:S(i,.08),colorFillQuaternary:S(i,.04),colorBgSolid:S(i,.95),colorBgSolidHover:S(i,1),colorBgSolidActive:S(i,.9),colorBgElevated:O(n,12),colorBgContainer:O(n,8),colorBgLayout:O(n,0),colorBgSpotlight:O(n,26),colorBgBlur:S(i,.04),colorBorder:O(n,26),colorBorderSecondary:O(n,19)}},C={defaultSeed:g.defaultConfig.token,useToken:function(){let[e,t,n]=(0,p.useToken)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:b.default,darkAlgorithm:(e,t)=>{let n=Object.keys(u.defaultPresetColors).map(t=>{let n=(0,y.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,i,l)=>(e[`${t}-${l+1}`]=n[l],e[`${t}${l+1}`]=n[l],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),i=null!=t?t:(0,b.default)(e),l=(0,v.default)(e,{generateColorPalettes:x,generateNeutralColorPalettes:j});return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),l),{colorPrimaryBg:l.colorPrimaryBorder,colorPrimaryBgHover:l.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,b.default)(e),i=n.fontSizeSM,l=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,i=n-2;return{sizeXXL:t*(i+10),sizeXL:t*(i+6),sizeLG:t*(i+2),sizeMD:t*(i+2),sizeMS:t*(i+1),size:t*i,sizeSM:t*i,sizeXS:t*(i-1),sizeXXS:t*(i-1)}}(null!=t?t:e)),(0,h.default)(i)),{controlHeight:l}),(0,f.default)(Object.assign(Object.assign({},n),{controlHeight:l})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):c.default,n=Object.assign(Object.assign({},u.default),null==e?void 0:e.token);return(0,d.getComputedToken)(n,{override:null==e?void 0:e.token},t,m.default)},defaultConfig:g.defaultConfig,_internalContext:g.DesignTokenContext};e.s(["theme",0,C],368869);var w=e.i(270377),E=e.i(271645);function z({isOpen:e,title:s,alertMessage:d,message:c,resourceInformationTitle:u,resourceInformation:m,onCancel:g,onOk:p,confirmLoading:b,requiredConfirmation:f}){let{Title:h,Text:y}=r.Typography,{token:v}=C.useToken(),[$,S]=(0,E.useState)("");return(0,E.useEffect)(()=>{e&&S("")},[e]),(0,t.jsx)(o.Modal,{title:s,open:e,onOk:p,onCancel:g,confirmLoading:b,okText:b?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!f&&$!==f||b},cancelButtonProps:{disabled:b},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(n.Alert,{message:d,type:"warning"}),(0,t.jsx)(i.Card,{title:u,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:v.colorErrorBg,borderColor:v.colorErrorBorder}},style:{backgroundColor:v.colorErrorBg,borderColor:v.colorErrorBorder},children:(0,t.jsx)(l.Descriptions,{column:1,size:"small",children:m&&m.map(({label:e,value:n,...i})=>(0,t.jsx)(l.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(y,{...i,children:n??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(y,{children:c})}),f&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(y,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(y,{children:"Type "}),(0,t.jsx)(y,{strong:!0,type:"danger",children:f}),(0,t.jsx)(y,{children:" to confirm deletion:"})]}),(0,t.jsx)(a.Input,{value:$,onChange:e=>S(e.target.value),placeholder:f,className:"rounded-md",prefix:(0,t.jsx)(w.ExclamationCircleOutlined,{style:{color:v.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>z],127952)},530212,e=>{"use strict";var t=e.i(271645);let n=t.forwardRef(function(e,n){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,n],530212)},689020,e=>{"use strict";var t=e.i(764205);let n=async e=>{try{let n=await (0,t.modelHubCall)(e);if(console.log("model_info:",n),n?.data.length>0){let e=n.data.map(e=>({model_group:e.model_group,mode: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}};e.s(["fetchAvailableModels",0,n])},244451,e=>{"use strict";let t;e.i(247167);var n=e.i(271645),i=e.i(343794),l=e.i(242064),a=e.i(763731),o=e.i(174428);let r=80*Math.PI,s=e=>{let{dotClassName:t,style:l,hasCircleCls:a}=e;return n.createElement("circle",{className:(0,i.default)(`${t}-circle`,{[`${t}-circle-bg`]:a}),r:40,cx:50,cy:50,strokeWidth:20,style:l})},d=({percent:e,prefixCls:t})=>{let l=`${t}-dot`,a=`${l}-holder`,d=`${a}-hidden`,[c,u]=n.useState(!1);(0,o.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let g={strokeDashoffset:`${r/4}`,strokeDasharray:`${r*m/100} ${r*(100-m)/100}`};return n.createElement("span",{className:(0,i.default)(a,`${l}-progress`,m<=0&&d)},n.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},n.createElement(s,{dotClassName:l,hasCircleCls:!0}),n.createElement(s,{dotClassName:l,style:g})))};function c(e){let{prefixCls:t,percent:l=0}=e,a=`${t}-dot`,o=`${a}-holder`,r=`${o}-hidden`;return n.createElement(n.Fragment,null,n.createElement("span",{className:(0,i.default)(o,l>0&&r)},n.createElement("span",{className:(0,i.default)(a,`${t}-dot-spin`)},[1,2,3,4].map(e=>n.createElement("i",{className:`${t}-dot-item`,key:e})))),n.createElement(d,{prefixCls:t,percent:l}))}function u(e){var t;let{prefixCls:l,indicator:o,percent:r}=e,s=`${l}-dot`;return o&&n.isValidElement(o)?(0,a.cloneElement)(o,{className:(0,i.default)(null==(t=o.props)?void 0:t.className,s),percent:r}):n.createElement(c,{prefixCls:l,percent:r})}e.i(296059);var m=e.i(694758),g=e.i(183293),p=e.i(246422),b=e.i(838378);let f=new m.Keyframes("antSpinMove",{to:{opacity:1}}),h=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),y=(0,p.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:f,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:h,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,b.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:n}}),v=[[30,.05],[70,.03],[96,.01]];var $=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,i=Object.getOwnPropertySymbols(e);lt.indexOf(i[l])&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(n[i[l]]=e[i[l]]);return n};let S=e=>{var a;let{prefixCls:o,spinning:r=!0,delay:s=0,className:d,rootClassName:c,size:m="default",tip:g,wrapperClassName:p,style:b,children:f,fullscreen:h=!1,indicator:S,percent:O}=e,x=$(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:j,direction:C,className:w,style:E,indicator:z}=(0,l.useComponentConfig)("spin"),N=j("spin",o),[k,T,B]=y(N),[M,I]=n.useState(()=>r&&(!r||!s||!!Number.isNaN(Number(s)))),L=function(e,t){let[i,l]=n.useState(0),a=n.useRef(null),o="auto"===t;return n.useEffect(()=>(o&&e&&(l(0),a.current=setInterval(()=>{l(e=>{let t=100-e;for(let n=0;n{a.current&&(clearInterval(a.current),a.current=null)}),[o,e]),o?i:t}(M,O);n.useEffect(()=>{if(r){let e=function(e,t,n){var i,l=n||{},a=l.noTrailing,o=void 0!==a&&a,r=l.noLeading,s=void 0!==r&&r,d=l.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function g(){i&&clearTimeout(i)}function p(){for(var n=arguments.length,l=Array(n),a=0;ae?s?(m=Date.now(),o||(i=setTimeout(c?b:p,e))):p():!0!==o&&(i=setTimeout(c?b:p,void 0===c?e-d:e)))}return p.cancel=function(e){var t=(e||{}).upcomingOnly;g(),u=!(void 0!==t&&t)},p}(s,()=>{I(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}I(!1)},[s,r]);let P=n.useMemo(()=>void 0!==f&&!h,[f,h]),D=(0,i.default)(N,w,{[`${N}-sm`]:"small"===m,[`${N}-lg`]:"large"===m,[`${N}-spinning`]:M,[`${N}-show-text`]:!!g,[`${N}-rtl`]:"rtl"===C},d,!h&&c,T,B),H=(0,i.default)(`${N}-container`,{[`${N}-blur`]:M}),R=null!=(a=null!=S?S:z)?a:t,G=Object.assign(Object.assign({},E),b),W=n.createElement("div",Object.assign({},x,{style:G,className:D,"aria-live":"polite","aria-busy":M}),n.createElement(u,{prefixCls:N,indicator:R,percent:L}),g&&(P||h)?n.createElement("div",{className:`${N}-text`},g):null);return k(P?n.createElement("div",Object.assign({},x,{className:(0,i.default)(`${N}-nested-loading`,p,T,B)}),M&&n.createElement("div",{key:"loading"},W),n.createElement("div",{className:H,key:"container"},f)):h?n.createElement("div",{className:(0,i.default)(`${N}-fullscreen`,{[`${N}-fullscreen-show`]:M},c,T,B)},W):W)};S.setDefaultIndicator=e=>{t=e},e.s(["default",0,S],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var l=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(l.default,(0,t.default)({},e,{ref:a,icon:i}))});e.s(["default",0,a],597440)},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},309426,e=>{"use strict";var t=e.i(290571),n=e.i(444755),i=e.i(673706),l=e.i(271645),a=e.i(46757);let o=(0,i.makeClassName)("Col"),r=l.default.forwardRef((e,i)=>{let r,s,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:b,className:f}=e,h=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),y=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return l.default.createElement("div",Object.assign({ref:i,className:(0,n.tremorTwMerge)(o("root"),(r=y(u,a.colSpan),s=y(m,a.colSpanSm),d=y(g,a.colSpanMd),c=y(p,a.colSpanLg),(0,n.tremorTwMerge)(r,s,d,c)),f)},h),b)});r.displayName="Col",e.s(["Col",()=>r],309426)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4a97ab1044d56ea9.js b/litellm/proxy/_experimental/out/_next/static/chunks/4a97ab1044d56ea9.js new file mode 100644 index 0000000000..532dcf9591 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/4a97ab1044d56ea9.js @@ -0,0 +1,8 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,160818,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["GlobalOutlined",0,o],160818)},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["default",0,o],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(529681);let o=e=>{let{prefixCls:a,className:l,style:o,size:i,shape:n}=e,s=(0,r.default)({[`${a}-lg`]:"large"===i,[`${a}-sm`]:"small"===i}),d=(0,r.default)({[`${a}-circle`]:"circle"===n,[`${a}-square`]:"square"===n,[`${a}-round`]:"round"===n}),c=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(a,s,d,l),style:Object.assign(Object.assign({},c),o)})};e.i(296059);var i=e.i(694758),n=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,n.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),f=e=>Object.assign({width:e},u(e)),h=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),p=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:l,skeletonButtonCls:o,skeletonInputCls:i,skeletonImageCls:n,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:p,padding:v,marginSM:C,borderRadius:w,titleHeight:k,blockRadius:x,paragraphLiHeight:$,controlHeightXS:y,paragraphMarginTop:j}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:v,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:p},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:k,background:p,borderRadius:x,[`+ ${l}`]:{marginBlockStart:u}},[l]:{padding:0,"> li":{width:"100%",height:$,listStyle:"none",background:p,borderRadius:x,"+ li":{marginBlockStart:y}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${l} > li`]:{borderRadius:w}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:C,[`+ ${l}`]:{marginBlockStart:j}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:l,controlHeightSM:o,gradientFromColor:i,calc:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:n(a).mul(2).equal(),minWidth:n(a).mul(2).equal()},b(a,n))},h(e,a,r)),{[`${r}-lg`]:Object.assign({},b(l,n))}),h(e,l,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(o,n))}),h(e,o,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:l,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(l)),[`${t}${t}-sm`]:Object.assign({},m(o))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:l,controlHeightSM:o,gradientFromColor:i,calc:n}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},g(t,n)),[`${a}-lg`]:Object.assign({},g(l,n)),[`${a}-sm`]:Object.assign({},g(o,n))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:l,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:l},f(o(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(r)),{maxWidth:o(r).mul(4).equal(),maxHeight:o(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${l} > li, + ${r}, + ${o}, + ${i}, + ${n} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,d.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),v=e=>{let{prefixCls:a,className:l,style:o,rows:i=0}=e,n=Array.from({length:i}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:o},n)},C=({prefixCls:e,className:a,width:l,style:o})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},o)});function w(e){return e&&"object"==typeof e?e:{}}let k=e=>{let{prefixCls:l,loading:i,className:n,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:h}=e,{getPrefixCls:b,direction:k,className:x,style:$}=(0,a.useComponentConfig)("skeleton"),y=b("skeleton",l),[j,N,E]=p(y);if(i||!("loading"in e)){let e,a,l=!!u,i=!!m,c=!!g;if(l){let r=Object.assign(Object.assign({prefixCls:`${y}-avatar`},i&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),w(u));e=t.createElement("div",{className:`${y}-header`},t.createElement(o,Object.assign({},r)))}if(i||c){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${y}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),w(m));e=t.createElement(C,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},(e={},l&&i||(e.width="61%"),!l&&i?e.rows=3:e.rows=2,e)),w(g));r=t.createElement(v,Object.assign({},a))}a=t.createElement("div",{className:`${y}-content`},e,r)}let b=(0,r.default)(y,{[`${y}-with-avatar`]:l,[`${y}-active`]:f,[`${y}-rtl`]:"rtl"===k,[`${y}-round`]:h},x,n,s,N,E);return j(t.createElement("div",{className:b,style:Object.assign(Object.assign({},$),d)},e,a))}return null!=c?c:null};k.Button=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-button`,size:u},v))))},k.Avatar=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls","className"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},v))))},k.Input=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-input`,size:u},v))))},k.Image=e=>{let{prefixCls:l,className:o,rootClassName:i,style:n,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[u,m,g]=p(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},o,i,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,o),style:n},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${c}-image-path`})))))},k.Node=e=>{let{prefixCls:l,className:o,rootClassName:i,style:n,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",l),[m,g,f]=p(u),h=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,o,i,f);return m(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${u}-image`,o),style:n},d)))},e.s(["default",0,k],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],o=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,n=(e,t,r,a,l)=>{clearTimeout(a.current);let i=o(e);t(i),r.current=i,l&&l({current:i})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let u=e=>{var r=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.default.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 m=e.i(95779);let g={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"}},f=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,m.colorPalette.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},h=(0,c.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:l,needMargin:o,transitionStatus:i})=>{let n=o?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(u,{className:(0,d.tremorTwMerge)(h("icon"),"animate-spin shrink-0",n,m.default,m[i]),style:{transition:"width 150ms"}}):a.default.createElement(l,{className:(0,d.tremorTwMerge)(h("icon"),"shrink-0",t,n)})},p=a.default.forwardRef((e,l)=>{let{icon:u,iconPosition:m=s.HorizontalPositions.Left,size:p=s.Sizes.SM,color:v,variant:C="primary",disabled:w,loading:k=!1,loadingText:x,children:$,tooltip:y,className:j}=e,N=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),E=k||w,O=void 0!==u||k,T=k&&x,z=!(!$&&!T),M=(0,d.tremorTwMerge)(g[p].height,g[p].width),R="light"!==C?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",B=f(C,v),S=("light"!==C?{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"}})[p],{tooltipProps:q,getReferenceProps:H}=(0,r.useTooltip)(300),[P,L]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:l,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[g,f]=(0,a.useState)(()=>o(d?2:i(c))),h=(0,a.useRef)(g),b=(0,a.useRef)(0),[p,v]="object"==typeof s?[s.enter,s.exit]:[s,s],C=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(h.current._s,u);e&&n(e,f,h,b,m)},[m,u]);return[g,(0,a.useCallback)(a=>{let o=e=>{switch(n(e,f,h,b,m),e){case 1:p>=0&&(b.current=((...e)=>setTimeout(...e))(C,p));break;case 4:v>=0&&(b.current=((...e)=>setTimeout(...e))(C,v));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||o(e+1)},0)}},s=h.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||o(e?+!r:2):s&&o(t?l?3:4:i(u))},[C,m,e,t,r,l,p,v,u]),C]})({timeout:50});return(0,a.useEffect)(()=>{L(k)},[k]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([l,q.refs.setReference]),className:(0,d.tremorTwMerge)(h("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",R,S.paddingX,S.paddingY,S.fontSize,B.textColor,B.bgColor,B.borderColor,B.hoverBorderColor,E?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(f(C,v).hoverTextColor,f(C,v).hoverBgColor,f(C,v).hoverBorderColor),j),disabled:E},H,N),a.default.createElement(r.default,Object.assign({text:y},q)),O&&m!==s.HorizontalPositions.Right?a.default.createElement(b,{loading:k,iconSize:M,iconPosition:m,Icon:u,transitionStatus:P.status,needMargin:z}):null,T||$?a.default.createElement("span",{className:(0,d.tremorTwMerge)(h("text"),"text-tremor-default whitespace-nowrap")},T?x:$):null,O&&m===s.HorizontalPositions.Right?a.default.createElement(b,{loading:k,iconSize:M,iconPosition:m,Icon:u,transitionStatus:P.status,needMargin:z}):null)});p.displayName="Button",e.s(["Button",()=>p],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",n)},r.default.createElement("table",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});o.displayName="Table",e.s(["Table",()=>o],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",n)},s),i))});o.displayName="TableHead",e.s(["TableHead",()=>o],427612)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("row"),n)},s),i))});o.displayName="TableRow",e.s(["TableRow",()=>o],496020)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",n)},s),i))});o.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>o],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",n)},s),i))});o.displayName="TableBody",e.s(["TableBody",()=>o],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",n)},s),i))});o.displayName="TableCell",e.s(["TableCell",()=>o],977572)},68155,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,r],68155)},871943,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},207670,e=>{"use strict";function t(){for(var e,t,r=0,a="",l=arguments.length;rt,"default",0,t])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>t.default])},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["ArrowLeftOutlined",0,o],447566)},292639,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},250980,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,r],250980)},502547,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,r],502547)},738014,e=>{"use strict";var t=e.i(135214),r=e.i(764205),a=e.i(266027);let l=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:o}=(0,t.default)();return(0,a.useQuery)({queryKey:l.detail(o),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&o)})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/949fa90ad69e3ffa.js b/litellm/proxy/_experimental/out/_next/static/chunks/4b9bda626d5a281b.js similarity index 79% rename from litellm/proxy/_experimental/out/_next/static/chunks/949fa90ad69e3ffa.js rename to litellm/proxy/_experimental/out/_next/static/chunks/4b9bda626d5a281b.js index 95c5c8af48..b741bbf526 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/949fa90ad69e3ffa.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/4b9bda626d5a281b.js @@ -7,4 +7,4 @@ ${(0,c.unit)(r)} ${(0,c.unit)(r)} 0 0 ${n}, ${(0,c.unit)(r)} 0 0 0 ${n} inset, 0 ${(0,c.unit)(r)} 0 0 ${n} inset; - `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:l}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:l,cardActionsIconSize:r,colorBorderSecondary:i,actionsBg:o}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:o,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${i}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:l,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:r,lineHeight:(0,c.unit)(e.calc(r).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${i}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${r}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:l}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:l,bodyPadding:r}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(l)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(r)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:l,headerHeightSM:r,headerFontSizeSM:i}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:r,padding:`0 ${(0,c.unit)(l)}`,fontSize:i,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var p=e.i(792812),f=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};let h=e=>{let{actionClasses:n,actions:l=[],actionStyle:r}=e;return t.createElement("ul",{className:n,style:r},l.map((e,n)=>{let r=`action-${n}`;return t.createElement("li",{style:{width:`${100/l.length}%`},key:r},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let c,{prefixCls:u,className:g,rootClassName:m,style:y,extra:v,headStyle:$={},bodyStyle:O={},title:x,loading:j,bordered:S,variant:E,size:C,type:w,cover:T,actions:k,tabList:B,children:N,activeTabKey:z,defaultActiveTabKey:L,tabBarExtraContent:P,hoverable:M,tabProps:I={},classNames:H,styles:R}=e,F=f(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:D,direction:G,card:W}=t.useContext(r.ConfigContext),[A]=(0,p.default)("card",E,S),X=e=>{var t;return(0,n.default)(null==(t=null==W?void 0:W.classNames)?void 0:t[e],null==H?void 0:H[e])},q=e=>{var t;return Object.assign(Object.assign({},null==(t=null==W?void 0:W.styles)?void 0:t[e]),null==R?void 0:R[e])},K=t.useMemo(()=>{let e=!1;return t.Children.forEach(N,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[N]),U=D("card",u),[Q,V,Y]=b(U),_=t.createElement(o.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},N),J=void 0!==z,Z=Object.assign(Object.assign({},I),{[J?"activeKey":"defaultActiveKey"]:J?z:L,tabBarExtraContent:P}),ee=(0,i.default)(C),et=ee&&"default"!==ee?ee:"large",en=B?t.createElement(a.default,Object.assign({size:et},Z,{className:`${U}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:B.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(x||v||en){let e=(0,n.default)(`${U}-head`,X("header")),l=(0,n.default)(`${U}-head-title`,X("title")),r=(0,n.default)(`${U}-extra`,X("extra")),i=Object.assign(Object.assign({},$),q("header"));c=t.createElement("div",{className:e,style:i},t.createElement("div",{className:`${U}-head-wrapper`},x&&t.createElement("div",{className:l,style:q("title")},x),v&&t.createElement("div",{className:r,style:q("extra")},v)),en)}let el=(0,n.default)(`${U}-cover`,X("cover")),er=T?t.createElement("div",{className:el,style:q("cover")},T):null,ei=(0,n.default)(`${U}-body`,X("body")),eo=Object.assign(Object.assign({},O),q("body")),ea=t.createElement("div",{className:ei,style:eo},j?_:N),es=(0,n.default)(`${U}-actions`,X("actions")),ed=(null==k?void 0:k.length)?t.createElement(h,{actionClasses:es,actionStyle:q("actions"),actions:k}):null,ec=(0,l.default)(F,["onTabChange"]),eu=(0,n.default)(U,null==W?void 0:W.className,{[`${U}-loading`]:j,[`${U}-bordered`]:"borderless"!==A,[`${U}-hoverable`]:M,[`${U}-contain-grid`]:K,[`${U}-contain-tabs`]:null==B?void 0:B.length,[`${U}-${ee}`]:ee,[`${U}-type-${w}`]:!!w,[`${U}-rtl`]:"rtl"===G},g,m,V,Y),eg=Object.assign(Object.assign({},null==W?void 0:W.style),y);return Q(t.createElement("div",Object.assign({ref:s},ec,{className:eu,style:eg}),c,er,ea,ed))});var v=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(n[l[r]]=e[l[r]]);return n};y.Grid=d,y.Meta=e=>{let{prefixCls:l,className:i,avatar:o,title:a,description:s}=e,d=v(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(r.ConfigContext),u=c("card",l),g=(0,n.default)(`${u}-meta`,i),m=o?t.createElement("div",{className:`${u}-meta-avatar`},o):null,b=a?t.createElement("div",{className:`${u}-meta-title`},a):null,p=s?t.createElement("div",{className:`${u}-meta-description`},s):null,f=b||p?t.createElement("div",{className:`${u}-meta-detail`},b,p):null;return t.createElement("div",Object.assign({},d,{className:g}),m,f)},e.s(["Card",0,y],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),n=e.i(560445),l=e.i(175712),r=e.i(869216),i=e.i(311451),o=e.i(212931),a=e.i(898586);e.i(296059);var s=e.i(868297),d=e.i(732961),c=e.i(289882),u=e.i(170517),g=e.i(628882),m=e.i(320890),b=e.i(104458),p=e.i(722319),f=e.i(8398),h=e.i(279728);e.i(765846);var y=e.i(602716),v=e.i(328052);e.i(262370);var $=e.i(135551);let O=(e,t)=>new $.FastColor(e).setA(t).toRgbString(),x=(e,t)=>new $.FastColor(e).lighten(t).toHexString(),j=e=>{let t=(0,y.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},S=(e,t)=>{let n=e||"#000",l=t||"#fff";return{colorBgBase:n,colorTextBase:l,colorText:O(l,.85),colorTextSecondary:O(l,.65),colorTextTertiary:O(l,.45),colorTextQuaternary:O(l,.25),colorFill:O(l,.18),colorFillSecondary:O(l,.12),colorFillTertiary:O(l,.08),colorFillQuaternary:O(l,.04),colorBgSolid:O(l,.95),colorBgSolidHover:O(l,1),colorBgSolidActive:O(l,.9),colorBgElevated:x(n,12),colorBgContainer:x(n,8),colorBgLayout:x(n,0),colorBgSpotlight:x(n,26),colorBgBlur:O(l,.04),colorBorder:x(n,26),colorBorderSecondary:x(n,19)}},E={defaultSeed:m.defaultConfig.token,useToken:function(){let[e,t,n]=(0,b.useToken)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:p.default,darkAlgorithm:(e,t)=>{let n=Object.keys(u.defaultPresetColors).map(t=>{let n=(0,y.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,l,r)=>(e[`${t}-${r+1}`]=n[r],e[`${t}${r+1}`]=n[r],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),l=null!=t?t:(0,p.default)(e),r=(0,v.default)(e,{generateColorPalettes:j,generateNeutralColorPalettes:S});return Object.assign(Object.assign(Object.assign(Object.assign({},l),n),r),{colorPrimaryBg:r.colorPrimaryBorder,colorPrimaryBgHover:r.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,p.default)(e),l=n.fontSizeSM,r=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,l=n-2;return{sizeXXL:t*(l+10),sizeXL:t*(l+6),sizeLG:t*(l+2),sizeMD:t*(l+2),sizeMS:t*(l+1),size:t*l,sizeSM:t*l,sizeXS:t*(l-1),sizeXXS:t*(l-1)}}(null!=t?t:e)),(0,h.default)(l)),{controlHeight:r}),(0,f.default)(Object.assign(Object.assign({},n),{controlHeight:r})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):c.default,n=Object.assign(Object.assign({},u.default),null==e?void 0:e.token);return(0,d.getComputedToken)(n,{override:null==e?void 0:e.token},t,g.default)},defaultConfig:m.defaultConfig,_internalContext:m.DesignTokenContext};e.s(["theme",0,E],368869);var C=e.i(270377),w=e.i(271645);function T({isOpen:e,title:s,alertMessage:d,message:c,resourceInformationTitle:u,resourceInformation:g,onCancel:m,onOk:b,confirmLoading:p,requiredConfirmation:f}){let{Title:h,Text:y}=a.Typography,{token:v}=E.useToken(),[$,O]=(0,w.useState)("");return(0,w.useEffect)(()=>{e&&O("")},[e]),(0,t.jsx)(o.Modal,{title:s,open:e,onOk:b,onCancel:m,confirmLoading:p,okText:p?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!f&&$!==f||p},cancelButtonProps:{disabled:p},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(n.Alert,{message:d,type:"warning"}),(0,t.jsx)(l.Card,{title:u,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:v.colorErrorBg,borderColor:v.colorErrorBorder}},style:{backgroundColor:v.colorErrorBg,borderColor:v.colorErrorBorder},children:(0,t.jsx)(r.Descriptions,{column:1,size:"small",children:g&&g.map(({label:e,value:n,...l})=>(0,t.jsx)(r.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(y,{...l,children:n??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(y,{children:c})}),f&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(y,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(y,{children:"Type "}),(0,t.jsx)(y,{strong:!0,type:"danger",children:f}),(0,t.jsx)(y,{children:" to confirm deletion:"})]}),(0,t.jsx)(i.Input,{value:$,onChange:e=>O(e.target.value),placeholder:f,className:"rounded-md",prefix:(0,t.jsx)(C.ExclamationCircleOutlined,{style:{color:v.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>T],127952)},233538,e=>{"use strict";function t(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let l=(null==t?void 0:t.getAttribute("disabled"))==="";return!(l&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&l}e.s(["isDisabledReactIssue7711",()=>t])},888288,220508,e=>{"use strict";var t=e.i(271645);let n=(e,n)=>{let l=void 0!==n,[r,i]=(0,t.useState)(e);return[l?n:r,e=>{l||i(e)}]};e.s(["default",()=>n],888288);let l=t.forwardRef(function(e,n){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["CheckCircleIcon",0,l],220508)},503269,214520,601893,694421,140721,942803,35889,722678,e=>{"use strict";var t=e.i(271645),n=e.i(914189);function l(e,l,r){let[i,o]=(0,t.useState)(r),a=void 0!==e,s=(0,t.useRef)(a),d=(0,t.useRef)(!1),c=(0,t.useRef)(!1);return!a||s.current||d.current?a||!s.current||c.current||(c.current=!0,s.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(d.current=!0,s.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[a?e:i,(0,n.useEvent)(e=>(a||o(e),null==l?void 0:l(e)))]}function r(e){let[n]=(0,t.useState)(e);return n}e.s(["useControllable",()=>l],503269),e.s(["useDefaultValue",()=>r],214520);let i=(0,t.createContext)(void 0);function o(){return(0,t.useContext)(i)}e.s(["useDisabled",()=>o],601893);var a=e.i(174080),s=e.i(746725);function d(e={},t=null,n=[]){for(let[l,r]of Object.entries(e))!function e(t,n,l){if(Array.isArray(l))for(let[r,i]of l.entries())e(t,c(n,r.toString()),i);else l instanceof Date?t.push([n,l.toISOString()]):"boolean"==typeof l?t.push([n,l?"1":"0"]):"string"==typeof l?t.push([n,l]):"number"==typeof l?t.push([n,`${l}`]):null==l?t.push([n,""]):d(l,n,t)}(n,c(t,l),r);return n}function c(e,t){return e?e+"["+t+"]":t}function u(e){var t,n;let l=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(l){for(let t of l.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=l.requestSubmit)||n.call(l)}}e.s(["attemptSubmit",()=>u,"objectToFormEntries",()=>d],694421);var g=e.i(700020),m=e.i(2788);let b=(0,t.createContext)(null);function p({children:e}){let n=(0,t.useContext)(b);if(!n)return t.default.createElement(t.default.Fragment,null,e);let{target:l}=n;return l?(0,a.createPortal)(t.default.createElement(t.default.Fragment,null,e),l):null}function f({data:e,form:n,disabled:l,onReset:r,overrides:i}){let[o,a]=(0,t.useState)(null),c=(0,s.useDisposables)();return(0,t.useEffect)(()=>{if(r&&o)return c.addEventListener(o,"reset",r)},[o,n,r]),t.default.createElement(p,null,t.default.createElement(h,{setForm:a,formId:n}),d(e).map(([e,r])=>t.default.createElement(m.Hidden,{features:m.HiddenFeatures.Hidden,...(0,g.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:l,name:e,value:r,...i})})))}function h({setForm:e,formId:n}){return(0,t.useEffect)(()=>{if(n){let t=document.getElementById(n);t&&e(t)}},[e,n]),n?null:t.default.createElement(m.Hidden,{features:m.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}e.s(["FormFields",()=>f],140721);let y=(0,t.createContext)(void 0);function v(){return(0,t.useContext)(y)}e.s(["useProvidedId",()=>v],942803);var $=e.i(835696),O=e.i(294316);let x=(0,t.createContext)(null);function j(){var e,n;return null!=(n=null==(e=(0,t.useContext)(x))?void 0:e.value)?n:void 0}function S(){let[e,l]=(0,t.useState)([]);return[e.length>0?e.join(" "):void 0,(0,t.useMemo)(()=>function(e){let r=(0,n.useEvent)(e=>(l(t=>[...t,e]),()=>l(t=>{let n=t.slice(),l=n.indexOf(e);return -1!==l&&n.splice(l,1),n}))),i=(0,t.useMemo)(()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value}),[r,e.slot,e.name,e.props,e.value]);return t.default.createElement(x.Provider,{value:i},e.children)},[l])]}x.displayName="DescriptionContext";let E=Object.assign((0,g.forwardRefWithAs)(function(e,n){let l=(0,t.useId)(),r=o(),{id:i=`headlessui-description-${l}`,...a}=e,s=function e(){let n=(0,t.useContext)(x);if(null===n){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return n}(),d=(0,O.useSyncRefs)(n);(0,$.useIsoMorphicEffect)(()=>s.register(i),[i,s.register]);let c=r||!1,u=(0,t.useMemo)(()=>({...s.slot,disabled:c}),[s.slot,c]),m={ref:d,...s.props,id:i};return(0,g.useRender)()({ourProps:m,theirProps:a,slot:u,defaultTag:"p",name:s.name||"Description"})}),{});e.s(["Description",()=>E,"useDescribedBy",()=>j,"useDescriptions",()=>S],35889);let C=(0,t.createContext)(null);function w(e){var n,l,r;let i=null!=(l=null==(n=(0,t.useContext)(C))?void 0:n.value)?l:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function T({inherit:e=!1}={}){let l=w(),[r,i]=(0,t.useState)([]),o=e?[l,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,(0,t.useMemo)(()=>function(e){let l=(0,n.useEvent)(e=>(i(t=>[...t,e]),()=>i(t=>{let n=t.slice(),l=n.indexOf(e);return -1!==l&&n.splice(l,1),n}))),r=(0,t.useMemo)(()=>({register:l,slot:e.slot,name:e.name,props:e.props,value:e.value}),[l,e.slot,e.name,e.props,e.value]);return t.default.createElement(C.Provider,{value:r},e.children)},[i])]}C.displayName="LabelContext";let k=Object.assign((0,g.forwardRefWithAs)(function(e,l){var r;let i=(0,t.useId)(),a=function e(){let n=(0,t.useContext)(C);if(null===n){let t=Error("You used a ` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=l.default.Children.only(n)}let $=O?o&&"object"==typeof o&&o.ref:N,F=l.default.useCallback(e=>(null!==R&&(w.current=(0,h.mountLinkInstance)(e,A,R,M,U,v)),()=>{w.current&&((0,h.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,h.unmountPrefetchableInstance)(e)}),[U,A,R,M,v]),H={ref:(0,u.useMergedRef)(F,$),onClick(t){O||"function"!=typeof k||k(t),O&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!R||t.defaultPrevented||function(t,r,n,o,a,i,s){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(699781);l.default.startTransition(()=>{d(n||r,a?"replace":"push",i??!0,o.current)})}}(t,A,D,w,_,C,I)},onMouseEnter(e){O||"function"!=typeof T||T(e),O&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),R&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===B)},onTouchStart:function(e){O||"function"!=typeof P||P(e),O&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),R&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===B)}};return(0,d.isAbsoluteUrl)(D)?H.href=D:O&&!E&&("a"!==o.type||"href"in o.props)||(H.href=(0,f.addBasePath)(D)),a=O?l.default.cloneElement(o,H):(0,i.jsx)("a",{...z,...H,children:n}),(0,i.jsx)(y.Provider,{value:s,children:a})}e.r(284508);let y=(0,l.createContext)(h.IDLE_LINK_STATUS),w=()=>(0,l.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},402874,521323,636772,e=>{"use strict";var t=e.i(843476),r=e.i(764205),n=e.i(266027);let o=(0,e.i(243652).createQueryKeys)("healthReadiness"),a=async()=>{let e=(0,r.getProxyBaseUrl)(),t=await fetch(`${e}/health/readiness`);if(!t.ok)throw Error(`Failed to fetch health readiness: ${t.statusText}`);return t.json()},i=()=>(0,n.useQuery)({queryKey:o.detail("readiness"),queryFn:a,staleTime:3e5});e.s(["useHealthReadiness",0,i],521323);var l=e.i(115571),s=e.i(271645);function c(e){let t=t=>{"disableBouncingIcon"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableBouncingIcon"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function u(){return"true"===(0,l.getLocalStorageItem)("disableBouncingIcon")}function d(){return(0,s.useSyncExternalStore)(c,u)}var f=e.i(275144),h=e.i(268004),m=e.i(321836),g=e.i(62478),p=e.i(44121),v=e.i(186515);e.i(247167);var y=e.i(931067),w=e.i(9583),x=e.i(464571),b=e.i(790848),j=e.i(262218),S=e.i(522016);function E(e){let t=t=>{"disableBlogPosts"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableBlogPosts"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function _(){return"true"===(0,l.getLocalStorageItem)("disableBlogPosts")}function L(){return(0,s.useSyncExternalStore)(E,_)}async function C(){let e=(0,r.getProxyBaseUrl)(),t=await fetch(`${e}/public/litellm_blog_posts`);if(!t.ok)throw Error(`Failed to fetch blog posts: ${t.statusText}`);return t.json()}var k=e.i(56456),T=e.i(326373),P=e.i(770914),O=e.i(898586);let{Text:I,Title:N,Paragraph:B}=O.Typography,z=()=>{let e,r=L(),{data:o,isLoading:a,isError:i,refetch:l}=(0,n.useQuery)({queryKey:["blogPosts"],queryFn:C,staleTime:36e5,retry:1,retryDelay:0});return r?null:(e=a?[{key:"loading",label:(0,t.jsx)(k.LoadingOutlined,{}),disabled:!0}]:i?[{key:"error",label:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(I,{type:"danger",children:"Failed to load posts"}),(0,t.jsx)(x.Button,{size:"small",onClick:()=>l(),children:"Retry"})]}),disabled:!0}]:o&&0!==o.posts.length?[...o.posts.slice(0,5).map(e=>({key:e.url,label:(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",width:380},children:[(0,t.jsx)(N,{level:5,style:{marginBottom:2},children:e.title}),(0,t.jsx)(I,{type:"secondary",style:{fontSize:11},children:new Date(e.date+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),(0,t.jsx)(B,{ellipsis:{rows:2},children:e.description})]})})),{type:"divider"},{key:"view-all",label:(0,t.jsx)("a",{href:"https://docs.litellm.ai/blog",target:"_blank",rel:"noopener noreferrer",children:"View all posts"})}]:[{key:"empty",label:(0,t.jsx)(I,{type:"secondary",children:"No posts available"}),disabled:!0}],(0,t.jsx)(T.Dropdown,{menu:{items:e},trigger:["hover"],placement:"bottomRight",children:(0,t.jsx)(x.Button,{type:"text",children:"Blog"})}))};function R(e){let t=t=>{"disableShowPrompts"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableShowPrompts"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function U(){return"true"===(0,l.getLocalStorageItem)("disableShowPrompts")}function M(){return(0,s.useSyncExternalStore)(R,U)}e.s(["useDisableShowPrompts",()=>M],636772);let A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"}}]},name:"github",theme:"outlined"};var D=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:A}))});let $={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M409.4 128c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h76.7v-76.8c0-42.3-34.3-76.7-76.7-76.8zm0 204.8H204.7c-42.4 0-76.7 34.4-76.7 76.8s34.4 76.8 76.7 76.8h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.8-76.6-76.8zM614 486.4c42.4 0 76.8-34.4 76.7-76.8V204.8c0-42.4-34.3-76.8-76.7-76.8-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.5 34.3 76.8 76.7 76.8zm281.4-76.8c0-42.4-34.4-76.8-76.7-76.8S742 367.2 742 409.6v76.8h76.7c42.3 0 76.7-34.4 76.7-76.8zm-76.8 128H614c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM614 742.4h-76.7v76.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM409.4 537.6c-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8V614.4c0-20.3-8.1-39.9-22.4-54.3a76.92 76.92 0 00-54.3-22.5zM128 614.4c0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5c42.4 0 76.8-34.4 76.7-76.8v-76.8h-76.7c-42.3 0-76.7 34.4-76.7 76.8z"}}]},name:"slack",theme:"outlined"};var F=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:$}))});let H=()=>M()?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Button,{href:"https://www.litellm.ai/support",target:"_blank",rel:"noopener noreferrer",icon:(0,t.jsx)(F,{}),className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",children:"Join Slack"}),(0,t.jsx)(x.Button,{href:"https://github.com/BerriAI/litellm",target:"_blank",rel:"noopener noreferrer",className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",icon:(0,t.jsx)(D,{}),children:"Star us on GitHub"})]});var V=e.i(135214),K=e.i(371401),W=e.i(100486),G=e.i(755151);let q={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"};var Q=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:q}))}),X=e.i(948401),J=e.i(602073),Z=e.i(771674),Y=e.i(312361),ee=e.i(592968);let{Text:et}=O.Typography,er=({onLogout:e})=>{let{userId:r,userEmail:n,userRole:o,premiumUser:a}=(0,V.default)(),i=M(),c=(0,K.useDisableUsageIndicator)(),u=L(),f=d(),[h,m]=(0,s.useState)(!1);(0,s.useEffect)(()=>{m("true"===(0,l.getLocalStorageItem)("disableShowNewBadge"))},[]);let g=[{key:"logout",label:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Q,{}),"Logout"]}),onClick:e}];return(0,t.jsx)(T.Dropdown,{menu:{items:g},popupRender:e=>(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-lg",children:[(0,t.jsxs)(P.Space,{direction:"vertical",size:"small",style:{width:"100%",padding:"12px"},children:[(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(X.MailOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:n||"-"})]}),a?(0,t.jsx)(j.Tag,{icon:(0,t.jsx)(W.CrownOutlined,{}),color:"gold",children:"Premium"}):(0,t.jsx)(ee.Tooltip,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,t.jsx)(j.Tag,{icon:(0,t.jsx)(W.CrownOutlined,{}),children:"Standard"})})]}),(0,t.jsx)(Y.Divider,{style:{margin:"8px 0"}}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Z.UserOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:"User ID"})]}),(0,t.jsx)(et,{copyable:!0,ellipsis:!0,style:{maxWidth:"150px"},title:r||"-",children:r||"-"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(J.SafetyOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:"Role"})]}),(0,t.jsx)(et,{children:o})]}),(0,t.jsx)(Y.Divider,{style:{margin:"8px 0"}}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide New Feature Indicators"}),(0,t.jsx)(b.Switch,{size:"small",checked:h,onChange:e=>{m(e),e?(0,l.setLocalStorageItem)("disableShowNewBadge","true"):(0,l.removeLocalStorageItem)("disableShowNewBadge"),(0,l.emitLocalStorageChange)("disableShowNewBadge")},"aria-label":"Toggle hide new feature indicators"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide All Prompts"}),(0,t.jsx)(b.Switch,{size:"small",checked:i,onChange:e=>{e?(0,l.setLocalStorageItem)("disableShowPrompts","true"):(0,l.removeLocalStorageItem)("disableShowPrompts"),(0,l.emitLocalStorageChange)("disableShowPrompts")},"aria-label":"Toggle hide all prompts"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Usage Indicator"}),(0,t.jsx)(b.Switch,{size:"small",checked:c,onChange:e=>{e?(0,l.setLocalStorageItem)("disableUsageIndicator","true"):(0,l.removeLocalStorageItem)("disableUsageIndicator"),(0,l.emitLocalStorageChange)("disableUsageIndicator")},"aria-label":"Toggle hide usage indicator"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Blog Posts"}),(0,t.jsx)(b.Switch,{size:"small",checked:u,onChange:e=>{e?(0,l.setLocalStorageItem)("disableBlogPosts","true"):(0,l.removeLocalStorageItem)("disableBlogPosts"),(0,l.emitLocalStorageChange)("disableBlogPosts")},"aria-label":"Toggle hide blog posts"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Bouncing Icon"}),(0,t.jsx)(b.Switch,{size:"small",checked:f,onChange:e=>{e?(0,l.setLocalStorageItem)("disableBouncingIcon","true"):(0,l.removeLocalStorageItem)("disableBouncingIcon"),(0,l.emitLocalStorageChange)("disableBouncingIcon")},"aria-label":"Toggle hide bouncing icon"})]})]}),(0,t.jsx)(Y.Divider,{style:{margin:0}}),s.default.cloneElement(e,{style:{boxShadow:"none"}})]}),children:(0,t.jsx)(x.Button,{type:"text",children:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Z.UserOutlined,{}),(0,t.jsx)(et,{children:"User"}),(0,t.jsx)(G.DownOutlined,{})]})})})};var en=e.i(199133),eo=e.i(295320),ea=e.i(283713);let ei=({onWorkerSwitch:e})=>{let{isControlPlane:r,selectedWorker:n,workers:o}=(0,ea.useWorker)();return r&&n?(0,t.jsx)(en.Select,{showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),value:n.worker_id,style:{minWidth:180},suffixIcon:(0,t.jsx)(eo.CloudServerOutlined,{}),options:o.map(e=>({label:e.name,value:e.worker_id,disabled:e.worker_id===n.worker_id})),onChange:t=>{e(t)}}):null};e.s(["default",0,({userID:e,userEmail:n,userRole:o,premiumUser:a,proxySettings:l,setProxySettings:c,accessToken:u,isPublicPage:y=!1,sidebarCollapsed:w=!1,onToggleSidebar:b,isDarkMode:E,toggleDarkMode:_})=>{let L=(0,r.getProxyBaseUrl)(),[C,k]=(0,s.useState)(""),{logoUrl:T}=(0,f.useTheme)(),{data:P}=i(),O=P?.litellm_version,I=d(),N=T||`${L}/get_image`;return(0,s.useEffect)(()=>{(async()=>{if(u){let e=await (0,g.fetchProxySettings)(u);console.log("response from fetchProxySettings",e),e&&c(e)}})()},[u]),(0,s.useEffect)(()=>{k(l?.PROXY_LOGOUT_URL||"")},[l]),(0,t.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)("div",{className:"flex items-center h-14 px-4",children:[(0,t.jsxs)("div",{className:"flex items-center flex-shrink-0",children:[b&&(0,t.jsx)("button",{onClick:b,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:w?"Expand sidebar":"Collapse sidebar",children:(0,t.jsx)("span",{className:"text-lg",children:w?(0,t.jsx)(v.MenuUnfoldOutlined,{}):(0,t.jsx)(p.MenuFoldOutlined,{})})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.default,{href:L||"/",className:"flex items-center",children:(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("div",{className:"h-10 max-w-48 flex items-center justify-center overflow-hidden",children:(0,t.jsx)("img",{src:N,alt:"LiteLLM Brand",className:"max-w-full max-h-full w-auto h-auto object-contain"})})})}),O&&(0,t.jsxs)("div",{className:"relative",children:[!I&&(0,t.jsx)("span",{className:"absolute -top-1 -left-2 text-lg animate-bounce",style:{animationDuration:"2s"},title:"Thanks for using LiteLLM!",children:"🌑"}),(0,t.jsx)(j.Tag,{className:"relative text-xs font-medium cursor-pointer z-10",children:(0,t.jsxs)("a",{href:"https://docs.litellm.ai/release_notes",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0",children:["v",O]})})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,t.jsx)(ei,{onWorkerSwitch:e=>{(0,h.clearTokenCookies)(),(0,m.clearStoredReturnUrl)(),localStorage.removeItem("litellm_selected_worker_id"),localStorage.removeItem("litellm_worker_url"),window.location.href=`/ui/login?worker=${encodeURIComponent(e)}`}}),(0,t.jsx)(H,{}),!1,(0,t.jsx)(x.Button,{type:"text",href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",children:"Docs"}),(0,t.jsx)(z,{}),!y&&(0,t.jsx)(er,{onLogout:()=>{(0,h.clearTokenCookies)(),localStorage.removeItem("litellm_selected_worker_id"),localStorage.removeItem("litellm_worker_url"),window.location.href=C}})]})]})})})}],402874)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9b19f9f63c383201.js b/litellm/proxy/_experimental/out/_next/static/chunks/9b19f9f63c383201.js new file mode 100644 index 0000000000..0fa24217b3 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/9b19f9f63c383201.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(708347),r=e.i(135214);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&a.all_admin_roles.includes(s||"")})}])},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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"},{id:"SQS",displayName:"SQS",logo:`${t}aws.svg`,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){return t.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:s},e),t.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"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,s],810757);let l=t.forwardRef(function(e,s){return t.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:s},e),t.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"}))});e.s(["BanIcon",0,l],477386)},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:g,className:i,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(l.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(a.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),u&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",p," (e.g. 2 ",p,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...x.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:N[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:N[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=e.i(91739),n=e.i(500727),o=e.i(531516),d=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:u,onChange:m,disabled:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.map(e=>e.name)})},disabled:d,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:d,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(r.Spin,{size:"large"}),(0,t.jsx)(a.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!d&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>w({...v,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,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>w({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(l.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){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),l.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.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,t.jsx)(a.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){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),l.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(h,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(h,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(i).map(([a,i])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.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"===i&&(0,t.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"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),0===e.length&&(0,t.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,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.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,t.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,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(s.Text,{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,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",t);let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===eE,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===eE&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===ti||"read_only"===ti?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:eg?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:ep?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:ep?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9b4c8a50e297b9ad.js b/litellm/proxy/_experimental/out/_next/static/chunks/9b4c8a50e297b9ad.js new file mode 100644 index 0000000000..85bc76138c --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/9b4c8a50e297b9ad.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,240647,e=>{"use strict";var a=e.i(286612);e.s(["RightOutlined",()=>a.default])},166406,e=>{"use strict";var a=e.i(190144);e.s(["CopyOutlined",()=>a.default])},94629,e=>{"use strict";var a=e.i(271645);let r=a.forwardRef(function(e,r){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:r},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},916925,e=>{"use strict";var a,r=((a={}).A2A_Agent="A2A Agent",a.AI21="Ai21",a.AI21_CHAT="Ai21 Chat",a.AIML="AI/ML API",a.AIOHTTP_OPENAI="Aiohttp Openai",a.Anthropic="Anthropic",a.ANTHROPIC_TEXT="Anthropic Text",a.AssemblyAI="AssemblyAI",a.AUTO_ROUTER="Auto Router",a.Bedrock="Amazon Bedrock",a.BedrockMantle="Amazon Bedrock Mantle",a.SageMaker="AWS SageMaker",a.Azure="Azure",a.Azure_AI_Studio="Azure AI Foundry (Studio)",a.AZURE_TEXT="Azure Text",a.BASETEN="Baseten",a.BYTEZ="Bytez",a.Cerebras="Cerebras",a.CLARIFAI="Clarifai",a.CLOUDFLARE="Cloudflare",a.CODESTRAL="Codestral",a.Cohere="Cohere",a.COHERE_CHAT="Cohere Chat",a.COMETAPI="Cometapi",a.COMPACTIFAI="Compactifai",a.Cursor="Cursor",a.Dashscope="Dashscope",a.Databricks="Databricks (Qwen API)",a.DATAROBOT="Datarobot",a.DeepInfra="DeepInfra",a.Deepgram="Deepgram",a.Deepseek="Deepseek",a.DOCKER_MODEL_RUNNER="Docker Model Runner",a.DOTPROMPT="Dotprompt",a.ElevenLabs="ElevenLabs",a.EMPOWER="Empower",a.FalAI="Fal AI",a.FEATHERLESS_AI="Featherless Ai",a.FireworksAI="Fireworks AI",a.FRIENDLIAI="Friendliai",a.GALADRIEL="Galadriel",a.GITHUB_COPILOT="Github Copilot",a.Google_AI_Studio="Google AI Studio",a.GradientAI="GradientAI",a.Groq="Groq",a.HEROKU="Heroku",a.Hosted_Vllm="vllm",a.HUGGINGFACE="Huggingface",a.HYPERBOLIC="Hyperbolic",a.Infinity="Infinity",a.JinaAI="Jina AI",a.LAMBDA_AI="Lambda Ai",a.LEMONADE="Lemonade",a.LLAMAFILE="Llamafile",a.LM_STUDIO="Lm Studio",a.LLAMA="Meta Llama",a.MARITALK="Maritalk",a.MiniMax="MiniMax",a.MistralAI="Mistral AI",a.MOONSHOT="Moonshot",a.MORPH="Morph",a.NEBIUS="Nebius",a.NLP_CLOUD="Nlp Cloud",a.NOVITA="Novita",a.NSCALE="Nscale",a.NVIDIA_NIM="Nvidia Nim",a.Ollama="Ollama",a.OLLAMA_CHAT="Ollama Chat",a.OOBABOOGA="Oobabooga",a.OpenAI="OpenAI",a.OPENAI_LIKE="Openai Like",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.OVHCLOUD="Ovhcloud",a.Perplexity="Perplexity",a.PETALS="Petals",a.PG_VECTOR="Pg Vector",a.PREDIBASE="Predibase",a.RECRAFT="Recraft",a.REPLICATE="Replicate",a.RunwayML="RunwayML",a.SAGEMAKER_LEGACY="Sagemaker",a.Sambanova="Sambanova",a.SAP="SAP Generative AI Hub",a.Snowflake="Snowflake",a.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",a.TogetherAI="TogetherAI",a.TOPAZ="Topaz",a.Triton="Triton",a.V0="V0",a.VERCEL_AI_GATEWAY="Vercel Ai Gateway",a.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",a.VERTEX_AI_BETA="Vertex Ai Beta",a.VLLM="Vllm",a.VolcEngine="VolcEngine",a.Voyage="Voyage AI",a.WANDB="Wandb",a.WATSONX="Watsonx",a.WATSONX_TEXT="Watsonx Text",a.xAI="xAI",a.XINFERENCE="Xinference",a);let o={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},t="../ui/assets/logos/",i={"A2A Agent":`${t}a2a_agent.png`,Ai21:`${t}ai21.svg`,"Ai21 Chat":`${t}ai21.svg`,"AI/ML API":`${t}aiml_api.svg`,"Aiohttp Openai":`${t}openai_small.svg`,Anthropic:`${t}anthropic.svg`,"Anthropic Text":`${t}anthropic.svg`,AssemblyAI:`${t}assemblyai_small.png`,Azure:`${t}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${t}microsoft_azure.svg`,"Azure Text":`${t}microsoft_azure.svg`,Baseten:`${t}baseten.svg`,"Amazon Bedrock":`${t}bedrock.svg`,"Amazon Bedrock Mantle":`${t}bedrock.svg`,"AWS SageMaker":`${t}bedrock.svg`,Cerebras:`${t}cerebras.svg`,Cloudflare:`${t}cloudflare.svg`,Codestral:`${t}mistral.svg`,Cohere:`${t}cohere.svg`,"Cohere Chat":`${t}cohere.svg`,Cometapi:`${t}cometapi.svg`,Cursor:`${t}cursor.svg`,"Databricks (Qwen API)":`${t}databricks.svg`,Dashscope:`${t}dashscope.svg`,Deepseek:`${t}deepseek.svg`,Deepgram:`${t}deepgram.png`,DeepInfra:`${t}deepinfra.png`,ElevenLabs:`${t}elevenlabs.png`,"Fal AI":`${t}fal_ai.jpg`,"Featherless Ai":`${t}featherless.svg`,"Fireworks AI":`${t}fireworks.svg`,Friendliai:`${t}friendli.svg`,"Github Copilot":`${t}github_copilot.svg`,"Google AI Studio":`${t}google.svg`,GradientAI:`${t}gradientai.svg`,Groq:`${t}groq.svg`,vllm:`${t}vllm.png`,Huggingface:`${t}huggingface.svg`,Hyperbolic:`${t}hyperbolic.svg`,Infinity:`${t}infinity.png`,"Jina AI":`${t}jina.png`,"Lambda Ai":`${t}lambda.svg`,"Lm Studio":`${t}lmstudio.svg`,"Meta Llama":`${t}meta_llama.svg`,MiniMax:`${t}minimax.svg`,"Mistral AI":`${t}mistral.svg`,Moonshot:`${t}moonshot.svg`,Morph:`${t}morph.svg`,Nebius:`${t}nebius.svg`,Novita:`${t}novita.svg`,"Nvidia Nim":`${t}nvidia_nim.svg`,Ollama:`${t}ollama.svg`,"Ollama Chat":`${t}ollama.svg`,Oobabooga:`${t}openai_small.svg`,OpenAI:`${t}openai_small.svg`,"Openai Like":`${t}openai_small.svg`,"OpenAI Text Completion":`${t}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${t}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${t}openai_small.svg`,Openrouter:`${t}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${t}oracle.svg`,Perplexity:`${t}perplexity-ai.svg`,Recraft:`${t}recraft.svg`,Replicate:`${t}replicate.svg`,RunwayML:`${t}runwayml.png`,Sagemaker:`${t}bedrock.svg`,Sambanova:`${t}sambanova.svg`,"SAP Generative AI Hub":`${t}sap.png`,Snowflake:`${t}snowflake.svg`,"Text-Completion-Codestral":`${t}mistral.svg`,TogetherAI:`${t}togetherai.svg`,Topaz:`${t}topaz.svg`,Triton:`${t}nvidia_triton.png`,V0:`${t}v0.svg`,"Vercel Ai Gateway":`${t}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${t}google.svg`,"Vertex Ai Beta":`${t}google.svg`,Vllm:`${t}vllm.png`,VolcEngine:`${t}volcengine.png`,"Voyage AI":`${t}voyage.webp`,Watsonx:`${t}watsonx.svg`,"Watsonx Text":`${t}watsonx.svg`,xAI:`${t}xai.svg`,Xinference:`${t}xinference.svg`};e.s(["Providers",()=>r,"getPlaceholder",0,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)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"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 if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let a=Object.keys(o).find(a=>o[a].toLowerCase()===e.toLowerCase());if(!a)return{logo:"",displayName:e};let t=r[a];return{logo:i[t],displayName:t}},"getProviderModels",0,(e,a)=>{console.log(`Provider key: ${e}`);let r=o[e];console.log(`Provider mapped to: ${r}`);let t=[];return e&&"object"==typeof a&&(Object.entries(a).forEach(([e,a])=>{if(null!==a&&"object"==typeof a&&"litellm_provider"in a){let o=a.litellm_provider;(o===r||"string"==typeof o&&o.includes(r))&&t.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(a).forEach(([e,a])=>{null!==a&&"object"==typeof a&&"litellm_provider"in a&&"cohere_chat"===a.litellm_provider&&t.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(a).forEach(([e,a])=>{null!==a&&"object"==typeof a&&"litellm_provider"in a&&"sagemaker_chat"===a.litellm_provider&&t.push(e)}))),t},"providerLogoMap",0,i,"provider_map",0,o])},84899,e=>{"use strict";e.i(247167);var a=e.i(931067),r=e.i(271645),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},t=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(t.default,(0,a.default)({},e,{ref:i,icon:o}))});e.s(["SendOutlined",0,i],84899)},800944,e=>{"use strict";var a=e.i(843476),r=e.i(241902),o=e.i(135214);e.s(["default",0,()=>{let{accessToken:e,userId:t,userRole:i}=(0,o.default)();return(0,a.jsx)(r.default,{accessToken:e,userID:t,userRole:i})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9b8d229c6e7826fb.js b/litellm/proxy/_experimental/out/_next/static/chunks/9b8d229c6e7826fb.js new file mode 100644 index 0000000000..74c6bedb2b --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/9b8d229c6e7826fb.js @@ -0,0 +1,17 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(529681);let n=e=>{let{prefixCls:a,className:l,style:n,size:i,shape:o}=e,s=(0,r.default)({[`${a}-lg`]:"large"===i,[`${a}-sm`]:"small"===i}),d=(0,r.default)({[`${a}-circle`]:"circle"===o,[`${a}-square`]:"square"===o,[`${a}-round`]:"round"===o}),c=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(a,s,d,l),style:Object.assign(Object.assign({},c),n)})};e.i(296059);var i=e.i(694758),o=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),g=e=>({height:e,lineHeight:(0,o.unit)(e)}),u=e=>Object.assign({width:e},g(e)),m=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},g(e)),b=e=>Object.assign({width:e},g(e)),p=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},f=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},g(e)),h=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:l,skeletonButtonCls:n,skeletonInputCls:i,skeletonImageCls:o,controlHeight:s,controlHeightLG:d,controlHeightSM:g,gradientFromColor:h,padding:v,marginSM:$,borderRadius:y,titleHeight:x,blockRadius:C,paragraphLiHeight:O,controlHeightXS:j,paragraphMarginTop:w}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:v,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:h},u(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},u(d)),[`${r}-sm`]:Object.assign({},u(g))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:x,background:h,borderRadius:C,[`+ ${l}`]:{marginBlockStart:g}},[l]:{padding:0,"> li":{width:"100%",height:O,listStyle:"none",background:h,borderRadius:C,"+ li":{marginBlockStart:j}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${l} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:$,[`+ ${l}`]:{marginBlockStart:w}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:l,controlHeightSM:n,gradientFromColor:i,calc:o}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:o(a).mul(2).equal(),minWidth:o(a).mul(2).equal()},f(a,o))},p(e,a,r)),{[`${r}-lg`]:Object.assign({},f(l,o))}),p(e,l,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},f(n,o))}),p(e,n,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:l,controlHeightSM:n}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},u(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},u(l)),[`${t}${t}-sm`]:Object.assign({},u(n))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:l,controlHeightSM:n,gradientFromColor:i,calc:o}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},m(t,o)),[`${a}-lg`]:Object.assign({},m(l,o)),[`${a}-sm`]:Object.assign({},m(n,o))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:l,calc:n}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:l},b(n(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},b(r)),{maxWidth:n(r).mul(4).equal(),maxHeight:n(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[n]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${l} > li, + ${r}, + ${n}, + ${i}, + ${o} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,d.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),v=e=>{let{prefixCls:a,className:l,style:n,rows:i=0}=e,o=Array.from({length:i}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:n},o)},$=({prefixCls:e,className:a,width:l,style:n})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},n)});function y(e){return e&&"object"==typeof e?e:{}}let x=e=>{let{prefixCls:l,loading:i,className:o,rootClassName:s,style:d,children:c,avatar:g=!1,title:u=!0,paragraph:m=!0,active:b,round:p}=e,{getPrefixCls:f,direction:x,className:C,style:O}=(0,a.useComponentConfig)("skeleton"),j=f("skeleton",l),[w,k,S]=h(j);if(i||!("loading"in e)){let e,a,l=!!g,i=!!u,c=!!m;if(l){let r=Object.assign(Object.assign({prefixCls:`${j}-avatar`},i&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),y(g));e=t.createElement("div",{className:`${j}-header`},t.createElement(n,Object.assign({},r)))}if(i||c){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${j}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),y(u));e=t.createElement($,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${j}-paragraph`},(e={},l&&i||(e.width="61%"),!l&&i?e.rows=3:e.rows=2,e)),y(m));r=t.createElement(v,Object.assign({},a))}a=t.createElement("div",{className:`${j}-content`},e,r)}let f=(0,r.default)(j,{[`${j}-with-avatar`]:l,[`${j}-active`]:b,[`${j}-rtl`]:"rtl"===x,[`${j}-round`]:p},C,o,s,k,S);return w(t.createElement("div",{className:f,style:Object.assign(Object.assign({},O),d)},e,a))}return null!=c?c:null};x.Button=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,block:c=!1,size:g="default"}=e,{getPrefixCls:u}=t.useContext(a.ConfigContext),m=u("skeleton",i),[b,p,f]=h(m),v=(0,l.default)(e,["prefixCls"]),$=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:d,[`${m}-block`]:c},o,s,p,f);return b(t.createElement("div",{className:$},t.createElement(n,Object.assign({prefixCls:`${m}-button`,size:g},v))))},x.Avatar=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,shape:c="circle",size:g="default"}=e,{getPrefixCls:u}=t.useContext(a.ConfigContext),m=u("skeleton",i),[b,p,f]=h(m),v=(0,l.default)(e,["prefixCls","className"]),$=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:d},o,s,p,f);return b(t.createElement("div",{className:$},t.createElement(n,Object.assign({prefixCls:`${m}-avatar`,shape:c,size:g},v))))},x.Input=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,block:c,size:g="default"}=e,{getPrefixCls:u}=t.useContext(a.ConfigContext),m=u("skeleton",i),[b,p,f]=h(m),v=(0,l.default)(e,["prefixCls"]),$=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:d,[`${m}-block`]:c},o,s,p,f);return b(t.createElement("div",{className:$},t.createElement(n,Object.assign({prefixCls:`${m}-input`,size:g},v))))},x.Image=e=>{let{prefixCls:l,className:n,rootClassName:i,style:o,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[g,u,m]=h(c),b=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},n,i,u,m);return g(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${c}-image`,n),style:o},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${c}-image-path`})))))},x.Node=e=>{let{prefixCls:l,className:n,rootClassName:i,style:o,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),g=c("skeleton",l),[u,m,b]=h(g),p=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:s},m,n,i,b);return u(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${g}-image`,n),style:o},d)))},e.s(["default",0,x],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],n=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,o=(e,t,r,a,l)=>{clearTimeout(a.current);let i=n(e);t(i),r.current=i,l&&l({current:i})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let g=e=>{var r=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.default.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 u=e.i(95779);let m={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"}},b=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,u.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,u.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,u.colorPalette.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,c.getColorClassNames)(t,u.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,c.makeClassName)("Button"),f=({loading:e,iconSize:t,iconPosition:r,Icon:l,needMargin:n,transitionStatus:i})=>{let o=n?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),u={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(g,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",o,u.default,u[i]),style:{transition:"width 150ms"}}):a.default.createElement(l,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,o)})},h=a.default.forwardRef((e,l)=>{let{icon:g,iconPosition:u=s.HorizontalPositions.Left,size:h=s.Sizes.SM,color:v,variant:$="primary",disabled:y,loading:x=!1,loadingText:C,children:O,tooltip:j,className:w}=e,k=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),S=x||y,E=void 0!==g||x,N=x&&C,T=!(!O&&!N),z=(0,d.tremorTwMerge)(m[h].height,m[h].width),B="light"!==$?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",P=b($,v),M=("light"!==$?{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"}})[h],{tooltipProps:R,getReferenceProps:H}=(0,r.useTooltip)(300),[L,I]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:l,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:g,onStateChange:u}={})=>{let[m,b]=(0,a.useState)(()=>n(d?2:i(c))),p=(0,a.useRef)(m),f=(0,a.useRef)(0),[h,v]="object"==typeof s?[s.enter,s.exit]:[s,s],$=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(p.current._s,g);e&&o(e,b,p,f,u)},[u,g]);return[m,(0,a.useCallback)(a=>{let n=e=>{switch(o(e,b,p,f,u),e){case 1:h>=0&&(f.current=((...e)=>setTimeout(...e))($,h));break;case 4:v>=0&&(f.current=((...e)=>setTimeout(...e))($,v));break;case 0:case 3:f.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||n(e+1)},0)}},s=p.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||n(e?+!r:2):s&&n(t?l?3:4:i(g))},[$,u,e,t,r,l,h,v,g]),$]})({timeout:50});return(0,a.useEffect)(()=>{I(x)},[x]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([l,R.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",B,M.paddingX,M.paddingY,M.fontSize,P.textColor,P.bgColor,P.borderColor,P.hoverBorderColor,S?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(b($,v).hoverTextColor,b($,v).hoverBgColor,b($,v).hoverBorderColor),w),disabled:S},H,k),a.default.createElement(r.default,Object.assign({text:j},R)),E&&u!==s.HorizontalPositions.Right?a.default.createElement(f,{loading:x,iconSize:z,iconPosition:u,Icon:g,transitionStatus:L.status,needMargin:T}):null,N||O?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},N?C:O):null,E&&u===s.HorizontalPositions.Right?a.default.createElement(f,{loading:x,iconSize:z,iconPosition:u,Icon:g,transitionStatus:L.status,needMargin:T}):null)});h.displayName="Button",e.s(["Button",()=>h],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",o)},r.default.createElement("table",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});n.displayName="Table",e.s(["Table",()=>n],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",o)},s),i))});n.displayName="TableBody",e.s(["TableBody",()=>n],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",o)},s),i))});n.displayName="TableCell",e.s(["TableCell",()=>n],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",o)},s),i))});n.displayName="TableHead",e.s(["TableHead",()=>n],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",o)},s),i))});n.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>n],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("row"),o)},s),i))});n.displayName="TableRow",e.s(["TableRow",()=>n],496020)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),l=e.i(95779),n=e.i(444755),i=e.i(673706);let o=(0,i.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:d="",decorationColor:c,children:g,className:u}=e,m=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,className:(0,n.tremorTwMerge)(o("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",c?(0,i.getColorClassNames)(c,l.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case a.HorizontalPositions.Left:return"border-l-4";case a.VerticalPositions.Top:return"border-t-4";case a.HorizontalPositions.Right:return"border-r-4";case a.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),u)},m),g)});s.displayName="Card",e.s(["Card",()=>s],304967)},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var l=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(l.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["default",0,n],959013)},68155,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,r],68155)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},871943,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(908206),l=e.i(242064),n=e.i(517455),i=e.i(150073);let o={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var d=e.i(876556),c=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r},g=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let u=e=>{let{itemPrefixCls:a,component:l,span:n,className:i,style:o,labelStyle:d,contentStyle:c,bordered:g,label:u,content:m,colon:b,type:p,styles:f}=e,{classNames:h}=t.useContext(s),v=Object.assign(Object.assign({},d),null==f?void 0:f.label),$=Object.assign(Object.assign({},c),null==f?void 0:f.content);if(g)return t.createElement(l,{colSpan:n,style:o,className:(0,r.default)(i,{[`${a}-item-${p}`]:"label"===p||"content"===p,[null==h?void 0:h.label]:(null==h?void 0:h.label)&&"label"===p,[null==h?void 0:h.content]:(null==h?void 0:h.content)&&"content"===p})},null!=u&&t.createElement("span",{style:v},u),null!=m&&t.createElement("span",{style:$},m));return t.createElement(l,{colSpan:n,style:o,className:(0,r.default)(`${a}-item`,i)},t.createElement("div",{className:`${a}-item-container`},null!=u&&t.createElement("span",{style:v,className:(0,r.default)(`${a}-item-label`,null==h?void 0:h.label,{[`${a}-item-no-colon`]:!b})},u),null!=m&&t.createElement("span",{style:$,className:(0,r.default)(`${a}-item-content`,null==h?void 0:h.content)},m)))};function m(e,{colon:r,prefixCls:a,bordered:l},{component:n,type:i,showLabel:o,showContent:s,labelStyle:d,contentStyle:c,styles:g}){return e.map(({label:e,children:m,prefixCls:b=a,className:p,style:f,labelStyle:h,contentStyle:v,span:$=1,key:y,styles:x},C)=>"string"==typeof n?t.createElement(u,{key:`${i}-${y||C}`,className:p,style:f,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==g?void 0:g.label),h),null==x?void 0:x.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==g?void 0:g.content),v),null==x?void 0:x.content)},span:$,colon:r,component:n,itemPrefixCls:b,bordered:l,label:o?e:null,content:s?m:null,type:i}):[t.createElement(u,{key:`label-${y||C}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==g?void 0:g.label),f),h),null==x?void 0:x.label),span:1,colon:r,component:n[0],itemPrefixCls:b,bordered:l,label:e,type:"label"}),t.createElement(u,{key:`content-${y||C}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==g?void 0:g.content),f),v),null==x?void 0:x.content),span:2*$-1,component:n[1],itemPrefixCls:b,bordered:l,content:m,type:"content"})])}let b=e=>{let r=t.useContext(s),{prefixCls:a,vertical:l,row:n,index:i,bordered:o}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${a}-row`},m(n,e,Object.assign({component:"th",type:"label",showLabel:!0},r))),t.createElement("tr",{key:`content-${i}`,className:`${a}-row`},m(n,e,Object.assign({component:"td",type:"content",showContent:!0},r)))):t.createElement("tr",{key:i,className:`${a}-row`},m(n,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},r)))};e.i(296059);var p=e.i(915654),f=e.i(183293),h=e.i(246422),v=e.i(838378);let $=(0,h.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:r,itemPaddingBottom:a,itemPaddingEnd:l,colonMarginRight:n,colonMarginLeft:i,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,f.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:r}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.padding)} ${(0,p.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:r,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.paddingSM)} ${(0,p.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.paddingXS)} ${(0,p.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:o},[`${t}-title`]:Object.assign(Object.assign({},f.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:r,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:a,paddingInlineEnd:l},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,p.unit)(i)} ${(0,p.unit)(n)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,v.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var y=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let x=e=>{let u,{prefixCls:m,title:p,extra:f,column:h,colon:v=!0,bordered:x,layout:C,children:O,className:j,rootClassName:w,style:k,size:S,labelStyle:E,contentStyle:N,styles:T,items:z,classNames:B}=e,P=y(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:M,direction:R,className:H,style:L,classNames:I,styles:q}=(0,l.useComponentConfig)("descriptions"),W=M("descriptions",m),A=(0,i.default)(),G=t.useMemo(()=>{var e;return"number"==typeof h?h:null!=(e=(0,a.matchScreen)(A,Object.assign(Object.assign({},o),h)))?e:3},[A,h]),X=(u=t.useMemo(()=>z||(0,d.default)(O).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[z,O]),t.useMemo(()=>u.map(e=>{var{span:t}=e,r=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},r),{filled:!0}):Object.assign(Object.assign({},r),{span:"number"==typeof t?t:(0,a.matchScreen)(A,t)})}),[u,A])),F=(0,n.default)(S),D=((e,r)=>{let[a,l]=(0,t.useMemo)(()=>{let t,a,l,n;return t=[],a=[],l=!1,n=0,r.filter(e=>e).forEach(r=>{let{filled:i}=r,o=g(r,["filled"]);if(i){a.push(o),t.push(a),a=[],n=0;return}let s=e-n;(n+=r.span||1)>=e?(n>e?(l=!0,a.push(Object.assign(Object.assign({},o),{span:s}))):a.push(o),t.push(a),a=[],n=0):a.push(o)}),a.length>0&&t.push(a),[t=t.map(t=>{let r=t.reduce((e,t)=>e+(t.span||1),0);if(r({labelStyle:E,contentStyle:N,styles:{content:Object.assign(Object.assign({},q.content),null==T?void 0:T.content),label:Object.assign(Object.assign({},q.label),null==T?void 0:T.label)},classNames:{label:(0,r.default)(I.label,null==B?void 0:B.label),content:(0,r.default)(I.content,null==B?void 0:B.content)}}),[E,N,T,B,I,q]);return _(t.createElement(s.Provider,{value:V},t.createElement("div",Object.assign({className:(0,r.default)(W,H,I.root,null==B?void 0:B.root,{[`${W}-${F}`]:F&&"default"!==F,[`${W}-bordered`]:!!x,[`${W}-rtl`]:"rtl"===R},j,w,Y,K),style:Object.assign(Object.assign(Object.assign(Object.assign({},L),q.root),null==T?void 0:T.root),k)},P),(p||f)&&t.createElement("div",{className:(0,r.default)(`${W}-header`,I.header,null==B?void 0:B.header),style:Object.assign(Object.assign({},q.header),null==T?void 0:T.header)},p&&t.createElement("div",{className:(0,r.default)(`${W}-title`,I.title,null==B?void 0:B.title),style:Object.assign(Object.assign({},q.title),null==T?void 0:T.title)},p),f&&t.createElement("div",{className:(0,r.default)(`${W}-extra`,I.extra,null==B?void 0:B.extra),style:Object.assign(Object.assign({},q.extra),null==T?void 0:T.extra)},f)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,D.map((e,r)=>t.createElement(b,{key:r,index:r,colon:v,prefixCls:W,vertical:"vertical"===C,bordered:x,row:e}))))))))};x.Item=({children:e})=>e,e.s(["Descriptions",0,x],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let 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:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var l=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(l.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ExclamationCircleOutlined",0,n],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(242064),n=e.i(517455),i=e.i(185793),o=e.i(721369),s=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let d=e=>{var{prefixCls:a,className:n,hoverable:i=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("card",a),g=(0,r.default)(`${c}-grid`,n,{[`${c}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},o,{className:g}))};e.i(296059);var c=e.i(915654),g=e.i(183293),u=e.i(246422),m=e.i(838378);let b=(0,u.genStyleHooks)("Card",e=>{let t=(0,m.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:r,cardHeadPadding:a,colorBorderSecondary:l,boxShadowTertiary:n,bodyPadding:i,extraColor:o}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:n},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:a,headerPadding:l,tabsMarginBottom:n}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:`0 ${(0,c.unit)(l)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`},(0,g.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},g.textEllipsis),{[` + > ${r}-typography, + > ${r}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:n,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:i,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:a,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${(0,c.unit)(l)} 0 0 0 ${r}, + 0 ${(0,c.unit)(l)} 0 0 ${r}, + ${(0,c.unit)(l)} ${(0,c.unit)(l)} 0 0 ${r}, + ${(0,c.unit)(l)} 0 0 0 ${r} inset, + 0 ${(0,c.unit)(l)} 0 0 ${r} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:a}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:r,actionsLiMargin:a,cardActionsIconSize:l,colorBorderSecondary:n,actionsBg:i}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:i,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${n}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,g.clearFix)()),{"& > li":{margin:a,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:l,lineHeight:(0,c.unit)(e.calc(l).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${n}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,g.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},g.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${l}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:r}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:a}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:r,headerPadding:a,bodyPadding:l}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(a)}`,background:r,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(l)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:r,headerPaddingSM:a,headerHeightSM:l,headerFontSizeSM:n}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:l,padding:`0 ${(0,c.unit)(a)}`,fontSize:n,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:r}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,r;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(r=e.headerPadding)?r:e.paddingLG}});var p=e.i(792812),f=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let h=e=>{let{actionClasses:r,actions:a=[],actionStyle:l}=e;return t.createElement("ul",{className:r,style:l},a.map((e,r)=>{let l=`action-${r}`;return t.createElement("li",{style:{width:`${100/a.length}%`},key:l},t.createElement("span",null,e))}))},v=t.forwardRef((e,s)=>{let c,{prefixCls:g,className:u,rootClassName:m,style:v,extra:$,headStyle:y={},bodyStyle:x={},title:C,loading:O,bordered:j,variant:w,size:k,type:S,cover:E,actions:N,tabList:T,children:z,activeTabKey:B,defaultActiveTabKey:P,tabBarExtraContent:M,hoverable:R,tabProps:H={},classNames:L,styles:I}=e,q=f(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:W,direction:A,card:G}=t.useContext(l.ConfigContext),[X]=(0,p.default)("card",w,j),F=e=>{var t;return(0,r.default)(null==(t=null==G?void 0:G.classNames)?void 0:t[e],null==L?void 0:L[e])},D=e=>{var t;return Object.assign(Object.assign({},null==(t=null==G?void 0:G.styles)?void 0:t[e]),null==I?void 0:I[e])},_=t.useMemo(()=>{let e=!1;return t.Children.forEach(z,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[z]),Y=W("card",g),[K,V,U]=b(Y),Q=t.createElement(i.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},z),J=void 0!==B,Z=Object.assign(Object.assign({},H),{[J?"activeKey":"defaultActiveKey"]:J?B:P,tabBarExtraContent:M}),ee=(0,n.default)(k),et=ee&&"default"!==ee?ee:"large",er=T?t.createElement(o.default,Object.assign({size:et},Z,{className:`${Y}-head-tabs`,onChange:t=>{var r;null==(r=e.onTabChange)||r.call(e,t)},items:T.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(C||$||er){let e=(0,r.default)(`${Y}-head`,F("header")),a=(0,r.default)(`${Y}-head-title`,F("title")),l=(0,r.default)(`${Y}-extra`,F("extra")),n=Object.assign(Object.assign({},y),D("header"));c=t.createElement("div",{className:e,style:n},t.createElement("div",{className:`${Y}-head-wrapper`},C&&t.createElement("div",{className:a,style:D("title")},C),$&&t.createElement("div",{className:l,style:D("extra")},$)),er)}let ea=(0,r.default)(`${Y}-cover`,F("cover")),el=E?t.createElement("div",{className:ea,style:D("cover")},E):null,en=(0,r.default)(`${Y}-body`,F("body")),ei=Object.assign(Object.assign({},x),D("body")),eo=t.createElement("div",{className:en,style:ei},O?Q:z),es=(0,r.default)(`${Y}-actions`,F("actions")),ed=(null==N?void 0:N.length)?t.createElement(h,{actionClasses:es,actionStyle:D("actions"),actions:N}):null,ec=(0,a.default)(q,["onTabChange"]),eg=(0,r.default)(Y,null==G?void 0:G.className,{[`${Y}-loading`]:O,[`${Y}-bordered`]:"borderless"!==X,[`${Y}-hoverable`]:R,[`${Y}-contain-grid`]:_,[`${Y}-contain-tabs`]:null==T?void 0:T.length,[`${Y}-${ee}`]:ee,[`${Y}-type-${S}`]:!!S,[`${Y}-rtl`]:"rtl"===A},u,m,V,U),eu=Object.assign(Object.assign({},null==G?void 0:G.style),v);return K(t.createElement("div",Object.assign({ref:s},ec,{className:eg,style:eu}),c,el,eo,ed))});var $=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};v.Grid=d,v.Meta=e=>{let{prefixCls:a,className:n,avatar:i,title:o,description:s}=e,d=$(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(l.ConfigContext),g=c("card",a),u=(0,r.default)(`${g}-meta`,n),m=i?t.createElement("div",{className:`${g}-meta-avatar`},i):null,b=o?t.createElement("div",{className:`${g}-meta-title`},o):null,p=s?t.createElement("div",{className:`${g}-meta-description`},s):null,f=b||p?t.createElement("div",{className:`${g}-meta-detail`},b,p):null;return t.createElement("div",Object.assign({},d,{className:u}),m,f)},e.s(["Card",0,v],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),r=e.i(560445),a=e.i(175712),l=e.i(869216),n=e.i(311451),i=e.i(212931),o=e.i(898586);e.i(296059);var s=e.i(868297),d=e.i(732961),c=e.i(289882),g=e.i(170517),u=e.i(628882),m=e.i(320890),b=e.i(104458),p=e.i(722319),f=e.i(8398),h=e.i(279728);e.i(765846);var v=e.i(602716),$=e.i(328052);e.i(262370);var y=e.i(135551);let x=(e,t)=>new y.FastColor(e).setA(t).toRgbString(),C=(e,t)=>new y.FastColor(e).lighten(t).toHexString(),O=e=>{let t=(0,v.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},j=(e,t)=>{let r=e||"#000",a=t||"#fff";return{colorBgBase:r,colorTextBase:a,colorText:x(a,.85),colorTextSecondary:x(a,.65),colorTextTertiary:x(a,.45),colorTextQuaternary:x(a,.25),colorFill:x(a,.18),colorFillSecondary:x(a,.12),colorFillTertiary:x(a,.08),colorFillQuaternary:x(a,.04),colorBgSolid:x(a,.95),colorBgSolidHover:x(a,1),colorBgSolidActive:x(a,.9),colorBgElevated:C(r,12),colorBgContainer:C(r,8),colorBgLayout:C(r,0),colorBgSpotlight:C(r,26),colorBgBlur:x(a,.04),colorBorder:C(r,26),colorBorderSecondary:C(r,19)}},w={defaultSeed:m.defaultConfig.token,useToken:function(){let[e,t,r]=(0,b.useToken)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:p.default,darkAlgorithm:(e,t)=>{let r=Object.keys(g.defaultPresetColors).map(t=>{let r=(0,v.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,a,l)=>(e[`${t}-${l+1}`]=r[l],e[`${t}${l+1}`]=r[l],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),a=null!=t?t:(0,p.default)(e),l=(0,$.default)(e,{generateColorPalettes:O,generateNeutralColorPalettes:j});return Object.assign(Object.assign(Object.assign(Object.assign({},a),r),l),{colorPrimaryBg:l.colorPrimaryBorder,colorPrimaryBgHover:l.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,p.default)(e),a=r.fontSizeSM,l=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,a=r-2;return{sizeXXL:t*(a+10),sizeXL:t*(a+6),sizeLG:t*(a+2),sizeMD:t*(a+2),sizeMS:t*(a+1),size:t*a,sizeSM:t*a,sizeXS:t*(a-1),sizeXXS:t*(a-1)}}(null!=t?t:e)),(0,h.default)(a)),{controlHeight:l}),(0,f.default)(Object.assign(Object.assign({},r),{controlHeight:l})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):c.default,r=Object.assign(Object.assign({},g.default),null==e?void 0:e.token);return(0,d.getComputedToken)(r,{override:null==e?void 0:e.token},t,u.default)},defaultConfig:m.defaultConfig,_internalContext:m.DesignTokenContext};e.s(["theme",0,w],368869);var k=e.i(270377),S=e.i(271645);function E({isOpen:e,title:s,alertMessage:d,message:c,resourceInformationTitle:g,resourceInformation:u,onCancel:m,onOk:b,confirmLoading:p,requiredConfirmation:f}){let{Title:h,Text:v}=o.Typography,{token:$}=w.useToken(),[y,x]=(0,S.useState)("");return(0,S.useEffect)(()=>{e&&x("")},[e]),(0,t.jsx)(i.Modal,{title:s,open:e,onOk:b,onCancel:m,confirmLoading:p,okText:p?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!f&&y!==f||p},cancelButtonProps:{disabled:p},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(r.Alert,{message:d,type:"warning"}),(0,t.jsx)(a.Card,{title:g,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder}},style:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder},children:(0,t.jsx)(l.Descriptions,{column:1,size:"small",children:u&&u.map(({label:e,value:r,...a})=>(0,t.jsx)(l.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(v,{...a,children:r??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(v,{children:c})}),f&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(v,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(v,{children:"Type "}),(0,t.jsx)(v,{strong:!0,type:"danger",children:f}),(0,t.jsx)(v,{children:" to confirm deletion:"})]}),(0,t.jsx)(n.Input,{value:y,onChange:e=>x(e.target.value),placeholder:f,className:"rounded-md",prefix:(0,t.jsx)(k.ExclamationCircleOutlined,{style:{color:$.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>E],127952)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9bfe1d85217d0efc.js b/litellm/proxy/_experimental/out/_next/static/chunks/9bfe1d85217d0efc.js new file mode 100644 index 0000000000..e2eca3ea56 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/9bfe1d85217d0efc.js @@ -0,0 +1,8 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},94629,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),l=e.i(444755),n=e.i(673706),i=e.i(95779);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"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},c={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:""}},u=(0,n.makeClassName)("Icon"),m=r.default.forwardRef((e,m)=>{let{icon:g,variant:b="simple",tooltip:f,size:h=o.Sizes.SM,color:p,className:C}=e,k=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),x=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.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,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.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,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,n.getColorClassNames)(t,i.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(b,p),{tooltipProps:w,getReferenceProps:v}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,n.mergeRefs)([m,w.refs.setReference]),className:(0,l.tremorTwMerge)(u("root"),"inline-flex shrink-0 items-center justify-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,c[b].rounded,c[b].border,c[b].shadow,c[b].ring,s[h].paddingX,s[h].paddingY,C)},v,k),r.default.createElement(a.default,Object.assign({text:f},w)),r.default.createElement(g,{className:(0,l.tremorTwMerge)(u("icon"),"shrink-0",d[h].height,d[h].width)}))});m.displayName="Icon",e.s(["default",()=>m],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.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.s(["PencilAltIcon",0,r],591935)},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var o=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(o.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),o=e.i(529681);let l=e=>{let{prefixCls:a,className:o,style:l,size:n,shape:i}=e,s=(0,r.default)({[`${a}-lg`]:"large"===n,[`${a}-sm`]:"small"===n}),d=(0,r.default)({[`${a}-circle`]:"circle"===i,[`${a}-square`]:"square"===i,[`${a}-round`]:"round"===i}),c=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(a,s,d,o),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var n=e.i(694758),i=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,i.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),b=e=>Object.assign({width:e},u(e)),f=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},h=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),p=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:o,skeletonButtonCls:l,skeletonInputCls:n,skeletonImageCls:i,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:p,padding:C,marginSM:k,borderRadius:x,titleHeight:w,blockRadius:v,paragraphLiHeight:N,controlHeightXS:y,paragraphMarginTop:j}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:C,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:p},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:w,background:p,borderRadius:v,[`+ ${o}`]:{marginBlockStart:u}},[o]:{padding:0,"> li":{width:"100%",height:N,listStyle:"none",background:p,borderRadius:v,"+ li":{marginBlockStart:y}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${o} > li`]:{borderRadius:x}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:k,[`+ ${o}`]:{marginBlockStart:j}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:t,width:i(a).mul(2).equal(),minWidth:i(a).mul(2).equal()},h(a,i))},f(e,a,r)),{[`${r}-lg`]:Object.assign({},h(o,i))}),f(e,o,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},h(l,i))}),f(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(o)),[`${t}${t}-sm`]:Object.assign({},m(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},g(t,i)),[`${a}-lg`]:Object.assign({},g(o,i)),[`${a}-sm`]:Object.assign({},g(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:o,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:o},b(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},b(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${o} > li, + ${r}, + ${l}, + ${n}, + ${i} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,d.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),C=e=>{let{prefixCls:a,className:o,style:l,rows:n=0}=e,i=Array.from({length:n}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,o),style:l},i)},k=({prefixCls:e,className:a,width:o,style:l})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:o},l)});function x(e){return e&&"object"==typeof e?e:{}}let w=e=>{let{prefixCls:o,loading:n,className:i,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:b,round:f}=e,{getPrefixCls:h,direction:w,className:v,style:N}=(0,a.useComponentConfig)("skeleton"),y=h("skeleton",o),[j,$,T]=p(y);if(n||!("loading"in e)){let e,a,o=!!u,n=!!m,c=!!g;if(o){let r=Object.assign(Object.assign({prefixCls:`${y}-avatar`},n&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),x(u));e=t.createElement("div",{className:`${y}-header`},t.createElement(l,Object.assign({},r)))}if(n||c){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${y}-title`},!o&&c?{width:"38%"}:o&&c?{width:"50%"}:{}),x(m));e=t.createElement(k,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},(e={},o&&n||(e.width="61%"),!o&&n?e.rows=3:e.rows=2,e)),x(g));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${y}-content`},e,r)}let h=(0,r.default)(y,{[`${y}-with-avatar`]:o,[`${y}-active`]:b,[`${y}-rtl`]:"rtl"===w,[`${y}-round`]:f},v,i,s,$,T);return j(t.createElement("div",{className:h,style:Object.assign(Object.assign({},N),d)},e,a))}return null!=c?c:null};w.Button=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",n),[b,f,h]=p(g),C=(0,o.default)(e,["prefixCls"]),k=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,f,h);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${g}-button`,size:u},C))))},w.Avatar=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",n),[b,f,h]=p(g),C=(0,o.default)(e,["prefixCls","className"]),k=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},i,s,f,h);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},C))))},w.Input=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",n),[b,f,h]=p(g),C=(0,o.default)(e,["prefixCls"]),k=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,f,h);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${g}-input`,size:u},C))))},w.Image=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",o),[u,m,g]=p(c),b=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},l,n,m,g);return u(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${c}-image`,l),style:i},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${c}-image-path`})))))},w.Node=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",o),[m,g,b]=p(u),f=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,l,n,b);return m(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${u}-image`,l),style:i},d)))},e.s(["default",0,w],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let o=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],l=e=>({_s:e,status:o[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),n=e=>e?6:5,i=(e,t,r,a,o)=>{clearTimeout(a.current);let n=l(e);t(n),r.current=n,o&&o({current:n})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let u=e=>{var r=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.default.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 m=e.i(95779);let g={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"}},b=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,m.colorPalette.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},f=(0,c.makeClassName)("Button"),h=({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:l,transitionStatus:n})=>{let i=l?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(u,{className:(0,d.tremorTwMerge)(f("icon"),"animate-spin shrink-0",i,m.default,m[n]),style:{transition:"width 150ms"}}):a.default.createElement(o,{className:(0,d.tremorTwMerge)(f("icon"),"shrink-0",t,i)})},p=a.default.forwardRef((e,o)=>{let{icon:u,iconPosition:m=s.HorizontalPositions.Left,size:p=s.Sizes.SM,color:C,variant:k="primary",disabled:x,loading:w=!1,loadingText:v,children:N,tooltip:y,className:j}=e,$=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),T=w||x,E=void 0!==u||w,O=w&&v,M=!(!N&&!O),R=(0,d.tremorTwMerge)(g[p].height,g[p].width),z="light"!==k?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",B=b(k,C),P=("light"!==k?{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"}})[p],{tooltipProps:S,getReferenceProps:q}=(0,r.useTooltip)(300),[H,_]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[g,b]=(0,a.useState)(()=>l(d?2:n(c))),f=(0,a.useRef)(g),h=(0,a.useRef)(0),[p,C]="object"==typeof s?[s.enter,s.exit]:[s,s],k=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return n(t)}})(f.current._s,u);e&&i(e,b,f,h,m)},[m,u]);return[g,(0,a.useCallback)(a=>{let l=e=>{switch(i(e,b,f,h,m),e){case 1:p>=0&&(h.current=((...e)=>setTimeout(...e))(k,p));break;case 4:C>=0&&(h.current=((...e)=>setTimeout(...e))(k,C));break;case 0:case 3:h.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},s=f.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||l(e?+!r:2):s&&l(t?o?3:4:n(u))},[k,m,e,t,r,o,p,C,u]),k]})({timeout:50});return(0,a.useEffect)(()=>{_(w)},[w]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([o,S.refs.setReference]),className:(0,d.tremorTwMerge)(f("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",z,P.paddingX,P.paddingY,P.fontSize,B.textColor,B.bgColor,B.borderColor,B.hoverBorderColor,T?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(b(k,C).hoverTextColor,b(k,C).hoverBgColor,b(k,C).hoverBorderColor),j),disabled:T},q,$),a.default.createElement(r.default,Object.assign({text:y},S)),E&&m!==s.HorizontalPositions.Right?a.default.createElement(h,{loading:w,iconSize:R,iconPosition:m,Icon:u,transitionStatus:H.status,needMargin:M}):null,O||N?a.default.createElement("span",{className:(0,d.tremorTwMerge)(f("text"),"text-tremor-default whitespace-nowrap")},O?v:N):null,E&&m===s.HorizontalPositions.Right?a.default.createElement(h,{loading:w,iconSize:R,iconPosition:m,Icon:u,transitionStatus:H.status,needMargin:M}):null)});p.displayName="Button",e.s(["Button",()=>p],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("Table"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(o("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),n))});l.displayName="Table",e.s(["Table",()=>l],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHead"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),n))});l.displayName="TableHead",e.s(["TableHead",()=>l],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHeaderCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},s),n))});l.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>l],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableBody"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),n))});l.displayName="TableBody",e.s(["TableBody",()=>l],942232)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableRow"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("row"),i)},s),n))});l.displayName="TableRow",e.s(["TableRow",()=>l],496020)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),n))});l.displayName="TableCell",e.s(["TableCell",()=>l],977572)},68155,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,r],68155)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},871943,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943)},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},207670,e=>{"use strict";function t(){for(var e,t,r=0,a="",o=arguments.length;rt,"default",0,t])},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},991124,e=>{"use strict";let t=(0,e.i(475254).default)("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"}]]);e.s(["default",()=>t])},678784,678745,e=>{"use strict";let t=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},54943,e=>{"use strict";let t=(0,e.i(475254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",()=>t])},367240,555436,e=>{"use strict";let t=(0,e.i(475254).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>t],367240);var r=e.i(54943);e.s(["Search",()=>r.default],555436)},655913,38419,78334,e=>{"use strict";var t=e.i(843476),r=e.i(115504),a=e.i(311451),o=e.i(374009),l=e.i(271645);e.s(["FilterInput",0,({placeholder:e,value:n,onChange:i,icon:s,className:d})=>{let[c,u]=(0,l.useState)(n);(0,l.useEffect)(()=>{u(n)},[n]);let m=(0,l.useMemo)(()=>(0,o.default)(e=>i(e),300),[i]);(0,l.useEffect)(()=>()=>{m.cancel()},[m]);let g=(0,l.useCallback)(e=>{let t=e.target.value;u(t),m(t)},[m]);return(0,t.jsx)(a.Input,{placeholder:e,value:c,onChange:g,prefix:s?(0,t.jsx)(s,{size:16,className:"text-gray-500"}):void 0,className:(0,r.cx)("w-64",d)})}],655913);var n=e.i(906579),i=e.i(464571);let s=(0,e.i(475254).default)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);e.s(["FiltersButton",0,({onClick:e,active:r,hasActiveFilters:a,label:o="Filters"})=>(0,t.jsx)(n.Badge,{color:"blue",dot:a,children:(0,t.jsx)(i.Button,{type:"default",onClick:e,icon:(0,t.jsx)(s,{size:16}),className:r?"bg-gray-100":"",children:o})})],38419);var d=e.i(367240);e.s(["ResetFiltersButton",0,({onClick:e,label:r="Reset Filters"})=>(0,t.jsx)(i.Button,{type:"default",onClick:e,icon:(0,t.jsx)(d.RotateCcw,{size:16}),children:r})],78334)},846753,e=>{"use strict";let t=(0,e.i(475254).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["default",()=>t])},284614,e=>{"use strict";var t=e.i(846753);e.s(["User",()=>t.default])},502275,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,r],502275)},114600,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),o=e.i(271645);let l=(0,a.makeClassName)("Divider"),n=o.default.forwardRef((e,a)=>{let{className:n,children:i}=e,s=(0,t.__rest)(e,["className","children"]);return o.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(l("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",n)},s),i?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),o.default.createElement("div",{className:(0,r.tremorTwMerge)("text-inherit whitespace-nowrap")},i),o.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):o.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});n.displayName="Divider",e.s(["Divider",()=>n],114600)},78085,e=>{"use strict";var t=e.i(290571),r=e.i(103471),a=e.i(888288),o=e.i(271645),l=e.i(444755),n=e.i(673706);let i=(0,n.makeClassName)("Textarea"),s=o.default.forwardRef((e,s)=>{let{value:d,defaultValue:c="",placeholder:u="Type...",error:m=!1,errorMessage:g,disabled:b=!1,className:f,onChange:h,onValueChange:p,autoHeight:C=!1}=e,k=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[x,w]=(0,a.default)(c,d),v=(0,o.useRef)(null),N=(0,r.hasValue)(x);return(0,o.useEffect)(()=>{let e=v.current;if(C&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[C,v,x]),o.default.createElement(o.default.Fragment,null,o.default.createElement("textarea",Object.assign({ref:(0,n.mergeRefs)([v,s]),value:x,placeholder:u,disabled:b,className:(0,l.tremorTwMerge)(i("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,r.getSelectButtonColors)(N,b,m),b?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",f),"data-testid":"text-area",onChange:e=>{null==h||h(e),w(e.target.value),null==p||p(e.target.value)}},k)),m&&g?o.default.createElement("p",{className:(0,l.tremorTwMerge)(i("errorMessage"),"text-sm text-red-500 mt-1")},g):null)});s.displayName="Textarea",e.s(["Textarea",()=>s],78085)},198134,e=>{"use strict";var t=e.i(843476),r=e.i(910119),a=e.i(135214),o=e.i(214541),l=e.i(109799),n=e.i(708347),i=e.i(271645);e.s(["default",0,()=>{let{accessToken:e,userRole:s,userId:d,token:c}=(0,a.default)(),[u,m]=(0,i.useState)([]),{teams:g}=(0,o.default)(),{data:b,isLoading:f}=(0,l.useOrganizations)(),h=(0,i.useMemo)(()=>{if(!d||!s||(0,n.isProxyAdminRole)(s))return null;if(f||!b)return;let e=b.filter(e=>e.members?.some(e=>e.user_id===d&&"org_admin"===e.user_role)).map(e=>({organization_id:e.organization_id,organization_alias:e.organization_alias}));return e.length>0?e:null},[d,b,s,f]);return(0,t.jsx)(r.default,{accessToken:e,token:c,keys:u,userRole:s,userID:d,teams:g,setKeys:m,orgAdminOrgIds:h})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9ce7fbf2fad5f6f4.js b/litellm/proxy/_experimental/out/_next/static/chunks/9ce7fbf2fad5f6f4.js new file mode 100644 index 0000000000..fdc7738c32 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/9ce7fbf2fad5f6f4.js @@ -0,0 +1,17 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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"};var l=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(l.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["default",0,n],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(529681);let n=e=>{let{prefixCls:a,className:l,style:n,size:i,shape:o}=e,s=(0,r.default)({[`${a}-lg`]:"large"===i,[`${a}-sm`]:"small"===i}),d=(0,r.default)({[`${a}-circle`]:"circle"===o,[`${a}-square`]:"square"===o,[`${a}-round`]:"round"===o}),c=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(a,s,d,l),style:Object.assign(Object.assign({},c),n)})};e.i(296059);var i=e.i(694758),o=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),g=e=>({height:e,lineHeight:(0,o.unit)(e)}),u=e=>Object.assign({width:e},g(e)),m=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},g(e)),b=e=>Object.assign({width:e},g(e)),p=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},f=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},g(e)),h=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:l,skeletonButtonCls:n,skeletonInputCls:i,skeletonImageCls:o,controlHeight:s,controlHeightLG:d,controlHeightSM:g,gradientFromColor:h,padding:v,marginSM:$,borderRadius:y,titleHeight:x,blockRadius:O,paragraphLiHeight:C,controlHeightXS:j,paragraphMarginTop:w}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:v,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:h},u(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},u(d)),[`${r}-sm`]:Object.assign({},u(g))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:x,background:h,borderRadius:O,[`+ ${l}`]:{marginBlockStart:g}},[l]:{padding:0,"> li":{width:"100%",height:C,listStyle:"none",background:h,borderRadius:O,"+ li":{marginBlockStart:j}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${l} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:$,[`+ ${l}`]:{marginBlockStart:w}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:l,controlHeightSM:n,gradientFromColor:i,calc:o}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:o(a).mul(2).equal(),minWidth:o(a).mul(2).equal()},f(a,o))},p(e,a,r)),{[`${r}-lg`]:Object.assign({},f(l,o))}),p(e,l,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},f(n,o))}),p(e,n,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:l,controlHeightSM:n}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},u(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},u(l)),[`${t}${t}-sm`]:Object.assign({},u(n))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:l,controlHeightSM:n,gradientFromColor:i,calc:o}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},m(t,o)),[`${a}-lg`]:Object.assign({},m(l,o)),[`${a}-sm`]:Object.assign({},m(n,o))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:l,calc:n}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:l},b(n(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},b(r)),{maxWidth:n(r).mul(4).equal(),maxHeight:n(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[n]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${l} > li, + ${r}, + ${n}, + ${i}, + ${o} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"})}}})((0,d.mergeToken)(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))},e=>{let{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),v=e=>{let{prefixCls:a,className:l,style:n,rows:i=0}=e,o=Array.from({length:i}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:n},o)},$=({prefixCls:e,className:a,width:l,style:n})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},n)});function y(e){return e&&"object"==typeof e?e:{}}let x=e=>{let{prefixCls:l,loading:i,className:o,rootClassName:s,style:d,children:c,avatar:g=!1,title:u=!0,paragraph:m=!0,active:b,round:p}=e,{getPrefixCls:f,direction:x,className:O,style:C}=(0,a.useComponentConfig)("skeleton"),j=f("skeleton",l),[w,k,S]=h(j);if(i||!("loading"in e)){let e,a,l=!!g,i=!!u,c=!!m;if(l){let r=Object.assign(Object.assign({prefixCls:`${j}-avatar`},i&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),y(g));e=t.createElement("div",{className:`${j}-header`},t.createElement(n,Object.assign({},r)))}if(i||c){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${j}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),y(u));e=t.createElement($,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${j}-paragraph`},(e={},l&&i||(e.width="61%"),!l&&i?e.rows=3:e.rows=2,e)),y(m));r=t.createElement(v,Object.assign({},a))}a=t.createElement("div",{className:`${j}-content`},e,r)}let f=(0,r.default)(j,{[`${j}-with-avatar`]:l,[`${j}-active`]:b,[`${j}-rtl`]:"rtl"===x,[`${j}-round`]:p},O,o,s,k,S);return w(t.createElement("div",{className:f,style:Object.assign(Object.assign({},C),d)},e,a))}return null!=c?c:null};x.Button=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,block:c=!1,size:g="default"}=e,{getPrefixCls:u}=t.useContext(a.ConfigContext),m=u("skeleton",i),[b,p,f]=h(m),v=(0,l.default)(e,["prefixCls"]),$=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:d,[`${m}-block`]:c},o,s,p,f);return b(t.createElement("div",{className:$},t.createElement(n,Object.assign({prefixCls:`${m}-button`,size:g},v))))},x.Avatar=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,shape:c="circle",size:g="default"}=e,{getPrefixCls:u}=t.useContext(a.ConfigContext),m=u("skeleton",i),[b,p,f]=h(m),v=(0,l.default)(e,["prefixCls","className"]),$=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:d},o,s,p,f);return b(t.createElement("div",{className:$},t.createElement(n,Object.assign({prefixCls:`${m}-avatar`,shape:c,size:g},v))))},x.Input=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,block:c,size:g="default"}=e,{getPrefixCls:u}=t.useContext(a.ConfigContext),m=u("skeleton",i),[b,p,f]=h(m),v=(0,l.default)(e,["prefixCls"]),$=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:d,[`${m}-block`]:c},o,s,p,f);return b(t.createElement("div",{className:$},t.createElement(n,Object.assign({prefixCls:`${m}-input`,size:g},v))))},x.Image=e=>{let{prefixCls:l,className:n,rootClassName:i,style:o,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[g,u,m]=h(c),b=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},n,i,u,m);return g(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${c}-image`,n),style:o},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},t.createElement("title",null,"Image placeholder"),t.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:`${c}-image-path`})))))},x.Node=e=>{let{prefixCls:l,className:n,rootClassName:i,style:o,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),g=c("skeleton",l),[u,m,b]=h(g),p=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:s},m,n,i,b);return u(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${g}-image`,n),style:o},d)))},e.s(["default",0,x],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],n=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,o=(e,t,r,a,l)=>{clearTimeout(a.current);let i=n(e);t(i),r.current=i,l&&l({current:i})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let g=e=>{var r=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.default.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 u=e.i(95779);let m={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"}},b=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,u.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,u.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,u.colorPalette.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,c.getColorClassNames)(t,u.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,u.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,u.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,c.makeClassName)("Button"),f=({loading:e,iconSize:t,iconPosition:r,Icon:l,needMargin:n,transitionStatus:i})=>{let o=n?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),u={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(g,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",o,u.default,u[i]),style:{transition:"width 150ms"}}):a.default.createElement(l,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,o)})},h=a.default.forwardRef((e,l)=>{let{icon:g,iconPosition:u=s.HorizontalPositions.Left,size:h=s.Sizes.SM,color:v,variant:$="primary",disabled:y,loading:x=!1,loadingText:O,children:C,tooltip:j,className:w}=e,k=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),S=x||y,E=void 0!==g||x,N=x&&O,T=!(!C&&!N),z=(0,d.tremorTwMerge)(m[h].height,m[h].width),B="light"!==$?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",M=b($,v),P=("light"!==$?{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"}})[h],{tooltipProps:R,getReferenceProps:L}=(0,r.useTooltip)(300),[H,I]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:l,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:g,onStateChange:u}={})=>{let[m,b]=(0,a.useState)(()=>n(d?2:i(c))),p=(0,a.useRef)(m),f=(0,a.useRef)(0),[h,v]="object"==typeof s?[s.enter,s.exit]:[s,s],$=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(p.current._s,g);e&&o(e,b,p,f,u)},[u,g]);return[m,(0,a.useCallback)(a=>{let n=e=>{switch(o(e,b,p,f,u),e){case 1:h>=0&&(f.current=((...e)=>setTimeout(...e))($,h));break;case 4:v>=0&&(f.current=((...e)=>setTimeout(...e))($,v));break;case 0:case 3:f.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||n(e+1)},0)}},s=p.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||n(e?+!r:2):s&&n(t?l?3:4:i(g))},[$,u,e,t,r,l,h,v,g]),$]})({timeout:50});return(0,a.useEffect)(()=>{I(x)},[x]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([l,R.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",B,P.paddingX,P.paddingY,P.fontSize,M.textColor,M.bgColor,M.borderColor,M.hoverBorderColor,S?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(b($,v).hoverTextColor,b($,v).hoverBgColor,b($,v).hoverBorderColor),w),disabled:S},L,k),a.default.createElement(r.default,Object.assign({text:j},R)),E&&u!==s.HorizontalPositions.Right?a.default.createElement(f,{loading:x,iconSize:z,iconPosition:u,Icon:g,transitionStatus:H.status,needMargin:T}):null,N||C?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},N?O:C):null,E&&u===s.HorizontalPositions.Right?a.default.createElement(f,{loading:x,iconSize:z,iconPosition:u,Icon:g,transitionStatus:H.status,needMargin:T}):null)});h.displayName="Button",e.s(["Button",()=>h],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",o)},r.default.createElement("table",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});n.displayName="Table",e.s(["Table",()=>n],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",o)},s),i))});n.displayName="TableBody",e.s(["TableBody",()=>n],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",o)},s),i))});n.displayName="TableCell",e.s(["TableCell",()=>n],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",o)},s),i))});n.displayName="TableHead",e.s(["TableHead",()=>n],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",o)},s),i))});n.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>n],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("row"),o)},s),i))});n.displayName="TableRow",e.s(["TableRow",()=>n],496020)},68155,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,r],68155)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},871943,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(908206),l=e.i(242064),n=e.i(517455),i=e.i(150073);let o={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var d=e.i(876556),c=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r},g=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let u=e=>{let{itemPrefixCls:a,component:l,span:n,className:i,style:o,labelStyle:d,contentStyle:c,bordered:g,label:u,content:m,colon:b,type:p,styles:f}=e,{classNames:h}=t.useContext(s),v=Object.assign(Object.assign({},d),null==f?void 0:f.label),$=Object.assign(Object.assign({},c),null==f?void 0:f.content);if(g)return t.createElement(l,{colSpan:n,style:o,className:(0,r.default)(i,{[`${a}-item-${p}`]:"label"===p||"content"===p,[null==h?void 0:h.label]:(null==h?void 0:h.label)&&"label"===p,[null==h?void 0:h.content]:(null==h?void 0:h.content)&&"content"===p})},null!=u&&t.createElement("span",{style:v},u),null!=m&&t.createElement("span",{style:$},m));return t.createElement(l,{colSpan:n,style:o,className:(0,r.default)(`${a}-item`,i)},t.createElement("div",{className:`${a}-item-container`},null!=u&&t.createElement("span",{style:v,className:(0,r.default)(`${a}-item-label`,null==h?void 0:h.label,{[`${a}-item-no-colon`]:!b})},u),null!=m&&t.createElement("span",{style:$,className:(0,r.default)(`${a}-item-content`,null==h?void 0:h.content)},m)))};function m(e,{colon:r,prefixCls:a,bordered:l},{component:n,type:i,showLabel:o,showContent:s,labelStyle:d,contentStyle:c,styles:g}){return e.map(({label:e,children:m,prefixCls:b=a,className:p,style:f,labelStyle:h,contentStyle:v,span:$=1,key:y,styles:x},O)=>"string"==typeof n?t.createElement(u,{key:`${i}-${y||O}`,className:p,style:f,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==g?void 0:g.label),h),null==x?void 0:x.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==g?void 0:g.content),v),null==x?void 0:x.content)},span:$,colon:r,component:n,itemPrefixCls:b,bordered:l,label:o?e:null,content:s?m:null,type:i}):[t.createElement(u,{key:`label-${y||O}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==g?void 0:g.label),f),h),null==x?void 0:x.label),span:1,colon:r,component:n[0],itemPrefixCls:b,bordered:l,label:e,type:"label"}),t.createElement(u,{key:`content-${y||O}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==g?void 0:g.content),f),v),null==x?void 0:x.content),span:2*$-1,component:n[1],itemPrefixCls:b,bordered:l,content:m,type:"content"})])}let b=e=>{let r=t.useContext(s),{prefixCls:a,vertical:l,row:n,index:i,bordered:o}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${a}-row`},m(n,e,Object.assign({component:"th",type:"label",showLabel:!0},r))),t.createElement("tr",{key:`content-${i}`,className:`${a}-row`},m(n,e,Object.assign({component:"td",type:"content",showContent:!0},r)))):t.createElement("tr",{key:i,className:`${a}-row`},m(n,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},r)))};e.i(296059);var p=e.i(915654),f=e.i(183293),h=e.i(246422),v=e.i(838378);let $=(0,h.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:r,itemPaddingBottom:a,itemPaddingEnd:l,colonMarginRight:n,colonMarginLeft:i,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,f.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:r}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.padding)} ${(0,p.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:r,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.paddingSM)} ${(0,p.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.paddingXS)} ${(0,p.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:o},[`${t}-title`]:Object.assign(Object.assign({},f.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:r,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:a,paddingInlineEnd:l},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,p.unit)(i)} ${(0,p.unit)(n)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,v.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var y=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let x=e=>{let u,{prefixCls:m,title:p,extra:f,column:h,colon:v=!0,bordered:x,layout:O,children:C,className:j,rootClassName:w,style:k,size:S,labelStyle:E,contentStyle:N,styles:T,items:z,classNames:B}=e,M=y(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:P,direction:R,className:L,style:H,classNames:I,styles:q}=(0,l.useComponentConfig)("descriptions"),W=P("descriptions",m),A=(0,i.default)(),G=t.useMemo(()=>{var e;return"number"==typeof h?h:null!=(e=(0,a.matchScreen)(A,Object.assign(Object.assign({},o),h)))?e:3},[A,h]),X=(u=t.useMemo(()=>z||(0,d.default)(C).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[z,C]),t.useMemo(()=>u.map(e=>{var{span:t}=e,r=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},r),{filled:!0}):Object.assign(Object.assign({},r),{span:"number"==typeof t?t:(0,a.matchScreen)(A,t)})}),[u,A])),F=(0,n.default)(S),D=((e,r)=>{let[a,l]=(0,t.useMemo)(()=>{let t,a,l,n;return t=[],a=[],l=!1,n=0,r.filter(e=>e).forEach(r=>{let{filled:i}=r,o=g(r,["filled"]);if(i){a.push(o),t.push(a),a=[],n=0;return}let s=e-n;(n+=r.span||1)>=e?(n>e?(l=!0,a.push(Object.assign(Object.assign({},o),{span:s}))):a.push(o),t.push(a),a=[],n=0):a.push(o)}),a.length>0&&t.push(a),[t=t.map(t=>{let r=t.reduce((e,t)=>e+(t.span||1),0);if(r({labelStyle:E,contentStyle:N,styles:{content:Object.assign(Object.assign({},q.content),null==T?void 0:T.content),label:Object.assign(Object.assign({},q.label),null==T?void 0:T.label)},classNames:{label:(0,r.default)(I.label,null==B?void 0:B.label),content:(0,r.default)(I.content,null==B?void 0:B.content)}}),[E,N,T,B,I,q]);return _(t.createElement(s.Provider,{value:U},t.createElement("div",Object.assign({className:(0,r.default)(W,L,I.root,null==B?void 0:B.root,{[`${W}-${F}`]:F&&"default"!==F,[`${W}-bordered`]:!!x,[`${W}-rtl`]:"rtl"===R},j,w,Y,K),style:Object.assign(Object.assign(Object.assign(Object.assign({},H),q.root),null==T?void 0:T.root),k)},M),(p||f)&&t.createElement("div",{className:(0,r.default)(`${W}-header`,I.header,null==B?void 0:B.header),style:Object.assign(Object.assign({},q.header),null==T?void 0:T.header)},p&&t.createElement("div",{className:(0,r.default)(`${W}-title`,I.title,null==B?void 0:B.title),style:Object.assign(Object.assign({},q.title),null==T?void 0:T.title)},p),f&&t.createElement("div",{className:(0,r.default)(`${W}-extra`,I.extra,null==B?void 0:B.extra),style:Object.assign(Object.assign({},q.extra),null==T?void 0:T.extra)},f)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,D.map((e,r)=>t.createElement(b,{key:r,index:r,colon:v,prefixCls:W,vertical:"vertical"===O,bordered:x,row:e}))))))))};x.Item=({children:e})=>e,e.s(["Descriptions",0,x],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let 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:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var l=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(l.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ExclamationCircleOutlined",0,n],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(242064),n=e.i(517455),i=e.i(185793),o=e.i(721369),s=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let d=e=>{var{prefixCls:a,className:n,hoverable:i=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("card",a),g=(0,r.default)(`${c}-grid`,n,{[`${c}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},o,{className:g}))};e.i(296059);var c=e.i(915654),g=e.i(183293),u=e.i(246422),m=e.i(838378);let b=(0,u.genStyleHooks)("Card",e=>{let t=(0,m.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:r,cardHeadPadding:a,colorBorderSecondary:l,boxShadowTertiary:n,bodyPadding:i,extraColor:o}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:n},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:a,headerPadding:l,tabsMarginBottom:n}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:`0 ${(0,c.unit)(l)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`},(0,g.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},g.textEllipsis),{[` + > ${r}-typography, + > ${r}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:n,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:i,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:a,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${(0,c.unit)(l)} 0 0 0 ${r}, + 0 ${(0,c.unit)(l)} 0 0 ${r}, + ${(0,c.unit)(l)} ${(0,c.unit)(l)} 0 0 ${r}, + ${(0,c.unit)(l)} 0 0 0 ${r} inset, + 0 ${(0,c.unit)(l)} 0 0 ${r} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:a}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:r,actionsLiMargin:a,cardActionsIconSize:l,colorBorderSecondary:n,actionsBg:i}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:i,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${n}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,g.clearFix)()),{"& > li":{margin:a,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:l,lineHeight:(0,c.unit)(e.calc(l).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${n}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,g.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},g.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${l}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:r}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:a}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:r,headerPadding:a,bodyPadding:l}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(a)}`,background:r,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(l)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:r,headerPaddingSM:a,headerHeightSM:l,headerFontSizeSM:n}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:l,padding:`0 ${(0,c.unit)(a)}`,fontSize:n,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:r}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,r;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(r=e.headerPadding)?r:e.paddingLG}});var p=e.i(792812),f=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let h=e=>{let{actionClasses:r,actions:a=[],actionStyle:l}=e;return t.createElement("ul",{className:r,style:l},a.map((e,r)=>{let l=`action-${r}`;return t.createElement("li",{style:{width:`${100/a.length}%`},key:l},t.createElement("span",null,e))}))},v=t.forwardRef((e,s)=>{let c,{prefixCls:g,className:u,rootClassName:m,style:v,extra:$,headStyle:y={},bodyStyle:x={},title:O,loading:C,bordered:j,variant:w,size:k,type:S,cover:E,actions:N,tabList:T,children:z,activeTabKey:B,defaultActiveTabKey:M,tabBarExtraContent:P,hoverable:R,tabProps:L={},classNames:H,styles:I}=e,q=f(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:W,direction:A,card:G}=t.useContext(l.ConfigContext),[X]=(0,p.default)("card",w,j),F=e=>{var t;return(0,r.default)(null==(t=null==G?void 0:G.classNames)?void 0:t[e],null==H?void 0:H[e])},D=e=>{var t;return Object.assign(Object.assign({},null==(t=null==G?void 0:G.styles)?void 0:t[e]),null==I?void 0:I[e])},_=t.useMemo(()=>{let e=!1;return t.Children.forEach(z,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[z]),Y=W("card",g),[K,U,V]=b(Y),Q=t.createElement(i.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},z),J=void 0!==B,Z=Object.assign(Object.assign({},L),{[J?"activeKey":"defaultActiveKey"]:J?B:M,tabBarExtraContent:P}),ee=(0,n.default)(k),et=ee&&"default"!==ee?ee:"large",er=T?t.createElement(o.default,Object.assign({size:et},Z,{className:`${Y}-head-tabs`,onChange:t=>{var r;null==(r=e.onTabChange)||r.call(e,t)},items:T.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(O||$||er){let e=(0,r.default)(`${Y}-head`,F("header")),a=(0,r.default)(`${Y}-head-title`,F("title")),l=(0,r.default)(`${Y}-extra`,F("extra")),n=Object.assign(Object.assign({},y),D("header"));c=t.createElement("div",{className:e,style:n},t.createElement("div",{className:`${Y}-head-wrapper`},O&&t.createElement("div",{className:a,style:D("title")},O),$&&t.createElement("div",{className:l,style:D("extra")},$)),er)}let ea=(0,r.default)(`${Y}-cover`,F("cover")),el=E?t.createElement("div",{className:ea,style:D("cover")},E):null,en=(0,r.default)(`${Y}-body`,F("body")),ei=Object.assign(Object.assign({},x),D("body")),eo=t.createElement("div",{className:en,style:ei},C?Q:z),es=(0,r.default)(`${Y}-actions`,F("actions")),ed=(null==N?void 0:N.length)?t.createElement(h,{actionClasses:es,actionStyle:D("actions"),actions:N}):null,ec=(0,a.default)(q,["onTabChange"]),eg=(0,r.default)(Y,null==G?void 0:G.className,{[`${Y}-loading`]:C,[`${Y}-bordered`]:"borderless"!==X,[`${Y}-hoverable`]:R,[`${Y}-contain-grid`]:_,[`${Y}-contain-tabs`]:null==T?void 0:T.length,[`${Y}-${ee}`]:ee,[`${Y}-type-${S}`]:!!S,[`${Y}-rtl`]:"rtl"===A},u,m,U,V),eu=Object.assign(Object.assign({},null==G?void 0:G.style),v);return K(t.createElement("div",Object.assign({ref:s},ec,{className:eg,style:eu}),c,el,eo,ed))});var $=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};v.Grid=d,v.Meta=e=>{let{prefixCls:a,className:n,avatar:i,title:o,description:s}=e,d=$(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(l.ConfigContext),g=c("card",a),u=(0,r.default)(`${g}-meta`,n),m=i?t.createElement("div",{className:`${g}-meta-avatar`},i):null,b=o?t.createElement("div",{className:`${g}-meta-title`},o):null,p=s?t.createElement("div",{className:`${g}-meta-description`},s):null,f=b||p?t.createElement("div",{className:`${g}-meta-detail`},b,p):null;return t.createElement("div",Object.assign({},d,{className:u}),m,f)},e.s(["Card",0,v],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),r=e.i(560445),a=e.i(175712),l=e.i(869216),n=e.i(311451),i=e.i(212931),o=e.i(898586);e.i(296059);var s=e.i(868297),d=e.i(732961),c=e.i(289882),g=e.i(170517),u=e.i(628882),m=e.i(320890),b=e.i(104458),p=e.i(722319),f=e.i(8398),h=e.i(279728);e.i(765846);var v=e.i(602716),$=e.i(328052);e.i(262370);var y=e.i(135551);let x=(e,t)=>new y.FastColor(e).setA(t).toRgbString(),O=(e,t)=>new y.FastColor(e).lighten(t).toHexString(),C=e=>{let t=(0,v.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},j=(e,t)=>{let r=e||"#000",a=t||"#fff";return{colorBgBase:r,colorTextBase:a,colorText:x(a,.85),colorTextSecondary:x(a,.65),colorTextTertiary:x(a,.45),colorTextQuaternary:x(a,.25),colorFill:x(a,.18),colorFillSecondary:x(a,.12),colorFillTertiary:x(a,.08),colorFillQuaternary:x(a,.04),colorBgSolid:x(a,.95),colorBgSolidHover:x(a,1),colorBgSolidActive:x(a,.9),colorBgElevated:O(r,12),colorBgContainer:O(r,8),colorBgLayout:O(r,0),colorBgSpotlight:O(r,26),colorBgBlur:x(a,.04),colorBorder:O(r,26),colorBorderSecondary:O(r,19)}},w={defaultSeed:m.defaultConfig.token,useToken:function(){let[e,t,r]=(0,b.useToken)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:p.default,darkAlgorithm:(e,t)=>{let r=Object.keys(g.defaultPresetColors).map(t=>{let r=(0,v.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,a,l)=>(e[`${t}-${l+1}`]=r[l],e[`${t}${l+1}`]=r[l],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),a=null!=t?t:(0,p.default)(e),l=(0,$.default)(e,{generateColorPalettes:C,generateNeutralColorPalettes:j});return Object.assign(Object.assign(Object.assign(Object.assign({},a),r),l),{colorPrimaryBg:l.colorPrimaryBorder,colorPrimaryBgHover:l.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,p.default)(e),a=r.fontSizeSM,l=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,a=r-2;return{sizeXXL:t*(a+10),sizeXL:t*(a+6),sizeLG:t*(a+2),sizeMD:t*(a+2),sizeMS:t*(a+1),size:t*a,sizeSM:t*a,sizeXS:t*(a-1),sizeXXS:t*(a-1)}}(null!=t?t:e)),(0,h.default)(a)),{controlHeight:l}),(0,f.default)(Object.assign(Object.assign({},r),{controlHeight:l})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):c.default,r=Object.assign(Object.assign({},g.default),null==e?void 0:e.token);return(0,d.getComputedToken)(r,{override:null==e?void 0:e.token},t,u.default)},defaultConfig:m.defaultConfig,_internalContext:m.DesignTokenContext};e.s(["theme",0,w],368869);var k=e.i(270377),S=e.i(271645);function E({isOpen:e,title:s,alertMessage:d,message:c,resourceInformationTitle:g,resourceInformation:u,onCancel:m,onOk:b,confirmLoading:p,requiredConfirmation:f}){let{Title:h,Text:v}=o.Typography,{token:$}=w.useToken(),[y,x]=(0,S.useState)("");return(0,S.useEffect)(()=>{e&&x("")},[e]),(0,t.jsx)(i.Modal,{title:s,open:e,onOk:b,onCancel:m,confirmLoading:p,okText:p?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!f&&y!==f||p},cancelButtonProps:{disabled:p},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(r.Alert,{message:d,type:"warning"}),(0,t.jsx)(a.Card,{title:g,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder}},style:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder},children:(0,t.jsx)(l.Descriptions,{column:1,size:"small",children:u&&u.map(({label:e,value:r,...a})=>(0,t.jsx)(l.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(v,{...a,children:r??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(v,{children:c})}),f&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(v,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(v,{children:"Type "}),(0,t.jsx)(v,{strong:!0,type:"danger",children:f}),(0,t.jsx)(v,{children:" to confirm deletion:"})]}),(0,t.jsx)(n.Input,{value:y,onChange:e=>x(e.target.value),placeholder:f,className:"rounded-md",prefix:(0,t.jsx)(k.ExclamationCircleOutlined,{style:{color:$.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>E],127952)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9edb3e10a3bcd754.js b/litellm/proxy/_experimental/out/_next/static/chunks/9edb3e10a3bcd754.js deleted file mode 100644 index 4f2a33acb0..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/9edb3e10a3bcd754.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,743151,(e,t,r)=>{"use strict";function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var a=n(e.r(271645)),l=n(e.r(844343)),i=["text","onCopy","options","children"];function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,i),s=a.default.Children.only(t);return a.default.cloneElement(s,c(c({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var s=e.r(743151).CopyToClipboard;s.CopyToClipboard=s,t.exports=s},645526,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["TeamOutlined",0,l],645526)},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={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"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["RobotOutlined",0,l],983561)},631171,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",()=>t])},621482,e=>{"use strict";var t=e.i(869230),r=e.i(992571),s=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,r.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,r.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:s}=e,a=super.createResult(e,t),{isFetching:l,isRefetching:i,isError:n,isRefetchError:o}=a,c=s.fetchMeta?.fetchMore?.direction,d=n&&"forward"===c,u=l&&"forward"===c,m=n&&"backward"===c,p=l&&"backward"===c;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,r.hasNextPage)(t,s.data),hasPreviousPage:(0,r.hasPreviousPage)(t,s.data),isFetchNextPageError:d,isFetchingNextPage:u,isFetchPreviousPageError:m,isFetchingPreviousPage:p,isRefetchError:o&&!d&&!m,isRefetching:i&&!u&&!p}}},a=e.i(469637);function l(e,t){return(0,a.useBaseQuery)(e,s,t)}e.s(["useInfiniteQuery",()=>l],621482)},270345,e=>{"use strict";var t=e.i(764205);let r=async(e,r,s,a)=>"Admin"!=s&&"Admin Viewer"!=s?await (0,t.teamListCall)(e,a?.organization_id||null,r):await (0,t.teamListCall)(e,a?.organization_id||null);e.s(["fetchTeams",0,r])},785242,e=>{"use strict";var t=e.i(619273),r=e.i(621482),s=e.i(266027),a=e.i(912598),l=e.i(135214),i=e.i(270345),n=e.i(243652),o=e.i(764205);let c=async(e,t,r,s={})=>{try{let a=(0,o.getProxyBaseUrl)(),l=new URLSearchParams(Object.entries({team_id:s.teamID,organization_id:s.organizationID,team_alias:s.team_alias,user_id:s.userID,page:t,page_size:r,sort_by:s.sortBy,sort_order:s.sortOrder,status:s.status}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${a?`${a}/v2/team/list`:"/v2/team/list"}?${l}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let c=await n.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to list teams:",e),e}},d=(0,n.createQueryKeys)("teams"),u=(0,n.createQueryKeys)("infiniteTeams"),m=async(e,t,r,s={})=>{try{let a=(0,o.getProxyBaseUrl)(),l=new URLSearchParams(Object.entries({team_id:s.teamID,organization_id:s.organizationID,team_alias:s.team_alias,user_id:s.userID,page:t,page_size:r,sort_by:s.sortBy,sort_order:s.sortOrder,status:"deleted"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${a?`${a}/v2/team/list`:"/v2/team/list"}?${l}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let c=await n.json();if(console.log("/team/list?status=deleted API Response:",c),c&&"object"==typeof c&&"teams"in c)return c.teams;return c}catch(e){throw console.error("Failed to list deleted teams:",e),e}},p=(0,n.createQueryKeys)("deletedTeams");e.s(["teamListCall",0,c,"useDeletedTeams",0,(e,r,a={})=>{let{accessToken:i}=(0,l.default)();return(0,s.useQuery)({queryKey:p.list({page:e,limit:r,...a}),queryFn:async()=>await m(i,e,r,a),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useInfiniteTeams",0,(e=50,t,s)=>{let{accessToken:a,userId:i,userRole:n}=(0,l.default)(),o="Admin"===n||"Admin Viewer"===n;return(0,r.useInfiniteQuery)({queryKey:u.list({filters:{pageSize:e,...t&&{search:t},...s&&{organizationId:s},...i&&{userId:i}}}),queryFn:async({pageParam:r})=>await c(a,r,e,{team_alias:t||void 0,organizationID:s,userID:o?void 0:i}),initialPageParam:1,getNextPageParam:e=>{if(e.page{let{accessToken:t}=(0,l.default)(),r=(0,a.useQueryClient)();return(0,s.useQuery)({queryKey:d.detail(e),enabled:!!(t&&e),queryFn:async()=>{if(!t||!e)throw Error("Missing auth or teamId");return(0,o.teamInfoCall)(t,e)},initialData:()=>{if(!e)return;let t=r.getQueryData(d.list({}));return t?.find(t=>t.team_id===e)}})},"useTeams",0,()=>{let{accessToken:e,userId:t,userRole:r}=(0,l.default)();return(0,s.useQuery)({queryKey:d.list({}),queryFn:async()=>await (0,i.fetchTeams)(e,t,r,null),enabled:!!e})}])},109799,e=>{"use strict";var t=e.i(135214),r=e.i(764205),s=e.i(266027),a=e.i(912598);let l=(0,e.i(243652).createQueryKeys)("organizations");e.s(["useOrganization",0,e=>{let i=(0,a.useQueryClient)(),{accessToken:n}=(0,t.default)();return(0,s.useQuery)({queryKey:l.detail(e),enabled:!!(n&&e),queryFn:async()=>{if(!n||!e)throw Error("Missing auth or teamId");return(0,r.organizationInfoCall)(n,e)},initialData:()=>{if(!e)return;let t=i.getQueryData(l.list({}));return t?.find(t=>t.organization_id===e)}})},"useOrganizations",0,()=>{let{accessToken:e,userId:a,userRole:i}=(0,t.default)();return(0,s.useQuery)({queryKey:l.list({}),queryFn:async()=>await (0,r.organizationListCall)(e),enabled:!!(e&&a&&i)})}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),s=e.i(371330),a=e.i(271645),l=e.i(394487),i=e.i(503269),n=e.i(214520),o=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(601893),p=e.i(140721),h=e.i(942803),g=e.i(233538),f=e.i(694421),x=e.i(700020),y=e.i(35889),b=e.i(998348),v=e.i(722678);let _=(0,a.createContext)(null);_.displayName="GroupContext";let j=a.Fragment,w=Object.assign((0,x.forwardRefWithAs)(function(e,t){var j;let w=(0,a.useId)(),k=(0,h.useProvidedId)(),N=(0,m.useDisabled)(),{id:C=k||`headlessui-switch-${w}`,disabled:S=N||!1,checked:T,defaultChecked:E,onChange:O,name:I,value:M,form:P,autoFocus:A=!1,...L}=e,R=(0,a.useContext)(_),[F,D]=(0,a.useState)(null),B=(0,a.useRef)(null),$=(0,u.useSyncRefs)(B,t,null===R?null:R.setSwitch,D),z=(0,n.useDefaultValue)(E),[K,U]=(0,i.useControllable)(T,O,null!=z&&z),q=(0,o.useDisposables)(),[V,G]=(0,a.useState)(!1),H=(0,c.useEvent)(()=>{G(!0),null==U||U(!K),q.nextFrame(()=>{G(!1)})}),W=(0,c.useEvent)(e=>{if((0,g.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),H()}),Q=(0,c.useEvent)(e=>{e.key===b.Keys.Space?(e.preventDefault(),H()):e.key===b.Keys.Enter&&(0,f.attemptSubmit)(e.currentTarget)}),J=(0,c.useEvent)(e=>e.preventDefault()),Y=(0,v.useLabelledBy)(),X=(0,y.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:A}),{isHovered:et,hoverProps:er}=(0,s.useHover)({isDisabled:S}),{pressed:es,pressProps:ea}=(0,l.useActivePress)({disabled:S}),el=(0,a.useMemo)(()=>({checked:K,disabled:S,hover:et,focus:Z,active:es,autofocus:A,changing:V}),[K,et,Z,es,S,V,A]),ei=(0,x.mergeProps)({id:C,ref:$,role:"switch",type:(0,d.useResolveButtonType)(e,F),tabIndex:-1===e.tabIndex?0:null!=(j=e.tabIndex)?j:0,"aria-checked":K,"aria-labelledby":Y,"aria-describedby":X,disabled:S||void 0,autoFocus:A,onClick:W,onKeyUp:Q,onKeyPress:J},ee,er,ea),en=(0,a.useCallback)(()=>{if(void 0!==z)return null==U?void 0:U(z)},[U,z]),eo=(0,x.useRender)();return a.default.createElement(a.default.Fragment,null,null!=I&&a.default.createElement(p.FormFields,{disabled:S,data:{[I]:M||"on"},overrides:{type:"checkbox",checked:K},form:P,onReset:en}),eo({ourProps:ei,theirProps:L,slot:el,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,s]=(0,a.useState)(null),[l,i]=(0,v.useLabels)(),[n,o]=(0,y.useDescriptions)(),c=(0,a.useMemo)(()=>({switch:r,setSwitch:s}),[r,s]),d=(0,x.useRender)();return a.default.createElement(o,{name:"Switch.Description",value:n},a.default.createElement(i,{name:"Switch.Label",value:l,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},a.default.createElement(_.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:j,name:"Switch.Group"}))))},Label:v.Label,Description:y.Description});var k=e.i(888288),N=e.i(95779),C=e.i(444755),S=e.i(673706),T=e.i(829087);let E=(0,S.makeClassName)("Switch"),O=a.default.forwardRef((e,r)=>{let{checked:s,defaultChecked:l=!1,onChange:i,color:n,name:o,error:c,errorMessage:d,disabled:u,required:m,tooltip:p,id:h}=e,g=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),f={bgColor:n?(0,S.getColorClassNames)(n,N.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:n?(0,S.getColorClassNames)(n,N.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[x,y]=(0,k.default)(l,s),[b,v]=(0,a.useState)(!1),{tooltipProps:_,getReferenceProps:j}=(0,T.useTooltip)(300);return a.default.createElement("div",{className:"flex flex-row items-center justify-start"},a.default.createElement(T.default,Object.assign({text:p},_)),a.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([r,_.refs.setReference]),className:(0,C.tremorTwMerge)(E("root"),"flex flex-row relative h-5")},g,j),a.default.createElement("input",{type:"checkbox",className:(0,C.tremorTwMerge)(E("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:m,checked:x,onChange:e=>{e.preventDefault()}}),a.default.createElement(w,{checked:x,onChange:e=>{y(e),null==i||i(e)},disabled:u,className:(0,C.tremorTwMerge)(E("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:h},a.default.createElement("span",{className:(0,C.tremorTwMerge)(E("sr-only"),"sr-only")},"Switch ",x?"on":"off"),a.default.createElement("span",{"aria-hidden":"true",className:(0,C.tremorTwMerge)(E("background"),x?f.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),a.default.createElement("span",{"aria-hidden":"true",className:(0,C.tremorTwMerge)(E("round"),x?(0,C.tremorTwMerge)(f.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",b?(0,C.tremorTwMerge)("ring-2",f.ringColor):"")}))),c&&d?a.default.createElement("p",{className:(0,C.tremorTwMerge)(E("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});O.displayName="Switch",e.s(["Switch",()=>O],793130)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},361653,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>t])},158392,419470,e=>{"use strict";var t=e.i(843476),r=e.i(779241);let s={ttl:3600,lowest_latency_buffer:0},a=({routingStrategyArgs:e})=>{let a={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||s).map(([e,s])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:a[e]||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:"object"==typeof s?JSON.stringify(s,null,2):s?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},l=({routerSettings:e,routerFieldsMetadata:s})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,a])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:s[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:s[e]?.field_description||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:null==a||"null"===a?"":"object"==typeof a?JSON.stringify(a,null,2):a?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var i=e.i(199133);let n=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:s,routerFieldsMetadata:a,onStrategyChange:l})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:a.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:a.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(i.Select,{value:e,onChange:l,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(i.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),s[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:s[e]})]})},e))})})]});var o=e.i(793130);let c=({enabled:e,routerFieldsMetadata:r,onToggle:s})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(o.Switch,{checked:e,onChange:s,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:s,availableRoutingStrategies:i,routingStrategyDescriptions:o})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),i.length>0&&(0,t.jsx)(n,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:i,routingStrategyDescriptions:o,routerFieldsMetadata:s,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(c,{enabled:e.enableTagFiltering,routerFieldsMetadata:s,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(a,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(l,{routerSettings:e.routerSettings,routerFieldsMetadata:s})]})],158392);var d=e.i(994388),u=e.i(653496),m=e.i(107233),p=e.i(271645),h=e.i(888259),g=e.i(592968),f=e.i(361653),f=f;let x=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var y=e.i(37727);function b({group:e,onChange:r,availableModels:s,maxFallbacks:a}){let l=s.filter(t=>t!==e.primaryModel),n=e.fallbackModels.length{let s=[...e.fallbackModels];s.includes(t)&&(s=s.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:s})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:s.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,t.jsx)(f.default,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-sm",children:[(0,t.jsx)(x,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",a," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(i.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:n?"Select fallback models to add...":`Maximum ${a} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let s=t.slice(0,a);r({...e,fallbackModels:s})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:l.map(e=>({label:e,value:e})),optionRender:(r,s)=>{let a=e.fallbackModels.includes(r.value),l=a?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[a&&null!==l&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:l}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(g.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:n?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${a} used)`:`Maximum ${a} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((s,a)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-sm transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:a+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:s})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==a),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(y.X,{className:"w-4 h-4"})})]},`${s}-${a}`))})]})]})]})}function v({groups:e,onGroupsChange:r,availableModels:s,maxFallbacks:a=10,maxGroups:l=5}){let[i,n]=(0,p.useState)(e.length>0?e[0].id:"1");(0,p.useEffect)(()=>{e.length>0?e.some(e=>e.id===i)||n(e[0].id):n("1")},[e]);let o=()=>{if(e.length>=l)return;let t=Date.now().toString();r([...e,{id:t,primaryModel:null,fallbackModels:[]}]),n(t)},c=t=>{r(e.map(e=>e.id===t.id?t:e))},g=e.map((r,l)=>{let i=r.primaryModel?r.primaryModel:`Group ${l+1}`;return{key:r.id,label:i,closable:e.length>1,children:(0,t.jsx)(b,{group:r,onChange:c,availableModels:s,maxFallbacks:a})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(d.Button,{variant:"primary",onClick:o,icon:()=>(0,t.jsx)(m.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:i,onChange:n,onEdit:(t,s)=>{"add"===s?o():"remove"===s&&e.length>1&&(t=>{if(1===e.length)return h.default.warning("At least one group is required");let s=e.filter(e=>e.id!==t);r(s),i===t&&s.length>0&&n(s[s.length-1].id)})(t)},items:g,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=l})}e.s(["FallbackSelectionForm",()=>v],419470)},309426,e=>{"use strict";var t=e.i(290571),r=e.i(444755),s=e.i(673706),a=e.i(271645),l=e.i(46757);let i=(0,s.makeClassName)("Col"),n=a.default.forwardRef((e,s)=>{let n,o,c,d,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:p,numColSpanLg:h,children:g,className:f}=e,x=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),y=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return a.default.createElement("div",Object.assign({ref:s,className:(0,r.tremorTwMerge)(i("root"),(n=y(u,l.colSpan),o=y(m,l.colSpanSm),c=y(p,l.colSpanMd),d=y(h,l.colSpanLg),(0,r.tremorTwMerge)(n,o,c,d)),f)},x),g)});n.displayName="Col",e.s(["Col",()=>n],309426)},950724,(e,t,r)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},100236,(e,t,r)=>{t.exports=e.g&&e.g.Object===Object&&e.g},139088,(e,t,r)=>{var s=e.r(100236),a="object"==typeof self&&self&&self.Object===Object&&self;t.exports=s||a||Function("return this")()},631926,(e,t,r)=>{var s=e.r(139088);t.exports=function(){return s.Date.now()}},748891,(e,t,r)=>{var s=/\s/;t.exports=function(e){for(var t=e.length;t--&&s.test(e.charAt(t)););return t}},830364,(e,t,r)=>{var s=e.r(748891),a=/^\s+/;t.exports=function(e){return e?e.slice(0,s(e)+1).replace(a,""):e}},630353,(e,t,r)=>{t.exports=e.r(139088).Symbol},243436,(e,t,r)=>{var s=e.r(630353),a=Object.prototype,l=a.hasOwnProperty,i=a.toString,n=s?s.toStringTag:void 0;t.exports=function(e){var t=l.call(e,n),r=e[n];try{e[n]=void 0;var s=!0}catch(e){}var a=i.call(e);return s&&(t?e[n]=r:delete e[n]),a}},223243,(e,t,r)=>{var s=Object.prototype.toString;t.exports=function(e){return s.call(e)}},377684,(e,t,r)=>{var s=e.r(630353),a=e.r(243436),l=e.r(223243),i=s?s.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):l(e)}},877289,(e,t,r)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},361884,(e,t,r)=>{var s=e.r(377684),a=e.r(877289);t.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==s(e)}},773759,(e,t,r)=>{var s=e.r(830364),a=e.r(950724),l=e.r(361884),i=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(l(e))return i;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var r=o.test(e);return r||c.test(e)?d(e.slice(2),r?2:8):n.test(e)?i:+e}},374009,(e,t,r)=>{var s=e.r(950724),a=e.r(631926),l=e.r(773759),i=Math.max,n=Math.min;t.exports=function(e,t,r){var o,c,d,u,m,p,h=0,g=!1,f=!1,x=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var r=o,s=c;return o=c=void 0,h=t,u=e.apply(s,r)}function b(e){var r=e-p,s=e-h;return void 0===p||r>=t||r<0||f&&s>=d}function v(){var e,r,s,l=a();if(b(l))return _(l);m=setTimeout(v,(e=l-p,r=l-h,s=t-e,f?n(s,d-r):s))}function _(e){return(m=void 0,x&&o)?y(e):(o=c=void 0,u)}function j(){var e,r=a(),s=b(r);if(o=arguments,c=this,p=r,s){if(void 0===m)return h=e=p,m=setTimeout(v,t),g?y(e):u;if(f)return clearTimeout(m),m=setTimeout(v,t),y(p)}return void 0===m&&(m=setTimeout(v,t)),u}return t=l(t)||0,s(r)&&(g=!!r.leading,d=(f="maxWait"in r)?i(l(r.maxWait)||0,t):d,x="trailing"in r?!!r.trailing:x),j.cancel=function(){void 0!==m&&clearTimeout(m),h=0,o=p=c=m=void 0},j.flush=function(){return void 0===m?u:_(a())},j}},964306,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["XCircleIcon",0,r],964306)},435451,620250,e=>{"use strict";var t=e.i(843476),r=e.i(290571),s=e.i(271645);let a=e=>{var t=(0,r.__rest)(e,[]);return s.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),s.default.createElement("path",{d:"M12 4v16m8-8H4"}))},l=e=>{var t=(0,r.__rest)(e,[]);return s.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),s.default.createElement("path",{d:"M20 12H4"}))};var i=e.i(444755),n=e.i(673706),o=e.i(677955);let c="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",d="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",u=s.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:p,onValueChange:h,onChange:g}=e,f=(0,r.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),x=(0,s.useRef)(null),[y,b]=s.default.useState(!1),v=s.default.useCallback(()=>{b(!0)},[]),_=s.default.useCallback(()=>{b(!1)},[]),[j,w]=s.default.useState(!1),k=s.default.useCallback(()=>{w(!0)},[]),N=s.default.useCallback(()=>{w(!1)},[]);return s.default.createElement(o.default,Object.assign({type:"number",ref:(0,n.mergeRefs)([x,t]),disabled:p,makeInputClassName:(0,n.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=x.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&v(),"ArrowUp"===e.key&&k()},onKeyUp:e=>{"ArrowDown"===e.key&&_(),"ArrowUp"===e.key&&N()},onChange:e=>{p||(null==h||h(parseFloat(e.target.value)),null==g||g(e))},stepper:m?s.default.createElement("div",{className:(0,i.tremorTwMerge)("flex justify-center align-middle")},s.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null==(e=x.current)||e.stepDown(),null==(t=x.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},s.default.createElement(l,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),s.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null==(e=x.current)||e.stepUp(),null==(t=x.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},s.default.createElement(a,{"data-testid":"step-up",className:(j?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},f))});u.displayName="NumberInput",e.s(["NumberInput",()=>u],620250),e.s(["default",0,({step:e=.01,style:r={width:"100%"},placeholder:s="Enter a numerical value",min:a,max:l,onChange:i,...n})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:r,placeholder:s,min:a,max:l,onChange:i,...n})],435451)},677667,674175,886148,543086,e=>{"use strict";let t,r;var s,a=e.i(290571),l=e.i(429427),i=e.i(371330),n=e.i(271645),o=e.i(394487),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(83733);let p=(0,n.createContext)(()=>{});function h({value:e,children:t}){return n.default.createElement(p.Provider,{value:e},t)}e.s(["CloseProvider",()=>h],674175);var g=e.i(233137),f=e.i(233538),x=e.i(397701),y=e.i(402155),b=e.i(700020);let v=null!=(s=n.default.startTransition)?s:function(e){e()};var _=e.i(998348),j=((t=j||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),w=((r=w||{})[r.ToggleDisclosure=0]="ToggleDisclosure",r[r.CloseDisclosure=1]="CloseDisclosure",r[r.SetButtonId=2]="SetButtonId",r[r.SetPanelId=3]="SetPanelId",r[r.SetButtonElement=4]="SetButtonElement",r[r.SetPanelElement=5]="SetPanelElement",r);let k={0:e=>({...e,disclosureState:(0,x.match)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},N=(0,n.createContext)(null);function C(e){let t=(0,n.useContext)(N);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,C),t}return t}N.displayName="DisclosureContext";let S=(0,n.createContext)(null);S.displayName="DisclosureAPIContext";let T=(0,n.createContext)(null);function E(e,t){return(0,x.match)(t.type,k,e,t)}T.displayName="DisclosurePanelContext";let O=n.Fragment,I=b.RenderFeatures.RenderStrategy|b.RenderFeatures.Static,M=Object.assign((0,b.forwardRefWithAs)(function(e,t){let{defaultOpen:r=!1,...s}=e,a=(0,n.useRef)(null),l=(0,u.useSyncRefs)(t,(0,u.optionalRef)(e=>{a.current=e},void 0===e.as||e.as===n.Fragment)),i=(0,n.useReducer)(E,{disclosureState:+!r,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:d},m]=i,p=(0,c.useEvent)(e=>{m({type:1});let t=(0,y.getOwnerDocument)(a);if(!t||!d)return;let r=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(d):t.getElementById(d);null==r||r.focus()}),f=(0,n.useMemo)(()=>({close:p}),[p]),v=(0,n.useMemo)(()=>({open:0===o,close:p}),[o,p]),_=(0,b.useRender)();return n.default.createElement(N.Provider,{value:i},n.default.createElement(S.Provider,{value:f},n.default.createElement(h,{value:p},n.default.createElement(g.OpenClosedProvider,{value:(0,x.match)(o,{0:g.State.Open,1:g.State.Closed})},_({ourProps:{ref:l},theirProps:s,slot:v,defaultTag:O,name:"Disclosure"})))))}),{Button:(0,b.forwardRefWithAs)(function(e,t){let r=(0,n.useId)(),{id:s=`headlessui-disclosure-button-${r}`,disabled:a=!1,autoFocus:m=!1,...p}=e,[h,g]=C("Disclosure.Button"),x=(0,n.useContext)(T),y=null!==x&&x===h.panelId,v=(0,n.useRef)(null),j=(0,u.useSyncRefs)(v,t,(0,c.useEvent)(e=>{if(!y)return g({type:4,element:e})}));(0,n.useEffect)(()=>{if(!y)return g({type:2,buttonId:s}),()=>{g({type:2,buttonId:null})}},[s,g,y]);let w=(0,c.useEvent)(e=>{var t;if(y){if(1===h.disclosureState)return;switch(e.key){case _.Keys.Space:case _.Keys.Enter:e.preventDefault(),e.stopPropagation(),g({type:0}),null==(t=h.buttonElement)||t.focus()}}else switch(e.key){case _.Keys.Space:case _.Keys.Enter:e.preventDefault(),e.stopPropagation(),g({type:0})}}),k=(0,c.useEvent)(e=>{e.key===_.Keys.Space&&e.preventDefault()}),N=(0,c.useEvent)(e=>{var t;(0,f.isDisabledReactIssue7711)(e.currentTarget)||a||(y?(g({type:0}),null==(t=h.buttonElement)||t.focus()):g({type:0}))}),{isFocusVisible:S,focusProps:E}=(0,l.useFocusRing)({autoFocus:m}),{isHovered:O,hoverProps:I}=(0,i.useHover)({isDisabled:a}),{pressed:M,pressProps:P}=(0,o.useActivePress)({disabled:a}),A=(0,n.useMemo)(()=>({open:0===h.disclosureState,hover:O,active:M,disabled:a,focus:S,autofocus:m}),[h,O,M,S,a,m]),L=(0,d.useResolveButtonType)(e,h.buttonElement),R=y?(0,b.mergeProps)({ref:j,type:L,disabled:a||void 0,autoFocus:m,onKeyDown:w,onClick:N},E,I,P):(0,b.mergeProps)({ref:j,id:s,type:L,"aria-expanded":0===h.disclosureState,"aria-controls":h.panelElement?h.panelId:void 0,disabled:a||void 0,autoFocus:m,onKeyDown:w,onKeyUp:k,onClick:N},E,I,P);return(0,b.useRender)()({ourProps:R,theirProps:p,slot:A,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,b.forwardRefWithAs)(function(e,t){let r=(0,n.useId)(),{id:s=`headlessui-disclosure-panel-${r}`,transition:a=!1,...l}=e,[i,o]=C("Disclosure.Panel"),{close:d}=function e(t){let r=(0,n.useContext)(S);if(null===r){let r=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}("Disclosure.Panel"),[p,h]=(0,n.useState)(null),f=(0,u.useSyncRefs)(t,(0,c.useEvent)(e=>{v(()=>o({type:5,element:e}))}),h);(0,n.useEffect)(()=>(o({type:3,panelId:s}),()=>{o({type:3,panelId:null})}),[s,o]);let x=(0,g.useOpenClosed)(),[y,_]=(0,m.useTransition)(a,p,null!==x?(x&g.State.Open)===g.State.Open:0===i.disclosureState),j=(0,n.useMemo)(()=>({open:0===i.disclosureState,close:d}),[i.disclosureState,d]),w={ref:f,id:s,...(0,m.transitionDataAttributes)(_)},k=(0,b.useRender)();return n.default.createElement(g.ResetOpenClosedProvider,null,n.default.createElement(T.Provider,{value:i.panelId},k({ourProps:w,theirProps:l,slot:j,defaultTag:"div",features:I,visible:y,name:"Disclosure.Panel"})))})});e.s(["Disclosure",()=>M],886148);let P=(0,n.createContext)(void 0);var A=e.i(444755);let L=(0,e.i(673706).makeClassName)("Accordion"),R=(0,n.createContext)({isOpen:!1}),F=n.default.forwardRef((e,t)=>{var r;let{defaultOpen:s=!1,children:l,className:i}=e,o=(0,a.__rest)(e,["defaultOpen","children","className"]),c=null!=(r=(0,n.useContext)(P))?r:(0,A.tremorTwMerge)("rounded-tremor-default border");return n.default.createElement(M,Object.assign({as:"div",ref:t,className:(0,A.tremorTwMerge)(L("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",c,i),defaultOpen:s},o),({open:e})=>n.default.createElement(R.Provider,{value:{isOpen:e}},l))});F.displayName="Accordion",e.s(["OpenContext",()=>R,"default",()=>F],543086),e.s(["Accordion",()=>F],677667)},898667,e=>{"use strict";var t=e.i(290571),r=e.i(271645),s=e.i(886148);let a=e=>{var s=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},s),r.default.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var l=e.i(543086),i=e.i(444755);let n=(0,e.i(673706).makeClassName)("AccordionHeader"),o=r.default.forwardRef((e,o)=>{let{children:c,className:d}=e,u=(0,t.__rest)(e,["children","className"]),{isOpen:m}=(0,r.useContext)(l.OpenContext);return r.default.createElement(s.Disclosure.Button,Object.assign({ref:o,className:(0,i.tremorTwMerge)(n("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",d)},u),r.default.createElement("div",{className:(0,i.tremorTwMerge)(n("children"),"flex flex-1 text-inherit mr-4")},c),r.default.createElement("div",null,r.default.createElement(a,{className:(0,i.tremorTwMerge)(n("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m?"transition-all":"transition-all -rotate-180")})))});o.displayName="AccordionHeader",e.s(["AccordionHeader",()=>o],898667)},130643,e=>{"use strict";var t=e.i(290571),r=e.i(271645),s=e.i(886148),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("AccordionBody"),i=r.default.forwardRef((e,i)=>{let{children:n,className:o}=e,c=(0,t.__rest)(e,["children","className"]);return r.default.createElement(s.Disclosure.Panel,Object.assign({ref:i,className:(0,a.tremorTwMerge)(l("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",o)},c),n)});i.displayName="AccordionBody",e.s(["AccordionBody",()=>i],130643)},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.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"}))});e.s(["PencilIcon",0,r],797672)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(779241),a=e.i(599724),l=e.i(199133),i=e.i(983561),n=e.i(689020);e.s(["default",0,({accessToken:e,value:o,placeholder:c="Select a Model",onChange:d,disabled:u=!1,style:m,className:p,showLabel:h=!0,labelText:g="Select Model"})=>{let[f,x]=(0,r.useState)(o),[y,b]=(0,r.useState)(!1),[v,_]=(0,r.useState)([]),j=(0,r.useRef)(null);return(0,r.useEffect)(()=>{x(o)},[o]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,n.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&_(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[h&&(0,t.jsxs)(a.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.RobotOutlined,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{value:f,placeholder:c,onChange:e=>{"custom"===e?(b(!0),x(void 0)):(b(!1),x(e),d&&d(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...m},showSearch:!0,className:`rounded-md ${p||""}`,disabled:u}),y&&(0,t.jsx)(s.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{x(e),d&&d(e)},500)},disabled:u})]})}])},500727,699857,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),s=e.i(764205),a=e.i(135214);let l=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,a.default)();return(0,t.useQuery)({queryKey:l.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,s.fetchMCPServers)(r,e),enabled:!!r})}],500727);let i=(0,r.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,a.default)();return(0,t.useQuery)({queryKey:i.list(),queryFn:async()=>await (0,s.fetchMCPToolsets)(e),enabled:!!e})}],699857);var n=e.i(843476),o=e.i(271645),c=e.i(536916),d=e.i(599724),u=e.i(409797),m=e.i(246349),m=m;let p=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,h=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,g=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,f=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function x(e,t=""){let r=e.toLowerCase();if(f.test(r))return"read";if(p.test(r))return"delete";if(g.test(r))return"update";if(h.test(r))return"create";if(t){let e=t.toLowerCase();if(f.test(e))return"read";if(p.test(e))return"delete";if(g.test(e))return"update";if(h.test(e))return"create"}return"unknown"}function y(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[x(r.name,r.description)].push(r);return t}let b={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,b,"classifyToolOp",()=>x,"groupToolsByCrud",()=>y],696609);let v=["read","create","update","delete","unknown"],_={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},j={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:s=!1,searchFilter:a=""})=>{let[l,i]=(0,o.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),p=(0,o.useMemo)(()=>y(e),[e]),h=(0,o.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),g=e=>{if(s)return;let t=new Set(h);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,n.jsx)("div",{className:"space-y-3",children:v.map(e=>{let t,o=p[e];if(0===o.length)return null;if(a){let e=a.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let f=b[e],x=(t=p[e]).length>0&&t.every(e=>h.has(e.name)),y=(e=>{let t=p[e];if(0===t.length)return!1;let r=t.filter(e=>h.has(e.name)).length;return r>0&&r{i(t=>({...t,[e]:!t[e]}))},children:[v?(0,n.jsx)(m.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,n.jsx)(u.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,n.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:f.label}),(0,n.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${_[f.risk]}`,children:"high"===f.risk?"High Risk":"medium"===f.risk?"Medium Risk":"low"===f.risk?"Safe":"Unclassified"}),(0,n.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>h.has(e.name)).length,"/",o.length," allowed"]})]}),!s&&(0,n.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,n.jsx)(d.Text,{className:"text-xs text-gray-500",children:x?"All on":y?"Partial":"All off"}),(0,n.jsx)(c.Checkbox,{checked:x,indeterminate:y,onChange:t=>((e,t)=>{if(s)return;let a=new Set(h);for(let r of p[e])t?a.add(r.name):a.delete(r.name);r(Array.from(a))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!v&&(0,n.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:f.description}),!v&&(0,n.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!a||e.name.toLowerCase().includes(a.toLowerCase())||(e.description??"").toLowerCase().includes(a.toLowerCase())).map(e=>{let t,r=(t=e.name,h.has(t));return(0,n.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!s?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>g(e.name),children:[(0,n.jsx)(c.Checkbox,{checked:r,onChange:()=>g(e.name),disabled:s,onClick:e=>e.stopPropagation()}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)(d.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,n.jsx)(d.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,n.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,placeholder:o="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[m,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,a.vectorStoreListCall)(n);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",placeholder:o,onChange:e,value:l,loading:m,className:i,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${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})})}])},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode: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}};e.s(["fetchAvailableModels",0,r])},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},993914,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={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"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["FileTextOutlined",0,l],993914)},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},59935,(e,t,r)=>{var s;let a;e.e,s=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},s=!r.document&&!!r.postMessage,a=r.IS_PAPA_WORKER||!1,l={},i=0,n={};function o(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new p(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,a)r.postMessage({results:l,workerId:n.WORKER_ID,finished:s});else if(_(this._config.chunk)&&!t){if(this._config.chunk(l,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=l=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(l.data),this._completeResults.errors=this._completeResults.errors.concat(l.errors),this._completeResults.meta=l.meta),this._completed||!s||!_(this._config.complete)||l&&l.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||l&&l.meta.paused||this._nextChunk(),l}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):a&&this._config.error&&r.postMessage({workerId:n.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=n.RemoteChunkSize),o.call(this,e),this._nextChunk=s?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),s||(t.onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!s),this._config.downloadRequestHeaders){var e,r,a=this._config.downloadRequestHeaders;for(r in a)t.setRequestHeader(r,a[r])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}s&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=n.LocalChunkSize),o.call(this,e);var t,r,s="u">typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,s?((t=new FileReader).onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function u(e){var t;o.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function m(e){o.call(this,e=e||{});var t=[],r=!0,s=!1;this.pause=function(){o.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){o.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function p(e){var t,r,s,a,l=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,i=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,o=this,c=0,d=0,u=!1,m=!1,p=[],f={data:[],errors:[],meta:{}};function x(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function y(){if(f&&s&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+n.DefaultDelimiter+"'"),s=!1),e.skipEmptyLines&&(f.data=f.data.filter(function(e){return!x(e)})),v()){if(f)if(Array.isArray(f.data[0])){for(var t,r=0;v()&&r(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(l.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):i.test(r)?new Date(r):""===r?null:r):r)(n=e.header?a>=p.length?"__parsed_extra":p[a]:n,o=e.transform?e.transform(o,n):o);"__parsed_extra"===n?(s[n]=s[n]||[],s[n].push(o)):s[n]=o}return e.header&&(a>p.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+a,d+r):ae.preview?r.abort():(f.data=f.data[0],a(f,o))))}),this.parse=function(a,l,i){var o=e.quoteChar||'"',o=(e.newline||(e.newline=this.guessLineEndings(a,o)),s=!1,e.delimiter?_(e.delimiter)&&(e.delimiter=e.delimiter(a),f.meta.delimiter=e.delimiter):((o=((t,r,s,a,l)=>{var i,o,c,d;l=l||[","," ","|",";",n.RECORD_SEP,n.UNIT_SEP];for(var u=0;u=r.length/2?"\r\n":"\r"}}function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t=(e=e||{}).delimiter,r=e.newline,s=e.comments,a=e.step,l=e.preview,i=e.fastMode,o=null,c=!1,d=null==e.quoteChar?'"':e.quoteChar,u=d;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof t||-1=l)return D(!0);break}k.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:m}),M++}}else if(s&&0===N.length&&n.substring(m,m+v)===s){if(-1===O)return D();m=O+b,O=n.indexOf(r,m),E=n.indexOf(t,m)}else if(-1!==E&&(E=l)return D(!0)}return R();function A(e){w.push(e),C=m}function L(e){return -1!==e&&(e=n.substring(M+1,e))&&""===e.trim()?e.length:0}function R(e){return f||(void 0===e&&(e=n.substring(m)),N.push(e),m=x,A(N),j&&B()),D()}function F(e){m=e,A(N),N=[],O=n.indexOf(r,m)}function D(s){if(e.header&&!g&&w.length&&!c){var a=w[0],l=Object.create(null),i=new Set(a);let t=!1;for(let r=0;r{if("object"==typeof t){if("string"!=typeof t.delimiter||n.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(a=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(l=t.newline),"string"==typeof t.quoteChar&&(i=t.quoteChar),"boolean"==typeof t.header&&(s=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(o=t.escapeChar+i),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),RegExp(h(i),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,c);if("object"==typeof e[0])return p(d||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),p(e.fields||[],e.data||[],c);throw Error("Unable to serialize unrecognized input");function p(e,t,r){var i="",n=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var r=0;r{"use strict";var t=e.i(266027),r=e.i(243652),s=e.i(764205),a=e.i(135214);let l=(0,r.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:r,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:l.list({}),queryFn:async()=>await (0,s.tagListCall)(e),enabled:!!(e&&r&&i)})}])},9314,263147,e=>{"use strict";var t=e.i(843476),r=e.i(199133),s=e.i(981339),a=e.i(645526),l=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),c=e.i(708347),d=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),r=`${t}/v1/access_group`,s=await fetch(r,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return s.json()},p=()=>{let{accessToken:e,userRole:t}=(0,d.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&c.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:c,className:d,showLabel:u=!1,labelText:m="Access Group",allowClear:h=!0})=>{let{data:g,isLoading:f,isError:x}=p();if(f)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Skeleton.Input,{active:!0,block:!0,style:{height:32,...c}})]});let y=(g??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(r.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:h,showSearch:!0,style:{width:"100%",...c},className:`rounded-md ${d??""}`,notFoundContent:x?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(y.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:y.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},552130,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,placeholder:o="Select agents",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[m,p]=(0,r.useState)([]),[h,g]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let r=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>r.add(e))}),p(Array.from(r))}catch(e){console.error("Error fetching agents:",e)}finally{g(!1)}}})()},[n]);let f=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...d.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],x=[...l?.agents||[],...(l?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:x,loading:h,className:i,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:c,filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:f.map(e=>(0,t.jsx)(s.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},844565,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:c=!1,teamId:d})=>{let[u,m]=(0,r.useState)([]),[p,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,d);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,r=e.methods;return r&&r.length>0?r.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{h(!1)}}})()},[n,d]),(0,t.jsx)(s.Select,{mode:"tags",placeholder:o,onChange:e,value:l,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.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),t.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"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,r],810757);let s=t.forwardRef(function(e,r){return t.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),t.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"}))});e.s(["BanIcon",0,s],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",r=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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:`${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"},{id:"SQS",displayName:"SQS",logo:`${t}aws.svg`,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],s=r.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=r.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),l=r.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,s,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>l[e]||e),"reverse_callback_map",0,l])},75921,e=>{"use strict";var t=e.i(843476),r=e.i(266027),s=e.i(243652),a=e.i(764205),l=e.i(135214);let i=(0,s.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),c=e.i(199133);let d="toolset:";e.s(["default",0,({onChange:e,value:s,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:h=!1,teamId:g})=>{let{data:f=[],isLoading:x}=(0,n.useMCPServers)(g),{data:y=[],isLoading:b}=(()=>{let{accessToken:e}=(0,l.default)();return(0,r.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:v=[],isLoading:_}=(0,o.useMCPToolsets)(),j=new Set(y),w=[...y.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...f.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...v.map(e=>({label:e.toolset_name,value:`${d}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],k={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},N={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},C=[...s?.servers||[],...s?.accessGroups||[],...(s?.toolsets||[]).map(e=>`${d}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(c.Select,{mode:"multiple",placeholder:p,onChange:t=>{let r=t.filter(e=>e.startsWith(d)).map(e=>e.slice(d.length)),s=t.filter(e=>!e.startsWith(d));e({servers:s.filter(e=>!j.has(e)),accessGroups:s.filter(e=>j.has(e)),toolsets:r})},value:C,loading:x||b||_,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:h,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(c.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:k[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:k[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:N[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(764205),a=e.i(599724),l=e.i(482725),i=e.i(91739),n=e.i(500727),o=e.i(531516),c=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:d,toolPermissions:u,onChange:m,disabled:p=!1})=>{let{data:h=[]}=(0,n.useMCPServers)(),[g,f]=(0,r.useState)({}),[x,y]=(0,r.useState)({}),[b,v]=(0,r.useState)({}),[_,j]=(0,r.useState)({}),w=(0,r.useRef)(u);(0,r.useEffect)(()=>{w.current=u},[u]);let k=(0,r.useMemo)(()=>0===d.length?[]:h.filter(e=>d.includes(e.server_id)),[h,d]),N=async(e,t)=>{y(t=>({...t,[e]:!0})),v(t=>({...t,[e]:""}));try{let r=await (0,s.listMCPTools)(t,e);if(r.error)v(t=>({...t,[e]:r.message||"Failed to fetch tools"})),f(t=>({...t,[e]:[]}));else{let t=r.tools||[];f(r=>({...r,[e]:t}));let s=w.current;if(!s[e]&&t.length>0){let r=t.filter(e=>"delete"!==(0,c.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...s,[e]:r})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),v(t=>({...t,[e]:"Failed to fetch tools"})),f(t=>({...t,[e]:[]}))}finally{y(t=>({...t,[e]:!1}))}};(0,r.useEffect)(()=>{k.forEach(t=>{g[t.server_id]||x[t.server_id]||N(t.server_id,e)})},[k,e]);let C=(e,t)=>{m({...u,[e]:t})};return 0===d.length?null:(0,t.jsx)("div",{className:"space-y-4",children:k.map(e=>{let r=e.server_name||e.alias||e.server_id,s=g[e.server_id]||[],n=u[e.server_id]||[],c=x[e.server_id],d=b[e.server_id],h=_[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:r}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&s.length>0&&(0,t.jsx)(i.Radio.Group,{value:h,onChange:t=>j(r=>({...r,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let r;return r=g[t=e.server_id]||[],void m({...u,[t]:r.map(e=>e.name)})},disabled:c,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:c,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[c&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(l.Spin,{size:"large"}),(0,t.jsx)(a.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),d&&!c&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:d})]}),!c&&!d&&s.length>0&&"crud"===h&&(0,t.jsx)(o.default,{tools:s,value:u[e.server_id]?n:void 0,onChange:t=>C(e.server_id,t),readOnly:p}),!c&&!d&&s.length>0&&"flat"===h&&(0,t.jsx)("div",{className:"space-y-2",children:s.map(r=>{let s=n.includes(r.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{if(p)return;let t=s?n.filter(e=>e!==r.name):[...n,r.name];C(e.server_id,t)},disabled:p,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900",children:r.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",r.description||"No description"]})]})})]},r.name)})}),!c&&!d&&0===s.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),r=e.i(199133),s=e.i(592968),a=e.i(312361),l=e.i(827252),i=e.i(994388),n=e.i(304967),o=e.i(779241),c=e.i(988297),d=e.i(68155),u=e.i(810757),m=e.i(477386),p=e.i(557662),h=e.i(435451);let{Option:g}=r.Select;e.s(["default",0,({value:e=[],onChange:f,disabledCallbacks:x=[],onDisabledCallbacksChange:y})=>{let b=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),v=Object.keys(p.callbackInfo),_=e=>{f?.(e)},j=(t,r,s)=>{let a=[...e];if("callback_name"===r){let e=p.callback_map[s]||s;a[t]={...a[t],[r]:e,callback_vars:{}}}else a[t]={...a[t],[r]:s};_(a)},w=(t,r,s)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[r]:s}},_(a)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(s.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(r.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:x,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);y?.(t)},style:{width:"100%"},optionLabelProp:"label",children:v.map(e=>{let r=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(g,{value:e,label:e,children:(0,t.jsx)(s.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,t.jsx)("img",{src:r,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let r=t.target,s=r.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,r)}}}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.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,t.jsx)(a.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(s.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{_([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:c.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((a,c)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{_(e.filter((e,t)=>t!==c))},icon:d.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(r.Select,{value:u,placeholder:"Select integration",onChange:e=>j(c,"callback_name",e),className:"w-full",optionLabelProp:"label",children:b.map(e=>{let r=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(g,{value:e,label:e,children:(0,t.jsx)(s.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,t.jsx)("img",{src:r,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let r=t.target,s=r.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,r)}}}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(r.Select,{value:a.callback_type,onChange:e=>j(c,"callback_type",e),className:"w-full",children:[(0,t.jsx)(g,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(g,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(g,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,r)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,r])=>r===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(i).map(([a,i])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),(0,t.jsx)(s.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.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"===i&&(0,t.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"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(r,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(r,a,e.target.value)})]},a))})]})})(a,c)]})]},c)})}),0===e.length&&(0,t.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,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(404206),a=e.i(723731),l=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),c=e.i(158392),d=e.i(419470),u=e.i(689020);let m=(0,r.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:h},g)=>{let[f,x]=(0,r.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[y,b]=(0,r.useState)([]),[v,_]=(0,r.useState)([]),[j,w]=(0,r.useState)([]),[k,N]=(0,r.useState)([]),[C,S]=(0,r.useState)({}),[T,E]=(0,r.useState)({}),O=(0,r.useRef)(!1),I=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(O.current&&e===I.current){O.current=!1;return}if(O.current&&e!==I.current&&(O.current=!1),e!==I.current)if(I.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...r}=e;x({routerSettings:r,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let s=e.fallbacks||[];b(s),_(s&&0!==s.length?s.map((e,t)=>{let[r,s]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:r||null,fallbackModels:s||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else x({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),b([]),_([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,r.useEffect)(()=>{e&&(0,o.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),S(t);let r=e.fields.find(e=>"routing_strategy"===e.field_name);r?.options&&N(r.options),e.routing_strategy_descriptions&&E(e.routing_strategy_descriptions)}})},[e]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let M=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),r=Object.fromEntries(Object.entries({...f.routerSettings,enable_tag_filtering:f.enableTagFiltering,routing_strategy:f.selectedStrategy,fallbacks:y.length>0?y:null}).map(([r,s])=>{if("routing_strategy_args"!==r&&"routing_strategy"!==r&&"enable_tag_filtering"!==r&&"fallbacks"!==r){let a=document.querySelector(`input[name="${r}"]`);if(a){if(void 0!==a.value&&""!==a.value){let l=((r,s,a)=>{if(null==s)return a;let l=String(s).trim();if(""===l||"null"===l.toLowerCase())return null;if(e.has(r)){let e=Number(l);return Number.isNaN(e)?a:e}if(t.has(r)){if(""===l)return null;try{return JSON.parse(l)}catch{return a}}return"true"===l.toLowerCase()||"false"!==l.toLowerCase()&&l})(r,a.value,s);return[r,l]}return[r,null]}}else if("routing_strategy"===r)return[r,f.selectedStrategy];else if("enable_tag_filtering"===r)return[r,f.enableTagFiltering];else if("fallbacks"===r)return[r,y.length>0?y:null];else if("routing_strategy_args"===r&&"latency-based-routing"===f.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),r={};return e?.value&&(r.lowest_latency_buffer=Number(e.value)),t?.value&&(r.ttl=Number(t.value)),["routing_strategy_args",Object.keys(r).length>0?r:null]}return[r,s]}).filter(e=>null!=e)),s=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:s(r.routing_strategy),allowed_fails:s(r.allowed_fails,!0),cooldown_time:s(r.cooldown_time,!0),num_retries:s(r.num_retries,!0),timeout:s(r.timeout,!0),retry_after:s(r.retry_after,!0),fallbacks:y.length>0?y:null,context_window_fallbacks:s(r.context_window_fallbacks),retry_policy:s(r.retry_policy),model_group_alias:s(r.model_group_alias),enable_tag_filtering:f.enableTagFiltering,routing_strategy_args:s(r.routing_strategy_args)}};(0,r.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{O.current=!0,p({router_settings:M()})},100);return()=>clearTimeout(e)},[f,y]);let P=Array.from(new Set(j.map(e=>e.model_group))).sort();return((0,r.useImperativeHandle)(g,()=>({getValue:()=>({router_settings:M()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(l.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(s.TabPanel,{children:(0,t.jsx)(c.default,{value:f,onChange:x,routerFieldsMetadata:C,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(s.TabPanel,{children:(0,t.jsx)(d.FallbackSelectionForm,{groups:v,onGroupsChange:e=>{_(e),b(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:P,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},207082,e=>{"use strict";var t=e.i(619273),r=e.i(266027),s=e.i(243652),a=e.i(764205),l=e.i(135214);let i=(0,s.createQueryKeys)("keys"),n=async(e,t,r,s={})=>{try{let l=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:s.teamID,project_id:s.projectID,organization_id:s.organizationID,key_alias:s.selectedKeyAlias,key_hash:s.keyHash,user_id:s.userID,page:t,size:r,sort_by:s.sortBy,sort_order:s.sortOrder,expand:s.expand,status:s.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${l?`${l}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let c=await o.json();return console.log("/key/list API Response:",c),c}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,s.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,s,a={})=>{let{accessToken:i}=(0,l.default)();return(0,r.useQuery)({queryKey:o.list({page:e,limit:s,...a}),queryFn:async()=>await n(i,e,s,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,s,a={})=>{let{accessToken:o}=(0,l.default)();return(0,r.useQuery)({queryKey:i.list({page:e,limit:s,...a}),queryFn:async()=>await n(o,e,s,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),r=e.i(243652),s=e.i(764205),a=e.i(708347),l=e.i(135214);let i=(0,r.createQueryKeys)("projects"),n=async e=>{let t=(0,s.getProxyBaseUrl)(),r=`${t}/project/list`,a=await fetch(r,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:r}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&a.all_admin_roles.includes(r||"")})}])},392110,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(199133),a=e.i(592968),l=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),c=e.i(779241);let{Option:d}=s.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:g=!1,neverExpire:f=!1,onNeverExpireChange:x})=>{let y=p&&!["7d","30d","90d","180d","365d"].includes(p),[b,v]=(0,r.useState)(y),[_,j]=(0,r.useState)(y?p:""),[w,k]=(0,r.useState)(e?.getFieldValue?.("duration")||"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(a.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!g&&x&&(0,t.jsx)(n.Checkbox,{checked:f,onChange:t=>{let r=t.target.checked;x(r),r&&(k(""),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(c.TextInput,{name:"duration",placeholder:g?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{k(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!g&&f})]})]}),(0,t.jsx)(l.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(s.Select,{value:b?"custom":p,onChange:e=>{"custom"===e?v(!0):(v(!1),j(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(d,{value:"7d",children:"7 days"}),(0,t.jsx)(d,{value:"30d",children:"30 days"}),(0,t.jsx)(d,{value:"90d",children:"90 days"}),(0,t.jsx)(d,{value:"180d",children:"180 days"}),(0,t.jsx)(d,{value:"365d",children:"365 days"}),(0,t.jsx)(d,{value:"custom",children:"Custom interval"})]}),b&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:_,onChange:e=>{let t=e.target.value;j(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),u&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),r=e.i(808613),s=e.i(199133),a=e.i(592968),l=e.i(827252);let{Option:i}=s.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:c="",initialValue:d=null,form:u,onChange:m})=>{let p=e.toUpperCase(),h=e.toLowerCase(),g=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(r.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:g,children:(0,t.jsx)(l.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:d,className:c,children:(0,t.jsx)(s.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",h," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",h," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",p," (e.g. 2 ",p,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),r=e.i(199133);let{Text:s}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:l,disabled:i,loading:n,style:o})=>(0,t.jsx)(r.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:l,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,r)=>{if(!r)return!1;let s=e?.find(e=>e.organization_id===r.key);if(!s)return!1;let a=t.toLowerCase().trim(),l=(s.organization_alias||"").toLowerCase(),i=(s.organization_id||"").toLowerCase();return l.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(r.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(s,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},533882,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(250980),a=e.i(797672),l=e.i(68155),i=e.i(304967),n=e.i(629569),o=e.i(599724),c=e.i(269200),d=e.i(427612),u=e.i(64848),m=e.i(942232),p=e.i(496020),h=e.i(977572),g=e.i(992619),f=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:x={},onAliasUpdate:y,showExampleConfig:b=!0})=>{let[v,_]=(0,r.useState)([]),[j,w]=(0,r.useState)({aliasName:"",targetModel:""}),[k,N]=(0,r.useState)(null);(0,r.useEffect)(()=>{_(Object.entries(x).map(([e,t],r)=>({id:`${r}-${e}`,aliasName:e,targetModel:t})))},[x]);let C=()=>{if(!k)return;if(!k.aliasName||!k.targetModel)return void f.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.id!==k.id&&e.aliasName===k.aliasName))return void f.default.fromBackend("An alias with this name already exists");let e=v.map(e=>e.id===k.id?k:e);_(e),N(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),f.default.success("Alias updated successfully")},S=()=>{N(null)},T=v.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:j.aliasName,onChange:e=>w({...j,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,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(g.default,{accessToken:e,value:j.targetModel,placeholder:"Select target model",onChange:e=>w({...j,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!j.aliasName||!j.targetModel)return void f.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.aliasName===j.aliasName))return void f.default.fromBackend("An alias with this name already exists");let e=[...v,{id:`${Date.now()}-${j.aliasName}`,aliasName:j.aliasName,targetModel:j.targetModel}];_(e),w({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),f.default.success("Alias added successfully")},disabled:!j.aliasName||!j.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!j.aliasName||!j.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(s.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(d.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[v.map(r=>(0,t.jsx)(p.TableRow,{className:"h-8",children:k&&k.id===r.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:k.aliasName,onChange:e=>N({...k,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(h.TableCell,{className:"py-0.5",children:(0,t.jsx)(g.default,{accessToken:e,value:k.targetModel,onChange:e=>N({...k,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(h.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:C,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.TableCell,{className:"py-0.5 text-sm text-gray-900",children:r.aliasName}),(0,t.jsx)(h.TableCell,{className:"py-0.5 text-sm text-gray-500",children:r.targetModel}),(0,t.jsx)(h.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{N({...r})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,s;return e=r.id,_(t=v.filter(t=>t.id!==e)),s={},void(t.forEach(e=>{s[e.aliasName]=e.targetModel}),y&&y(s),f.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(l.TrashIcon,{className:"w-3 h-3"})})]})})]})},r.id)),0===v.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(h.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,r])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',r,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),r=e.i(599724),s=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:l=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return l?(0,t.jsx)(s.default,{value:e,onChange:a,disabledCallbacks:i,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.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,t.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,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(r.Text,{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,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),r=e.i(199133),s=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:l,onChange:i,disabled:n,loading:o,teamId:c})=>{let d=c?e?.filter(e=>e.team_id===c):e;return(0,t.jsx)(r.Select,{showSearch:!0,placeholder:"Search or select a project",value:l,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(s.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let r=d?.find(e=>e.project_id===t.key);if(!r)return!1;let s=e.toLowerCase().trim(),a=(r.project_alias||"").toLowerCase(),l=(r.project_id||"").toLowerCase();return a.includes(s)||l.includes(s)},optionFilterProp:"children",children:!o&&d?.map(e=>(0,t.jsxs)(r.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),r=e.i(207082),s=e.i(109799),a=e.i(510674),l=e.i(109034),i=e.i(292639),n=e.i(135214),o=e.i(500330),c=e.i(827252),d=e.i(912598),u=e.i(677667),m=e.i(130643),p=e.i(898667),h=e.i(994388),g=e.i(309426),f=e.i(350967),x=e.i(599724),y=e.i(779241),b=e.i(629569),v=e.i(464571),_=e.i(808613),j=e.i(311451),w=e.i(212931),k=e.i(91739),N=e.i(199133),C=e.i(790848),S=e.i(262218),T=e.i(592968),E=e.i(374009),O=e.i(271645),I=e.i(708347),M=e.i(552130),P=e.i(557662),A=e.i(9314),L=e.i(860585),R=e.i(82946),F=e.i(392110),D=e.i(533882),B=e.i(844565),$=e.i(651904),z=e.i(939510),K=e.i(460285),U=e.i(663435),q=e.i(363256),V=e.i(575260),G=e.i(371455),H=e.i(355619),W=e.i(75921),Q=e.i(390605),J=e.i(727749),Y=e.i(764205),X=e.i(237016),Z=e.i(888259);let ee=({apiKey:e})=>{let[r,s]=(0,O.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(X.CopyToClipboard,{text:e,onCopy:()=>{s(!0),Z.default.success("Key copied to clipboard"),setTimeout(()=>s(!1),2e3)},children:(0,t.jsx)(v.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,ee],364769);var et=e.i(435451),er=e.i(916940);let{Option:es}=N.Select,ea=async(e,t,r,s)=>{try{if(null===e||null===t)return[];if(null!==r){let a=(await (0,Y.modelAvailableCall)(r,e,t,!0,s,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},el=async(e,t,r,s)=>{try{if(null===e||null===t)return;if(null!==r){let a=(await (0,Y.modelAvailableCall)(r,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),s(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:X,data:Z,addKey:ei,autoOpenCreate:en,prefillData:eo})=>{let{accessToken:ec,userId:ed,userRole:eu,premiumUser:em}=(0,n.default)(),ep=em||null!=eu&&I.rolesWithWriteAccess.includes(eu),{data:eh,isLoading:eg}=(0,s.useOrganizations)(),{data:ef,isLoading:ex}=(0,a.useProjects)(),{data:ey}=(0,i.useUISettings)(),{data:eb}=(0,l.useTags)(),ev=!!ey?.values?.enable_projects_ui,e_=!!ey?.values?.disable_custom_api_keys,ej=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],ew=(0,d.useQueryClient)(),[ek]=_.Form.useForm(),[eN,eC]=(0,O.useState)(!1),[eS,eT]=(0,O.useState)(null),[eE,eO]=(0,O.useState)(null),[eI,eM]=(0,O.useState)([]),[eP,eA]=(0,O.useState)([]),[eL,eR]=(0,O.useState)("you"),[eF,eD]=(0,O.useState)(!1),[eB,e$]=(0,O.useState)(null),[ez,eK]=(0,O.useState)([]),[eU,eq]=(0,O.useState)([]),[eV,eG]=(0,O.useState)([]),[eH,eW]=(0,O.useState)([]),[eQ,eJ]=(0,O.useState)(e),[eY,eX]=(0,O.useState)(null),[eZ,e0]=(0,O.useState)(null),[e1,e2]=(0,O.useState)(!1),[e4,e3]=(0,O.useState)(null),[e6,e5]=(0,O.useState)({}),[e7,e8]=(0,O.useState)([]),[e9,te]=(0,O.useState)(!1),[tt,tr]=(0,O.useState)([]),[ts,ta]=(0,O.useState)([]),[tl,ti]=(0,O.useState)("llm_api"),[tn,to]=(0,O.useState)({}),[tc,td]=(0,O.useState)(!1),[tu,tm]=(0,O.useState)("30d"),[tp,th]=(0,O.useState)(null),[tg,tf]=(0,O.useState)(0),[tx,ty]=(0,O.useState)([]),[tb,tv]=(0,O.useState)(null),t_=()=>{eC(!1),ek.resetFields(),eW([]),ta([]),ti("llm_api"),to({}),td(!1),tm("30d"),th(null),tf(e=>e+1),tv(null),eX(null),e0(null)},tj=()=>{eC(!1),eT(null),eJ(null),ek.resetFields(),eW([]),ta([]),ti("llm_api"),to({}),td(!1),tm("30d"),th(null),tf(e=>e+1),tv(null),eX(null),e0(null)};(0,O.useEffect)(()=>{ed&&eu&&ec&&el(ed,eu,ec,eM)},[ec,ed,eu]),(0,O.useEffect)(()=>{ec&&(0,Y.getAgentsList)(ec).then(e=>ty(e?.agents||[])).catch(()=>ty([]))},[ec]),(0,O.useEffect)(()=>{let e=async()=>{try{let e=(await (0,Y.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eq(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,Y.getPromptsList)(ec);eG(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,Y.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);eK(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,O.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e5(JSON.parse(e));else{let e=await (0,Y.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e5(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,O.useEffect)(()=>{if(en&&!eF&&X&&eu&&I.rolesWithWriteAccess.includes(eu)&&(eC(!0),eD(!0),eo)){if(eo.owned_by&&("another_user"===eo.owned_by&&"Admin"!==eu?eR("you"):eR(eo.owned_by)),eo.team_id){let e=X?.find(e=>e.team_id===eo.team_id)||null;e&&(eJ(e),ek.setFieldsValue({team_id:eo.team_id}))}eo.key_alias&&ek.setFieldsValue({key_alias:eo.key_alias}),eo.models&&eo.models.length>0&&e$(eo.models),eo.key_type&&(ti(eo.key_type),ek.setFieldsValue({key_type:eo.key_type}))}},[en,eo,X,eF,ek,eu]);let tw=eP.includes("no-default-models")&&!eQ,tk=async e=>{try{let t,s=e?.key_alias??"",a=e?.team_id??null;if((Z?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(s))throw Error(`Key alias ${s} already exists for team with ID ${a}, please provide another key alias`);if(J.default.info("Making API Call"),eC(!0),"you"===eL)e.user_id=ed;else if("agent"===eL){if(!tb)return void J.default.fromBackend("Please select an agent");e.agent_id=tb}let l={};try{l=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eL&&(l.service_account_id=e.key_alias),eH.length>0&&(l={...l,logging:eH.filter(e=>e.callback_name)}),ts.length>0){let e=(0,P.mapDisplayToInternalNames)(ts);l={...l,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tu),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(l),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&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:r}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),r&&r.length>0&&(e.object_permission.mcp_access_groups=r),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:r}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),r&&r.length>0&&(e.object_permission.agent_access_groups=r),delete e.allowed_agents_and_groups}Object.keys(tn).length>0&&(e.aliases=JSON.stringify(tn)),tp?.router_settings&&Object.values(tp.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tp.router_settings),t="service_account"===eL?await (0,Y.keyCreateServiceAccountCall)(ec,e):await (0,Y.keyCreateCall)(ec,ed,e),console.log("key create Response:",t),ei(t),ew.invalidateQueries({queryKey:r.keyKeys.lists()}),eT(t.key),eO(t.soft_budget),J.default.success("Virtual Key Created"),ek.resetFields(),localStorage.removeItem("userData"+ed)}catch(t){console.log("error in create key:",t);let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let r=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),s=t?.error||t;s?.message&&(r=s.message)}}else{let t=e?.error||e;t?.message&&(r=t.message)}}catch(e){}return t.includes("team_member_permission_error")||r.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);J.default.fromBackend(e)}};(0,O.useEffect)(()=>{if(eZ){let e=ef?.find(e=>e.project_id===eZ);eA(e?.models??[]),ek.setFieldValue("models",[]);return}ed&&eu&&ec&&ea(ed,eu,ec,eQ?.team_id??null).then(e=>{eA(Array.from(new Set([...eQ?.models??[],...e])))}),eB||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eQ,eZ,ec,ed,eu,ek]),(0,O.useEffect)(()=>{if(!eB||0===eB.length||!eP||0===eP.length)return;let e=eB.filter(e=>eP.includes(e));e.length>0&&ek.setFieldsValue({models:e}),e$(null)},[eB,eP,ek]),(0,O.useEffect)(()=>{if(!eZ||!X)return;let e=ef?.find(e=>e.project_id===eZ);if(!e?.team_id||eQ?.team_id===e.team_id)return;let t=X.find(t=>t.team_id===e.team_id)||null;t&&(eJ(t),ek.setFieldValue("team_id",t.team_id))},[X,eZ,ef]);let tN=async e=>{if(!e)return void e8([]);te(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let r=(await (0,Y.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(r)}catch(e){console.error("Error fetching users:",e),J.default.fromBackend("Failed to search for users")}finally{te(!1)}},tC=(0,O.useCallback)((0,E.default)(e=>tN(e),300),[ec]);return(0,t.jsxs)("div",{children:[eu&&I.rolesWithWriteAccess.includes(eu)&&(0,t.jsx)(h.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eN,width:1e3,footer:null,onOk:t_,onCancel:tj,children:(0,t.jsxs)(_.Form,{form:ek,onFinish:tk,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(k.Radio.Group,{onChange:e=>eR(e.target.value),value:eL,children:[(0,t.jsx)(k.Radio,{value:"you",children:"You"}),(0,t.jsx)(k.Radio,{value:"service_account",children:"Service Account"}),"Admin"===eu&&(0,t.jsx)(k.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(k.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eL&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===eL,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tC(e)},onSelect:(e,t)=>{let r;return r=t.user,void ek.setFieldsValue({user_id:r.user_id})},options:e7,loading:e9,allowClear:!0,style:{width:"100%"},notFoundContent:e9?"Searching...":"No users found"}),(0,t.jsx)(v.Button,{onClick:()=>e2(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===eL&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tb,onChange:e=>tv(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tx.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(q.default,{organizations:eh,loading:eg,disabled:"Admin"!==eu,onChange:e=>{eX(e||null),eJ(null),e0(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===eL,message:"Please select a team for the service account"}],help:"service_account"===eL?"required":"",children:(0,t.jsx)(U.default,{disabled:null!==eZ,organizationId:eY,onTeamSelect:e=>{eJ(e),e0(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eX(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eX(null),ek.setFieldValue("organization_id",void 0))}})}),ev&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(V.default,{projects:ef,teamId:eQ?.team_id,loading:ex||!X,onChange:e=>{if(!e){e0(null),eJ(null),ek.setFieldValue("team_id",void 0);return}e0(e)}})})]}),tw&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(x.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tw&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eL||"another_user"===eL?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eL||"another_user"===eL?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===eL?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(y.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tl||"read_only"===tl?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(N.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tl||"read_only"===tl,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!eZ&&(0,t.jsx)(es,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eP.map(e=>(0,t.jsx)(es,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(N.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{ti(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(es,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(es,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(es,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tw&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,r)=>{if(r&&e&&null!==e.max_budget&&r>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(et.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(L.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,r)=>{if(r&&e&&null!==e.tpm_limit&&r>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(et.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,r)=>{if(r&&e&&null!==e.rpm_limit&&r>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(et.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:ep?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:ez.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:ep?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(C.Switch,{disabled:!ep,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:em?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!em,placeholder:em?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eU.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:em?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!em,placeholder:em?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eV.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(A.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:em?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(B.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:em?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!em,teamId:eQ?eQ.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(j.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:ej})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(W.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eQ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(j.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(Q.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(M.default,{onChange:e=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),em?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)($.default,{value:eH,onChange:eW,premiumUser:!0,disabledCallbacks:ts,onDisabledCallbacksChange:ta})})})]}):(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)($.default,{value:eH,onChange:eW,premiumUser:!1,disabledCallbacks:ts,onDisabledCallbacksChange:ta})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(K.default,{accessToken:ec||"",value:tp||void 0,onChange:th,modelData:eI.length>0?{data:eI.map(e=>({model_name:e}))}:void 0},tg)})})]},`router-settings-accordion-${tg}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(x.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(D.default,{accessToken:ec,initialModelAliases:tn,onAliasUpdate:to,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(F.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:td,rotationInterval:tu,onRotationIntervalChange:tm,isCreateMode:!0})})}),(0,t.jsx)(_.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(j.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:Y.proxyBaseUrl?`${Y.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(c.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(R.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...e_?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(v.Button,{htmlType:"submit",disabled:tw,style:{opacity:tw?.5:1},children:"Create Key"})})]})}),e1&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e1,onCancel:()=>e2(!1),footer:null,width:800,children:(0,t.jsx)(G.CreateUserButton,{userID:ed,accessToken:ec,teams:X,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e2(!1)},isEmbedded:!0})}),eS&&(0,t.jsx)(w.Modal,{open:eN,onOk:t_,onCancel:tj,footer:null,children:(0,t.jsxs)(f.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(g.Col,{numColSpan:1,children:null!=eS?(0,t.jsx)(ee,{apiKey:eS}):(0,t.jsx)(x.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,ea,"fetchUserModels",0,el],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a0871b3a8352592c.js b/litellm/proxy/_experimental/out/_next/static/chunks/a0871b3a8352592c.js deleted file mode 100644 index 0fd2a0b670..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/a0871b3a8352592c.js +++ /dev/null @@ -1,10 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(829087),n=e.i(480731),l=e.i(444755),a=e.i(673706),i=e.i(95779);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"}},s={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"}},c={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=(0,a.makeClassName)("Icon"),u=r.default.forwardRef((e,u)=>{let{icon:b,variant:m="simple",tooltip:p,size:f=n.Sizes.SM,color:h,className:y}=e,$=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),x=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,a.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,a.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,a.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,a.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,a.getColorClassNames)(t,i.colorPalette.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,a.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.tremorTwMerge)((0,a.getColorClassNames)(t,i.colorPalette.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,a.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,a.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,a.getColorClassNames)(t,i.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.tremorTwMerge)((0,a.getColorClassNames)(t,i.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(m,h),{tooltipProps:v,getReferenceProps:O}=(0,o.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,a.mergeRefs)([u,v.refs.setReference]),className:(0,l.tremorTwMerge)(g("root"),"inline-flex shrink-0 items-center justify-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,c[m].rounded,c[m].border,c[m].shadow,c[m].ring,d[f].paddingX,d[f].paddingY,y)},O,$),r.default.createElement(o.default,Object.assign({text:p},v)),r.default.createElement(b,{className:(0,l.tremorTwMerge)(g("icon"),"shrink-0",s[f].height,s[f].width)}))});u.displayName="Icon",e.s(["default",()=>u],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(908206),n=e.i(242064),l=e.i(517455),a=e.i(150073);let i={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},d=t.default.createContext({});var s=e.i(876556),c=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r},g=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let u=e=>{let{itemPrefixCls:o,component:n,span:l,className:a,style:i,labelStyle:s,contentStyle:c,bordered:g,label:u,content:b,colon:m,type:p,styles:f}=e,{classNames:h}=t.useContext(d),y=Object.assign(Object.assign({},s),null==f?void 0:f.label),$=Object.assign(Object.assign({},c),null==f?void 0:f.content);if(g)return t.createElement(n,{colSpan:l,style:i,className:(0,r.default)(a,{[`${o}-item-${p}`]:"label"===p||"content"===p,[null==h?void 0:h.label]:(null==h?void 0:h.label)&&"label"===p,[null==h?void 0:h.content]:(null==h?void 0:h.content)&&"content"===p})},null!=u&&t.createElement("span",{style:y},u),null!=b&&t.createElement("span",{style:$},b));return t.createElement(n,{colSpan:l,style:i,className:(0,r.default)(`${o}-item`,a)},t.createElement("div",{className:`${o}-item-container`},null!=u&&t.createElement("span",{style:y,className:(0,r.default)(`${o}-item-label`,null==h?void 0:h.label,{[`${o}-item-no-colon`]:!m})},u),null!=b&&t.createElement("span",{style:$,className:(0,r.default)(`${o}-item-content`,null==h?void 0:h.content)},b)))};function b(e,{colon:r,prefixCls:o,bordered:n},{component:l,type:a,showLabel:i,showContent:d,labelStyle:s,contentStyle:c,styles:g}){return e.map(({label:e,children:b,prefixCls:m=o,className:p,style:f,labelStyle:h,contentStyle:y,span:$=1,key:x,styles:v},O)=>"string"==typeof l?t.createElement(u,{key:`${a}-${x||O}`,className:p,style:f,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},s),null==g?void 0:g.label),h),null==v?void 0:v.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==g?void 0:g.content),y),null==v?void 0:v.content)},span:$,colon:r,component:l,itemPrefixCls:m,bordered:n,label:i?e:null,content:d?b:null,type:a}):[t.createElement(u,{key:`label-${x||O}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},s),null==g?void 0:g.label),f),h),null==v?void 0:v.label),span:1,colon:r,component:l[0],itemPrefixCls:m,bordered:n,label:e,type:"label"}),t.createElement(u,{key:`content-${x||O}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==g?void 0:g.content),f),y),null==v?void 0:v.content),span:2*$-1,component:l[1],itemPrefixCls:m,bordered:n,content:b,type:"content"})])}let m=e=>{let r=t.useContext(d),{prefixCls:o,vertical:n,row:l,index:a,bordered:i}=e;return n?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${a}`,className:`${o}-row`},b(l,e,Object.assign({component:"th",type:"label",showLabel:!0},r))),t.createElement("tr",{key:`content-${a}`,className:`${o}-row`},b(l,e,Object.assign({component:"td",type:"content",showContent:!0},r)))):t.createElement("tr",{key:a,className:`${o}-row`},b(l,e,Object.assign({component:i?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},r)))};e.i(296059);var p=e.i(915654),f=e.i(183293),h=e.i(246422),y=e.i(838378);let $=(0,h.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:r,itemPaddingBottom:o,itemPaddingEnd:n,colonMarginRight:l,colonMarginLeft:a,titleMarginBottom:i}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,f.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:r}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.padding)} ${(0,p.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:r,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.paddingSM)} ${(0,p.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.paddingXS)} ${(0,p.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:i},[`${t}-title`]:Object.assign(Object.assign({},f.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:r,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:o,paddingInlineEnd:n},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,p.unit)(a)} ${(0,p.unit)(l)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,y.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var x=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let v=e=>{let u,{prefixCls:b,title:p,extra:f,column:h,colon:y=!0,bordered:v,layout:O,children:j,className:C,rootClassName:S,style:w,size:k,labelStyle:E,contentStyle:N,styles:T,items:P,classNames:z}=e,B=x(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:M,direction:L,className:I,style:R,classNames:H,styles:G}=(0,n.useComponentConfig)("descriptions"),W=M("descriptions",b),X=(0,a.default)(),A=t.useMemo(()=>{var e;return"number"==typeof h?h:null!=(e=(0,o.matchScreen)(X,Object.assign(Object.assign({},i),h)))?e:3},[X,h]),D=(u=t.useMemo(()=>P||(0,s.default)(j).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[P,j]),t.useMemo(()=>u.map(e=>{var{span:t}=e,r=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},r),{filled:!0}):Object.assign(Object.assign({},r),{span:"number"==typeof t?t:(0,o.matchScreen)(X,t)})}),[u,X])),F=(0,l.default)(k),K=((e,r)=>{let[o,n]=(0,t.useMemo)(()=>{let t,o,n,l;return t=[],o=[],n=!1,l=0,r.filter(e=>e).forEach(r=>{let{filled:a}=r,i=g(r,["filled"]);if(a){o.push(i),t.push(o),o=[],l=0;return}let d=e-l;(l+=r.span||1)>=e?(l>e?(n=!0,o.push(Object.assign(Object.assign({},i),{span:d}))):o.push(i),t.push(o),o=[],l=0):o.push(i)}),o.length>0&&t.push(o),[t=t.map(t=>{let r=t.reduce((e,t)=>e+(t.span||1),0);if(r({labelStyle:E,contentStyle:N,styles:{content:Object.assign(Object.assign({},G.content),null==T?void 0:T.content),label:Object.assign(Object.assign({},G.label),null==T?void 0:T.label)},classNames:{label:(0,r.default)(H.label,null==z?void 0:z.label),content:(0,r.default)(H.content,null==z?void 0:z.content)}}),[E,N,T,z,H,G]);return Y(t.createElement(d.Provider,{value:Q},t.createElement("div",Object.assign({className:(0,r.default)(W,I,H.root,null==z?void 0:z.root,{[`${W}-${F}`]:F&&"default"!==F,[`${W}-bordered`]:!!v,[`${W}-rtl`]:"rtl"===L},C,S,q,_),style:Object.assign(Object.assign(Object.assign(Object.assign({},R),G.root),null==T?void 0:T.root),w)},B),(p||f)&&t.createElement("div",{className:(0,r.default)(`${W}-header`,H.header,null==z?void 0:z.header),style:Object.assign(Object.assign({},G.header),null==T?void 0:T.header)},p&&t.createElement("div",{className:(0,r.default)(`${W}-title`,H.title,null==z?void 0:z.title),style:Object.assign(Object.assign({},G.title),null==T?void 0:T.title)},p),f&&t.createElement("div",{className:(0,r.default)(`${W}-extra`,H.extra,null==z?void 0:z.extra),style:Object.assign(Object.assign({},G.extra),null==T?void 0:T.extra)},f)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,K.map((e,r)=>t.createElement(m,{key:r,index:r,colon:y,prefixCls:W,vertical:"vertical"===O,bordered:v,row:e}))))))))};v.Item=({children:e})=>e,e.s(["Descriptions",0,v],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var n=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(n.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["ExclamationCircleOutlined",0,l],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(529681),n=e.i(242064),l=e.i(517455),a=e.i(185793),i=e.i(721369),d=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let s=e=>{var{prefixCls:o,className:l,hoverable:a=!0}=e,i=d(e,["prefixCls","className","hoverable"]);let{getPrefixCls:s}=t.useContext(n.ConfigContext),c=s("card",o),g=(0,r.default)(`${c}-grid`,l,{[`${c}-grid-hoverable`]:a});return t.createElement("div",Object.assign({},i,{className:g}))};e.i(296059);var c=e.i(915654),g=e.i(183293),u=e.i(246422),b=e.i(838378);let m=(0,u.genStyleHooks)("Card",e=>{let t=(0,b.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:r,cardHeadPadding:o,colorBorderSecondary:n,boxShadowTertiary:l,bodyPadding:a,extraColor:i}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:l},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:o,headerPadding:n,tabsMarginBottom:l}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:o,marginBottom:-1,padding:`0 ${(0,c.unit)(n)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`},(0,g.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},g.textEllipsis),{[` - > ${r}-typography, - > ${r}-typography-edit-content - `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:l,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:i,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:a,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:o,lineWidth:n}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` - ${(0,c.unit)(n)} 0 0 0 ${r}, - 0 ${(0,c.unit)(n)} 0 0 ${r}, - ${(0,c.unit)(n)} ${(0,c.unit)(n)} 0 0 ${r}, - ${(0,c.unit)(n)} 0 0 0 ${r} inset, - 0 ${(0,c.unit)(n)} 0 0 ${r} inset; - `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:o}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:r,actionsLiMargin:o,cardActionsIconSize:n,colorBorderSecondary:l,actionsBg:a}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${l}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,g.clearFix)()),{"& > li":{margin:o,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:n,lineHeight:(0,c.unit)(e.calc(n).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${l}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,g.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},g.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${n}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:r}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:o}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:r,headerPadding:o,bodyPadding:n}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(o)}`,background:r,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.unit)(n)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:r,headerPaddingSM:o,headerHeightSM:n,headerFontSizeSM:l}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:n,padding:`0 ${(0,c.unit)(o)}`,fontSize:l,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:r}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,r;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(r=e.headerPadding)?r:e.paddingLG}});var p=e.i(792812),f=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let h=e=>{let{actionClasses:r,actions:o=[],actionStyle:n}=e;return t.createElement("ul",{className:r,style:n},o.map((e,r)=>{let n=`action-${r}`;return t.createElement("li",{style:{width:`${100/o.length}%`},key:n},t.createElement("span",null,e))}))},y=t.forwardRef((e,d)=>{let c,{prefixCls:g,className:u,rootClassName:b,style:y,extra:$,headStyle:x={},bodyStyle:v={},title:O,loading:j,bordered:C,variant:S,size:w,type:k,cover:E,actions:N,tabList:T,children:P,activeTabKey:z,defaultActiveTabKey:B,tabBarExtraContent:M,hoverable:L,tabProps:I={},classNames:R,styles:H}=e,G=f(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:W,direction:X,card:A}=t.useContext(n.ConfigContext),[D]=(0,p.default)("card",S,C),F=e=>{var t;return(0,r.default)(null==(t=null==A?void 0:A.classNames)?void 0:t[e],null==R?void 0:R[e])},K=e=>{var t;return Object.assign(Object.assign({},null==(t=null==A?void 0:A.styles)?void 0:t[e]),null==H?void 0:H[e])},Y=t.useMemo(()=>{let e=!1;return t.Children.forEach(P,t=>{(null==t?void 0:t.type)===s&&(e=!0)}),e},[P]),q=W("card",g),[_,Q,U]=m(q),V=t.createElement(a.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},P),J=void 0!==z,Z=Object.assign(Object.assign({},I),{[J?"activeKey":"defaultActiveKey"]:J?z:B,tabBarExtraContent:M}),ee=(0,l.default)(w),et=ee&&"default"!==ee?ee:"large",er=T?t.createElement(i.default,Object.assign({size:et},Z,{className:`${q}-head-tabs`,onChange:t=>{var r;null==(r=e.onTabChange)||r.call(e,t)},items:T.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(O||$||er){let e=(0,r.default)(`${q}-head`,F("header")),o=(0,r.default)(`${q}-head-title`,F("title")),n=(0,r.default)(`${q}-extra`,F("extra")),l=Object.assign(Object.assign({},x),K("header"));c=t.createElement("div",{className:e,style:l},t.createElement("div",{className:`${q}-head-wrapper`},O&&t.createElement("div",{className:o,style:K("title")},O),$&&t.createElement("div",{className:n,style:K("extra")},$)),er)}let eo=(0,r.default)(`${q}-cover`,F("cover")),en=E?t.createElement("div",{className:eo,style:K("cover")},E):null,el=(0,r.default)(`${q}-body`,F("body")),ea=Object.assign(Object.assign({},v),K("body")),ei=t.createElement("div",{className:el,style:ea},j?V:P),ed=(0,r.default)(`${q}-actions`,F("actions")),es=(null==N?void 0:N.length)?t.createElement(h,{actionClasses:ed,actionStyle:K("actions"),actions:N}):null,ec=(0,o.default)(G,["onTabChange"]),eg=(0,r.default)(q,null==A?void 0:A.className,{[`${q}-loading`]:j,[`${q}-bordered`]:"borderless"!==D,[`${q}-hoverable`]:L,[`${q}-contain-grid`]:Y,[`${q}-contain-tabs`]:null==T?void 0:T.length,[`${q}-${ee}`]:ee,[`${q}-type-${k}`]:!!k,[`${q}-rtl`]:"rtl"===X},u,b,Q,U),eu=Object.assign(Object.assign({},null==A?void 0:A.style),y);return _(t.createElement("div",Object.assign({ref:d},ec,{className:eg,style:eu}),c,en,ei,es))});var $=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};y.Grid=s,y.Meta=e=>{let{prefixCls:o,className:l,avatar:a,title:i,description:d}=e,s=$(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(n.ConfigContext),g=c("card",o),u=(0,r.default)(`${g}-meta`,l),b=a?t.createElement("div",{className:`${g}-meta-avatar`},a):null,m=i?t.createElement("div",{className:`${g}-meta-title`},i):null,p=d?t.createElement("div",{className:`${g}-meta-description`},d):null,f=m||p?t.createElement("div",{className:`${g}-meta-detail`},m,p):null;return t.createElement("div",Object.assign({},s,{className:u}),b,f)},e.s(["Card",0,y],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),r=e.i(560445),o=e.i(175712),n=e.i(869216),l=e.i(311451),a=e.i(212931),i=e.i(898586);e.i(296059);var d=e.i(868297),s=e.i(732961),c=e.i(289882),g=e.i(170517),u=e.i(628882),b=e.i(320890),m=e.i(104458),p=e.i(722319),f=e.i(8398),h=e.i(279728);e.i(765846);var y=e.i(602716),$=e.i(328052);e.i(262370);var x=e.i(135551);let v=(e,t)=>new x.FastColor(e).setA(t).toRgbString(),O=(e,t)=>new x.FastColor(e).lighten(t).toHexString(),j=e=>{let t=(0,y.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},C=(e,t)=>{let r=e||"#000",o=t||"#fff";return{colorBgBase:r,colorTextBase:o,colorText:v(o,.85),colorTextSecondary:v(o,.65),colorTextTertiary:v(o,.45),colorTextQuaternary:v(o,.25),colorFill:v(o,.18),colorFillSecondary:v(o,.12),colorFillTertiary:v(o,.08),colorFillQuaternary:v(o,.04),colorBgSolid:v(o,.95),colorBgSolidHover:v(o,1),colorBgSolidActive:v(o,.9),colorBgElevated:O(r,12),colorBgContainer:O(r,8),colorBgLayout:O(r,0),colorBgSpotlight:O(r,26),colorBgBlur:v(o,.04),colorBorder:O(r,26),colorBorderSecondary:O(r,19)}},S={defaultSeed:b.defaultConfig.token,useToken:function(){let[e,t,r]=(0,m.useToken)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:p.default,darkAlgorithm:(e,t)=>{let r=Object.keys(g.defaultPresetColors).map(t=>{let r=(0,y.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,o,n)=>(e[`${t}-${n+1}`]=r[n],e[`${t}${n+1}`]=r[n],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),o=null!=t?t:(0,p.default)(e),n=(0,$.default)(e,{generateColorPalettes:j,generateNeutralColorPalettes:C});return Object.assign(Object.assign(Object.assign(Object.assign({},o),r),n),{colorPrimaryBg:n.colorPrimaryBorder,colorPrimaryBgHover:n.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,p.default)(e),o=r.fontSizeSM,n=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,o=r-2;return{sizeXXL:t*(o+10),sizeXL:t*(o+6),sizeLG:t*(o+2),sizeMD:t*(o+2),sizeMS:t*(o+1),size:t*o,sizeSM:t*o,sizeXS:t*(o-1),sizeXXS:t*(o-1)}}(null!=t?t:e)),(0,h.default)(o)),{controlHeight:n}),(0,f.default)(Object.assign(Object.assign({},r),{controlHeight:n})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,d.createTheme)(e.algorithm):c.default,r=Object.assign(Object.assign({},g.default),null==e?void 0:e.token);return(0,s.getComputedToken)(r,{override:null==e?void 0:e.token},t,u.default)},defaultConfig:b.defaultConfig,_internalContext:b.DesignTokenContext};e.s(["theme",0,S],368869);var w=e.i(270377),k=e.i(271645);function E({isOpen:e,title:d,alertMessage:s,message:c,resourceInformationTitle:g,resourceInformation:u,onCancel:b,onOk:m,confirmLoading:p,requiredConfirmation:f}){let{Title:h,Text:y}=i.Typography,{token:$}=S.useToken(),[x,v]=(0,k.useState)("");return(0,k.useEffect)(()=>{e&&v("")},[e]),(0,t.jsx)(a.Modal,{title:d,open:e,onOk:m,onCancel:b,confirmLoading:p,okText:p?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!f&&x!==f||p},cancelButtonProps:{disabled:p},children:(0,t.jsxs)("div",{className:"space-y-4",children:[s&&(0,t.jsx)(r.Alert,{message:s,type:"warning"}),(0,t.jsx)(o.Card,{title:g,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder}},style:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder},children:(0,t.jsx)(n.Descriptions,{column:1,size:"small",children:u&&u.map(({label:e,value:r,...o})=>(0,t.jsx)(n.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(y,{...o,children:r??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(y,{children:c})}),f&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(y,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(y,{children:"Type "}),(0,t.jsx)(y,{strong:!0,type:"danger",children:f}),(0,t.jsx)(y,{children:" to confirm deletion:"})]}),(0,t.jsx)(l.Input,{value:x,onChange:e=>v(e.target.value),placeholder:f,className:"rounded-md",prefix:(0,t.jsx)(w.ExclamationCircleOutlined,{style:{color:$.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>E],127952)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a09028cd611c08ef.js b/litellm/proxy/_experimental/out/_next/static/chunks/a09028cd611c08ef.js new file mode 100644 index 0000000000..b278a8b9ab --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/a09028cd611c08ef.js @@ -0,0 +1,2 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,83733,233137,e=>{"use strict";let t,n;var r,o,l=e.i(247167),i=e.i(271645),u=e.i(544508),s=e.i(746725),a=e.i(835696);void 0!==l.default&&"u">typeof globalThis&&"u">typeof Element&&(null==(r=null==l.default?void 0:l.default.env)?void 0:r.NODE_ENV)==="test"&&void 0===(null==(o=null==Element?void 0:Element.prototype)?void 0:o.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(` +`)),[]});var c=((t=c||{})[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t);function d(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function f(e,t,n,r){let[o,l]=(0,i.useState)(n),{hasFlag:c,addFlag:d,removeFlag:f}=function(e=0){let[t,n]=(0,i.useState)(e),r=(0,i.useCallback)(e=>n(e),[t]),o=(0,i.useCallback)(e=>n(t=>t|e),[t]),l=(0,i.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:r,addFlag:o,hasFlag:l,removeFlag:(0,i.useCallback)(e=>n(t=>t&~e),[n]),toggleFlag:(0,i.useCallback)(e=>n(t=>t^e),[n])}}(e&&o?3:0),p=(0,i.useRef)(!1),m=(0,i.useRef)(!1),v=(0,s.useDisposables)();return(0,a.useIsoMorphicEffect)(()=>{var o;if(e){if(n&&l(!0),!t){n&&d(3);return}return null==(o=null==r?void 0:r.start)||o.call(r,n),function(e,{prepare:t,run:n,done:r,inFlight:o}){let l=(0,u.disposables)();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:o}),l.nextFrame(()=>{n(),l.requestAnimationFrame(()=>{l.add(function(e,t){var n,r;let o=(0,u.disposables)();if(!e)return o.dispose;let l=!1;o.add(()=>{l=!0});let i=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?r:[];return 0===i.length?t():Promise.allSettled(i.map(e=>e.finished)).then(()=>{l||t()}),o.dispose}(e,r))})}),l.dispose}(t,{inFlight:p,prepare(){m.current?m.current=!1:m.current=p.current,p.current=!0,m.current||(n?(d(3),f(4)):(d(4),f(2)))},run(){m.current?n?(f(3),d(4)):(f(4),d(3)):n?f(1):d(1)},done(){var e;m.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(p.current=!1,f(7),n||l(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})}},[e,n,t,v]),e?[o,{closed:c(1),enter:c(2),leave:c(4),transition:c(2)||c(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}e.s(["transitionDataAttributes",()=>d,"useTransition",()=>f],83733);let p=(0,i.createContext)(null);p.displayName="OpenClosedContext";var m=((n=m||{})[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n);function v(){return(0,i.useContext)(p)}function g({value:e,children:t}){return i.default.createElement(p.Provider,{value:e},t)}function h({children:e}){return i.default.createElement(p.Provider,{value:null},e)}e.s(["OpenClosedProvider",()=>g,"ResetOpenClosedProvider",()=>h,"State",()=>m,"useOpenClosed",()=>v],233137)},233538,e=>{"use strict";function t(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(null==t?void 0:t.getAttribute("disabled"))==="";return!(r&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}e.s(["isDisabledReactIssue7711",()=>t])},220508,e=>{"use strict";var t=e.i(271645);let n=t.forwardRef(function(e,n){return t.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),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["CheckCircleIcon",0,n],220508)},503269,214520,601893,694421,140721,942803,35889,722678,e=>{"use strict";var t=e.i(271645),n=e.i(914189);function r(e,r,o){let[l,i]=(0,t.useState)(o),u=void 0!==e,s=(0,t.useRef)(u),a=(0,t.useRef)(!1),c=(0,t.useRef)(!1);return!u||s.current||a.current?u||!s.current||c.current||(c.current=!0,s.current=u,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(a.current=!0,s.current=u,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[u?e:l,(0,n.useEvent)(e=>(u||i(e),null==r?void 0:r(e)))]}function o(e){let[n]=(0,t.useState)(e);return n}e.s(["useControllable",()=>r],503269),e.s(["useDefaultValue",()=>o],214520);let l=(0,t.createContext)(void 0);function i(){return(0,t.useContext)(l)}e.s(["useDisabled",()=>i],601893);var u=e.i(174080),s=e.i(746725);function a(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))!function e(t,n,r){if(Array.isArray(r))for(let[o,l]of r.entries())e(t,c(n,o.toString()),l);else r instanceof Date?t.push([n,r.toISOString()]):"boolean"==typeof r?t.push([n,r?"1":"0"]):"string"==typeof r?t.push([n,r]):"number"==typeof r?t.push([n,`${r}`]):null==r?t.push([n,""]):a(r,n,t)}(n,c(t,r),o);return n}function c(e,t){return e?e+"["+t+"]":t}function d(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=r.requestSubmit)||n.call(r)}}e.s(["attemptSubmit",()=>d,"objectToFormEntries",()=>a],694421);var f=e.i(700020),p=e.i(2788);let m=(0,t.createContext)(null);function v({children:e}){let n=(0,t.useContext)(m);if(!n)return t.default.createElement(t.default.Fragment,null,e);let{target:r}=n;return r?(0,u.createPortal)(t.default.createElement(t.default.Fragment,null,e),r):null}function g({data:e,form:n,disabled:r,onReset:o,overrides:l}){let[i,u]=(0,t.useState)(null),c=(0,s.useDisposables)();return(0,t.useEffect)(()=>{if(o&&i)return c.addEventListener(i,"reset",o)},[i,n,o]),t.default.createElement(v,null,t.default.createElement(h,{setForm:u,formId:n}),a(e).map(([e,o])=>t.default.createElement(p.Hidden,{features:p.HiddenFeatures.Hidden,...(0,f.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:r,name:e,value:o,...l})})))}function h({setForm:e,formId:n}){return(0,t.useEffect)(()=>{if(n){let t=document.getElementById(n);t&&e(t)}},[e,n]),n?null:t.default.createElement(p.Hidden,{features:p.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}e.s(["FormFields",()=>g],140721);let b=(0,t.createContext)(void 0);function x(){return(0,t.useContext)(b)}e.s(["useProvidedId",()=>x],942803);var E=e.i(835696),y=e.i(294316);let S=(0,t.createContext)(null);function R(){var e,n;return null!=(n=null==(e=(0,t.useContext)(S))?void 0:e.value)?n:void 0}function O(){let[e,r]=(0,t.useState)([]);return[e.length>0?e.join(" "):void 0,(0,t.useMemo)(()=>function(e){let o=(0,n.useEvent)(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),l=(0,t.useMemo)(()=>({register:o,slot:e.slot,name:e.name,props:e.props,value:e.value}),[o,e.slot,e.name,e.props,e.value]);return t.default.createElement(S.Provider,{value:l},e.children)},[r])]}S.displayName="DescriptionContext";let w=Object.assign((0,f.forwardRefWithAs)(function(e,n){let r=(0,t.useId)(),o=i(),{id:l=`headlessui-description-${r}`,...u}=e,s=function e(){let n=(0,t.useContext)(S);if(null===n){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return n}(),a=(0,y.useSyncRefs)(n);(0,E.useIsoMorphicEffect)(()=>s.register(l),[l,s.register]);let c=o||!1,d=(0,t.useMemo)(()=>({...s.slot,disabled:c}),[s.slot,c]),p={ref:a,...s.props,id:l};return(0,f.useRender)()({ourProps:p,theirProps:u,slot:d,defaultTag:"p",name:s.name||"Description"})}),{});e.s(["Description",()=>w,"useDescribedBy",()=>R,"useDescriptions",()=>O],35889);let C=(0,t.createContext)(null);function P(e){var n,r,o;let l=null!=(r=null==(n=(0,t.useContext)(C))?void 0:n.value)?r:void 0;return(null!=(o=null==e?void 0:e.length)?o:0)>0?[l,...e].filter(Boolean).join(" "):l}function M({inherit:e=!1}={}){let r=P(),[o,l]=(0,t.useState)([]),i=e?[r,...o].filter(Boolean):o;return[i.length>0?i.join(" "):void 0,(0,t.useMemo)(()=>function(e){let r=(0,n.useEvent)(e=>(l(t=>[...t,e]),()=>l(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),o=(0,t.useMemo)(()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value}),[r,e.slot,e.name,e.props,e.value]);return t.default.createElement(C.Provider,{value:o},e.children)},[l])]}C.displayName="LabelContext";let L=Object.assign((0,f.forwardRefWithAs)(function(e,r){var o;let l=(0,t.useId)(),u=function e(){let n=(0,t.useContext)(C);if(null===n){let t=Error("You used a