arize-phoenix 5.1.2__py3-none-any.whl → 5.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of arize-phoenix might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arize-phoenix
3
- Version: 5.1.2
3
+ Version: 5.1.3
4
4
  Summary: AI Observability and Evaluation
5
5
  Project-URL: Documentation, https://docs.arize.com/phoenix/
6
6
  Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
@@ -24,7 +24,6 @@ Requires-Dist: arize-phoenix-otel>=0.5.1
24
24
  Requires-Dist: authlib
25
25
  Requires-Dist: cachetools
26
26
  Requires-Dist: fastapi
27
- Requires-Dist: fastapi-mail
28
27
  Requires-Dist: grpc-interceptor
29
28
  Requires-Dist: grpcio
30
29
  Requires-Dist: hdbscan>=0.8.38
@@ -6,7 +6,7 @@ phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
6
6
  phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
7
7
  phoenix/services.py,sha256=aTxhcOA1pZHB6U-B3TEcp6fqDF5oT0xCUvEUNMZVTUQ,5175
8
8
  phoenix/settings.py,sha256=ht-0oN-sMV6SPXrk7Tu1EZlngpAYkGNLYPhO8DyrdQI,661
9
- phoenix/version.py,sha256=UBCMYF3p9TNaBbKwlj4g040bBVzeptAOIiaN6Za44mY,22
9
+ phoenix/version.py,sha256=qwCWrKr_CCqXOXqb3bXMphBWFsBKgp8wL1gP1s2VtkQ,22
10
10
  phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
12
12
  phoenix/core/model.py,sha256=km_a--PBHOuA337ClRw9xqhOHhrUT6Rl9pz_zV0JYkQ,4843
@@ -79,7 +79,7 @@ phoenix/server/dml_event.py,sha256=MpjCFqljxvgb9OB5Cez9vJesb3oHb3XxXictynBfcis,2
79
79
  phoenix/server/dml_event_handler.py,sha256=yU23-DDwXcL35p5EPwFW0oZh6mxQxJrJAQPKcYZYJz4,8310
80
80
  phoenix/server/grpc_server.py,sha256=nqeHg0FxGppjy8MqQUQ8DJtY4bkvJkR3tCxxmXGk6n0,3733
81
81
  phoenix/server/jwt_store.py,sha256=lmcTRBPoxMHzSV7WT8Ew40ag4uxeMWPLDw-vPIoWL8s,16829
82
- phoenix/server/main.py,sha256=mgKlPgzzT8LrSKaE7jjFg2mOUtIiChtu6Zvpvr7_FP0,16051
82
+ phoenix/server/main.py,sha256=pCKqOaJxAWwlXAl0AVIjHdszx3vkocMSSN9hJbsfsIs,15800
83
83
  phoenix/server/oauth2.py,sha256=4zt6NEh0o2a3HUThYs-FPqOeDcvYM3YKKMg-s_Awls0,2043
84
84
  phoenix/server/prometheus.py,sha256=x9zV3M8VeZ9GS32SLr5OxNdi1VaxvdHCZPx2zI8Hoa4,3549
85
85
  phoenix/server/rate_limiters.py,sha256=7UJDH9YTmBIeGFLJX1759-LpS-XNp0zN1TlzxyqTnZc,7163
@@ -243,7 +243,7 @@ phoenix/server/api/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
243
243
  phoenix/server/api/types/node.py,sha256=V0Xh9U4cGkz3iMg-vzEXtcs6cumU29JFPiU-JuGzjWI,848
244
244
  phoenix/server/api/types/pagination.py,sha256=PcaJ0s4exsTKgCZC4aFm1cgZNrGpHSdo6PbkWzPcweg,9077
245
245
  phoenix/server/email/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
246
- phoenix/server/email/sender.py,sha256=ejs5uKrPAerauhCFIUrW6MSGnOfNeLkI44RqiSaqG4Y,712
246
+ phoenix/server/email/sender.py,sha256=Df-fZKbK_01KEkjo8UnDiYSuU69YfknyI1neZK_kmwA,3388
247
247
  phoenix/server/email/types.py,sha256=URLIMwtQWbbDEKLWjZTw9snCxsfxqRyoXNyByttbVWE,213
248
248
  phoenix/server/email/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
249
249
  phoenix/server/email/templates/password_reset.html,sha256=jv0Pe-06JloPZcubRWxPdAFHYEn9eDj_4SjmuoIwshI,441
@@ -258,15 +258,15 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
258
258
  phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
259
259
  phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
260
260
  phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
261
- phoenix/server/static/.vite/manifest.json,sha256=QOliINx0UPD2CNJHqCm8ILZtigtAfICzwItrd5D8eO4,1929
262
- phoenix/server/static/assets/components-REunxTt6.js,sha256=ApfcG9-t_ykpASPnJDs-yuhkkgornxaTITG9EksZluw,260199
263
- phoenix/server/static/assets/index-DAPJxlCw.js,sha256=htKOg6pfLPJ-foBO9ald85Ba6WyD7RCmWpoJ5iOqH-M,6947
264
- phoenix/server/static/assets/pages-1VrMk2pW.js,sha256=7NCjjO5wpK-vt5gpNdaw96OsZvTsGHc9fTC5O-8OY_o,557793
265
- phoenix/server/static/assets/vendor-B5IC0ivG.js,sha256=rdlK4xyYuC5sf88-_InfYxqq0njgyziNCXhOzMocjG4,1435343
261
+ phoenix/server/static/.vite/manifest.json,sha256=jC-e9SL0phVtNYO7kWYfdzCJ9KTRcQgSD0-HvBaBaxE,1929
262
+ phoenix/server/static/assets/components-XIEhA1rq.js,sha256=HytAMc0JxF3ya3N5EXk8n0qZ6dIJAJW76H1KXjD25lQ,260199
263
+ phoenix/server/static/assets/index-DY9zA_Wc.js,sha256=PkHtj1YLIKiOeUGxAbCmHUoyeFbveG98Rw9jRNheZSY,6947
264
+ phoenix/server/static/assets/pages-BGZBXlrn.js,sha256=mYrs-S4gFqLeWla27tt9I5km2_XaHaqdq9LB7OH0Rro,557828
265
+ phoenix/server/static/assets/vendor-D8cj1ZYg.js,sha256=UeDWj3xjmDOo7XvqugE_ePbZZG_o1X6QqdB2Jop7dPs,1435307
266
266
  phoenix/server/static/assets/vendor-DxkFTwjz.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
267
- phoenix/server/static/assets/vendor-arizeai-aFbT4kl1.js,sha256=HB_erjTo0HSj-TYhrPHZHNLVnz3Sh0K0NfS0Tbb5Evc,304401
268
- phoenix/server/static/assets/vendor-codemirror-BEGorXSV.js,sha256=qdX5gBEdzbXID4Bvph79cnKcSDQn0KUs8DDFsy9KX7g,516470
269
- phoenix/server/static/assets/vendor-recharts-6nUU7gU_.js,sha256=-M0gdQ9iRQn0ogsYAI6809BJFGBRjxGEyByZAvqhG1A,282859
267
+ phoenix/server/static/assets/vendor-arizeai-BU1VHwXB.js,sha256=6rYhFTNVr64dh6y8iVOiRUr9YGLxTXJO2vbOlvltamE,304401
268
+ phoenix/server/static/assets/vendor-codemirror-BDMHmh1x.js,sha256=nHzc7sIu8XC6Tc0yGtmbxFpNjid2lVW7kuJ19l7QNRE,516470
269
+ phoenix/server/static/assets/vendor-recharts-BATX_8yP.js,sha256=lm_k7iQ4lulnBnESotJGLmQO_WfulqzciqGCrkQ6lww,282859
270
270
  phoenix/server/static/assets/vendor-three-DwGkEfCM.js,sha256=0D12ZgKzfKCTSdSTKJBFR2RZO_xxeMXrqDp0AszZqHY,620972
271
271
  phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
272
272
  phoenix/server/templates/index.html,sha256=ULNlp0-agU8pH4wCIapE1goqnwkbctAoQRgrfwH_irg,4379
@@ -306,8 +306,8 @@ phoenix/utilities/logging.py,sha256=B8t2WPULOwVyuGLRLbwKsw5N41N26vtgF-lCAYgWTEk,
306
306
  phoenix/utilities/project.py,sha256=8IJuMM4yUMoooPi37sictGj8Etu9rGmq6RFtc9848cQ,436
307
307
  phoenix/utilities/re.py,sha256=nr_B0txj_7CXc45953X6vr2KCRSWMuaXJSEkL8s8Sjc,2036
308
308
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
309
- arize_phoenix-5.1.2.dist-info/METADATA,sha256=Krw91Q3bZMcvgMCAWwIPbpVlpQO-bOi4jts1aOXAeuI,11861
310
- arize_phoenix-5.1.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
311
- arize_phoenix-5.1.2.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
312
- arize_phoenix-5.1.2.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
313
- arize_phoenix-5.1.2.dist-info/RECORD,,
309
+ arize_phoenix-5.1.3.dist-info/METADATA,sha256=mxQv9T_YVz1EjuQxW9Gb-215RAqNIkkq43jOWUTKHoI,11833
310
+ arize_phoenix-5.1.3.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
311
+ arize_phoenix-5.1.3.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
312
+ arize_phoenix-5.1.3.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
313
+ arize_phoenix-5.1.3.dist-info/RECORD,,
@@ -1,26 +1,97 @@
1
+ import asyncio
2
+ import smtplib
3
+ import ssl
4
+ from email.message import EmailMessage
1
5
  from pathlib import Path
6
+ from typing import Literal
2
7
 
3
- from fastapi_mail import ConnectionConfig, FastMail, MessageSchema
8
+ from jinja2 import Environment, FileSystemLoader, select_autoescape
4
9
 
5
10
  EMAIL_TEMPLATE_FOLDER = Path(__file__).parent / "templates"
6
11
 
7
12
 
8
- class FastMailSender:
9
- def __init__(self, conf: ConnectionConfig) -> None:
10
- self._fm = FastMail(conf)
13
+ class SimpleEmailSender:
14
+ def __init__(
15
+ self,
16
+ smtp_server: str,
17
+ smtp_port: int,
18
+ username: str,
19
+ password: str,
20
+ sender_email: str,
21
+ connection_method: Literal["STARTTLS", "SSL", "PLAIN"] = "STARTTLS",
22
+ validate_certs: bool = True,
23
+ ) -> None:
24
+ self.smtp_server = smtp_server
25
+ self.smtp_port = smtp_port
26
+ self.username = username
27
+ self.password = password
28
+ self.sender_email = sender_email
29
+ self.connection_method = connection_method.upper()
30
+ self.validate_certs = validate_certs
31
+
32
+ self.env = Environment(
33
+ loader=FileSystemLoader(EMAIL_TEMPLATE_FOLDER),
34
+ autoescape=select_autoescape(["html", "xml"]),
35
+ )
11
36
 
12
37
  async def send_password_reset_email(
13
38
  self,
14
39
  email: str,
15
40
  reset_url: str,
16
41
  ) -> None:
17
- message = MessageSchema(
18
- subject="[Phoenix] Password Reset Request",
19
- recipients=[email],
20
- template_body=dict(reset_url=reset_url),
21
- subtype="html",
22
- )
23
- await self._fm.send_message(
24
- message,
25
- template_name="password_reset.html",
26
- )
42
+ subject = "[Phoenix] Password Reset Request"
43
+ template_name = "password_reset.html"
44
+
45
+ template = self.env.get_template(template_name)
46
+ html_content = template.render(reset_url=reset_url)
47
+
48
+ msg = EmailMessage()
49
+ msg["Subject"] = subject
50
+ msg["From"] = self.sender_email
51
+ msg["To"] = email
52
+ msg.set_content(html_content, subtype="html")
53
+
54
+ def send_email() -> None:
55
+ context: ssl.SSLContext
56
+ if self.validate_certs:
57
+ context = ssl.create_default_context()
58
+ else:
59
+ context = ssl._create_unverified_context()
60
+
61
+ methods_to_try = [self.connection_method]
62
+ # add secure method fallbacks
63
+ if self.connection_method != "PLAIN":
64
+ if self.connection_method != "STARTTLS":
65
+ methods_to_try.append("STARTTLS")
66
+ elif self.connection_method != "SSL":
67
+ methods_to_try.append("SSL")
68
+
69
+ for method in methods_to_try:
70
+ try:
71
+ if method == "STARTTLS":
72
+ server = smtplib.SMTP(self.smtp_server, self.smtp_port)
73
+ server.ehlo()
74
+ server.starttls(context=context)
75
+ server.ehlo()
76
+ elif method == "SSL":
77
+ server = smtplib.SMTP_SSL(self.smtp_server, self.smtp_port, context=context)
78
+ server.ehlo()
79
+ elif method == "PLAIN":
80
+ server = smtplib.SMTP(self.smtp_server, self.smtp_port)
81
+ server.ehlo()
82
+ else:
83
+ continue # Unsupported method
84
+
85
+ if self.username and self.password:
86
+ server.login(self.username, self.password)
87
+
88
+ server.send_message(msg)
89
+ server.quit()
90
+ break # Success
91
+ except Exception as e:
92
+ print(f"Failed to send email using {method}: {e}")
93
+ continue
94
+ else:
95
+ raise Exception("All connection methods failed")
96
+
97
+ await asyncio.to_thread(send_email)
phoenix/server/main.py CHANGED
@@ -10,7 +10,6 @@ from time import sleep, time
10
10
  from typing import List, Optional
11
11
  from urllib.parse import urljoin
12
12
 
13
- from fastapi_mail import ConnectionConfig
14
13
  from jinja2 import BaseLoader, Environment
15
14
  from uvicorn import Config, Server
16
15
 
@@ -59,7 +58,7 @@ from phoenix.server.app import (
59
58
  create_engine_and_run_migrations,
60
59
  instrument_engine_if_enabled,
61
60
  )
62
- from phoenix.server.email.sender import EMAIL_TEMPLATE_FOLDER, FastMailSender
61
+ from phoenix.server.email.sender import SimpleEmailSender
63
62
  from phoenix.server.types import DbSessionFactory
64
63
  from phoenix.settings import Settings
65
64
  from phoenix.trace.fixtures import (
@@ -368,20 +367,15 @@ def main() -> None:
368
367
  if mail_sever := get_env_smtp_hostname():
369
368
  assert (mail_username := get_env_smtp_username()), "SMTP username is required"
370
369
  assert (mail_password := get_env_smtp_password()), "SMTP password is required"
371
- assert (mail_from := get_env_smtp_mail_from()), "SMTP mail_from is required"
372
- email_sender = FastMailSender(
373
- ConnectionConfig(
374
- MAIL_USERNAME=mail_username,
375
- MAIL_PASSWORD=mail_password,
376
- MAIL_FROM=mail_from,
377
- MAIL_SERVER=mail_sever,
378
- MAIL_PORT=get_env_smtp_port(),
379
- VALIDATE_CERTS=get_env_smtp_validate_certs(),
380
- USE_CREDENTIALS=True,
381
- MAIL_STARTTLS=True,
382
- MAIL_SSL_TLS=False,
383
- TEMPLATE_FOLDER=EMAIL_TEMPLATE_FOLDER,
384
- )
370
+ assert (sender_email := get_env_smtp_mail_from()), "SMTP mail_from is required"
371
+ email_sender = SimpleEmailSender(
372
+ smtp_server=mail_sever,
373
+ smtp_port=get_env_smtp_port(),
374
+ username=mail_username,
375
+ password=mail_password,
376
+ sender_email=sender_email,
377
+ connection_method="STARTTLS",
378
+ validate_certs=get_env_smtp_validate_certs(),
385
379
  )
386
380
  app = create_app(
387
381
  db=factory,
@@ -1,32 +1,32 @@
1
1
  {
2
- "_components-REunxTt6.js": {
3
- "file": "assets/components-REunxTt6.js",
2
+ "_components-XIEhA1rq.js": {
3
+ "file": "assets/components-XIEhA1rq.js",
4
4
  "name": "components",
5
5
  "imports": [
6
- "_vendor-B5IC0ivG.js",
7
- "_vendor-arizeai-aFbT4kl1.js",
8
- "_pages-1VrMk2pW.js",
6
+ "_vendor-D8cj1ZYg.js",
7
+ "_vendor-arizeai-BU1VHwXB.js",
8
+ "_pages-BGZBXlrn.js",
9
9
  "_vendor-three-DwGkEfCM.js",
10
- "_vendor-codemirror-BEGorXSV.js"
10
+ "_vendor-codemirror-BDMHmh1x.js"
11
11
  ]
12
12
  },
13
- "_pages-1VrMk2pW.js": {
14
- "file": "assets/pages-1VrMk2pW.js",
13
+ "_pages-BGZBXlrn.js": {
14
+ "file": "assets/pages-BGZBXlrn.js",
15
15
  "name": "pages",
16
16
  "imports": [
17
- "_vendor-B5IC0ivG.js",
18
- "_vendor-arizeai-aFbT4kl1.js",
19
- "_components-REunxTt6.js",
20
- "_vendor-recharts-6nUU7gU_.js",
21
- "_vendor-codemirror-BEGorXSV.js"
17
+ "_vendor-D8cj1ZYg.js",
18
+ "_vendor-arizeai-BU1VHwXB.js",
19
+ "_components-XIEhA1rq.js",
20
+ "_vendor-recharts-BATX_8yP.js",
21
+ "_vendor-codemirror-BDMHmh1x.js"
22
22
  ]
23
23
  },
24
24
  "_vendor-!~{003}~.js": {
25
25
  "file": "assets/vendor-DxkFTwjz.css",
26
26
  "src": "_vendor-!~{003}~.js"
27
27
  },
28
- "_vendor-B5IC0ivG.js": {
29
- "file": "assets/vendor-B5IC0ivG.js",
28
+ "_vendor-D8cj1ZYg.js": {
29
+ "file": "assets/vendor-D8cj1ZYg.js",
30
30
  "name": "vendor",
31
31
  "imports": [
32
32
  "_vendor-three-DwGkEfCM.js"
@@ -35,25 +35,25 @@
35
35
  "assets/vendor-DxkFTwjz.css"
36
36
  ]
37
37
  },
38
- "_vendor-arizeai-aFbT4kl1.js": {
39
- "file": "assets/vendor-arizeai-aFbT4kl1.js",
38
+ "_vendor-arizeai-BU1VHwXB.js": {
39
+ "file": "assets/vendor-arizeai-BU1VHwXB.js",
40
40
  "name": "vendor-arizeai",
41
41
  "imports": [
42
- "_vendor-B5IC0ivG.js"
42
+ "_vendor-D8cj1ZYg.js"
43
43
  ]
44
44
  },
45
- "_vendor-codemirror-BEGorXSV.js": {
46
- "file": "assets/vendor-codemirror-BEGorXSV.js",
45
+ "_vendor-codemirror-BDMHmh1x.js": {
46
+ "file": "assets/vendor-codemirror-BDMHmh1x.js",
47
47
  "name": "vendor-codemirror",
48
48
  "imports": [
49
- "_vendor-B5IC0ivG.js"
49
+ "_vendor-D8cj1ZYg.js"
50
50
  ]
51
51
  },
52
- "_vendor-recharts-6nUU7gU_.js": {
53
- "file": "assets/vendor-recharts-6nUU7gU_.js",
52
+ "_vendor-recharts-BATX_8yP.js": {
53
+ "file": "assets/vendor-recharts-BATX_8yP.js",
54
54
  "name": "vendor-recharts",
55
55
  "imports": [
56
- "_vendor-B5IC0ivG.js"
56
+ "_vendor-D8cj1ZYg.js"
57
57
  ]
58
58
  },
59
59
  "_vendor-three-DwGkEfCM.js": {
@@ -61,18 +61,18 @@
61
61
  "name": "vendor-three"
62
62
  },
63
63
  "index.tsx": {
64
- "file": "assets/index-DAPJxlCw.js",
64
+ "file": "assets/index-DY9zA_Wc.js",
65
65
  "name": "index",
66
66
  "src": "index.tsx",
67
67
  "isEntry": true,
68
68
  "imports": [
69
- "_vendor-B5IC0ivG.js",
70
- "_vendor-arizeai-aFbT4kl1.js",
71
- "_pages-1VrMk2pW.js",
72
- "_components-REunxTt6.js",
69
+ "_vendor-D8cj1ZYg.js",
70
+ "_vendor-arizeai-BU1VHwXB.js",
71
+ "_pages-BGZBXlrn.js",
72
+ "_components-XIEhA1rq.js",
73
73
  "_vendor-three-DwGkEfCM.js",
74
- "_vendor-recharts-6nUU7gU_.js",
75
- "_vendor-codemirror-BEGorXSV.js"
74
+ "_vendor-recharts-BATX_8yP.js",
75
+ "_vendor-codemirror-BDMHmh1x.js"
76
76
  ]
77
77
  }
78
78
  }
@@ -1,4 +1,4 @@
1
- import{c as $e,p as at,d as Ze,r as g,j as e,R as W,n as U1,a as Fe,C as Oe,b as X,s as it,e as rt,f as de,g as _e,h as Je,i as ze,k as ue,l as l1,m as lt,o as le,q as ot,t as st,u as o1,v as o,w as m,L as Q1,x as ct,N as dt,y as ut,z as mt,$ as N,A as Ge,B as pt,D as ht,E as gt,F as ft,G as w1,H as ce,I as he,J as Lt,K as j1,S as Ct,M as yt,Q as x1,O as vt,P as bt,T as kt,U as Ye,V as q1,W as wt,X as xt,Y as St,Z as Mt,_ as Tt,a0 as It,a1 as Et,a2 as Dt,a3 as Vt,a4 as Te,a5 as F,a6 as W1,a7 as Pt,a8 as Ft,a9 as _t,aa as At,ab as Nt,ac as zt,ad as Rt}from"./vendor-B5IC0ivG.js";import{u as Ot,A as Ht,I,a as x,_ as X1,b as v,c as D,d as b,e as H,f as q,T as B,g as Kt,h as Y,i as Ie,j as V,F as J1,k as z,l as Bt,m as $t,P as Zt,R as U,n as Ee,o as Gt,p as Ut,L as d1,q as ee,r as ne,s as De,t as Y1,v as en,E as nn,w as Qt,x as jt,y as qt,z as Wt,B as tn,C as u1,D as Xt,G as Jt,H as S1,J as Yt}from"./vendor-arizeai-aFbT4kl1.js";import{u as ea}from"./pages-1VrMk2pW.js";import{V as na}from"./vendor-three-DwGkEfCM.js";import{j as an,E as rn,l as ln,a as on,R as Ue,n as Qe,p as ta,b as aa}from"./vendor-codemirror-BEGorXSV.js";const ia=n=>{const t=a=>({markdownDisplayMode:"text",setMarkdownDisplayMode:i=>{a({markdownDisplayMode:i})},traceStreamingEnabled:!0,setTraceStreamingEnabled:i=>{a({traceStreamingEnabled:i})},lastNTimeRangeKey:"7d",setLastNTimeRangeKey:i=>{a({lastNTimeRangeKey:i})},projectsAutoRefreshEnabled:!0,setProjectAutoRefreshEnabled:i=>{a({projectsAutoRefreshEnabled:i})},showSpanAside:!0,setShowSpanAside:i=>{a({showSpanAside:i})},showMetricsInTraceTree:!0,setShowMetricsInTraceTree:i=>{a({showMetricsInTraceTree:i})},...n});return $e()(at(Ze(t),{name:"arize-phoenix-preferences"}))},sn=g.createContext(null);function ol({children:n,...t}){const a=g.useRef();return a.current||(a.current=ia(t)),e(sn.Provider,{value:a.current,children:n})}function se(n,t){const a=W.useContext(sn);if(!a)throw new Error("Missing PreferencesContext.Provider in the tree");return U1(a,n,t)}var Q=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(Q||{});function R(n){throw new Error("Unreachable")}function m1(n){return typeof n=="number"||n===null}function ra(n){return typeof n=="string"||n===null}function sl(n){return Array.isArray(n)?n.every(t=>typeof t=="string"):!1}function la(n){return typeof n=="object"&&n!==null}const p1=g.createContext(null);function je(){const n=W.useContext(p1);if(n===null)throw new Error("useInferences must be used within a InferencesProvider");return n}function cl(n){return e(p1.Provider,{value:{primaryInferences:n.primaryInferences,referenceInferences:n.referenceInferences,corpusInferences:n.corpusInferences,getInferencesNameByRole:t=>{var a,i;switch(t){case Q.primary:return n.primaryInferences.name;case Q.reference:return((a=n.referenceInferences)==null?void 0:a.name)??"reference";case Q.corpus:return((i=n.corpusInferences)==null?void 0:i.name)??"corpus";default:R()}}},children:n.children})}const cn=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},t={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},a={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},l=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],s=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"eventIds",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"driftRatio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"primaryToCorpusRatio",storageKey:null},{condition:"fetchDataQualityMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"columnName",variableName:"dataQualityMetricColumnName"},{kind:"Literal",name:"metric",value:"mean"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"dataQualityMetric",plural:!1,selections:l,storageKey:null}]},{condition:"fetchPerformanceMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"performanceMetric",plural:!1,selections:l,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,t,a,i,r],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:s,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,t,i,r],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:s},params:{cacheID:"86666967012812887ac0a0149d2d2535",id:null,metadata:{},name:"pointCloudStore_clusterMetricsQuery",operationKind:"query",text:`query pointCloudStore_clusterMetricsQuery(
1
+ import{c as $e,p as at,d as Ze,r as g,j as e,R as W,n as U1,a as Fe,C as Oe,b as X,s as it,e as rt,f as de,g as _e,h as Je,i as ze,k as ue,l as l1,m as lt,o as le,q as ot,t as st,u as o1,v as o,w as m,L as Q1,x as ct,N as dt,y as ut,z as mt,$ as N,A as Ge,B as pt,D as ht,E as gt,F as ft,G as w1,H as ce,I as he,J as Lt,K as j1,S as Ct,M as yt,Q as x1,O as vt,P as bt,T as kt,U as Ye,V as q1,W as wt,X as xt,Y as St,Z as Mt,_ as Tt,a0 as It,a1 as Et,a2 as Dt,a3 as Vt,a4 as Te,a5 as F,a6 as W1,a7 as Pt,a8 as Ft,a9 as _t,aa as At,ab as Nt,ac as zt,ad as Rt}from"./vendor-D8cj1ZYg.js";import{u as Ot,A as Ht,I,a as x,_ as X1,b as v,c as D,d as b,e as H,f as q,T as B,g as Kt,h as Y,i as Ie,j as V,F as J1,k as z,l as Bt,m as $t,P as Zt,R as U,n as Ee,o as Gt,p as Ut,L as d1,q as ee,r as ne,s as De,t as Y1,v as en,E as nn,w as Qt,x as jt,y as qt,z as Wt,B as tn,C as u1,D as Xt,G as Jt,H as S1,J as Yt}from"./vendor-arizeai-BU1VHwXB.js";import{u as ea}from"./pages-BGZBXlrn.js";import{V as na}from"./vendor-three-DwGkEfCM.js";import{j as an,E as rn,l as ln,a as on,R as Ue,n as Qe,p as ta,b as aa}from"./vendor-codemirror-BDMHmh1x.js";const ia=n=>{const t=a=>({markdownDisplayMode:"text",setMarkdownDisplayMode:i=>{a({markdownDisplayMode:i})},traceStreamingEnabled:!0,setTraceStreamingEnabled:i=>{a({traceStreamingEnabled:i})},lastNTimeRangeKey:"7d",setLastNTimeRangeKey:i=>{a({lastNTimeRangeKey:i})},projectsAutoRefreshEnabled:!0,setProjectAutoRefreshEnabled:i=>{a({projectsAutoRefreshEnabled:i})},showSpanAside:!0,setShowSpanAside:i=>{a({showSpanAside:i})},showMetricsInTraceTree:!0,setShowMetricsInTraceTree:i=>{a({showMetricsInTraceTree:i})},...n});return $e()(at(Ze(t),{name:"arize-phoenix-preferences"}))},sn=g.createContext(null);function ol({children:n,...t}){const a=g.useRef();return a.current||(a.current=ia(t)),e(sn.Provider,{value:a.current,children:n})}function se(n,t){const a=W.useContext(sn);if(!a)throw new Error("Missing PreferencesContext.Provider in the tree");return U1(a,n,t)}var Q=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(Q||{});function R(n){throw new Error("Unreachable")}function m1(n){return typeof n=="number"||n===null}function ra(n){return typeof n=="string"||n===null}function sl(n){return Array.isArray(n)?n.every(t=>typeof t=="string"):!1}function la(n){return typeof n=="object"&&n!==null}const p1=g.createContext(null);function je(){const n=W.useContext(p1);if(n===null)throw new Error("useInferences must be used within a InferencesProvider");return n}function cl(n){return e(p1.Provider,{value:{primaryInferences:n.primaryInferences,referenceInferences:n.referenceInferences,corpusInferences:n.corpusInferences,getInferencesNameByRole:t=>{var a,i;switch(t){case Q.primary:return n.primaryInferences.name;case Q.reference:return((a=n.referenceInferences)==null?void 0:a.name)??"reference";case Q.corpus:return((i=n.corpusInferences)==null?void 0:i.name)??"corpus";default:R()}}},children:n.children})}const cn=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},t={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},a={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},l=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],s=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"eventIds",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"driftRatio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"primaryToCorpusRatio",storageKey:null},{condition:"fetchDataQualityMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"columnName",variableName:"dataQualityMetricColumnName"},{kind:"Literal",name:"metric",value:"mean"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"dataQualityMetric",plural:!1,selections:l,storageKey:null}]},{condition:"fetchPerformanceMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"performanceMetric",plural:!1,selections:l,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,t,a,i,r],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:s,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,t,i,r],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:s},params:{cacheID:"86666967012812887ac0a0149d2d2535",id:null,metadata:{},name:"pointCloudStore_clusterMetricsQuery",operationKind:"query",text:`query pointCloudStore_clusterMetricsQuery(
2
2
  $clusters: [ClusterInput!]!
3
3
  $fetchDataQualityMetric: Boolean!
4
4
  $dataQualityMetricColumnName: String
@@ -1,4 +1,4 @@
1
- import{j as e,w as h,aR as b,d6 as x,d7 as f,v as n,d8 as r,d9 as y,da as P,r as v,b as w,db as R}from"./vendor-B5IC0ivG.js";import{v as L,a4 as z}from"./vendor-arizeai-aFbT4kl1.js";import{E,L as k,R as $,r as j,a as S,F as A,A as I,b as F,c as T,P as C,h as O,M as D,d,D as B,e as M,f as N,g as q,i as G,j as W,T as K,p as H,k as c,l as J,m as Q,n as p,o as U,q as m,s as g,t as V,v as X,w as Y,x as Z,y as _,z as ee,B as re,S as ae,C as oe,G as te}from"./pages-1VrMk2pW.js";import{bo as ne,i as se,R as le,bp as ie,bq as de}from"./components-REunxTt6.js";import"./vendor-three-DwGkEfCM.js";import"./vendor-recharts-6nUU7gU_.js";import"./vendor-codemirror-BEGorXSV.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const t of o)if(t.type==="childList")for(const l of t.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function u(o){const t={};return o.integrity&&(t.integrity=o.integrity),o.referrerPolicy&&(t.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?t.credentials="include":o.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(o){if(o.ep)return;o.ep=!0;const t=u(o);fetch(o.href,t)}})();function ce(){return e(b,{styles:a=>h`
1
+ import{j as e,w as h,aR as b,d6 as x,d7 as f,v as n,d8 as r,d9 as y,da as P,r as v,b as w,db as R}from"./vendor-D8cj1ZYg.js";import{v as L,a4 as z}from"./vendor-arizeai-BU1VHwXB.js";import{E,L as k,R as $,r as j,a as S,F as A,A as I,b as F,c as T,P as C,h as O,M as D,d,D as B,e as M,f as N,g as q,i as G,j as W,T as K,p as H,k as c,l as J,m as Q,n as p,o as U,q as m,s as g,t as V,v as X,w as Y,x as Z,y as _,z as ee,B as re,S as ae,C as oe,G as te}from"./pages-BGZBXlrn.js";import{bo as ne,i as se,R as le,bp as ie,bq as de}from"./components-XIEhA1rq.js";import"./vendor-three-DwGkEfCM.js";import"./vendor-recharts-BATX_8yP.js";import"./vendor-codemirror-BDMHmh1x.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const t of o)if(t.type==="childList")for(const l of t.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function u(o){const t={};return o.integrity&&(t.integrity=o.integrity),o.referrerPolicy&&(t.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?t.credentials="include":o.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(o){if(o.ep)return;o.ep=!0;const t=u(o);fetch(o.href,t)}})();function ce(){return e(b,{styles:a=>h`
2
2
  body {
3
3
  background-color: var(--ac-global-color-grey-75);
4
4
  color: var(--ac-global-text-color-900);
@@ -1,4 +1,4 @@
1
- import{r as m,j as e,ae as ss,v as s,H as j,R as Ce,w as C,af as De,y as ee,b as T,ag as xn,ah as Ye,$ as W,ai as ta,B as me,D as ge,G as H,F as wn,o as Fl,aj as Ge,ak as re,al as We,am as os,I as Va,an as An,a4 as Fe,a5 as q,a6 as ds,ao as fe,ap as sn,aq as cs,ar as Sa,as as va,at as Ca,au as zn,av as Ie,aw as oa,n as za,a as us,ax as ms,ay as gs,aa as ps,ab as ys,az as fs,c as hs,d as ks,aA as bs,x as Ss}from"./vendor-B5IC0ivG.js";import{C as U,d as F,K as Jn,D as G,c as h,I as E,a as L,J as $a,G as Se,H as B,M as un,N as he,O as vs,m as Qa,Q as Zn,P as hn,S as Oe,i as Kl,j as te,q as Pn,r as _n,v as oe,b as K,o as xl,U as Ne,L as Bn,V as Dl,e as M,t as Y,W as Tl,X as Il,Y as Cs,Z as Fs,h as In,w as Xn,T as Le,k as Z,B as da,s as ve,$ as z,a0 as Ll,E as ca,f as Hn,a1 as Oa,a2 as Ks,z as ua,u as xs,a3 as Ds,R as nl,n as Ts}from"./vendor-arizeai-aFbT4kl1.js";import{N as Is,T as Ls,L as ue,u as de,B as ws,a as on,D as As,G as Ps,b as _s,c as Es,S as Rs,R as Ke,d as Pe,e as je,f as ja,P as wl,g as Al,M as al,h as ll,i as Yn,j as Ms,k as Ns,l as Q,m as Pl,n as xe,o as ma,p as En,q as _l,r as Rn,s as Mn,t as El,v as qe,w as Ve,C as ce,x as ga,y as en,z as qa,A as Ue,E as Rl,F as Vs,H as zs,I as $s,J as Qs,K as Os,O as js,Q as ze,U as se,V as qs,W as Us,X as Ml,Y as Bs,Z as Hs,_ as tl,$ as Gs,a0 as Ws,a1 as Js,a2 as Zs,a3 as Xs,a4 as Ys,a5 as Nl,a6 as kn,a7 as eo,a8 as no,a9 as ao,aa as lo,ab as to,ac as pn,ad as Ua,ae as Vl,af as Dn,ag as _a,ah as Fn,ai as _e,aj as io,ak as ro,al as ie,am as zl,an as pa,ao as we,ap as Ba,aq as bn,ar as ne,as as Be,at as so,au as Ha,av as Re,aw as Me,ax as yn,ay as Ga,az as $l,aA as oo,aB as Ql,aC as Te,aD as $e,aE as ea,aF as co,aG as na,aH as ya,aI as Ol,aJ as jl,aK as uo,aL as ql,aM as Ul,aN as Bl,aO as Nn,aP as Je,aQ as He,aR as ke,aS as mo,aT as il,aU as Hl,aV as go,aW as po,aX as yo,aY as fo,aZ as ho,a_ as Tn,a$ as cn,b0 as Ea,b1 as Sn,b2 as Gl,b3 as ko,b4 as mn,b5 as bo,b6 as fa,b7 as So,b8 as Wa,b9 as vo,ba as Ja,bb as Wl,bc as Jl,bd as Co,be as Ra,bf as Zl,bg as Fo,bh as Ko,bi as ia,bj as xo,bk as Xl,bl as Yl,bm as Do,bn as To}from"./components-REunxTt6.js";import{R as nn,C as aa,X as an,Y as Ae,a as ln,T as tn,B as Ln,A as Gn,b as et,c as Za,L as nt,d as Io,P as Lo,e as wo,f as Ao}from"./vendor-recharts-6nUU7gU_.js";import{p as Xa,R as ha,n as ka,j as Po,E as _o,k as Eo,c as Ro}from"./vendor-codemirror-BEGorXSV.js";const at="arize-phoenix-feature-flags",Fa={playground:!1};function Mo(){const n=localStorage.getItem(at);if(!n)return Fa;try{const a=JSON.parse(n);return Object.assign({},Fa,a)}catch{return Fa}}const lt=m.createContext(null);function tt(){const n=Ce.useContext(lt);if(n===null)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return n}function No(n){const{featureFlags:a}=tt();return a[n]}function Mg(n){const[a,l]=m.useState(Mo()),t=i=>{localStorage.setItem(at,JSON.stringify(i)),l(i)};return e(lt.Provider,{value:{featureFlags:a,setFeatureFlags:t},children:e(Vo,{children:n.children})})}function Vo(n){const{children:a}=n,{featureFlags:l,setFeatureFlags:t}=tt(),[i,r]=m.useState(!1);return ss("ctrl+shift+f",()=>r(!0)),s(j,{children:[a,e(G,{type:"modal",isDismissable:!0,onDismiss:()=>r(!1),children:i&&e(U,{title:"Feature Flags",children:e(F,{height:"size-1000",padding:"size-100",children:Object.keys(l).map(o=>e(Jn,{isSelected:l[o],onChange:u=>t({...l,[o]:u}),children:o},o))})})})]})}const it=m.createContext(null);function zo(){const n=m.useContext(it);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function Ng(n){return e(it.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const $o=C`
1
+ import{r as m,j as e,ae as ss,v as s,H as j,R as Ce,w as C,af as De,y as ee,b as T,ag as xn,ah as Ye,$ as W,ai as ta,B as me,D as ge,G as H,F as wn,o as Fl,aj as Ge,ak as re,al as We,am as os,I as Va,an as An,a4 as Fe,a5 as q,a6 as ds,ao as fe,ap as sn,aq as cs,ar as Sa,as as va,at as Ca,au as zn,av as Ie,aw as oa,n as za,a as us,ax as ms,ay as gs,aa as ps,ab as ys,az as fs,c as hs,d as ks,aA as bs,x as Ss}from"./vendor-D8cj1ZYg.js";import{C as U,d as F,K as Jn,D as G,c as h,I as E,a as L,J as $a,G as Se,H as B,M as un,N as he,O as vs,m as Qa,Q as Zn,P as hn,S as Oe,i as Kl,j as te,q as Pn,r as _n,v as oe,b as K,o as xl,U as Ne,L as Bn,V as Dl,e as M,t as Y,W as Tl,X as Il,Y as Cs,Z as Fs,h as In,w as Xn,T as Le,k as Z,B as da,s as ve,$ as z,a0 as Ll,E as ca,f as Hn,a1 as Oa,a2 as Ks,z as ua,u as xs,a3 as Ds,R as nl,n as Ts}from"./vendor-arizeai-BU1VHwXB.js";import{N as Is,T as Ls,L as ue,u as de,B as ws,a as on,D as As,G as Ps,b as _s,c as Es,S as Rs,R as Ke,d as Pe,e as je,f as ja,P as wl,g as Al,M as al,h as ll,i as Yn,j as Ms,k as Ns,l as Q,m as Pl,n as xe,o as ma,p as En,q as _l,r as Rn,s as Mn,t as El,v as qe,w as Ve,C as ce,x as ga,y as en,z as qa,A as Ue,E as Rl,F as Vs,H as zs,I as $s,J as Qs,K as Os,O as js,Q as ze,U as se,V as qs,W as Us,X as Ml,Y as Bs,Z as Hs,_ as tl,$ as Gs,a0 as Ws,a1 as Js,a2 as Zs,a3 as Xs,a4 as Ys,a5 as Nl,a6 as kn,a7 as eo,a8 as no,a9 as ao,aa as lo,ab as to,ac as pn,ad as Ua,ae as Vl,af as Dn,ag as _a,ah as Fn,ai as _e,aj as io,ak as ro,al as ie,am as zl,an as pa,ao as we,ap as Ba,aq as bn,ar as ne,as as Be,at as so,au as Ha,av as Re,aw as Me,ax as yn,ay as Ga,az as $l,aA as oo,aB as Ql,aC as Te,aD as $e,aE as ea,aF as co,aG as na,aH as ya,aI as Ol,aJ as jl,aK as uo,aL as ql,aM as Ul,aN as Bl,aO as Nn,aP as Je,aQ as He,aR as ke,aS as mo,aT as il,aU as Hl,aV as go,aW as po,aX as yo,aY as fo,aZ as ho,a_ as Tn,a$ as cn,b0 as Ea,b1 as Sn,b2 as Gl,b3 as ko,b4 as mn,b5 as bo,b6 as fa,b7 as So,b8 as Wa,b9 as vo,ba as Ja,bb as Wl,bc as Jl,bd as Co,be as Ra,bf as Zl,bg as Fo,bh as Ko,bi as ia,bj as xo,bk as Xl,bl as Yl,bm as Do,bn as To}from"./components-XIEhA1rq.js";import{R as nn,C as aa,X as an,Y as Ae,a as ln,T as tn,B as Ln,A as Gn,b as et,c as Za,L as nt,d as Io,P as Lo,e as wo,f as Ao}from"./vendor-recharts-BATX_8yP.js";import{p as Xa,R as ha,n as ka,j as Po,E as _o,k as Eo,c as Ro}from"./vendor-codemirror-BDMHmh1x.js";const at="arize-phoenix-feature-flags",Fa={playground:!1};function Mo(){const n=localStorage.getItem(at);if(!n)return Fa;try{const a=JSON.parse(n);return Object.assign({},Fa,a)}catch{return Fa}}const lt=m.createContext(null);function tt(){const n=Ce.useContext(lt);if(n===null)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return n}function No(n){const{featureFlags:a}=tt();return a[n]}function Mg(n){const[a,l]=m.useState(Mo()),t=i=>{localStorage.setItem(at,JSON.stringify(i)),l(i)};return e(lt.Provider,{value:{featureFlags:a,setFeatureFlags:t},children:e(Vo,{children:n.children})})}function Vo(n){const{children:a}=n,{featureFlags:l,setFeatureFlags:t}=tt(),[i,r]=m.useState(!1);return ss("ctrl+shift+f",()=>r(!0)),s(j,{children:[a,e(G,{type:"modal",isDismissable:!0,onDismiss:()=>r(!1),children:i&&e(U,{title:"Feature Flags",children:e(F,{height:"size-1000",padding:"size-100",children:Object.keys(l).map(o=>e(Jn,{isSelected:l[o],onChange:u=>t({...l,[o]:u}),children:o},o))})})})]})}const it=m.createContext(null);function zo(){const n=m.useContext(it);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function Ng(n){return e(it.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const $o=C`
2
2
  display: flex;
3
3
  direction: row;
4
4
  height: 100vh;
@@ -2087,7 +2087,7 @@ fragment DatasetSelectorPopoverContent_datasets on Query {
2087
2087
  `}};Ni.hash="7cd8a13144d97d2b5294f2a09c9e1351";function Cu(n){const{onCreateNewDataset:a,onDatasetSelected:l}=n,[t,i]=m.useState(""),r=T.useLazyLoadQuery(Ni,{},{fetchPolicy:"network-only"});return s(z,{title:"Add to Dataset",variant:"compact",backgroundColor:"light",borderColor:"light",bodyStyle:{padding:0},extra:e(M,{variant:"default",size:"compact",onClick:a,children:"New Dataset"}),children:[e(F,{padding:"size-100",children:e(Z,{type:"search",placeholder:"Search datasets",addonBefore:e(E,{svg:e(L.Search,{})}),onChange:o=>{i(o)}})}),e(F,{borderTopWidth:"thin",borderColor:"light",children:e("div",{css:C`
2088
2088
  height: 400px;
2089
2089
  overflow-y: auto;
2090
- `,children:e(Fu,{query:r,search:t,onDatasetSelected:l})})})]})}function Fu(n){const{search:a,onDatasetSelected:l}=n,[t]=T.useRefetchableFragment(Mi,n.query),i=m.useMemo(()=>{let o=t.datasets.edges.map(u=>u.dataset);return a&&(o=o.filter(u=>u.name.toLowerCase().includes(a.toLowerCase()))),o},[a,t]);return i.length===0?e(h,{direction:"column",justifyContent:"center",alignItems:"center",flex:"1 1 auto",children:e(K,{children:"No datasets found"})}):e(Zn,{selectionMode:"single",onSelectionChange:o=>{if(typeof o=="object"){const u=Array.from(o);l(u[0])}},children:i.map(o=>e(W,{children:o.name},o.id))})}function Vi(n){const a=ee(),[l,t]=m.useState(null),i=ie(),r=de(),[o,u]=m.useState(!1),{selectedSpans:d,onClearSelection:p}=n,[f,c]=T.useMutation(Ei),g=d.length!==1,y=m.useCallback(k=>{f({variables:{input:{datasetId:k,spanIds:d.map(b=>b.id)}},onCompleted:()=>{i({title:"Examples added to dataset",message:`${d.length} example${g?"s":""} have been added to the dataset.`,action:{text:"View dataset",onClick:()=>{a(`/datasets/${k}/examples`)}}}),p()},onError:b=>{r({title:"An error occurred",message:`Failed to add spans to dataset: ${b.message}`})}})},[f,d,i,g,p,a,r]);return s("div",{css:C`
2090
+ `,children:e(Fu,{query:r,search:t,onDatasetSelected:l})})})]})}function Fu(n){const{search:a,onDatasetSelected:l}=n,[t]=T.useRefetchableFragment(Mi,n.query),i=m.useMemo(()=>{let o=t.datasets.edges.map(u=>u.dataset);return a&&(o=o.filter(u=>u.name.toLowerCase().includes(a.toLowerCase()))),o},[a,t]);return i.length===0?e(F,{padding:"size-200",children:e(h,{direction:"column",justifyContent:"center",alignItems:"center",flex:"1 1 auto",children:e(K,{children:"No datasets found"})})}):e(Zn,{selectionMode:"single",onSelectionChange:o=>{if(typeof o=="object"){const u=Array.from(o);l(u[0])}},children:i.map(o=>e(W,{children:o.name},o.id))})}function Vi(n){const a=ee(),[l,t]=m.useState(null),i=ie(),r=de(),[o,u]=m.useState(!1),{selectedSpans:d,onClearSelection:p}=n,[f,c]=T.useMutation(Ei),g=d.length!==1,y=m.useCallback(k=>{f({variables:{input:{datasetId:k,spanIds:d.map(b=>b.id)}},onCompleted:()=>{i({title:"Examples added to dataset",message:`${d.length} example${g?"s":""} have been added to the dataset.`,action:{text:"View dataset",onClick:()=>{a(`/datasets/${k}/examples`)}}}),p()},onError:b=>{r({title:"An error occurred",message:`Failed to add spans to dataset: ${b.message}`})}})},[f,d,i,g,p,a,r]);return s("div",{css:C`
2091
2091
  position: absolute;
2092
2092
  bottom: var(--ac-global-dimension-size-400);
2093
2093
  left: 50%;