From b9656185fbb0b715c48ddcd4d4913a6278b58839 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 19 Feb 2026 18:00:42 +0000 Subject: [PATCH] chore: sync HyperDX 2.17.0 Built from hyperdxio/hyperdx@2.17.0 --- HYPERDX_VERSION | 2 +- out/404.html | 2 +- out/__ENV.js | 2 +- .../4X00GdJ--VNMdxwhVE1A2/_buildManifest.js | 1 - ...a152f5986e.js => 1021-663a6b3506100d9d.js} | 4 +- ...33e4b2ad5f.js => 6514-9ab29f6b02cd025a.js} | 2 +- .../static/chunks/8374-75e52bdef51a4632.js | 17 --- .../static/chunks/8374-cb38bfbe77b4240b.js | 17 +++ .../chunks/pages/_app-ff0750f811c67b45.js | 31 ------ .../chunks/pages/_app-ffdb6c1cb1648170.js | 31 ++++++ .../chunks/pages/chart-35295dad1f8a0721.js | 104 ++++++++++++++++++ .../chunks/pages/chart-6755baf0b3fd29c0.js | 104 ------------------ .../pages/clickhouse-2022191eb00788bf.js | 64 ----------- .../pages/clickhouse-6683816e115349a8.js | 64 +++++++++++ .../pages/dashboards-a3b5a41cc0a172e5.js | 104 ------------------ .../pages/dashboards-dc7f01f16edc5bbb.js | 104 ++++++++++++++++++ .../[dashboardId]-83bf90b056623488.js | 104 ++++++++++++++++++ .../[dashboardId]-e4b59bd2f4c63ea8.js | 104 ------------------ .../pages/kubernetes-456377648cf36bba.js | 64 +++++++++++ .../pages/kubernetes-8af8e775b8371886.js | 64 ----------- .../chunks/pages/search-023ca015512a644b.js | 81 -------------- .../chunks/pages/search-ffeb30ea5a7baf27.js | 81 ++++++++++++++ .../[savedSearchId]-4e3e23d140c4b998.js | 81 -------------- .../[savedSearchId]-555abbf86f300d96.js | 81 ++++++++++++++ ...4e0fd6.js => services-56c542cb661daed6.js} | 8 +- .../chunks/pages/sessions-acea943c26d1ae60.js | 64 +++++++++++ .../chunks/pages/sessions-ff61de8f7dc2c830.js | 64 ----------- ...864c8fabdc.js => team-2720ea0afbc2aca5.js} | 2 +- ...3e8053fc9d65c.css => 57ab40337a01a8f7.css} | 2 +- ...5e419d907eed3.css => 5e608e56fd4adb29.css} | 2 +- out/_next/static/css/60eef3d5b82c01fe.css | 1 + out/_next/static/css/7ad6e05a9a1f8d70.css | 1 - ...635a8721aacc8.css => 84d18700e9fc7086.css} | 4 +- out/_next/static/css/c3cd15a2f71d4e4b.css | 1 - out/_next/static/css/c7f9e6fa0e94fe8f.css | 1 + ...153f2bb2d1916.css => c9e47d6ecd091b56.css} | 2 +- out/_next/static/css/d9659d9e1a57bc7e.css | 1 + ...3c6185281f24c.css => da709c0151f8e860.css} | 2 +- out/_next/static/css/e7c8a91bdaa17057.css | 1 + out/_next/static/css/f0f1f058e57da1cf.css | 1 - out/_next/static/css/f6948ab8dd6a77d5.css | 1 - .../oBTf4Pdf4H7G1UBWfzX4O/_buildManifest.js | 1 + .../_ssgManifest.js | 0 out/alerts.html | 2 +- out/benchmark.html | 2 +- out/chart.html | 2 +- out/clickhouse.html | 2 +- out/dashboards.html | 2 +- out/dashboards/[dashboardId].html | 2 +- out/dashboards/import.html | 2 +- out/favicons/clickstack/apple-touch-icon.png | Bin 3799 -> 2564 bytes out/favicons/clickstack/favicon-16x16.png | Bin 386 -> 342 bytes out/favicons/clickstack/favicon-32x32.png | Bin 587 -> 534 bytes out/favicons/clickstack/favicon.ico | Bin 15406 -> 15086 bytes out/favicons/clickstack/favicon.svg | 24 ++-- out/index.html | 2 +- out/join-team.html | 2 +- out/kubernetes.html | 2 +- out/login.html | 2 +- out/register.html | 2 +- out/search.html | 2 +- out/search/[savedSearchId].html | 2 +- out/service-map.html | 2 +- out/services.html | 2 +- out/sessions.html | 2 +- out/team.html | 2 +- 66 files changed, 767 insertions(+), 765 deletions(-) delete mode 100644 out/_next/static/4X00GdJ--VNMdxwhVE1A2/_buildManifest.js rename out/_next/static/chunks/{1021-91be81a152f5986e.js => 1021-663a6b3506100d9d.js} (57%) rename out/_next/static/chunks/{6514-d4c2fa33e4b2ad5f.js => 6514-9ab29f6b02cd025a.js} (99%) delete mode 100644 out/_next/static/chunks/8374-75e52bdef51a4632.js create mode 100644 out/_next/static/chunks/8374-cb38bfbe77b4240b.js delete mode 100644 out/_next/static/chunks/pages/_app-ff0750f811c67b45.js create mode 100644 out/_next/static/chunks/pages/_app-ffdb6c1cb1648170.js create mode 100644 out/_next/static/chunks/pages/chart-35295dad1f8a0721.js delete mode 100644 out/_next/static/chunks/pages/chart-6755baf0b3fd29c0.js delete mode 100644 out/_next/static/chunks/pages/clickhouse-2022191eb00788bf.js create mode 100644 out/_next/static/chunks/pages/clickhouse-6683816e115349a8.js delete mode 100644 out/_next/static/chunks/pages/dashboards-a3b5a41cc0a172e5.js create mode 100644 out/_next/static/chunks/pages/dashboards-dc7f01f16edc5bbb.js create mode 100644 out/_next/static/chunks/pages/dashboards/[dashboardId]-83bf90b056623488.js delete mode 100644 out/_next/static/chunks/pages/dashboards/[dashboardId]-e4b59bd2f4c63ea8.js create mode 100644 out/_next/static/chunks/pages/kubernetes-456377648cf36bba.js delete mode 100644 out/_next/static/chunks/pages/kubernetes-8af8e775b8371886.js delete mode 100644 out/_next/static/chunks/pages/search-023ca015512a644b.js create mode 100644 out/_next/static/chunks/pages/search-ffeb30ea5a7baf27.js delete mode 100644 out/_next/static/chunks/pages/search/[savedSearchId]-4e3e23d140c4b998.js create mode 100644 out/_next/static/chunks/pages/search/[savedSearchId]-555abbf86f300d96.js rename out/_next/static/chunks/pages/{services-95cadc54324e0fd6.js => services-56c542cb661daed6.js} (51%) create mode 100644 out/_next/static/chunks/pages/sessions-acea943c26d1ae60.js delete mode 100644 out/_next/static/chunks/pages/sessions-ff61de8f7dc2c830.js rename out/_next/static/chunks/pages/{team-2af4df864c8fabdc.js => team-2720ea0afbc2aca5.js} (53%) rename out/_next/static/css/{0113e8053fc9d65c.css => 57ab40337a01a8f7.css} (64%) rename out/_next/static/css/{4495e419d907eed3.css => 5e608e56fd4adb29.css} (91%) create mode 100644 out/_next/static/css/60eef3d5b82c01fe.css delete mode 100644 out/_next/static/css/7ad6e05a9a1f8d70.css rename out/_next/static/css/{f95635a8721aacc8.css => 84d18700e9fc7086.css} (68%) delete mode 100644 out/_next/static/css/c3cd15a2f71d4e4b.css create mode 100644 out/_next/static/css/c7f9e6fa0e94fe8f.css rename out/_next/static/css/{a74153f2bb2d1916.css => c9e47d6ecd091b56.css} (63%) create mode 100644 out/_next/static/css/d9659d9e1a57bc7e.css rename out/_next/static/css/{38b3c6185281f24c.css => da709c0151f8e860.css} (71%) create mode 100644 out/_next/static/css/e7c8a91bdaa17057.css delete mode 100644 out/_next/static/css/f0f1f058e57da1cf.css delete mode 100644 out/_next/static/css/f6948ab8dd6a77d5.css create mode 100644 out/_next/static/oBTf4Pdf4H7G1UBWfzX4O/_buildManifest.js rename out/_next/static/{4X00GdJ--VNMdxwhVE1A2 => oBTf4Pdf4H7G1UBWfzX4O}/_ssgManifest.js (100%) diff --git a/HYPERDX_VERSION b/HYPERDX_VERSION index 2b5b5ad..d76bd2b 100644 --- a/HYPERDX_VERSION +++ b/HYPERDX_VERSION @@ -1 +1 @@ -UNSET +2.17.0 diff --git a/out/404.html b/out/404.html index d917e22..67d68fa 100644 --- a/out/404.html +++ b/out/404.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

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

404

This page could not be found.

\ No newline at end of file diff --git a/out/__ENV.js b/out/__ENV.js index ed1e765..2be534d 100644 --- a/out/__ENV.js +++ b/out/__ENV.js @@ -1 +1 @@ -window.__ENV = {"NEXT_PUBLIC_IS_LOCAL_MODE":"true","NEXT_PUBLIC_CLICKHOUSE_BUILD":"true","NEXT_PUBLIC_THEME":"clickstack","NEXT_PUBLIC_APP_VERSION":"2.16.0"}; \ No newline at end of file +window.__ENV = {"NEXT_PUBLIC_THEME":"clickstack","NEXT_PUBLIC_IS_LOCAL_MODE":"true","NEXT_PUBLIC_CLICKHOUSE_BUILD":"true","NEXT_PUBLIC_APP_VERSION":"2.17.0"}; \ No newline at end of file diff --git a/out/_next/static/4X00GdJ--VNMdxwhVE1A2/_buildManifest.js b/out/_next/static/4X00GdJ--VNMdxwhVE1A2/_buildManifest.js deleted file mode 100644 index 58b02c3..0000000 --- a/out/_next/static/4X00GdJ--VNMdxwhVE1A2/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(s,c,a,e,t,d,i,b,f,h,r,n,u,k,j,o,p,g,m,_,l,I,v,B,F,S,A,N,D,y,E,L,M,T,U,C){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:0,errorRate:1e-4,numBits:0,numHashes:E,bitArray:[]},__routerFilterDynamic:{numItems:0,errorRate:1e-4,numBits:0,numHashes:E,bitArray:[]},"/":[s,"static/chunks/pages/index-a65a2b78b8d7131b.js"],"/404":["static/chunks/pages/404-87418c6575573d12.js"],"/_error":["static/chunks/pages/_error-39388d370ed64907.js"],"/alerts":[e,t,d,s,c,i,f,b,h,"static/css/ee8688206e298d66.css","static/chunks/pages/alerts-bd7f41cff62f8d10.js"],"/benchmark":[e,t,d,r,s,c,a,i,n,u,j,b,o,"static/css/5397465024004a31.css","static/chunks/pages/benchmark-73496ad610b8fa71.js"],"/chart":[e,t,d,r,p,s,c,a,i,f,n,k,u,j,g,m,l,I,F,A,b,h,o,_,"static/css/f6948ab8dd6a77d5.css","static/chunks/pages/chart-6755baf0b3fd29c0.js"],"/clickhouse":[e,t,d,r,p,s,c,a,i,f,n,k,u,j,g,m,l,I,B,N,b,h,o,_,v,"static/css/0113e8053fc9d65c.css","static/chunks/pages/clickhouse-2022191eb00788bf.js"],"/dashboards":[e,t,d,r,p,s,c,a,i,f,n,k,u,j,g,m,l,I,B,F,A,L,b,h,o,_,v,M,"static/chunks/pages/dashboards-a3b5a41cc0a172e5.js"],"/dashboards/import":[e,t,d,s,c,a,i,f,"static/chunks/9967-169389f981fa00e5.js",b,h,"static/css/c2ef5da228e74437.css","static/chunks/pages/dashboards/import-814aff4bf2a0b7c5.js"],"/dashboards/[dashboardId]":[e,t,d,r,p,s,c,a,i,f,n,k,u,j,g,m,l,I,B,F,A,L,b,h,o,_,v,M,"static/chunks/pages/dashboards/[dashboardId]-e4b59bd2f4c63ea8.js"],"/join-team":[D,"static/chunks/pages/join-team-74e007c50e7bc44c.js"],"/kubernetes":[e,t,d,r,p,s,c,a,i,f,n,k,u,j,g,m,l,I,B,b,h,o,_,v,"static/css/f0f1f058e57da1cf.css","static/chunks/pages/kubernetes-8af8e775b8371886.js"],"/login":[s,c,a,D,T,"static/chunks/pages/login-f046da5509306fd8.js"],"/register":[s,c,a,D,T,"static/chunks/pages/register-86a04d6ba7a76f1a.js"],"/search":[e,t,d,r,p,s,c,a,i,f,n,k,u,j,g,m,l,I,B,F,N,U,b,h,o,_,v,C,"static/chunks/pages/search-023ca015512a644b.js"],"/search/[savedSearchId]":[e,t,d,r,p,s,c,a,i,f,n,k,u,j,g,m,l,I,B,F,N,U,b,h,o,_,v,C,"static/chunks/pages/search/[savedSearchId]-4e3e23d140c4b998.js"],"/service-map":[e,t,d,r,p,s,c,a,i,f,n,k,g,b,h,_,"static/css/4495e419d907eed3.css","static/chunks/pages/service-map-bcb8910dc98b83ce.js"],"/services":[e,t,d,r,p,s,c,a,i,f,n,k,u,j,g,m,l,I,B,b,h,o,_,v,"static/css/c3cd15a2f71d4e4b.css","static/chunks/pages/services-95cadc54324e0fd6.js"],"/sessions":[e,t,d,r,p,s,c,a,i,f,n,k,u,j,g,m,l,"static/chunks/6787-a27c5954b2697712.js",b,h,o,_,"static/css/a74153f2bb2d1916.css","static/chunks/pages/sessions-ff61de8f7dc2c830.js"],"/team":[e,t,d,r,s,c,a,i,f,n,k,u,m,I,b,h,v,"static/css/aa458d09e4c5d9b3.css","static/chunks/pages/team-2af4df864c8fabdc.js"],sortedPages:["/","/404","/_app","/_error","/alerts","/benchmark","/chart","/clickhouse","/dashboards","/dashboards/import","/dashboards/[dashboardId]","/join-team","/kubernetes","/login","/register","/search","/search/[savedSearchId]","/service-map","/services","/sessions","/team"]}}("static/chunks/910-f70c830849b8cf81.js","static/chunks/1606-5a30b62cb4feaa4a.js","static/chunks/1909-f4f65d5367297444.js","static/chunks/367e882f-7fb3ac49d51ad63a.js","static/chunks/4e973673-b7b5da192a879342.js","static/chunks/88e08fcc-4ec2fa1a379b744c.js","static/chunks/3999-487ca1292f0acaac.js","static/chunks/1021-91be81a152f5986e.js","static/chunks/1626-de51610d6ac78e10.js","static/chunks/6514-d4c2fa33e4b2ad5f.js","static/chunks/187e7e72-adec6481ecde3f61.js","static/chunks/1445-bacd907489fa7f07.js","static/chunks/4607-c12c74ba5c07f89c.js","static/chunks/2990-4ceeb762cdb09ceb.js","static/chunks/9979-25cce956b8228ba9.js","static/chunks/3234-91be2b1b16b8a12e.js","static/chunks/f92fad27-d0cff4750eeb2536.js","static/chunks/522-db7920b51550c9e2.js","static/chunks/3943-0b032b204fb92637.js","static/chunks/8374-75e52bdef51a4632.js","static/chunks/1926-613ed7f780169841.js","static/chunks/9353-f86472fc41edc301.js","static/chunks/3172-b6490fb55ce08c1c.js","static/chunks/4528-13c92570a143bd81.js","static/chunks/1470-84964c609a7051b9.js",0,"static/chunks/1274-aef343c4656bbdfc.js","static/chunks/8224-2d708009ee8fef6a.js","static/chunks/7074-b8101e6fbb15b996.js",0,NaN,"static/chunks/7386-8fea3f6843338cab.js","static/css/7ad6e05a9a1f8d70.css","static/chunks/35-9a2c3aba3b13971b.js","static/chunks/4913-75c3c17d5340be2d.js","static/css/38b3c6185281f24c.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/out/_next/static/chunks/1021-91be81a152f5986e.js b/out/_next/static/chunks/1021-663a6b3506100d9d.js similarity index 57% rename from out/_next/static/chunks/1021-91be81a152f5986e.js rename to out/_next/static/chunks/1021-663a6b3506100d9d.js index 7dd32b5..fc888b7 100644 --- a/out/_next/static/chunks/1021-91be81a152f5986e.js +++ b/out/_next/static/chunks/1021-663a6b3506100d9d.js @@ -1,4 +1,4 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1021],{2615:(e,t,a)=>{var n=a(60302);a(55754),a(67505),n.a,t.YR=n.e,n.b,n.d,t.bn=n.c},3145:(e,t,a)=>{var n=a(37823);a(60302),a(55754),a(67505),t.qs=n.F,n.H,n.G,t.yb=n.K,n.I,t.VO=n.J},6876:(e,t,a)=>{a.d(t,{Ay:()=>m,Q5:()=>c});var n=a(81278),r=a.n(n),i=a(62910),s=a(16932),o=a(12482),l=a(98142);let u=i.Ay.create({prefixUrl:"/api",credentials:"include",hooks:{afterResponse:[function(e,t,a){if(!["/","/forgot","/join-team","/login","/register","/reset-password"].includes(r().pathname)&&401===a.status){try{window.sessionStorage.setItem("hdx-login-redirect-url",r().asPath)}catch(e){console.error(e)}r().push("/login")}}]},timeout:!1}),c=(e,t)=>u(e,{...t}),m={useCreateAlert:()=>(0,s.n)({mutationFn:async e=>u("alerts",{method:"POST",json:e}).json()}),useUpdateAlert:()=>(0,s.n)({mutationFn:async e=>u(`alerts/${e.id}`,{method:"PUT",json:e}).json()}),useDeleteAlert:()=>(0,s.n)({mutationFn:async e=>u(`alerts/${e}`,{method:"DELETE"})}),useSilenceAlert:()=>(0,s.n)({mutationFn:async({alertId:e,mutedUntil:t})=>u(`alerts/${e}/silenced`,{method:"POST",json:{mutedUntil:t}})}),useUnsilenceAlert:()=>(0,s.n)({mutationFn:async e=>u(`alerts/${e}/silenced`,{method:"DELETE"})}),useDashboards:e=>(0,o.I)({queryKey:["dashboards"],queryFn:()=>l.VO?null:c("dashboards",{method:"GET"}).json(),...e}),useCreateDashboard:()=>(0,s.n)({mutationFn:async({name:e,charts:t,query:a,tags:n})=>c("dashboards",{method:"POST",json:{name:e,charts:t,query:a,tags:n}}).json()}),useUpdateDashboard:()=>(0,s.n)({mutationFn:async({id:e,name:t,charts:a,query:n,tags:r})=>c(`dashboards/${e}`,{method:"PUT",json:{name:t,charts:a,query:n,tags:r}}).json()}),useDeleteDashboard:()=>(0,s.n)({mutationFn:async({id:e})=>c(`dashboards/${e}`,{method:"DELETE"}).json()}),usePresetDashboardFilters:(e,t,a=!0)=>(0,o.I)({queryKey:["dashboards","preset",e,"filters",t],queryFn:()=>c(`dashboards/preset/${e}/filters/`,{method:"GET",searchParams:{sourceId:t}}).json(),enabled:!!t&&a}),useCreatePresetDashboardFilter:()=>(0,s.n)({mutationFn:async e=>c(`dashboards/preset/${e.presetDashboard}/filter`,{method:"POST",json:{filter:e}}).json()}),useUpdatePresetDashboardFilter:()=>(0,s.n)({mutationFn:async e=>c(`dashboards/preset/${e.presetDashboard}/filter`,{method:"PUT",json:{filter:e}}).json()}),useDeletePresetDashboardFilter:()=>(0,s.n)({mutationFn:async({id:e,presetDashboard:t})=>c(`dashboards/preset/${t}/filter/${e}`,{method:"DELETE"}).json()}),useAlerts:()=>(0,o.I)({queryKey:["alerts"],queryFn:()=>c("alerts").json()}),useServices:()=>(0,o.I)({queryKey:["services"],queryFn:()=>c("chart/services",{method:"GET"}).json()}),useRotateTeamApiKey:()=>(0,s.n)({mutationFn:async()=>c("team/apiKey",{method:"PATCH"}).json()}),useDeleteTeamMember:()=>(0,s.n)({mutationFn:async({userId:e})=>c(`team/member/${e}`,{method:"DELETE"}).json()}),useTeamInvitations:()=>(0,o.I)({queryKey:["team/invitations"],queryFn:()=>c("team/invitations").json()}),useSaveTeamInvitation:()=>(0,s.n)({mutationFn:async({name:e,email:t})=>c("team/invitation",{method:"POST",json:{name:e,email:t}}).json()}),useDeleteTeamInvitation:()=>(0,s.n)({mutationFn:async({id:e})=>c(`team/invitation/${e}`,{method:"DELETE"}).json()}),useInstallation:()=>(0,o.I)({queryKey:["installation"],queryFn:()=>{if(!l.VO)return c("installation").json()}}),useMe:()=>(0,o.I)({queryKey:["me"],queryFn:()=>l.VO?null:c("me").json()}),useTeam:()=>(0,o.I)({queryKey:["team"],queryFn:()=>l.VO?null:c("team").json(),retry:1}),useTeamMembers:()=>(0,o.I)({queryKey:["team/members"],queryFn:()=>c("team/members").json()}),useSetTeamName:()=>(0,s.n)({mutationFn:async({name:e})=>c("team/name",{method:"PATCH",json:{name:e}}).json()}),useUpdateClickhouseSettings:()=>(0,s.n)({mutationFn:async e=>c("team/clickhouse-settings",{method:"PATCH",json:e}).json()}),useTags:()=>(0,o.I)({queryKey:["team/tags"],queryFn:()=>c("team/tags").json()}),useSaveWebhook:()=>(0,s.n)({mutationFn:async({service:e,url:t,name:a,description:n,queryParams:r,headers:i,body:s})=>c("webhooks",{method:"POST",json:{name:a,service:e,url:t,description:n,queryParams:r||{},headers:i||{},body:s}}).json()}),useUpdateWebhook:()=>(0,s.n)({mutationFn:async({id:e,service:t,url:a,name:n,description:r,queryParams:i,headers:s,body:o})=>c(`webhooks/${e}`,{method:"PUT",json:{name:n,service:t,url:a,description:r,queryParams:i||{},headers:s||{},body:o}}).json()}),useWebhooks:e=>(0,o.I)({queryKey:[...e],queryFn:()=>c("webhooks",{method:"GET",searchParams:[...e.map(e=>["service",e])]}).json()}),useDeleteWebhook:()=>(0,s.n)({mutationFn:async({id:e})=>c(`webhooks/${e}`,{method:"DELETE"}).json()}),useTestWebhook:()=>(0,s.n)({mutationFn:async({service:e,url:t,queryParams:a,headers:n,body:r})=>c("webhooks/test",{method:"POST",json:{service:e,url:t,queryParams:a||{},headers:n||{},body:r}}).json()}),useRegisterPassword:()=>(0,s.n)({mutationFn:async({email:e,password:t,confirmPassword:a})=>c("register/password",{method:"POST",json:{email:e,password:t,confirmPassword:a}}).json()}),useTestConnection:()=>(0,s.n)({mutationFn:async({host:e,username:t,password:a})=>c("clickhouse-proxy/test",{method:"POST",json:{host:e,username:t,password:a}}).json()})}},7565:(e,t,a)=>{a.d(t,{H:()=>l,a:()=>o});var n=a(6029),r=a(75155);a(55729);var i=a(76089),s=a(57820);let o=()=>{let e,t=(0,r.c)(3),{userPreferences:a}=(0,s.HW)(),{isUTC:n,timeFormat:o}=a;return t[0]!==n||t[1]!==o?(e=(e,t)=>{let{format:a}=void 0===t?{}:t;try{let t=e instanceof Date?e:new Date(e);return(0,i.Yq)(t,{clock:o,isUTC:n,format:a})}catch(t){return console.error(t,e),"Unknown date"}},t[0]=n,t[1]=o,t[2]=e):e=t[2],e},l=e=>{let t,a,i=(0,r.c)(6),{value:s,format:l}=e,u=o();return s?(i[0]!==l||i[1]!==u||i[2]!==s?(t=u(s,{format:l}),i[0]=l,i[1]=u,i[2]=s,i[3]=t):t=i[3],i[4]!==t?(a=(0,n.jsx)(n.Fragment,{children:t}),i[4]=t,i[5]=a):a=i[5],a):null}},9897:(e,t,a)=>{a.d(t,{h:()=>r});var n,r=((n={})[n.Pending=1]="Pending",n[n.Running=2]="Running",n[n.Succeeded=3]="Succeeded",n[n.Failed=4]="Failed",n[n.Unknown=5]="Unknown",n)},35467:(e,t,a)=>{var n=a(37823);a(60302),a(55754),a(67505),n.y,t.p1=n.u,t.A2=n.l,t.kg=n.r,t.D7=n.B,n.w,n.x,n.s,t.rj=n.n,n.q,t.bZ=n.v,n.p,t.P1=n.C,n.m,n.E,t.zo=n.D,t.Zo=n.o,t.l6=n.A,t.k$=n.z,n.t},35871:(e,t,a)=>{a.d(t,{A:()=>u});var n=a(6029),r=a(75155),i=a(76089),s=a(63085),o=a(45749),l=a(7565);function u(e){let t,a,u,c,m,d=(0,r.c)(12),{originalDateRange:p,effectiveDateRange:g,mvGranularity:h}=e,f=(0,l.a)();if(!g||(0,i._p)(g,p))return null;d[0]!==g[0]||d[1]!==f?(t=f(g[0]),d[0]=g[0],d[1]=f,d[2]=t):t=d[2],d[3]!==g[1]||d[4]!==f?(a=f(g[1]),d[3]=g[1],d[4]=f,d[5]=a):a=d[5],d[6]!==t||d[7]!==a?(u=[t,a],d[6]=t,d[7]=a,d[8]=u):u=d[8];let[y,E]=u,A=h?`Querying ${y} - ${E} due to ${h} rollups in query acceleration.`:`Querying ${y} - ${E} to show complete intervals.`;return d[9]===Symbol.for("react.memo_cache_sentinel")?(c=(0,n.jsx)(o.A,{size:16,color:"var(--color-text)"}),d[9]=c):c=d[9],d[10]!==A?(m=(0,n.jsx)(s.m,{multiline:!0,maw:500,label:A,children:c}),d[10]=A,d[11]=m):m=d[11],m}},37823:(e,t,a)=>{let n;function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return null!=e?e:t()}function o(e){let t,a=e[0],n=1;for(;na.call(t,...e)),t=void 0)}return a}Object.defineProperty(t,"__esModule",{value:!0});var l,u,c,m=a(60302),d=a(55754),p=a(67505),g=a(64497),h=r(g),f=r(g),y=i(a(79339)),E=i(a(64022)),A=i(a(80519)),N=i(a(55235)),T=a(71434),S=t.G=l=class{constructor(){l.prototype.__init.call(this),l.prototype.__init2.call(this)}__init(){this.cache=new Map}__init2(){this.pendingQueries=new Map}get(e){return this.cache.get(e)}async getOrFetch(e,t){let a=this.cache.get(e);if(null!=a)return a;if(this.pendingQueries.has(e))return this.pendingQueries.get(e);let n=t();this.pendingQueries.set(e,n);try{let t=await n;return this.cache.set(e,t),t}finally{this.pendingQueries.delete(e)}}set(e,t){return this.cache.set(e,t)}},_=t.H=class{constructor(e,t,a){this.clickhouseClient=e,this.cache=t,a&&this.cache.set("clickhouse-settings",a)}getClickHouseSettings(){return s(this.cache.get("clickhouse-settings"),()=>({}))}setClickHouseSettings(e){let t={...this.getClickHouseSettings(),...e};this.cache.set("clickhouse-settings",t)}async queryTableMetadata({database:e,table:t,cache:a,connectionId:n}){return a.getOrFetch(`${n}.${e}.${t}.metadata`,async()=>{let a=eT`SELECT * FROM system.tables where database = ${{String:e}} AND name = ${{String:t}}`;return(await this.clickhouseClient.query({connectionId:n,query:a.sql,query_params:a.params,clickhouse_settings:this.getClickHouseSettings()}).then(e=>e.json())).data[0]})}async queryMaterializedViewsByTarget({databaseName:e,tableName:t,connectionId:a}){return this.cache.getOrFetch(`${a}.${e}.${t}.sourceMaterializedViews`,async()=>{let n=`%TO ${e}.${t}%`,r=eT` +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1021],{2615:(e,t,a)=>{var n=a(30404);a(31356),a(20470),n.a,t.YR=n.e,n.b,n.d,t.bn=n.c},3145:(e,t,a)=>{var n=a(9641);a(30404),a(31356),a(20470),t.qs=n.F,n.H,n.G,t.yb=n.K,n.I,t.VO=n.J},6876:(e,t,a)=>{a.d(t,{Ay:()=>m,Q5:()=>c});var n=a(81278),r=a.n(n),i=a(62910),s=a(16932),o=a(12482),l=a(98142);let u=i.Ay.create({prefixUrl:"/api",credentials:"include",hooks:{afterResponse:[function(e,t,a){if(!["/","/forgot","/join-team","/login","/register","/reset-password"].includes(r().pathname)&&401===a.status){try{window.sessionStorage.setItem("hdx-login-redirect-url",r().asPath)}catch(e){console.error(e)}r().push("/login")}}]},timeout:!1}),c=(e,t)=>u(e,{...t}),m={useCreateAlert:()=>(0,s.n)({mutationFn:async e=>u("alerts",{method:"POST",json:e}).json()}),useUpdateAlert:()=>(0,s.n)({mutationFn:async e=>u(`alerts/${e.id}`,{method:"PUT",json:e}).json()}),useDeleteAlert:()=>(0,s.n)({mutationFn:async e=>u(`alerts/${e}`,{method:"DELETE"})}),useSilenceAlert:()=>(0,s.n)({mutationFn:async({alertId:e,mutedUntil:t})=>u(`alerts/${e}/silenced`,{method:"POST",json:{mutedUntil:t}})}),useUnsilenceAlert:()=>(0,s.n)({mutationFn:async e=>u(`alerts/${e}/silenced`,{method:"DELETE"})}),useDashboards:e=>(0,o.I)({queryKey:["dashboards"],queryFn:()=>l.VO?null:c("dashboards",{method:"GET"}).json(),...e}),useCreateDashboard:()=>(0,s.n)({mutationFn:async({name:e,charts:t,query:a,tags:n})=>c("dashboards",{method:"POST",json:{name:e,charts:t,query:a,tags:n}}).json()}),useUpdateDashboard:()=>(0,s.n)({mutationFn:async({id:e,name:t,charts:a,query:n,tags:r})=>c(`dashboards/${e}`,{method:"PUT",json:{name:t,charts:a,query:n,tags:r}}).json()}),useDeleteDashboard:()=>(0,s.n)({mutationFn:async({id:e})=>c(`dashboards/${e}`,{method:"DELETE"}).json()}),usePresetDashboardFilters:(e,t,a=!0)=>(0,o.I)({queryKey:["dashboards","preset",e,"filters",t],queryFn:()=>c(`dashboards/preset/${e}/filters/`,{method:"GET",searchParams:{sourceId:t}}).json(),enabled:!!t&&a}),useCreatePresetDashboardFilter:()=>(0,s.n)({mutationFn:async e=>c(`dashboards/preset/${e.presetDashboard}/filter`,{method:"POST",json:{filter:e}}).json()}),useUpdatePresetDashboardFilter:()=>(0,s.n)({mutationFn:async e=>c(`dashboards/preset/${e.presetDashboard}/filter`,{method:"PUT",json:{filter:e}}).json()}),useDeletePresetDashboardFilter:()=>(0,s.n)({mutationFn:async({id:e,presetDashboard:t})=>c(`dashboards/preset/${t}/filter/${e}`,{method:"DELETE"}).json()}),useAlerts:()=>(0,o.I)({queryKey:["alerts"],queryFn:()=>c("alerts").json()}),useServices:()=>(0,o.I)({queryKey:["services"],queryFn:()=>c("chart/services",{method:"GET"}).json()}),useRotateTeamApiKey:()=>(0,s.n)({mutationFn:async()=>c("team/apiKey",{method:"PATCH"}).json()}),useDeleteTeamMember:()=>(0,s.n)({mutationFn:async({userId:e})=>c(`team/member/${e}`,{method:"DELETE"}).json()}),useTeamInvitations:()=>(0,o.I)({queryKey:["team/invitations"],queryFn:()=>c("team/invitations").json()}),useSaveTeamInvitation:()=>(0,s.n)({mutationFn:async({name:e,email:t})=>c("team/invitation",{method:"POST",json:{name:e,email:t}}).json()}),useDeleteTeamInvitation:()=>(0,s.n)({mutationFn:async({id:e})=>c(`team/invitation/${e}`,{method:"DELETE"}).json()}),useInstallation:()=>(0,o.I)({queryKey:["installation"],queryFn:()=>{if(!l.VO)return c("installation").json()}}),useMe:()=>(0,o.I)({queryKey:["me"],queryFn:()=>l.VO?null:c("me").json()}),useTeam:()=>(0,o.I)({queryKey:["team"],queryFn:()=>l.VO?null:c("team").json(),retry:1}),useTeamMembers:()=>(0,o.I)({queryKey:["team/members"],queryFn:()=>c("team/members").json()}),useSetTeamName:()=>(0,s.n)({mutationFn:async({name:e})=>c("team/name",{method:"PATCH",json:{name:e}}).json()}),useUpdateClickhouseSettings:()=>(0,s.n)({mutationFn:async e=>c("team/clickhouse-settings",{method:"PATCH",json:e}).json()}),useTags:()=>(0,o.I)({queryKey:["team/tags"],queryFn:()=>c("team/tags").json()}),useSaveWebhook:()=>(0,s.n)({mutationFn:async({service:e,url:t,name:a,description:n,queryParams:r,headers:i,body:s})=>c("webhooks",{method:"POST",json:{name:a,service:e,url:t,description:n,queryParams:r||{},headers:i||{},body:s}}).json()}),useUpdateWebhook:()=>(0,s.n)({mutationFn:async({id:e,service:t,url:a,name:n,description:r,queryParams:i,headers:s,body:o})=>c(`webhooks/${e}`,{method:"PUT",json:{name:n,service:t,url:a,description:r,queryParams:i||{},headers:s||{},body:o}}).json()}),useWebhooks:e=>(0,o.I)({queryKey:[...e],queryFn:()=>c("webhooks",{method:"GET",searchParams:[...e.map(e=>["service",e])]}).json()}),useDeleteWebhook:()=>(0,s.n)({mutationFn:async({id:e})=>c(`webhooks/${e}`,{method:"DELETE"}).json()}),useTestWebhook:()=>(0,s.n)({mutationFn:async({service:e,url:t,queryParams:a,headers:n,body:r})=>c("webhooks/test",{method:"POST",json:{service:e,url:t,queryParams:a||{},headers:n||{},body:r}}).json()}),useRegisterPassword:()=>(0,s.n)({mutationFn:async({email:e,password:t,confirmPassword:a})=>c("register/password",{method:"POST",json:{email:e,password:t,confirmPassword:a}}).json()}),useTestConnection:()=>(0,s.n)({mutationFn:async({host:e,username:t,password:a})=>c("clickhouse-proxy/test",{method:"POST",json:{host:e,username:t,password:a}}).json()})}},7565:(e,t,a)=>{a.d(t,{H:()=>l,a:()=>o});var n=a(6029),r=a(75155);a(55729);var i=a(76089),s=a(57820);let o=()=>{let e,t=(0,r.c)(3),{userPreferences:a}=(0,s.HW)(),{isUTC:n,timeFormat:o}=a;return t[0]!==n||t[1]!==o?(e=(e,t)=>{let{format:a}=void 0===t?{}:t;try{let t=e instanceof Date?e:new Date(e);return(0,i.Yq)(t,{clock:o,isUTC:n,format:a})}catch(t){return console.error(t,e),"Unknown date"}},t[0]=n,t[1]=o,t[2]=e):e=t[2],e},l=e=>{let t,a,i=(0,r.c)(6),{value:s,format:l}=e,u=o();return s?(i[0]!==l||i[1]!==u||i[2]!==s?(t=u(s,{format:l}),i[0]=l,i[1]=u,i[2]=s,i[3]=t):t=i[3],i[4]!==t?(a=(0,n.jsx)(n.Fragment,{children:t}),i[4]=t,i[5]=a):a=i[5],a):null}},9641:(e,t,a)=>{let n;function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return null!=e?e:t()}function o(e){let t,a=e[0],n=1;for(;na.call(t,...e)),t=void 0)}return a}Object.defineProperty(t,"__esModule",{value:!0});var l,u,c,m=a(30404),d=a(31356),p=a(20470),g=a(64497),h=r(g),f=r(g),y=i(a(79339)),E=i(a(64022)),A=i(a(80519)),N=i(a(55235)),T=a(71434),S=t.G=l=class{constructor(){l.prototype.__init.call(this),l.prototype.__init2.call(this)}__init(){this.cache=new Map}__init2(){this.pendingQueries=new Map}get(e){return this.cache.get(e)}async getOrFetch(e,t){let a=this.cache.get(e);if(null!=a)return a;if(this.pendingQueries.has(e))return this.pendingQueries.get(e);let n=t();this.pendingQueries.set(e,n);try{let t=await n;return this.cache.set(e,t),t}finally{this.pendingQueries.delete(e)}}set(e,t){return this.cache.set(e,t)}},_=t.H=class{constructor(e,t,a){this.clickhouseClient=e,this.cache=t,a&&this.cache.set("clickhouse-settings",a)}getClickHouseSettings(){return s(this.cache.get("clickhouse-settings"),()=>({}))}setClickHouseSettings(e){let t={...this.getClickHouseSettings(),...e};this.cache.set("clickhouse-settings",t)}async queryTableMetadata({database:e,table:t,cache:a,connectionId:n}){return a.getOrFetch(`${n}.${e}.${t}.metadata`,async()=>{let a=eT`SELECT * FROM system.tables where database = ${{String:e}} AND name = ${{String:t}}`;return(await this.clickhouseClient.query({connectionId:n,query:a.sql,query_params:a.params,clickhouse_settings:this.getClickHouseSettings()}).then(e=>e.json())).data[0]})}async queryMaterializedViewsByTarget({databaseName:e,tableName:t,connectionId:a}){return this.cache.getOrFetch(`${a}.${e}.${t}.sourceMaterializedViews`,async()=>{let n=`%TO ${e}.${t}%`,r=eT` SELECT database as databaseName, name as tableName FROM system.tables WHERE engine = 'MaterializedView' @@ -226,7 +226,7 @@ END AS "${r}" FROM points WHERE length(point) > 1 AND total > 0 - `}];t.a=eq,t.b=K,t.c=G,t.d=Q,t.e=z,t.f=Y,t.g=J,t.h=function(e){return{...e,operator:X[e.operator]}},t.i=Z,t.j=er,t.k=ep,t.l=eg,t.m=eh,t.n=ef,t.o=ey,t.p=eE,t.q=eA,t.r=eT,t.s=eS,t.t=e_,t.u=eR,t.v=eb,t.w=ew,t.x=eI,t.y=e$,t.z=ex,t.A=eO,t.B=function(e){let t={};if(null==e)return t;try{let a=eO(e),[n]=d.C.call(void 0,a),{sqlWithReplacements:r,replacements:i}=d.i.call(void 0,n),s=new h.Parser().astify(r,{database:"Postgresql",parseOptions:{includeLocations:!0}});for(let[e,a]of(null!=s.columns&&s.columns.forEach(e=>{null!=e.as&&("expr"===e.type&&"column_ref"===e.expr.type?t[e.as]=e.expr.array_index&&o([e,"access",e=>e.expr,"access",e=>e.array_index,"access",e=>e[0],"optionalAccess",e=>e.brackets])?`${e.expr.column.expr.value}['${e.expr.array_index[0].index.value}']`:e.expr.column.expr.value:null!=e.expr.loc?t[e.as]=r.slice(e.expr.loc.start.offset,e.expr.loc.end.offset):console.error("Unknown alias column type",e))}),Object.entries(t)))for(let[n,r]of i)a.includes(n)&&(t[e]=a.replaceAll(n,r))}catch(t){console.error("Error parsing alias map with JSON removed",t,"for query",e)}return t},t.C=ev,t.D=eL,t.E=eF,t.F=3e6,t.G=S,t.H=_,t.I=function(e){return{databaseName:s(o([e,"optionalAccess",e=>e.from,"optionalAccess",e=>e.databaseName]),()=>""),tableName:s(o([e,"optionalAccess",e=>e.from,"optionalAccess",e=>e.tableName]),()=>""),connectionId:s(o([e,"optionalAccess",e=>e.connection]),()=>"")}},t.J=function(e){return{databaseName:s(o([e,"optionalAccess",e=>e.from,"optionalAccess",e=>e.databaseName]),()=>""),tableName:s(o([e,"optionalAccess",e=>e.from,"optionalAccess",e=>e.tableName]),()=>""),connectionId:s(o([e,"optionalAccess",e=>e.connection]),()=>"")}},t.K=b,t.L=w,t.M=q,t.N=U,t.O=H,t.P=W,t.Q=B},43152:(e,t,a)=>{a.d(t,{gT:()=>N,Hx:()=>R,WG:()=>T,zE:()=>v,x5:()=>x,p2:()=>L,nH:()=>F,JD:()=>q,xh:()=>O,wt:()=>b,VH:()=>W,m9:()=>Q,A7:()=>j,qL:()=>C,_t:()=>K,Z7:()=>G,O7:()=>S,ik:()=>H,zg:()=>P,r4:()=>M,eY:()=>$,xu:()=>z,Ht:()=>I,W6:()=>w,GJ:()=>_});var n=a(6029),r=a(75155),i=a(86508),s=a(11370),o=a(76694),l=a.n(o),u=a(80519),c=a.n(u),m=a(6663),d=a(35467),p=a(67270),g=a(76089),h=a(82641),f=a(60665),y=a(35871);let E={"k8s.pod.cpu.utilization":{newName:"k8s.pod.cpu.usage",versionThreshold:"0.125.0"},"k8s.node.cpu.utilization":{newName:"k8s.node.cpu.usage",versionThreshold:"0.125.0"},"container.cpu.utilization":{newName:"container.cpu.usage",versionThreshold:"0.125.0"}};a(9897);var A=a(92917);let N=[{value:"count",label:"Count of Events",isAttributable:!1},{value:"sum",label:"Sum",isAttributable:!1},{value:"p99",label:"99th Percentile"},{value:"p95",label:"95th Percentile"},{value:"p90",label:"90th Percentile"},{value:"p50",label:"Median"},{value:"avg",label:"Average"},{value:"max",label:"Maximum"},{value:"min",label:"Minimum"},{value:"count_distinct",label:"Count Distinct",isAttributable:!1},{value:"any",label:"Any"},{value:"none",label:"Custom"}],T={name:"",select:[{aggFn:"count",aggCondition:"",aggConditionLanguage:"lucene",valueExpression:""}],where:"",whereLanguage:"lucene",displayType:h.t2.Line,granularity:"auto",alignDateRangeToGranularity:!0};function S(e){let t="auto"===e.granularity||null==e.granularity?(0,g.tA)(e.dateRange,80):e.granularity,a=!1===e.alignDateRangeToGranularity?e.dateRange:(0,g.Ol)(e.dateRange,t);return{...e,dateRange:a,dateRangeEndInclusive:!1,granularity:t,limit:{limit:1e5}}}function _(e){let t,a,n=(0,r.c)(7);n[0]!==e?(t=S(e),n[0]=e,n[1]=t):t=n[1];let i=t;return n[2]!==i.dateRange||n[3]!==i.displayType||n[4]!==i.fillNulls||n[5]!==i.granularity?(a={displayType:i.displayType,dateRange:i.dateRange,fillNulls:i.fillNulls,granularity:i.granularity},n[2]=i.dateRange,n[3]=i.displayType,n[4]=i.fillNulls,n[5]=i.granularity,n[6]=a):a=n[6],a}let R=" \xb7 ",b=" (previous)";function C(e){let[t,a]=e.split(" "),n=Number.parseInt(t);switch(a){case"second":return n;case"minute":return 60*n;case"hour":return 60*n*60;case"day":return 60*n*1440;default:return 0}}function w(e,t){let[a,n]=t.split(" "),r=Number.parseInt(a),i=Math.floor;switch(n){case"second":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),i(e.getUTCSeconds()/r)*r));case"minute":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),i(e.getUTCMinutes()/r)*r));case"hour":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),i(e.getUTCHours()/r)*r));case"day":return new Date(1e3*(i(e.getTime()/1e3/60/60/24/r)*r)*86400);default:return e}}function I(e,t,a){let n=[],r=w(e,a),s=C(a);for(;r{let t=e.toLowerCase();return["count","countIf","countDistinct","sum","sumIf","avg","avgIf","min","max","any","anyLast","groupArray","groupArrayInsertAt","groupArrayMovingAvg","groupArraySample","groupUniqArray","groupUniqArrayIf","groupArrayIntersect","groupArrayIntersectIf","groupArrayReduce","groupBitmap","groupBitmapIf","groupBitmapOr","groupBitmapXor","quantile","quantileIf","quantileExact","quantileExactWeighted","quantileTiming","quantileTimingWeighted","quantileTDigest","quantileTDigestWeighted","quantileBFloat16","quantileBFloat16Weighted","quantiles","median","medianExact","medianTDigest","medianBFloat16","stddevPop","stddevPopIf","stddevSamp","stddevSampIf","varPop","varPopIf","varSamp","varSampIf","covarPop","covarSamp","corr","uniq","uniqExact","uniqCombined","uniqCombined64","uniqHLL12","uniqTheta","groupBitAnd","groupBitOr","groupBitXor","groupArrayMap","groupArrayTuple","groupArraySorted","topK","topKIf","topKWeighted","argMin","argMax","minMap","maxMap","runningDifference","retention","sequenceCount","sequenceMatch","histogram","simpleLinearRegression","stochasticLinearRegression","categoricalInformationValue","sumMap","sumMapFiltered","sumWithOverflow","entropy","skewPop","skewSamp","kurtPop","kurtSamp"].some(e=>t.includes(e.toLowerCase()+"("))},x={factor:1,output:"number",mantissa:0,thousandSeparated:!0},O={factor:1,output:"number",mantissa:2,thousandSeparated:!0,unit:"ms"},v={output:"percent",mantissa:0},L={output:"percent",mantissa:0},F={output:"byte"},q={output:"byte"};function D(e,t){return(0,d.P1)(e,[d.A2.Number])?.filter(e=>!t.has(e.name))}function U(e){return(0,d.P1)(e,[d.A2.String,d.A2.Map,d.A2.Array])}function M(e){let[t,a]=e,n=(0,s.A)(a,t);return[new Date(t.getTime()-1e3*n),new Date(a.getTime()-1e3*n)]}function k({response:e,lineDataMap:t,tsBucketMap:a,source:n,previousPeriodOffsetSeconds:r,isPreviousPeriod:i,hiddenSeries:s=[]}){let{meta:o,data:l}=e;if(null==o)throw Error("No meta data found in response");let u=(0,d.zo)(o);if(null==u)throw Error(`No timestamp column found with meta: ${JSON.stringify(o)}`);let c=D(o,new Set(s))??[],m=U(o)??[],p=1===c.length,g=m.length>0;for(let e of l){let s=new Date(e[u.name]),o=i?r:0,l=Math.round(s.getTime()/1e3+o);for(let r of c){let s,o=a.get(l);null==o&&(o={[u.name]:l},a.set(l,o));let c=[...p&&g?[]:[r.name],...m.map(t=>e[t.name])].join(R),d=`${c}${b}`,f=i?d:c,y=e[r.name],E="number"==typeof y?y:Number.parseFloat(y);o[f]=E,n&&1===m.length&&m[0].name===(n.kind===h.GL.Log?n.severityTextExpression:n.statusCodeExpression)&&(s=(0,A.aw)(e[m[0].name])),t[f]={dataKey:f,currentPeriodKey:c,previousPeriodKey:d,displayName:f,color:s,isDashed:i}}}}function P({currentPeriodResponse:e,previousPeriodResponse:t,dateRange:a,granularity:n,generateEmptyBuckets:r=!0,source:i,hiddenSeries:s=[],previousPeriodOffsetSeconds:o=0}){let l,u,c=e.meta;if(null==c)throw Error("No meta data found in response");let m=(0,d.zo)(c),p=D(c,new Set(s))??[],g=U(c)??[],h=1===p.length;if(null==m)throw Error(`No timestamp column found with meta: ${JSON.stringify(c)}`);let f=new Map,y={};k({response:e,lineDataMap:y,tsBucketMap:f,source:i,isPreviousPeriod:!1,previousPeriodOffsetSeconds:o,hiddenSeries:s}),null!=t&&k({response:t,lineDataMap:y,tsBucketMap:f,source:i,isPreviousPeriod:!0,previousPeriodOffsetSeconds:o,hiddenSeries:s});let E=(0,A.EA)(),N=Object.values(y).sort((e,t)=>E.findIndex(t=>t===e.color)-E.findIndex(e=>e===t.color));return r&&null!=n&&I(a[0],a[1],n).forEach(e=>{let t=e.getTime()/1e3,a=f.get(t);if(null==a){let e={[m.name]:t};for(let t of N)e[t.dataKey]=0;f.set(t,e)}else{for(let e of N)null==a[e.dataKey]&&(a[e.dataKey]=0);f.set(t,a)}}),{graphResults:Array.from(f.values()).sort((e,t)=>e[m.name]-t[m.name]),timestampColumn:m,lineData:(l=new Map,u=0,N.map(e=>{let t=e.currentPeriodKey;return l.has(t)?e.color=l.get(t):(e.color||(e.color=(0,A.ob)(u++,e.displayName??e.dataKey)),l.set(t,e.color)),e})),groupColumns:g.map(e=>e.name),valueColumns:p.map(e=>e.name),isSingleValueColumn:h}}let V=e=>{if(null==e)return e;if(e.endsWith("_rate"))return V(e.replace("_rate",""));if("p50"===e||"p90"===e||"p95"===e||"p99"===e)return"quantile";if("count_per_sec"===e||"count_per_min"===e||"count_per_hour"===e)return"count";if(["avg","count","count_distinct","last_value","max","min","sum"].includes(e))return e;throw Error(`Unsupported aggregation function in v2: ${e}`)},H=(e,t)=>{let{series:a,granularity:n,dateRange:r,displayType:i="line",fillNulls:s}=e;if(a.length<1)throw Error("series is required");let o=a[0],l="stacked_bar"===i?h.t2.StackedBar:h.t2.Line;if("logs"===o.table)throw Error("IMPLEMENT ME (logs)");if("metrics"===o.table){let e;if(null==t.metric)throw Error("source.metric is required for metrics");return{select:a.map(e=>{let t=e.field??"",[a,n]=t.split(" - ").map(e=>e.trim()),r=function(e){let t=E[e];if(t)return c().format("MetricName IN (?)",[[e,t.newName]])}(a),i=m.fc(h.SX).parse(n?.toLowerCase());return{aggFn:V(e.aggFn),metricType:i,valueExpression:t,metricName:a,metricNameSql:r,aggConditionLanguage:"lucene",aggCondition:e.where}}),from:t.metric?.from,numberFormat:o.numberFormat,groupBy:(e=t.metric,o.groupBy.map(t=>t.startsWith("k8s")?`${e.resourceAttributesExpression}['${t}']`:t).join(",")),dateRange:r,connection:t.metric?.connection,metricTables:t.metric?.metricTables,timestampValueExpression:t.metric?.timestampValueExpression,granularity:n,where:"",fillNulls:s,displayType:l}}throw Error(`unsupported table in v2: ${o.table}`)};function W({source:e,config:t,dateRange:a,groupFilters:n,valueRangeFilter:r}){if(!e?.id)return null;let i=(0,p.bv)(t);if(i&&e?.logSourceId==null)return f.$e.show({color:"yellow",message:"No log source is associated with the selected metric source."}),null;let s=t.where,o=t.whereLanguage||"lucene";0===s.length&&Array.isArray(t.select)&&1===t.select.length&&(s=t.select[0].aggCondition??"",o=t.select[0].aggConditionLanguage??"lucene");let l=[];if(n&&n.length>0&&n.forEach(({column:e,value:t})=>{if(e&&null!=t){let a=`${e} IN (${c().escape(t)})`;l.push({type:"sql",condition:a})}}),r){let{expression:e,value:t,threshold:a=.05}=r;if(!$(e)){let n=`${e} BETWEEN ${c().escape(t*(1-a))} AND ${c().escape(t*(1+a))}`;l.push({type:"sql",condition:n})}}let u=a[0].getTime(),m=a[1].getTime(),d={source:e?.id??"",where:s,whereLanguage:o,filters:JSON.stringify([...t.filters??[],...l]),isLive:"false",from:u.toString(),to:m.toString()};return i&&(d.where="",d.whereLanguage="lucene",d.filters=JSON.stringify([]),d.source=e?.logSourceId??""),t.eventTableSelect&&(d.select=t.eventTableSelect),`/search?${new URLSearchParams(d).toString()}`}function B(e){return e?"string"==typeof e?e.split(",").map(e=>e.trim()):e.map(e=>"string"==typeof e?e:e.valueExpression):[]}function j({row:e,source:t,config:a,dateRange:n}){let r;if(!t?.id)return null;let i=[];B(a.groupBy).forEach(t=>{null!=e[t]&&i.push({column:t,value:e[t]})});let s=a.select?.[0];if(s){let t="string"==typeof s?void 0:s.aggFn;if(N.find(e=>e.value===t)?.isAttributable!==!1){let t="string"==typeof s?s:s.valueExpression,n=new Set(B(a.groupBy)),i=Object.keys(e).find(e=>!n.has(e)),o=i?e[i]:void 0;null!=o&&"number"==typeof o&&(r={expression:t,value:o})}}return W({source:t,config:a,dateRange:n,groupFilters:i,valueRangeFilter:r})}function K(e){return l()(e,["granularity","groupBy"])}function G(e){let t=structuredClone(l()(e,["granularity"]));return t.limit||(t.limit={limit:200}),t.groupBy&&"string"==typeof t.groupBy&&!t.orderBy&&(t.orderBy=t.groupBy),t}function Q({mvOptimizationData:e,originalDateRange:t}){let a=e?.optimizedConfig?.dateRange;if(!a)return null;let r=e?.explanations.find(e=>e.success)?.mvConfig.minGranularity;return(0,n.jsx)(y.A,{originalDateRange:t,effectiveDateRange:a,mvGranularity:r},"date-range-indicator")}function z(e){return!1!==e}},49672:(e,t,a)=>{a.d(t,{VH:()=>p,W:()=>m,fu:()=>d,uI:()=>h});var n=a(75155),r=a(35467),i=a(88459),s=a(12482),o=a(98142),l=a(93108),u=a(6876),c=a(61410);let m=(e={})=>{if(o.VO){let t=(0,l.xZ)();return 0===t.length?(console.warn("No local connection found"),new i.aP({host:"",...e})):new i.aP({host:t[0].host,username:t[0].username,password:t[0].password,...e})}return new i.aP({host:"/api/clickhouse-proxy",...e})},d=(e={})=>{let{data:t}=u.Ay.useMe(),a=t?.team?.queryTimeout;return void 0!==a?e.queryTimeout=a:e.queryTimeout=c.rb,m(e)};function p(e,t){let a,r,i,o,l=(0,n.c)(8),{connectionId:u}=e;l[0]===Symbol.for("react.memo_cache_sentinel")?(a=m(),l[0]=a):a=l[0];let c=a;return l[1]!==u?(r=["direct_datasources/databases",u],i=async()=>await c.query({query:"SHOW DATABASES",connectionId:u}).then(g),l[1]=u,l[2]=r,l[3]=i):(r=l[2],i=l[3]),l[4]!==t||l[5]!==r||l[6]!==i?(o={queryKey:r,queryFn:i,staleTime:3e5,...t},l[4]=t,l[5]=r,l[6]=i,l[7]=o):o=l[7],(0,s.I)(o)}function g(e){return e.json()}function h({database:e,connectionId:t},a){let n=m();return(0,s.I)({queryKey:[`direct_datasources/databases/${e}/tables`,t],queryFn:async()=>{let a=(0,r.kg)`SHOW TABLES FROM ${{Identifier:e}}`;return await n.query({query:a.sql,query_params:a.params,connectionId:t}).then(e=>e.json())},staleTime:3e5,...a})}},57389:(e,t,a)=>{a.d(t,{d:()=>c});var n=a(75155),r=a(2615),i=a(4308),s=a(12482),o=a(49672),l=a(81973),u=a(78550);function c(e,t){let a,c,m,d,p,g=(0,n.c)(16);g[0]!==t?(a=t||{},g[0]=t,g[1]=a):a=g[1];let{enabled:h}=a,f=(0,u.Ge)(),y=(0,o.fu)(),E=e?.source;g[2]!==E?(c={id:E},g[2]=E,g[3]=c):c=g[3];let{data:A,isLoading:N}=(0,l.Fo)(c);g[4]!==e?(m=["optimizationExplanation",e],g[4]=e,g[5]=m):m=g[5],g[6]!==y||g[7]!==e||g[8]!==f||g[9]!==A?(d=async t=>{let{signal:a}=t;return e&&A?await (0,r.bn)(e,f,y,a,A):{explanations:[]}},g[6]=y,g[7]=e,g[8]=f,g[9]=A,g[10]=d):d=g[10];let T=(void 0===h||h)&&!N&&!!e&&!!A;return g[11]!==t||g[12]!==m||g[13]!==d||g[14]!==T?(p={queryKey:m,queryFn:d,placeholderData:i.rX,staleTime:5e3,...t,enabled:T},g[11]=t,g[12]=m,g[13]=d,g[14]=T,g[15]=p):p=g[15],(0,s.I)(p)}},60302:(e,t,a)=>{function n(e,t){return null!=e?e:t()}function r(e){let t,a=e[0],n=1;for(;na.call(t,...e)),t=void 0)}return a}async function i(e){let t,a=e[0],n=1;for(;na.call(t,...e)),t=void 0)}return a}Object.defineProperty(t,"__esModule",{value:!0});var s=a(55754),o=a(67505),l=a(35362);async function u(e,t,a){try{return!!await i([await a.getColumn({...e,column:t}),"optionalAccess",async e=>e.type,"access",async e=>e.startsWith,"call",async e=>e("SimpleAggregateFunction(")])}catch(e){return!1}}async function c(e,t,a){try{let n=await i([await a.getColumn({...e,column:t}),"optionalAccess",async e=>e.type]);return n?r([n,"access",e=>e.match,"call",e=>e(/^AggregateFunction\(\s*([^(, ]+)\s*\(/),"optionalAccess",e=>e[1]]):void 0}catch(e){return}}async function m(e,t,a,n){return"count"===a?"sum":await u(e,t,n)?a:`${a}Merge`}function d(e,t,a){return e.aggregatedColumns.find(e=>e.aggFn===a&&("count"===e.aggFn||e.sourceColumn===t))}function p(e,t){if(e.minDate&&!t.dateRange)return!1;if(!e.minDate||!t.dateRange)return!0;let[a]=t.dateRange;return a>=new Date(e.minDate)}var g=/\bcount(If)?\s*\(/i;function h(e){return g.test(e.valueExpression)}async function f(e,t,a,n){var r;let{valueExpression:i,aggFn:s}=t,l=s;if(h(t))throw Error("Custom count() expressions are not supported with materialized views.");if(!l)return t;if(!((r=l)&&o.h.safeParse(r).success))throw Error(`Aggregate function ${l} is not valid.`);let u=d(e,"",l);if(u){let e=u.mvColumn,r=await m(a,e,l,n);return{...t,valueExpression:e,aggFn:r}}let p=d(e,i,l);if(!p)throw Error(`The aggregate function ${function(e,t){if("quantile"!==e)return e;switch(t){case .5:return"median";case .9:return"p90";case .95:return"p95";case .99:return"p99";default:return"quantile"}}(l,t.level)} is not available for column '${i}'.`);if("quantile"===t.aggFn&&"level"in t&&"number"==typeof t.level){let e=await c(a,p.mvColumn,n);e&&(l=e)}let g=await m(a,p.mvColumn,l,n);return{...t,valueExpression:p.mvColumn,aggFn:g}}async function y(e,t,a){if(!Array.isArray(e.select))return{errors:["Only array-based select statements are supported."]};if(t.minDate&&!p(t,e))return{errors:["The selected date range includes dates for which this view does not contain data."]};if(!function(e,t){if(!t.granularity&&!t.dateRange)return!0;let a=t.granularity||"auto";if("auto"===a&&!t.dateRange)return!1;let n="auto"===a&&t.dateRange?s.l.call(void 0,t.dateRange):a,r=s.m.call(void 0,n),i=s.m.call(void 0,e.minGranularity);return r>=i&&r%i==0}(t,e))return{errors:[e.granularity?`Granularity must be a multiple of the view's granularity (${t.minGranularity}).`:"The selected date range is too short for the granularity of this materialized view."]};let n={databaseName:t.databaseName,tableName:t.tableName,connectionId:e.connection},r=await Promise.allSettled(e.select.map(e=>f(t,e,n,a))),i=[],o=[];for(let e of r)"rejected"===e.status?o.push(e.reason.message):i.push(e.value);return o.length>0?{errors:o}:{optimizedConfig:{...structuredClone(e),select:i,timestampValueExpression:t.timestampColumn,from:{databaseName:t.databaseName,tableName:t.tableName},..."dateRange"in e&&e.dateRange?{dateRangeEndInclusive:!1,dateRange:s.A.call(void 0,e.dateRange,t.minGranularity)}:{}}}}async function E(e,t,a,r,i,s){let o=[],l;if(e.with){let a=await Promise.all(e.with.map(async e=>e.chartConfig&&e.chartConfig.from.databaseName===s.from.databaseName&&e.chartConfig.from.tableName===s.from.tableName?y(e.chartConfig,i,t):{optimizedConfig:void 0,errors:[]}));a.some(e=>!!e.optimizedConfig)&&(l={...structuredClone(e),with:e.with.map((e,t)=>({...e,chartConfig:n(a[t].optimizedConfig,()=>e.chartConfig)}))}),o.push(...a.flatMap(e=>n(e.errors,()=>[])))}if(e.from.databaseName===s.from.databaseName&&e.from.tableName===s.from.tableName){let a=await y(n(l,()=>e),i,t);a.optimizedConfig&&(l=a.optimizedConfig),o.push(...n(a.errors,()=>[]))}if(l){let{isValid:e,rowEstimate:n=1/0,error:i}=await a.testChartConfigValidity({config:l,metadata:t,opts:{abort_signal:r},querySettings:s.querySettings});if(i&&o.push(i),e)return{optimizedConfig:l,rowEstimate:n,errors:[]}}return{errors:o}}async function A(e,t,a,r,i){let s=n(i.materializedViews,()=>[]),o=await Promise.all(s.map(n=>E(e,t,a,r,n,i).then(e=>({...e,mvConfig:n})))),l,u=1/0;for(let e of o)e.optimizedConfig&&n(e.rowEstimate,()=>1/0)1/0));let c=o.map(({optimizedConfig:e,errors:t,rowEstimate:a,mvConfig:n})=>({success:!!e&&e===l,errors:t,rowEstimate:a,mvConfig:n}));return{optimizedConfig:l,explanations:c}}async function N(e,t,a,r,i){let{optimizedConfig:s}=await A(e,t,a,r,i);return n(s,()=>e)}function T(e){return`${e.databaseName}.${e.tableName}`}async function S({chartConfig:e,keys:t,source:a,clickhouseClient:i,metadata:o,signal:u}){let c=new Map((r([a,"optionalAccess",e=>e.materializedViews])||[]).map(e=>[T(e),e])),m=new Map;for(let[a,n]of c.entries()){let r=e.dateRange?function(e,t){let[a,n]=e,r=s.m.call(void 0,t);return Math.floor(l.differenceInSeconds.call(void 0,n,a)/r)}(e.dateRange,n.minGranularity):1/0;if(p(n,e)&&r>=3){let e=s.e.call(void 0,n.dimensionColumns),r=t.filter(t=>e.includes(t));r.length>0&&m.set(a,r)}}let d=[...m.entries()].map(([t,a])=>{let{databaseName:n,tableName:r,timestampColumn:i}=c.get(t);return{...structuredClone(e),timestampValueExpression:i,from:{databaseName:n,tableName:r},select:a.map((e,t)=>`groupUniqArray(1)(${e}) AS param${t}`).join(", ")}}),g=await Promise.all(d.map(async e=>{let{isValid:t,rowEstimate:n=1/0}=await i.testChartConfigValidity({config:e,metadata:o,opts:{abort_signal:u},querySettings:r([a,"optionalAccess",e=>e.querySettings])});return{id:T({databaseName:e.from.databaseName,tableName:e.from.tableName}),isValid:t,rowEstimate:n}})),h=new Map,f=new Set(t);for(let e of g.filter(e=>e.isValid).sort((e,t)=>e.rowEstimate-t.rowEstimate)){let t=n(m.get(e.id),()=>[]).filter(e=>f.has(e));if(t.length)for(let a of(h.set(e.id,t),t))f.delete(a)}let y=[...h.entries()].map(([t,a])=>{let{databaseName:n,tableName:r,timestampColumn:i}=c.get(t);return{chartConfig:{...structuredClone(e),timestampValueExpression:i,from:{databaseName:n,tableName:r}},keys:a}});return f.size&&y.push({chartConfig:structuredClone(e),keys:[...f]}),y}t.a=h,t.b=y,t.c=A,t.d=N,t.e=S},61410:(e,t,a)=>{a.d(t,{Km:()=>n,Nz:()=>i,rb:()=>r});let n=200,r=60;function i(e){return{limit:{limit:e?.searchRowLimit??n}}}},67270:(e,t,a)=>{var n=a(37823);a(60302),a(55754),a(67505),t.n_=n.b,n.h,t.bv=n.e,t.v4=n.i,t.lE=n.d,t.x1=n.c,t.PV=n.k,n.f,n.g,n.j},69519:(e,t,a)=>{a.d(t,{Me:()=>i,so:()=>r});let n=[21600,21600,43200,86400];function r(e,t,a=n){if(e.getTime()===t.getTime())return[{startTime:e,endTime:t,windowIndex:0,direction:"DESC"}];let i=[],s=new Date(t),o=0;for(;s>e;){let t=1e3*(a[o]||a[a.length-1]),n=new Date(Math.max(s.getTime()-t,e.getTime()));i.push({endTime:new Date(s),startTime:n,windowIndex:o,direction:"DESC"}),s=n,o++}return i}function i(e,t,a=n){if(e.getTime()===t.getTime())return[{startTime:e,endTime:t,windowIndex:0,direction:"ASC"}];let r=[],s=new Date(e),o=0;for(;s{var n=a(67599),r=n.expandPhrases.call(void 0,["SELECT [ALL | DISTINCT]"]),i=n.expandPhrases.call(void 0,["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET"]),s=n.expandPhrases.call(void 0,["CREATE [GLOBAL TEMPORARY | LOCAL TEMPORARY] TABLE"]),o=n.expandPhrases.call(void 0,["CREATE [RECURSIVE] VIEW","UPDATE","WHERE CURRENT OF","DELETE FROM","DROP TABLE","ALTER TABLE","ADD COLUMN","DROP [COLUMN]","RENAME COLUMN","RENAME TO","ALTER [COLUMN]","{SET | DROP} DEFAULT","ADD SCOPE","DROP SCOPE {CASCADE | RESTRICT}","RESTART WITH","TRUNCATE TABLE","SET SCHEMA"]),l={name:"clickhouse",tokenizerOptions:{reservedSelect:r,reservedClauses:[...i,...s,...o],reservedSetOperations:n.expandPhrases.call(void 0,["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),reservedJoins:n.expandPhrases.call(void 0,["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),reservedPhrases:n.expandPhrases.call(void 0,["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),reservedKeywords:["ALL","ALLOCATE","ALTER","ANY","ARE","AS","ASC","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","BEGIN","BETWEEN","BOTH","BY","CALL","CALLED","CASCADED","CAST","CHECK","CLOSE","COALESCE","COLLATE","COLUMN","COMMIT","CONDITION","CONNECT","CONSTRAINT","CORRESPONDING","CREATE","CROSS","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DEALLOCATE","DAY","DECLARE","DEFAULT","DELETE","DEREF","DESC","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DROP","DYNAMIC","EACH","ELEMENT","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXTERNAL","FALSE","FETCH","FILTER","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GET","GLOBAL","GRANT","GROUP","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INTERSECT","INTO","IS","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LOCAL","MATCH","MEMBER","MERGE","METHOD","MINUTE","MODIFIES","MODULE","MONTH","NATURAL","NEW","NO","NONE","NOT","NULL","NULLIF","OF","OLD","ON","ONLY","OPEN","ORDER","OUT","OUTER","OVER","OVERLAPS","PARAMETER","PARTITION","PRECISION","PREPARE","PRIMARY","PROCEDURE","RANGE","READS","REAL","RECURSIVE","REF","REFERENCES","REFERENCING","RELEASE","RESULT","RETURN","RETURNS","REVOKE","RIGHT","ROLLBACK","ROLLUP","ROW","ROWS","SAVEPOINT","SCOPE","SCROLL","SEARCH","SECOND","SELECT","SENSITIVE","SESSION_USER","SET","SIMILAR","SOME","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","START","STATIC","SUBMULTISET","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATION","TREAT","TRIGGER","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","USER","USING","VALUE","VALUES","WHENEVER","WINDOW","WITHIN","WITHOUT","YEAR"],reservedDataTypes:["ARRAY","BIGINT","BINARY LARGE OBJECT","BINARY VARYING","BINARY","BLOB","BOOLEAN","CHAR LARGE OBJECT","CHAR VARYING","CHAR","CHARACTER LARGE OBJECT","CHARACTER VARYING","CHARACTER","CLOB","DATE","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","MULTISET","NATIONAL CHAR VARYING","NATIONAL CHAR","NATIONAL CHARACTER LARGE OBJECT","NATIONAL CHARACTER VARYING","NATIONAL CHARACTER","NCHAR LARGE OBJECT","NCHAR VARYING","NCHAR","NCLOB","NUMERIC","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR"],reservedFunctionNames:["GROUPING","RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","ROW_NUMBER","POSITION","OCCURRENCES_REGEX","POSITION_REGEX","EXTRACT","CHAR_LENGTH","CHARACTER_LENGTH","OCTET_LENGTH","CARDINALITY","ABS","MOD","LN","EXP","POWER","SQRT","FLOOR","CEIL","CEILING","WIDTH_BUCKET","SUBSTRING","SUBSTRING_REGEX","UPPER","LOWER","CONVERT","TRANSLATE","TRANSLATE_REGEX","TRIM","OVERLAY","NORMALIZE","SPECIFICTYPE","CURRENT_DATE","CURRENT_TIME","LOCALTIME","CURRENT_TIMESTAMP","LOCALTIMESTAMP","COUNT","AVG","MAX","MIN","SUM","STDDEV_POP","STDDEV_SAMP","VAR_SAMP","VAR_POP","COLLECT","FUSION","INTERSECTION","COVAR_POP","COVAR_SAMP","CORR","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","PERCENTILE_CONT","PERCENTILE_DISC","CAST","COALESCE","NULLIF","ROUND","SIN","COS","TAN","ASIN","ACOS","ATAN"],stringTypes:[{quote:"''-qq-bs",prefixes:["N","U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``"],extraParens:["[]"],paramTypes:{positional:!0},operators:["||","%"]},formatOptions:{onelineClauses:[...s,...o],tabularOnelineClauses:o}};t.GP=function(e){return n.formatDialect.call(void 0,e,{dialect:l})}},78550:(e,t,a)=>{a.d(t,{Ii:()=>F,ws:()=>w,Zh:()=>T,lo:()=>L,kN:()=>v,n$:()=>S,Ge:()=>N,Sh:()=>R,nT:()=>$,Z2:()=>I});var n=a(75155),r=a(55729),i=a(79339),s=a.n(i),o=a(35467),l=a(93251),u=a(12482),c=a(4308),m=a(6876),d=a(98142),p=a(93108),g=a(3145),h=a(49672),f=a(61410);let y=()=>(0,g.yb)((0,h.W)({queryTimeout:f.rb}));var E=a(81973),A=a(92917);function N(){let e,t,a,i,s,o=(0,n.c)(10);o[0]===Symbol.for("react.memo_cache_sentinel")?(e=y(),o[0]=e):e=o[0];let[u,c]=(0,r.useState)(e),{data:g}=m.Ay.useMe(),h=(0,r.useRef)(!1),f=(0,l.jE)();o[1]!==f?(t=()=>{if(void 0===window.document||!d.VO)return;let e=e=>{e.key===p.Gs&&e.newValue&&(c(y()),h.current=!1,f.resetQueries())};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}},a=[f],o[1]=f,o[2]=t,o[3]=a):(t=o[2],a=o[3]),(0,r.useEffect)(t,a),o[4]!==g||o[5]!==u?(i=()=>{g?.team?.metadataMaxRowsToRead&&!h.current&&(u.setClickHouseSettings({max_rows_to_read:g.team.metadataMaxRowsToRead}),h.current=!0)},o[4]=g,o[5]=u,o[6]=i):i=o[6];let E=g?.team?.metadataMaxRowsToRead;return o[7]!==u||o[8]!==E?(s=[E,u],o[7]=u,o[8]=E,o[9]=s):s=o[9],(0,r.useEffect)(i,s),u}function T(e,t){let a,r,i,s=(0,n.c)(13),{databaseName:o,tableName:l,connectionId:c}=e,m=N();s[0]!==o||s[1]!==l?(a=["useMetadata.useColumns",{databaseName:o,tableName:l}],s[0]=o,s[1]=l,s[2]=a):a=s[2],s[3]!==c||s[4]!==o||s[5]!==m||s[6]!==l?(r=async()=>m.getColumns({databaseName:o,tableName:l,connectionId:c}),s[3]=c,s[4]=o,s[5]=m,s[6]=l,s[7]=r):r=s[7];let d=!!o&&!!l&&!!c;return s[8]!==t||s[9]!==a||s[10]!==r||s[11]!==d?(i={queryKey:a,queryFn:r,enabled:d,...t},s[8]=t,s[9]=a,s[10]=r,s[11]=d,s[12]=i):i=s[12],(0,u.I)(i)}function S(e,t){let a,r,i,s=(0,n.c)(10),l=N();s[0]!==e?(a=["useMetadata.useJsonColumns",e],s[0]=e,s[1]=a):a=s[1],s[2]!==l||s[3]!==e?(r=async()=>{if(!e)return[];let t=await l.getColumns(e);return(0,o.P1)(t,[o.A2.JSON])?.map(_)??[]},s[2]=l,s[3]=e,s[4]=r):r=s[4];let c=e&&!!e.databaseName&&!!e.tableName&&!!e.connectionId;return s[5]!==t||s[6]!==a||s[7]!==r||s[8]!==c?(i={queryKey:a,queryFn:r,enabled:c,...t},s[5]=t,s[6]=a,s[7]=r,s[8]=c,s[9]=i):i=s[9],(0,u.I)(i)}function _(e){return e.name}function R(e,t){let a,r,i,s,o=(0,n.c)(14),l=N(),{data:c,isFetched:d}=m.Ay.useMe();return o[0]!==e?(a=["useMetadata.useMultipleAllFields",...e.map(C)],o[0]=e,o[1]=a):a=o[1],o[2]!==c?.team||o[3]!==l||o[4]!==e?(r=async()=>{let t=c?.team;if(t?.fieldMetadataDisabled)return[];let a=await Promise.all(e.map(e=>l.getAllFields(e)));return 1===a.length?a[0]:F(a)},o[2]=c?.team,o[3]=l,o[4]=e,o[5]=r):r=o[5],o[6]!==d||o[7]!==e?(i=e.length>0&&e.every(b)&&d,o[6]=d,o[7]=e,o[8]=i):i=o[8],o[9]!==t||o[10]!==a||o[11]!==r||o[12]!==i?(s={queryKey:a,queryFn:r,enabled:i,...t},o[9]=t,o[10]=a,o[11]=r,o[12]=i,o[13]=s):s=o[13],(0,u.I)(s)}function b(e){return!!e.databaseName&&!!e.tableName&&!!e.connectionId}function C(e){return{...e}}function w(e,t){let a,r=(0,n.c)(2);return r[0]!==e?(a=e?[e]:[],r[0]=e,r[1]=a):a=r[1],R(a,t)}function I(e,t){let a,r,i,s=(0,n.c)(13),{databaseName:o,tableName:l,connectionId:c}=e,m=N();s[0]!==o||s[1]!==l?(a=["useMetadata.useTableMetadata",{databaseName:o,tableName:l}],s[0]=o,s[1]=l,s[2]=a):a=s[2],s[3]!==c||s[4]!==o||s[5]!==m||s[6]!==l?(r=async()=>await m.getTableMetadata({databaseName:o,tableName:l,connectionId:c}),s[3]=c,s[4]=o,s[5]=m,s[6]=l,s[7]=r):r=s[7];let d=!!o&&!!l&&!!c;return s[8]!==t||s[9]!==a||s[10]!==r||s[11]!==d?(i={queryKey:a,queryFn:r,staleTime:3e5,enabled:d,...t},s[8]=t,s[9]=a,s[10]=r,s[11]=d,s[12]=i):i=s[12],(0,u.I)(i)}function $(e,t){let a,r,i,s=(0,n.c)(12),{chartConfigs:o,keys:l,limit:m,disableRowLimit:d}=e,p=N(),g=(0,A.$r)(o);s[0]!==t?(a=t||{},s[0]=t,s[1]=a):a=s[1];let{enabled:h}=a,{data:f,isLoading:y}=(0,E.oE)();s[2]!==g||s[3]!==d||s[4]!==l||s[5]!==m||s[6]!==p||s[7]!==f?(r=async e=>{let{signal:t}=e;return(await Promise.all(g.map(e=>{let a=e.source?f?.find(t=>t.id===e.source):void 0;return p.getKeyValuesWithMVs({chartConfig:e,keys:l.slice(0,20),limit:m,disableRowLimit:d,source:a,signal:t})}))).flatMap(x)},s[2]=g,s[3]=d,s[4]=l,s[5]=m,s[6]=p,s[7]=f,s[8]=r):r=s[8];let T=(0,u.I)({queryKey:["useMetadata.useGetKeyValues",...g.map(O),...l,d],queryFn:r,staleTime:3e5,placeholderData:c.rX,...t,enabled:!!(void 0===h||h)&&!!l.length&&!y}),S=T.isLoading||y;return s[9]!==T||s[10]!==S?(i={...T,isLoading:S},s[9]=T,s[10]=S,s[11]=i):i=s[11],i}function x(e){return e}function O(e){return{...e}}function v(e,t){let a,r,i,s,o=(0,n.c)(16),{chartConfig:l,key:m,limit:d}=e,p=N();o[0]!==l.source?(a={id:l.source},o[0]=l.source,o[1]=a):a=o[1];let{data:g,isLoading:h}=(0,E.Fo)(a);o[2]!==l||o[3]!==m?(r=["useMetadata.useGetValuesDistribution",l,m],o[2]=l,o[3]=m,o[4]=r):r=o[4],o[5]!==l||o[6]!==m||o[7]!==d||o[8]!==p||o[9]!==g?(i=async()=>await p.getValuesDistribution({chartConfig:l,key:m,limit:d,source:g}),o[5]=l,o[6]=m,o[7]=d,o[8]=p,o[9]=g,o[10]=i):i=o[10];let f=!!m&&!h;return o[11]!==t||o[12]!==r||o[13]!==i||o[14]!==f?(s={queryKey:r,queryFn:i,staleTime:1/0,enabled:f,placeholderData:c.rX,retry:!1,...t},o[11]=t,o[12]=r,o[13]=i,o[14]=f,o[15]=s):s=o[15],(0,u.I)(s)}function L(e,t){let a,r,i=(0,n.c)(7),{chartConfig:s,keys:o,limit:l,disableRowLimit:u}=e;return i[0]!==s?(a=s?[s]:[],i[0]=s,i[1]=a):a=i[1],i[2]!==u||i[3]!==o||i[4]!==l||i[5]!==a?(r={chartConfigs:a,keys:o,limit:l,disableRowLimit:u},i[2]=u,i[3]=o,i[4]=l,i[5]=a,i[6]=r):r=i[6],$(r,t)}function F(e){let t=[],a=new Set;for(let n of e)for(let e of n){let n=s().sha1(e);a.has(n)||(a.add(n),t.push(e))}return t}},81973:(e,t,a)=>{a.d(t,{AF:()=>R,Al:()=>j,Dp:()=>V,Fo:()=>O,N8:()=>w,YI:()=>U,Ys:()=>P,fS:()=>B,kJ:()=>A,kg:()=>H,nd:()=>q,oE:()=>$,pM:()=>b,sr:()=>L,xg:()=>C});var n=a(75155),r=a(29594),i=a.n(r),s=a(79339),o=a.n(s),l=a(91985),u=a.n(l),c=a(35467),m=a(76089),d=a(82641),p=a(12482),g=a(93251),h=a(16932),f=a(6876),y=a(98142),E=a(92917);let A={resourceAttributesExpression:"ResourceAttributes",eventAttributesExpression:"LogAttributes",timestampValueExpression:"TimestampTime",implicitColumnExpression:"Body"},N={...A,timestampValueExpression:"Timestamp"},T="hdx-local-source";function S(e){u().transact(T,e,[])}function _(){if(u().has(T))return u().get(T,[])??[];try{let e=(0,E.Ol)(y.m6??"");if(null!=e)return e}catch(e){console.error("Error fetching default sources",e)}return[]}function R(e){return(0,m.AB)(e)[0]}function b(e){return e.spanNameExpression}function C(e){return e.displayedTimestampValueExpression??R(e.timestampValueExpression)}function w(e){let t=e.kind===d.GL.Trace?e.spanNameExpression??void 0:e.bodyExpression??e.implicitColumnExpression,a=(0,m.AB)(t??"");return 1===a.length?t:a[0]}function I(e){return{...e,timestampValueExpression:e.kind===d.GL.Session?e.timestampValueExpression||A.timestampValueExpression:e.timestampValueExpression}}function $(){let e,t=(0,n.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:["sources"],queryFn:x},t[0]=e):e=t[0],(0,p.I)(e)}async function x(){return y.VO?_():(await (0,f.Q5)("sources").json()).map(I)}function O(e){let t,a,r,i=(0,n.c)(6),{id:s}=e;i[0]===Symbol.for("react.memo_cache_sentinel")?(t=["sources"],i[0]=t):t=i[0],i[1]!==s?(a=e=>e.filter(e=>e.id===s)[0],i[1]=s,i[2]=a):a=i[2];let o=null!=s;return i[3]!==a||i[4]!==o?(r={queryKey:t,queryFn:v,select:a,enabled:o},i[3]=a,i[4]=o,i[5]=r):r=i[5],(0,p.I)(r)}async function v(){return y.VO?_():(await (0,f.Q5)("sources").json()).map(I)}function L(){let e,t=(0,n.c)(2),a=(0,g.jE)();return t[0]!==a?(e={mutationFn:F,onSuccess:()=>{a.invalidateQueries({queryKey:["sources"]})}},t[0]=a,t[1]=e):e=t[1],(0,h.n)(e)}async function F(e){let{source:t}=e;if(!y.VO)return await (0,f.Q5)(`sources/${t.id}`,{method:"PUT",json:t});S(e=>e.map(e=>e.id===t.id?t:e))}function q(){let e,t=(0,n.c)(2),a=(0,g.jE)();return t[0]!==a?(e={mutationFn:D,onSuccess:()=>{a.invalidateQueries({queryKey:["sources"]})}},t[0]=a,t[1]=e):e=t[1],(0,h.n)(e)}async function D(e){let{source:t}=e;if(y.VO){let e=_().find(e=>o()(i()(e,["kind","name","connection"]))===o()(i()(t,["kind","name","connection"])));if(e)return{...t,id:e.id};let a={...t,id:`l${(0,m.s5)(Math.random().toString())}`};return S(e=>[...e,a]),a}return(0,f.Q5)("sources",{method:"POST",json:t}).json()}function U(){let e,t=(0,n.c)(2),a=(0,g.jE)();return t[0]!==a?(e={mutationFn:M,onSuccess:()=>{a.invalidateQueries({queryKey:["sources"]})}},t[0]=a,t[1]=e):e=t[1],(0,h.n)(e)}async function M(e){let{id:t}=e;return y.VO?void S(e=>e.filter(e=>e.id!==t)):(0,f.Q5)(`sources/${t}`,{method:"DELETE"})}function k(e,t){let a=new Map(e.map(e=>[e.name,e]));return 0===Array.from(t).filter(e=>!a.has(e)).length}async function P({databaseName:e,tableName:t,connectionId:a,metadata:n}){let r=await n.getColumns({databaseName:e,tableName:t,connectionId:a}),i=(await n.getTableMetadata({databaseName:e,tableName:t,connectionId:a})).primary_key,s=new Set((0,c.bZ)(i)),o=k(r,["Timestamp","Body","SeverityText","TraceId","SpanId","ServiceName","LogAttributes","ResourceAttributes"]),l=k(r,["Timestamp","SpanName","Duration","SpanKind","TraceId","SpanId","ParentSpanId","ServiceName","SpanAttributes","ResourceAttributes","StatusCode","StatusMessage"]),u=r.some(e=>"Events.Timestamp"===e.name),m=(0,c.P1)(r,[c.A2.Date]),d=m?.find(e=>s.has(e.name));return{...null!=d?{timestampValueExpression:d.name}:{},...o?{defaultTableSelectExpression:"Timestamp, ServiceName as service, SeverityText as level, Body",serviceNameExpression:"ServiceName",bodyExpression:"Body",displayedTimestampValueExpression:"Timestamp",eventAttributesExpression:"LogAttributes",implicitColumnExpression:"Body",resourceAttributesExpression:"ResourceAttributes",spanIdExpression:"SpanId",traceIdExpression:"TraceId",severityTextExpression:"SeverityText"}:{},...l?{displayedTimestampValueExpression:"Timestamp",implicitColumnExpression:"SpanName",defaultTableSelectExpression:"Timestamp, ServiceName as service, StatusCode as level, round(Duration / 1e6) as duration, SpanName",eventAttributesExpression:"SpanAttributes",serviceNameExpression:"ServiceName",resourceAttributesExpression:"ResourceAttributes",durationExpression:"Duration",durationPrecision:9,parentSpanIdExpression:"ParentSpanId",spanIdExpression:"SpanId",spanKindExpression:"SpanKind",spanNameExpression:"SpanName",traceIdExpression:"TraceId",statusCodeExpression:"StatusCode",statusMessageExpression:"StatusMessage",...u?{spanEventsValueExpression:"Events"}:{}}:{}}}function V(e){return`(${e.durationExpression})/1e${(e.durationPrecision??9)-3}`}function H(e){return`(${e.durationExpression})/1e${e.durationPrecision??9}`}let W={[d.SX.Gauge]:["TimeUnix","ServiceName","MetricName","Value","Attributes","ResourceAttributes"],[d.SX.Histogram]:["TimeUnix","ServiceName","MetricName","Attributes","ResourceAttributes","Count","Sum","BucketCounts","ExplicitBounds"],[d.SX.Sum]:["TimeUnix","ServiceName","MetricName","Value","Attributes","ResourceAttributes"],[d.SX.Summary]:["Attributes","TimeUnix","Count","Sum","ValueAtQuantiles.Quantile","ValueAtQuantiles.Value","Flags","ServiceName","MetricName","ResourceAttributes"],[d.SX.ExponentialHistogram]:["Attributes","TimeUnix","Count","Sum","Scale","ZeroCount","PositiveOffset","PositiveBucketCounts","NegativeOffset","NegativeBucketCounts","Flags","ServiceName","MetricName","ResourceAttributes"]};async function B({databaseName:e,tableName:t,connectionId:a,metricType:n,metadata:r}){return!!t&&k(await r.getColumns({databaseName:e,tableName:t,connectionId:a}),W[n])}async function j({databaseName:e,tableName:t,connectionId:a,metadata:n}){if(!t)return!1;let r=await n.getColumns({databaseName:e,tableName:t,connectionId:a});return k(r,Object.values(A))||k(r,Object.values(N))}},82641:(e,t,a)=>{var n=a(67505);n.g,n.i,n.A,t.lZ=n.v,n.C,t.w5=n.u,t.Or=n.t,t.qQ=n.s,n.$,n.aa,n.p,t.fB=n.B,n.J,n.U,n.I,n.O,n.N,n.R,t.mJ=n.T,n.S,n.k,t.t2=n.b,n.E,n.h,n.o,n.Y,n.c,t.SX=n.a,n.G,t.K5=n.P,n.Q,n.j,n.d,n.K,n.F,n.f,n.e,n.l,n.q,n.n,n.m,t.GL=n.X,n.Z,n.D,n.V,n.W,n.L,n.M,t.x=n.r,n.H,t.z1=n._,t.Oq=n.x,n.w,n.y,n.z},88459:(e,t,a)=>{function n(e){let t,a=e[0],n=1;for(;na.call(t,...e)),t=void 0)}return a}function r(e){let t=n(e);return null==t||t}var i=a(37823);a(60302),a(55754),a(67505);var s=a(5216),o=(e,t)=>{t||(t={});let a=new URL(e instanceof URL?e:e instanceof Request?e.url:e),i=n([t,"access",e=>e.headers,"optionalAccess",e=>e.Authorization]),[s,o]=window.atob(i.substring(6)).split(":");return r([t,"access",e=>e.headers,"optionalAccess",e=>delete e.Authorization]),r([t,"access",e=>e.headers,"optionalAccess",e=>delete e.authorization]),s&&a.searchParams.set("user",s),o&&a.searchParams.set("password",o),fetch(`${a.toString()}`,t)},l=(e,t)=>(t||(t={}),r([t,"access",e=>e.headers,"optionalAccess",e=>delete e.Authorization]),r([t,"access",e=>e.headers,"optionalAccess",e=>delete e.authorization]),fetch(e,t)),u=t.Kc=async({host:e,username:t,password:a})=>{try{return(await new c({host:e,username:t,password:a}).query({query:"SELECT 1",format:"TabSeparatedRaw"})).text().then(e=>"1"===e.trim())}catch(e){return console.warn("Failed to test local connection",e),!1}},c=t.aP=class extends i.y{constructor(e){super(e)}buildClient(){var e,t,a,n;let r=this.host,i,u=null!=this.username&&null!=this.password,c={};u?(i=o,c.add_http_cors_header=1):(r=`${window.origin}${this.host}`,i=l);let m=new URL(r);return s.createClient.call(void 0,{url:m.origin,pathname:m.pathname,clickhouse_settings:c,username:(e=this.username,t=()=>"",null!=e?e:t()),password:(a=this.password,n=()=>"",null!=a?a:n()),keep_alive:{enabled:!1},fetch:i,request_timeout:this.requestTimeout,application:this.application})}async __query({query:e,format:t="JSON",query_params:a={},abort_signal:n,clickhouse_settings:r,connectionId:i,queryId:s}){null==this.client&&(this.client=this.buildClient()),this.logDebugQuery(e,a);let o=this.processClickhouseSettings(r),l={...i&&"local"!==i?{"x-hyperdx-connection-id":i}:{}};return this.getClient().query({query:e,query_params:a,format:t,abort_signal:n,http_headers:l,clickhouse_settings:o,query_id:s})}};t.aP=c,t.Kc=u},91021:(e,t,a)=>{a.d(t,{Kc:()=>b,HD:()=>_,zu:()=>R});var n=a(75155),r=a(35467),i=a(67270),s=a(76089),o=a(73854),l=a(93251),u=a(12482),c=a(43152),m=a(49672),d=a(98142),p=a(79339),g=a.n(p);let h="hyperdx",f=e=>{let t=g().sha1(e),a=(0,i.v4)(e.aggCondition);switch(e.aggFn){case"min":case"max":case"sum":case"avg":return{fieldName:t,fn:`${e.aggFn}${a?"If":""}`,args:["Nullable(Float64)",...a?["UInt8"]:[]]};case"count":return{fieldName:t,fn:`${e.aggFn}${a?"If":""}`,args:a?["UInt8"]:[]};default:throw Error(`Unsupported aggregation function: ${e.aggFn}`)}},y=async(e,t,a,n)=>{let s,o={...e,...Array.isArray(e.select)&&{select:e.select.map(e=>{let{fieldName:t,fn:a}=f(e);return{...e,aggFn:`${a}State`,alias:t}})},granularity:n??e.granularity,dateRange:void 0,orderBy:void 0,limit:void 0},l=await (0,i.PV)(o,t,a),u=g().sha1(l),c=`${e.from.tableName}_mv_${u}`,m={...e,...Array.isArray(e.select)&&{select:e.select.map(e=>{let{fieldName:t,fn:a}=f(e);return{aggFn:`${a}Merge`,valueExpression:t,alias:`${e.aggFn}(${e.valueExpression})`}})},timestampValueExpression:i.n_,from:{databaseName:h,tableName:c}};return{mtViewName:c,dataTableDDL:(0,r.l6)(((e,t)=>{if(!Array.isArray(t.select))throw Error("Only array select is supported");if((0,i.x1)(t))throw Error("Group by is not supported");return(0,r.kg)`CREATE TABLE IF NOT EXISTS ${h}.${{Identifier:e}} + `}];t.a=eq,t.b=K,t.c=G,t.d=Q,t.e=z,t.f=Y,t.g=J,t.h=function(e){return{...e,operator:X[e.operator]}},t.i=Z,t.j=er,t.k=ep,t.l=eg,t.m=eh,t.n=ef,t.o=ey,t.p=eE,t.q=eA,t.r=eT,t.s=eS,t.t=e_,t.u=eR,t.v=eb,t.w=ew,t.x=eI,t.y=e$,t.z=ex,t.A=eO,t.B=function(e){let t={};if(null==e)return t;try{let a=eO(e),[n]=d.C.call(void 0,a),{sqlWithReplacements:r,replacements:i}=d.i.call(void 0,n),s=new h.Parser().astify(r,{database:"Postgresql",parseOptions:{includeLocations:!0}});for(let[e,a]of(null!=s.columns&&s.columns.forEach(e=>{null!=e.as&&("expr"===e.type&&"column_ref"===e.expr.type?t[e.as]=e.expr.array_index&&o([e,"access",e=>e.expr,"access",e=>e.array_index,"access",e=>e[0],"optionalAccess",e=>e.brackets])?`${e.expr.column.expr.value}['${e.expr.array_index[0].index.value}']`:e.expr.column.expr.value:null!=e.expr.loc?t[e.as]=r.slice(e.expr.loc.start.offset,e.expr.loc.end.offset):console.error("Unknown alias column type",e))}),Object.entries(t)))for(let[n,r]of i)a.includes(n)&&(t[e]=a.replaceAll(n,r))}catch(t){console.error("Error parsing alias map with JSON removed",t,"for query",e)}return t},t.C=ev,t.D=eL,t.E=eF,t.F=3e6,t.G=S,t.H=_,t.I=function(e){return{databaseName:s(o([e,"optionalAccess",e=>e.from,"optionalAccess",e=>e.databaseName]),()=>""),tableName:s(o([e,"optionalAccess",e=>e.from,"optionalAccess",e=>e.tableName]),()=>""),connectionId:s(o([e,"optionalAccess",e=>e.connection]),()=>"")}},t.J=function(e){return{databaseName:s(o([e,"optionalAccess",e=>e.from,"optionalAccess",e=>e.databaseName]),()=>""),tableName:s(o([e,"optionalAccess",e=>e.from,"optionalAccess",e=>e.tableName]),()=>""),connectionId:s(o([e,"optionalAccess",e=>e.connection]),()=>"")}},t.K=b,t.L=w,t.M=q,t.N=U,t.O=H,t.P=W,t.Q=B},9897:(e,t,a)=>{a.d(t,{h:()=>r});var n,r=((n={})[n.Pending=1]="Pending",n[n.Running=2]="Running",n[n.Succeeded=3]="Succeeded",n[n.Failed=4]="Failed",n[n.Unknown=5]="Unknown",n)},30404:(e,t,a)=>{function n(e,t){return null!=e?e:t()}function r(e){let t,a=e[0],n=1;for(;na.call(t,...e)),t=void 0)}return a}async function i(e){let t,a=e[0],n=1;for(;na.call(t,...e)),t=void 0)}return a}Object.defineProperty(t,"__esModule",{value:!0});var s=a(31356),o=a(20470),l=a(35362);async function u(e,t,a){try{return!!await i([await a.getColumn({...e,column:t}),"optionalAccess",async e=>e.type,"access",async e=>e.startsWith,"call",async e=>e("SimpleAggregateFunction(")])}catch(e){return!1}}async function c(e,t,a){try{let n=await i([await a.getColumn({...e,column:t}),"optionalAccess",async e=>e.type]);return n?r([n,"access",e=>e.match,"call",e=>e(/^AggregateFunction\(\s*([^(, ]+)\s*\(/),"optionalAccess",e=>e[1]]):void 0}catch(e){return}}async function m(e,t,a,n){return"count"===a?"sum":await u(e,t,n)?a:`${a}Merge`}function d(e,t,a){return e.aggregatedColumns.find(e=>e.aggFn===a&&("count"===e.aggFn||e.sourceColumn===t))}function p(e,t){if(e.minDate&&!t.dateRange)return!1;if(!e.minDate||!t.dateRange)return!0;let[a]=t.dateRange;return a>=new Date(e.minDate)}var g=/\bcount(If)?\s*\(/i;function h(e){return g.test(e.valueExpression)}async function f(e,t,a,n){var r;let{valueExpression:i,aggFn:s}=t,l=s;if(h(t))throw Error("Custom count() expressions are not supported with materialized views.");if(!l)return t;if(!((r=l)&&o.h.safeParse(r).success))throw Error(`Aggregate function ${l} is not valid.`);let u=d(e,"",l);if(u){let e=u.mvColumn,r=await m(a,e,l,n);return{...t,valueExpression:e,aggFn:r}}let p=d(e,i,l);if(!p)throw Error(`The aggregate function ${function(e,t){if("quantile"!==e)return e;switch(t){case .5:return"median";case .9:return"p90";case .95:return"p95";case .99:return"p99";default:return"quantile"}}(l,t.level)} is not available for column '${i}'.`);if("quantile"===t.aggFn&&"level"in t&&"number"==typeof t.level){let e=await c(a,p.mvColumn,n);e&&(l=e)}let g=await m(a,p.mvColumn,l,n);return{...t,valueExpression:p.mvColumn,aggFn:g}}async function y(e,t,a){if(!Array.isArray(e.select))return{errors:["Only array-based select statements are supported."]};if(t.minDate&&!p(t,e))return{errors:["The selected date range includes dates for which this view does not contain data."]};if(!function(e,t){if(!t.granularity&&!t.dateRange)return!0;let a=t.granularity||"auto";if("auto"===a&&!t.dateRange)return!1;let n="auto"===a&&t.dateRange?s.l.call(void 0,t.dateRange):a,r=s.m.call(void 0,n),i=s.m.call(void 0,e.minGranularity);return r>=i&&r%i==0}(t,e))return{errors:[e.granularity?`Granularity must be a multiple of the view's granularity (${t.minGranularity}).`:"The selected date range is too short for the granularity of this materialized view."]};let n={databaseName:t.databaseName,tableName:t.tableName,connectionId:e.connection},r=await Promise.allSettled(e.select.map(e=>f(t,e,n,a))),i=[],o=[];for(let e of r)"rejected"===e.status?o.push(e.reason.message):i.push(e.value);return o.length>0?{errors:o}:{optimizedConfig:{...structuredClone(e),select:i,timestampValueExpression:t.timestampColumn,from:{databaseName:t.databaseName,tableName:t.tableName},..."dateRange"in e&&e.dateRange?{dateRangeEndInclusive:!1,dateRange:s.A.call(void 0,e.dateRange,t.minGranularity)}:{}}}}async function E(e,t,a,r,i,s){let o=[],l;if(e.with){let a=await Promise.all(e.with.map(async e=>e.chartConfig&&e.chartConfig.from.databaseName===s.from.databaseName&&e.chartConfig.from.tableName===s.from.tableName?y(e.chartConfig,i,t):{optimizedConfig:void 0,errors:[]}));a.some(e=>!!e.optimizedConfig)&&(l={...structuredClone(e),with:e.with.map((e,t)=>({...e,chartConfig:n(a[t].optimizedConfig,()=>e.chartConfig)}))}),o.push(...a.flatMap(e=>n(e.errors,()=>[])))}if(e.from.databaseName===s.from.databaseName&&e.from.tableName===s.from.tableName){let a=await y(n(l,()=>e),i,t);a.optimizedConfig&&(l=a.optimizedConfig),o.push(...n(a.errors,()=>[]))}if(l){let{isValid:e,rowEstimate:n=1/0,error:i}=await a.testChartConfigValidity({config:l,metadata:t,opts:{abort_signal:r},querySettings:s.querySettings});if(i&&o.push(i),e)return{optimizedConfig:l,rowEstimate:n,errors:[]}}return{errors:o}}async function A(e,t,a,r,i){let s=n(i.materializedViews,()=>[]),o=await Promise.all(s.map(n=>E(e,t,a,r,n,i).then(e=>({...e,mvConfig:n})))),l,u=1/0;for(let e of o)e.optimizedConfig&&n(e.rowEstimate,()=>1/0)1/0));let c=o.map(({optimizedConfig:e,errors:t,rowEstimate:a,mvConfig:n})=>({success:!!e&&e===l,errors:t,rowEstimate:a,mvConfig:n}));return{optimizedConfig:l,explanations:c}}async function N(e,t,a,r,i){let{optimizedConfig:s}=await A(e,t,a,r,i);return n(s,()=>e)}function T(e){return`${e.databaseName}.${e.tableName}`}async function S({chartConfig:e,keys:t,source:a,clickhouseClient:i,metadata:o,signal:u}){let c=new Map((r([a,"optionalAccess",e=>e.materializedViews])||[]).map(e=>[T(e),e])),m=new Map;for(let[a,n]of c.entries()){let r=e.dateRange?function(e,t){let[a,n]=e,r=s.m.call(void 0,t);return Math.floor(l.differenceInSeconds.call(void 0,n,a)/r)}(e.dateRange,n.minGranularity):1/0;if(p(n,e)&&r>=3){let e=s.e.call(void 0,n.dimensionColumns),r=t.filter(t=>e.includes(t));r.length>0&&m.set(a,r)}}let d=[...m.entries()].map(([t,a])=>{let{databaseName:n,tableName:r,timestampColumn:i}=c.get(t);return{...structuredClone(e),timestampValueExpression:i,from:{databaseName:n,tableName:r},select:a.map((e,t)=>`groupUniqArray(1)(${e}) AS param${t}`).join(", ")}}),g=await Promise.all(d.map(async e=>{let{isValid:t,rowEstimate:n=1/0}=await i.testChartConfigValidity({config:e,metadata:o,opts:{abort_signal:u},querySettings:r([a,"optionalAccess",e=>e.querySettings])});return{id:T({databaseName:e.from.databaseName,tableName:e.from.tableName}),isValid:t,rowEstimate:n}})),h=new Map,f=new Set(t);for(let e of g.filter(e=>e.isValid).sort((e,t)=>e.rowEstimate-t.rowEstimate)){let t=n(m.get(e.id),()=>[]).filter(e=>f.has(e));if(t.length)for(let a of(h.set(e.id,t),t))f.delete(a)}let y=[...h.entries()].map(([t,a])=>{let{databaseName:n,tableName:r,timestampColumn:i}=c.get(t);return{chartConfig:{...structuredClone(e),timestampValueExpression:i,from:{databaseName:n,tableName:r}},keys:a}});return f.size&&y.push({chartConfig:structuredClone(e),keys:[...f]}),y}t.a=h,t.b=y,t.c=A,t.d=N,t.e=S},35467:(e,t,a)=>{var n=a(9641);a(30404),a(31356),a(20470),n.y,t.p1=n.u,t.A2=n.l,t.kg=n.r,t.D7=n.B,n.w,n.x,n.s,t.rj=n.n,n.q,t.bZ=n.v,n.p,t.P1=n.C,n.m,n.E,t.zo=n.D,t.Zo=n.o,t.l6=n.A,t.k$=n.z,n.t},35871:(e,t,a)=>{a.d(t,{A:()=>u});var n=a(6029),r=a(75155),i=a(76089),s=a(63085),o=a(45749),l=a(7565);function u(e){let t,a,u,c,m,d=(0,r.c)(12),{originalDateRange:p,effectiveDateRange:g,mvGranularity:h}=e,f=(0,l.a)();if(!g||(0,i._p)(g,p))return null;d[0]!==g[0]||d[1]!==f?(t=f(g[0]),d[0]=g[0],d[1]=f,d[2]=t):t=d[2],d[3]!==g[1]||d[4]!==f?(a=f(g[1]),d[3]=g[1],d[4]=f,d[5]=a):a=d[5],d[6]!==t||d[7]!==a?(u=[t,a],d[6]=t,d[7]=a,d[8]=u):u=d[8];let[y,E]=u,A=h?`Querying ${y} - ${E} due to ${h} rollups in query acceleration.`:`Querying ${y} - ${E} to show complete intervals.`;return d[9]===Symbol.for("react.memo_cache_sentinel")?(c=(0,n.jsx)(o.A,{size:16,color:"var(--color-text)"}),d[9]=c):c=d[9],d[10]!==A?(m=(0,n.jsx)(s.m,{multiline:!0,maw:500,label:A,children:c}),d[10]=A,d[11]=m):m=d[11],m}},43152:(e,t,a)=>{a.d(t,{gT:()=>N,Hx:()=>R,WG:()=>T,zE:()=>v,x5:()=>x,p2:()=>L,nH:()=>F,JD:()=>q,xh:()=>O,wt:()=>b,VH:()=>W,m9:()=>Q,A7:()=>j,qL:()=>C,_t:()=>K,Z7:()=>G,O7:()=>S,ik:()=>H,zg:()=>P,r4:()=>M,eY:()=>$,xu:()=>z,Ht:()=>I,W6:()=>w,GJ:()=>_});var n=a(6029),r=a(75155),i=a(86508),s=a(11370),o=a(76694),l=a.n(o),u=a(80519),c=a.n(u),m=a(6663),d=a(35467),p=a(67270),g=a(76089),h=a(82641),f=a(60665),y=a(35871);let E={"k8s.pod.cpu.utilization":{newName:"k8s.pod.cpu.usage",versionThreshold:"0.125.0"},"k8s.node.cpu.utilization":{newName:"k8s.node.cpu.usage",versionThreshold:"0.125.0"},"container.cpu.utilization":{newName:"container.cpu.usage",versionThreshold:"0.125.0"}};a(9897);var A=a(92917);let N=[{value:"count",label:"Count of Events",isAttributable:!1},{value:"sum",label:"Sum",isAttributable:!1},{value:"p99",label:"99th Percentile"},{value:"p95",label:"95th Percentile"},{value:"p90",label:"90th Percentile"},{value:"p50",label:"Median"},{value:"avg",label:"Average"},{value:"max",label:"Maximum"},{value:"min",label:"Minimum"},{value:"count_distinct",label:"Count Distinct",isAttributable:!1},{value:"any",label:"Any"},{value:"none",label:"Custom"}],T={name:"",select:[{aggFn:"count",aggCondition:"",aggConditionLanguage:"lucene",valueExpression:""}],where:"",whereLanguage:"lucene",displayType:h.t2.Line,granularity:"auto",alignDateRangeToGranularity:!0};function S(e){let t="auto"===e.granularity||null==e.granularity?(0,g.tA)(e.dateRange,80):e.granularity,a=!1===e.alignDateRangeToGranularity?e.dateRange:(0,g.Ol)(e.dateRange,t);return{...e,dateRange:a,dateRangeEndInclusive:!1,granularity:t,limit:{limit:1e5}}}function _(e){let t,a,n=(0,r.c)(7);n[0]!==e?(t=S(e),n[0]=e,n[1]=t):t=n[1];let i=t;return n[2]!==i.dateRange||n[3]!==i.displayType||n[4]!==i.fillNulls||n[5]!==i.granularity?(a={displayType:i.displayType,dateRange:i.dateRange,fillNulls:i.fillNulls,granularity:i.granularity},n[2]=i.dateRange,n[3]=i.displayType,n[4]=i.fillNulls,n[5]=i.granularity,n[6]=a):a=n[6],a}let R=" \xb7 ",b=" (previous)";function C(e){let[t,a]=e.split(" "),n=Number.parseInt(t);switch(a){case"second":return n;case"minute":return 60*n;case"hour":return 60*n*60;case"day":return 60*n*1440;default:return 0}}function w(e,t){let[a,n]=t.split(" "),r=Number.parseInt(a),i=Math.floor;switch(n){case"second":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),i(e.getUTCSeconds()/r)*r));case"minute":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),i(e.getUTCMinutes()/r)*r));case"hour":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),i(e.getUTCHours()/r)*r));case"day":return new Date(1e3*(i(e.getTime()/1e3/60/60/24/r)*r)*86400);default:return e}}function I(e,t,a){let n=[],r=w(e,a),s=C(a);for(;r{let t=e.toLowerCase();return["count","countIf","countDistinct","sum","sumIf","avg","avgIf","min","max","any","anyLast","groupArray","groupArrayInsertAt","groupArrayMovingAvg","groupArraySample","groupUniqArray","groupUniqArrayIf","groupArrayIntersect","groupArrayIntersectIf","groupArrayReduce","groupBitmap","groupBitmapIf","groupBitmapOr","groupBitmapXor","quantile","quantileIf","quantileExact","quantileExactWeighted","quantileTiming","quantileTimingWeighted","quantileTDigest","quantileTDigestWeighted","quantileBFloat16","quantileBFloat16Weighted","quantiles","median","medianExact","medianTDigest","medianBFloat16","stddevPop","stddevPopIf","stddevSamp","stddevSampIf","varPop","varPopIf","varSamp","varSampIf","covarPop","covarSamp","corr","uniq","uniqExact","uniqCombined","uniqCombined64","uniqHLL12","uniqTheta","groupBitAnd","groupBitOr","groupBitXor","groupArrayMap","groupArrayTuple","groupArraySorted","topK","topKIf","topKWeighted","argMin","argMax","minMap","maxMap","runningDifference","retention","sequenceCount","sequenceMatch","histogram","simpleLinearRegression","stochasticLinearRegression","categoricalInformationValue","sumMap","sumMapFiltered","sumWithOverflow","entropy","skewPop","skewSamp","kurtPop","kurtSamp"].some(e=>t.includes(e.toLowerCase()+"("))},x={factor:1,output:"number",mantissa:0,thousandSeparated:!0},O={factor:1,output:"number",mantissa:2,thousandSeparated:!0,unit:"ms"},v={output:"percent",mantissa:0},L={output:"percent",mantissa:0},F={output:"byte"},q={output:"byte"};function D(e,t){return(0,d.P1)(e,[d.A2.Number])?.filter(e=>!t.has(e.name))}function U(e){return(0,d.P1)(e,[d.A2.String,d.A2.Map,d.A2.Array])}function M(e){let[t,a]=e,n=(0,s.A)(a,t);return[new Date(t.getTime()-1e3*n),new Date(a.getTime()-1e3*n)]}function k({response:e,lineDataMap:t,tsBucketMap:a,source:n,previousPeriodOffsetSeconds:r,isPreviousPeriod:i,hiddenSeries:s=[]}){let{meta:o,data:l}=e;if(null==o)throw Error("No meta data found in response");let u=(0,d.zo)(o);if(null==u)throw Error(`No timestamp column found with meta: ${JSON.stringify(o)}`);let c=D(o,new Set(s))??[],m=U(o)??[],p=1===c.length,g=m.length>0;for(let e of l){let s=new Date(e[u.name]),o=i?r:0,l=Math.round(s.getTime()/1e3+o);for(let r of c){let s,o=a.get(l);null==o&&(o={[u.name]:l},a.set(l,o));let c=[...p&&g?[]:[r.name],...m.map(t=>e[t.name])].join(R),d=`${c}${b}`,f=i?d:c,y=e[r.name],E="number"==typeof y?y:Number.parseFloat(y);o[f]=E,n&&1===m.length&&m[0].name===(n.kind===h.GL.Log?n.severityTextExpression:n.statusCodeExpression)&&(s=(0,A.aw)(e[m[0].name])),t[f]={dataKey:f,currentPeriodKey:c,previousPeriodKey:d,displayName:f,color:s,isDashed:i}}}}function P({currentPeriodResponse:e,previousPeriodResponse:t,dateRange:a,granularity:n,generateEmptyBuckets:r=!0,source:i,hiddenSeries:s=[],previousPeriodOffsetSeconds:o=0}){let l,u,c=e.meta;if(null==c)throw Error("No meta data found in response");let m=(0,d.zo)(c),p=D(c,new Set(s))??[],g=U(c)??[],h=1===p.length;if(null==m)throw Error(`No timestamp column found with meta: ${JSON.stringify(c)}`);let f=new Map,y={};k({response:e,lineDataMap:y,tsBucketMap:f,source:i,isPreviousPeriod:!1,previousPeriodOffsetSeconds:o,hiddenSeries:s}),null!=t&&k({response:t,lineDataMap:y,tsBucketMap:f,source:i,isPreviousPeriod:!0,previousPeriodOffsetSeconds:o,hiddenSeries:s});let E=(0,A.EA)(),N=Object.values(y).sort((e,t)=>E.findIndex(t=>t===e.color)-E.findIndex(e=>e===t.color));return r&&null!=n&&I(a[0],a[1],n).forEach(e=>{let t=e.getTime()/1e3,a=f.get(t);if(null==a){let e={[m.name]:t};for(let t of N)e[t.dataKey]=0;f.set(t,e)}else{for(let e of N)null==a[e.dataKey]&&(a[e.dataKey]=0);f.set(t,a)}}),{graphResults:Array.from(f.values()).sort((e,t)=>e[m.name]-t[m.name]),timestampColumn:m,lineData:(l=new Map,u=0,N.map(e=>{let t=e.currentPeriodKey;return l.has(t)?e.color=l.get(t):(e.color||(e.color=(0,A.ob)(u++,e.displayName??e.dataKey)),l.set(t,e.color)),e})),groupColumns:g.map(e=>e.name),valueColumns:p.map(e=>e.name),isSingleValueColumn:h}}let V=e=>{if(null==e)return e;if(e.endsWith("_rate"))return V(e.replace("_rate",""));if("p50"===e||"p90"===e||"p95"===e||"p99"===e)return"quantile";if("count_per_sec"===e||"count_per_min"===e||"count_per_hour"===e)return"count";if(["avg","count","count_distinct","last_value","max","min","sum"].includes(e))return e;throw Error(`Unsupported aggregation function in v2: ${e}`)},H=(e,t)=>{let{series:a,granularity:n,dateRange:r,displayType:i="line",fillNulls:s}=e;if(a.length<1)throw Error("series is required");let o=a[0],l="stacked_bar"===i?h.t2.StackedBar:h.t2.Line;if("logs"===o.table)throw Error("IMPLEMENT ME (logs)");if("metrics"===o.table){let e;if(null==t.metric)throw Error("source.metric is required for metrics");return{select:a.map(e=>{let t=e.field??"",[a,n]=t.split(" - ").map(e=>e.trim()),r=function(e){let t=E[e];if(t)return c().format("MetricName IN (?)",[[e,t.newName]])}(a),i=m.fc(h.SX).parse(n?.toLowerCase());return{aggFn:V(e.aggFn),metricType:i,valueExpression:t,metricName:a,metricNameSql:r,aggConditionLanguage:"lucene",aggCondition:e.where}}),from:t.metric?.from,numberFormat:o.numberFormat,groupBy:(e=t.metric,o.groupBy.map(t=>t.startsWith("k8s")?`${e.resourceAttributesExpression}['${t}']`:t).join(",")),dateRange:r,connection:t.metric?.connection,metricTables:t.metric?.metricTables,timestampValueExpression:t.metric?.timestampValueExpression,granularity:n,where:"",fillNulls:s,displayType:l}}throw Error(`unsupported table in v2: ${o.table}`)};function W({source:e,config:t,dateRange:a,groupFilters:n,valueRangeFilter:r}){if(!e?.id)return null;let i=(0,p.bv)(t);if(i&&e?.logSourceId==null)return f.$e.show({color:"yellow",message:"No log source is associated with the selected metric source."}),null;let s=t.where,o=t.whereLanguage||"lucene";0===s.length&&Array.isArray(t.select)&&1===t.select.length&&(s=t.select[0].aggCondition??"",o=t.select[0].aggConditionLanguage??"lucene");let l=[];if(n&&n.length>0&&n.forEach(({column:e,value:t})=>{if(e&&null!=t){let a=`${e} IN (${c().escape(t)})`;l.push({type:"sql",condition:a})}}),r){let{expression:e,value:t,threshold:a=.05}=r;if(!$(e)){let n=`${e} BETWEEN ${c().escape(t*(1-a))} AND ${c().escape(t*(1+a))}`;l.push({type:"sql",condition:n})}}let u=a[0].getTime(),m=a[1].getTime(),d={source:e?.id??"",where:s,whereLanguage:o,filters:JSON.stringify([...t.filters??[],...l]),isLive:"false",from:u.toString(),to:m.toString()};return i&&(d.where="",d.whereLanguage="lucene",d.filters=JSON.stringify([]),d.source=e?.logSourceId??""),t.eventTableSelect&&(d.select=t.eventTableSelect),`/search?${new URLSearchParams(d).toString()}`}function B(e){return e?"string"==typeof e?e.split(",").map(e=>e.trim()):e.map(e=>"string"==typeof e?e:e.valueExpression):[]}function j({row:e,source:t,config:a,dateRange:n}){let r;if(!t?.id)return null;let i=[];B(a.groupBy).forEach(t=>{null!=e[t]&&i.push({column:t,value:e[t]})});let s=a.select?.[0];if(s){let t="string"==typeof s?void 0:s.aggFn;if(N.find(e=>e.value===t)?.isAttributable!==!1){let t="string"==typeof s?s:s.valueExpression,n=new Set(B(a.groupBy)),i=Object.keys(e).find(e=>!n.has(e)),o=i?e[i]:void 0;null!=o&&"number"==typeof o&&(r={expression:t,value:o})}}return W({source:t,config:a,dateRange:n,groupFilters:i,valueRangeFilter:r})}function K(e){return l()(e,["granularity","groupBy"])}function G(e){let t=structuredClone(l()(e,["granularity"]));return t.limit||(t.limit={limit:200}),t.groupBy&&"string"==typeof t.groupBy&&!t.orderBy&&(t.orderBy=t.groupBy),t}function Q({mvOptimizationData:e,originalDateRange:t}){let a=e?.optimizedConfig?.dateRange;if(!a)return null;let r=e?.explanations.find(e=>e.success)?.mvConfig.minGranularity;return(0,n.jsx)(y.A,{originalDateRange:t,effectiveDateRange:a,mvGranularity:r},"date-range-indicator")}function z(e){return!1!==e}},49672:(e,t,a)=>{a.d(t,{VH:()=>p,W:()=>m,fu:()=>d,uI:()=>h});var n=a(75155),r=a(35467),i=a(88459),s=a(12482),o=a(98142),l=a(93108),u=a(6876),c=a(61410);let m=(e={})=>{if(o.VO){let t=(0,l.xZ)();return 0===t.length?(console.warn("No local connection found"),new i.aP({host:"",...e})):new i.aP({host:t[0].host,username:t[0].username,password:t[0].password,...e})}return new i.aP({host:"/api/clickhouse-proxy",...e})},d=(e={})=>{let{data:t}=u.Ay.useMe(),a=t?.team?.queryTimeout;return void 0!==a?e.queryTimeout=a:e.queryTimeout=c.rb,m(e)};function p(e,t){let a,r,i,o,l=(0,n.c)(8),{connectionId:u}=e;l[0]===Symbol.for("react.memo_cache_sentinel")?(a=m(),l[0]=a):a=l[0];let c=a;return l[1]!==u?(r=["direct_datasources/databases",u],i=async()=>await c.query({query:"SHOW DATABASES",connectionId:u}).then(g),l[1]=u,l[2]=r,l[3]=i):(r=l[2],i=l[3]),l[4]!==t||l[5]!==r||l[6]!==i?(o={queryKey:r,queryFn:i,staleTime:3e5,...t},l[4]=t,l[5]=r,l[6]=i,l[7]=o):o=l[7],(0,s.I)(o)}function g(e){return e.json()}function h({database:e,connectionId:t},a){let n=m();return(0,s.I)({queryKey:[`direct_datasources/databases/${e}/tables`,t],queryFn:async()=>{let a=(0,r.kg)`SHOW TABLES FROM ${{Identifier:e}}`;return await n.query({query:a.sql,query_params:a.params,connectionId:t}).then(e=>e.json())},staleTime:3e5,...a})}},57389:(e,t,a)=>{a.d(t,{d:()=>c});var n=a(75155),r=a(2615),i=a(4308),s=a(12482),o=a(49672),l=a(81973),u=a(78550);function c(e,t){let a,c,m,d,p,g=(0,n.c)(16);g[0]!==t?(a=t||{},g[0]=t,g[1]=a):a=g[1];let{enabled:h}=a,f=(0,u.Ge)(),y=(0,o.fu)(),E=e?.source;g[2]!==E?(c={id:E},g[2]=E,g[3]=c):c=g[3];let{data:A,isLoading:N}=(0,l.Fo)(c);g[4]!==e?(m=["optimizationExplanation",e],g[4]=e,g[5]=m):m=g[5],g[6]!==y||g[7]!==e||g[8]!==f||g[9]!==A?(d=async t=>{let{signal:a}=t;return e&&A?await (0,r.bn)(e,f,y,a,A):{explanations:[]}},g[6]=y,g[7]=e,g[8]=f,g[9]=A,g[10]=d):d=g[10];let T=(void 0===h||h)&&!N&&!!e&&!!A;return g[11]!==t||g[12]!==m||g[13]!==d||g[14]!==T?(p={queryKey:m,queryFn:d,placeholderData:i.rX,staleTime:5e3,...t,enabled:T},g[11]=t,g[12]=m,g[13]=d,g[14]=T,g[15]=p):p=g[15],(0,s.I)(p)}},61410:(e,t,a)=>{a.d(t,{Km:()=>n,Nz:()=>i,rb:()=>r});let n=200,r=60;function i(e){return{limit:{limit:e?.searchRowLimit??n}}}},67270:(e,t,a)=>{var n=a(9641);a(30404),a(31356),a(20470),t.n_=n.b,n.h,t.bv=n.e,t.v4=n.i,t.lE=n.d,t.x1=n.c,t.PV=n.k,n.f,n.g,n.j},69519:(e,t,a)=>{a.d(t,{Me:()=>i,so:()=>r});let n=[21600,21600,43200,86400];function r(e,t,a=n){if(e.getTime()===t.getTime())return[{startTime:e,endTime:t,windowIndex:0,direction:"DESC"}];let i=[],s=new Date(t),o=0;for(;s>e;){let t=1e3*(a[o]||a[a.length-1]),n=new Date(Math.max(s.getTime()-t,e.getTime()));i.push({endTime:new Date(s),startTime:n,windowIndex:o,direction:"DESC"}),s=n,o++}return i}function i(e,t,a=n){if(e.getTime()===t.getTime())return[{startTime:e,endTime:t,windowIndex:0,direction:"ASC"}];let r=[],s=new Date(e),o=0;for(;s{var n=a(67599),r=n.expandPhrases.call(void 0,["SELECT [ALL | DISTINCT]"]),i=n.expandPhrases.call(void 0,["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET"]),s=n.expandPhrases.call(void 0,["CREATE [GLOBAL TEMPORARY | LOCAL TEMPORARY] TABLE"]),o=n.expandPhrases.call(void 0,["CREATE [RECURSIVE] VIEW","UPDATE","WHERE CURRENT OF","DELETE FROM","DROP TABLE","ALTER TABLE","ADD COLUMN","DROP [COLUMN]","RENAME COLUMN","RENAME TO","ALTER [COLUMN]","{SET | DROP} DEFAULT","ADD SCOPE","DROP SCOPE {CASCADE | RESTRICT}","RESTART WITH","TRUNCATE TABLE","SET SCHEMA"]),l={name:"clickhouse",tokenizerOptions:{reservedSelect:r,reservedClauses:[...i,...s,...o],reservedSetOperations:n.expandPhrases.call(void 0,["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),reservedJoins:n.expandPhrases.call(void 0,["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),reservedPhrases:n.expandPhrases.call(void 0,["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),reservedKeywords:["ALL","ALLOCATE","ALTER","ANY","ARE","AS","ASC","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","BEGIN","BETWEEN","BOTH","BY","CALL","CALLED","CASCADED","CAST","CHECK","CLOSE","COALESCE","COLLATE","COLUMN","COMMIT","CONDITION","CONNECT","CONSTRAINT","CORRESPONDING","CREATE","CROSS","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DEALLOCATE","DAY","DECLARE","DEFAULT","DELETE","DEREF","DESC","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DROP","DYNAMIC","EACH","ELEMENT","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXTERNAL","FALSE","FETCH","FILTER","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GET","GLOBAL","GRANT","GROUP","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INTERSECT","INTO","IS","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LOCAL","MATCH","MEMBER","MERGE","METHOD","MINUTE","MODIFIES","MODULE","MONTH","NATURAL","NEW","NO","NONE","NOT","NULL","NULLIF","OF","OLD","ON","ONLY","OPEN","ORDER","OUT","OUTER","OVER","OVERLAPS","PARAMETER","PARTITION","PRECISION","PREPARE","PRIMARY","PROCEDURE","RANGE","READS","REAL","RECURSIVE","REF","REFERENCES","REFERENCING","RELEASE","RESULT","RETURN","RETURNS","REVOKE","RIGHT","ROLLBACK","ROLLUP","ROW","ROWS","SAVEPOINT","SCOPE","SCROLL","SEARCH","SECOND","SELECT","SENSITIVE","SESSION_USER","SET","SIMILAR","SOME","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","START","STATIC","SUBMULTISET","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATION","TREAT","TRIGGER","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","USER","USING","VALUE","VALUES","WHENEVER","WINDOW","WITHIN","WITHOUT","YEAR"],reservedDataTypes:["ARRAY","BIGINT","BINARY LARGE OBJECT","BINARY VARYING","BINARY","BLOB","BOOLEAN","CHAR LARGE OBJECT","CHAR VARYING","CHAR","CHARACTER LARGE OBJECT","CHARACTER VARYING","CHARACTER","CLOB","DATE","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","MULTISET","NATIONAL CHAR VARYING","NATIONAL CHAR","NATIONAL CHARACTER LARGE OBJECT","NATIONAL CHARACTER VARYING","NATIONAL CHARACTER","NCHAR LARGE OBJECT","NCHAR VARYING","NCHAR","NCLOB","NUMERIC","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR"],reservedFunctionNames:["GROUPING","RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","ROW_NUMBER","POSITION","OCCURRENCES_REGEX","POSITION_REGEX","EXTRACT","CHAR_LENGTH","CHARACTER_LENGTH","OCTET_LENGTH","CARDINALITY","ABS","MOD","LN","EXP","POWER","SQRT","FLOOR","CEIL","CEILING","WIDTH_BUCKET","SUBSTRING","SUBSTRING_REGEX","UPPER","LOWER","CONVERT","TRANSLATE","TRANSLATE_REGEX","TRIM","OVERLAY","NORMALIZE","SPECIFICTYPE","CURRENT_DATE","CURRENT_TIME","LOCALTIME","CURRENT_TIMESTAMP","LOCALTIMESTAMP","COUNT","AVG","MAX","MIN","SUM","STDDEV_POP","STDDEV_SAMP","VAR_SAMP","VAR_POP","COLLECT","FUSION","INTERSECTION","COVAR_POP","COVAR_SAMP","CORR","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","PERCENTILE_CONT","PERCENTILE_DISC","CAST","COALESCE","NULLIF","ROUND","SIN","COS","TAN","ASIN","ACOS","ATAN"],stringTypes:[{quote:"''-qq-bs",prefixes:["N","U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``"],extraParens:["[]"],paramTypes:{positional:!0},operators:["||","%"]},formatOptions:{onelineClauses:[...s,...o],tabularOnelineClauses:o}};t.GP=function(e){return n.formatDialect.call(void 0,e,{dialect:l})}},78550:(e,t,a)=>{a.d(t,{Ii:()=>F,ws:()=>w,Zh:()=>T,lo:()=>L,kN:()=>v,n$:()=>S,Ge:()=>N,Sh:()=>R,nT:()=>$,Z2:()=>I});var n=a(75155),r=a(55729),i=a(79339),s=a.n(i),o=a(35467),l=a(93251),u=a(12482),c=a(4308),m=a(6876),d=a(98142),p=a(93108),g=a(3145),h=a(49672),f=a(61410);let y=()=>(0,g.yb)((0,h.W)({queryTimeout:f.rb}));var E=a(81973),A=a(92917);function N(){let e,t,a,i,s,o=(0,n.c)(10);o[0]===Symbol.for("react.memo_cache_sentinel")?(e=y(),o[0]=e):e=o[0];let[u,c]=(0,r.useState)(e),{data:g}=m.Ay.useMe(),h=(0,r.useRef)(!1),f=(0,l.jE)();o[1]!==f?(t=()=>{if(void 0===window.document||!d.VO)return;let e=e=>{e.key===p.Gs&&e.newValue&&(c(y()),h.current=!1,f.resetQueries())};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}},a=[f],o[1]=f,o[2]=t,o[3]=a):(t=o[2],a=o[3]),(0,r.useEffect)(t,a),o[4]!==g||o[5]!==u?(i=()=>{g?.team?.metadataMaxRowsToRead&&!h.current&&(u.setClickHouseSettings({max_rows_to_read:g.team.metadataMaxRowsToRead}),h.current=!0)},o[4]=g,o[5]=u,o[6]=i):i=o[6];let E=g?.team?.metadataMaxRowsToRead;return o[7]!==u||o[8]!==E?(s=[E,u],o[7]=u,o[8]=E,o[9]=s):s=o[9],(0,r.useEffect)(i,s),u}function T(e,t){let a,r,i,s=(0,n.c)(13),{databaseName:o,tableName:l,connectionId:c}=e,m=N();s[0]!==o||s[1]!==l?(a=["useMetadata.useColumns",{databaseName:o,tableName:l}],s[0]=o,s[1]=l,s[2]=a):a=s[2],s[3]!==c||s[4]!==o||s[5]!==m||s[6]!==l?(r=async()=>m.getColumns({databaseName:o,tableName:l,connectionId:c}),s[3]=c,s[4]=o,s[5]=m,s[6]=l,s[7]=r):r=s[7];let d=!!o&&!!l&&!!c;return s[8]!==t||s[9]!==a||s[10]!==r||s[11]!==d?(i={queryKey:a,queryFn:r,enabled:d,...t},s[8]=t,s[9]=a,s[10]=r,s[11]=d,s[12]=i):i=s[12],(0,u.I)(i)}function S(e,t){let a,r,i,s=(0,n.c)(10),l=N();s[0]!==e?(a=["useMetadata.useJsonColumns",e],s[0]=e,s[1]=a):a=s[1],s[2]!==l||s[3]!==e?(r=async()=>{if(!e)return[];let t=await l.getColumns(e);return(0,o.P1)(t,[o.A2.JSON])?.map(_)??[]},s[2]=l,s[3]=e,s[4]=r):r=s[4];let c=e&&!!e.databaseName&&!!e.tableName&&!!e.connectionId;return s[5]!==t||s[6]!==a||s[7]!==r||s[8]!==c?(i={queryKey:a,queryFn:r,enabled:c,...t},s[5]=t,s[6]=a,s[7]=r,s[8]=c,s[9]=i):i=s[9],(0,u.I)(i)}function _(e){return e.name}function R(e,t){let a,r,i,s,o=(0,n.c)(14),l=N(),{data:c,isFetched:d}=m.Ay.useMe();return o[0]!==e?(a=["useMetadata.useMultipleAllFields",...e.map(C)],o[0]=e,o[1]=a):a=o[1],o[2]!==c?.team||o[3]!==l||o[4]!==e?(r=async()=>{let t=c?.team;if(t?.fieldMetadataDisabled)return[];let a=await Promise.all(e.map(e=>l.getAllFields(e)));return 1===a.length?a[0]:F(a)},o[2]=c?.team,o[3]=l,o[4]=e,o[5]=r):r=o[5],o[6]!==d||o[7]!==e?(i=e.length>0&&e.every(b)&&d,o[6]=d,o[7]=e,o[8]=i):i=o[8],o[9]!==t||o[10]!==a||o[11]!==r||o[12]!==i?(s={queryKey:a,queryFn:r,enabled:i,...t},o[9]=t,o[10]=a,o[11]=r,o[12]=i,o[13]=s):s=o[13],(0,u.I)(s)}function b(e){return!!e.databaseName&&!!e.tableName&&!!e.connectionId}function C(e){return{...e}}function w(e,t){let a,r=(0,n.c)(2);return r[0]!==e?(a=e?[e]:[],r[0]=e,r[1]=a):a=r[1],R(a,t)}function I(e,t){let a,r,i,s=(0,n.c)(13),{databaseName:o,tableName:l,connectionId:c}=e,m=N();s[0]!==o||s[1]!==l?(a=["useMetadata.useTableMetadata",{databaseName:o,tableName:l}],s[0]=o,s[1]=l,s[2]=a):a=s[2],s[3]!==c||s[4]!==o||s[5]!==m||s[6]!==l?(r=async()=>await m.getTableMetadata({databaseName:o,tableName:l,connectionId:c}),s[3]=c,s[4]=o,s[5]=m,s[6]=l,s[7]=r):r=s[7];let d=!!o&&!!l&&!!c;return s[8]!==t||s[9]!==a||s[10]!==r||s[11]!==d?(i={queryKey:a,queryFn:r,staleTime:3e5,enabled:d,...t},s[8]=t,s[9]=a,s[10]=r,s[11]=d,s[12]=i):i=s[12],(0,u.I)(i)}function $(e,t){let a,r,i,s=(0,n.c)(12),{chartConfigs:o,keys:l,limit:m,disableRowLimit:d}=e,p=N(),g=(0,A.$r)(o);s[0]!==t?(a=t||{},s[0]=t,s[1]=a):a=s[1];let{enabled:h}=a,{data:f,isLoading:y}=(0,E.oE)();s[2]!==g||s[3]!==d||s[4]!==l||s[5]!==m||s[6]!==p||s[7]!==f?(r=async e=>{let{signal:t}=e;return(await Promise.all(g.map(e=>{let a=e.source?f?.find(t=>t.id===e.source):void 0;return p.getKeyValuesWithMVs({chartConfig:e,keys:l.slice(0,20),limit:m,disableRowLimit:d,source:a,signal:t})}))).flatMap(x)},s[2]=g,s[3]=d,s[4]=l,s[5]=m,s[6]=p,s[7]=f,s[8]=r):r=s[8];let T=(0,u.I)({queryKey:["useMetadata.useGetKeyValues",...g.map(O),...l,d],queryFn:r,staleTime:3e5,placeholderData:c.rX,...t,enabled:!!(void 0===h||h)&&!!l.length&&!y}),S=T.isLoading||y;return s[9]!==T||s[10]!==S?(i={...T,isLoading:S},s[9]=T,s[10]=S,s[11]=i):i=s[11],i}function x(e){return e}function O(e){return{...e}}function v(e,t){let a,r,i,s,o=(0,n.c)(16),{chartConfig:l,key:m,limit:d}=e,p=N();o[0]!==l.source?(a={id:l.source},o[0]=l.source,o[1]=a):a=o[1];let{data:g,isLoading:h}=(0,E.Fo)(a);o[2]!==l||o[3]!==m?(r=["useMetadata.useGetValuesDistribution",l,m],o[2]=l,o[3]=m,o[4]=r):r=o[4],o[5]!==l||o[6]!==m||o[7]!==d||o[8]!==p||o[9]!==g?(i=async()=>await p.getValuesDistribution({chartConfig:l,key:m,limit:d,source:g}),o[5]=l,o[6]=m,o[7]=d,o[8]=p,o[9]=g,o[10]=i):i=o[10];let f=!!m&&!h;return o[11]!==t||o[12]!==r||o[13]!==i||o[14]!==f?(s={queryKey:r,queryFn:i,staleTime:1/0,enabled:f,placeholderData:c.rX,retry:!1,...t},o[11]=t,o[12]=r,o[13]=i,o[14]=f,o[15]=s):s=o[15],(0,u.I)(s)}function L(e,t){let a,r,i=(0,n.c)(7),{chartConfig:s,keys:o,limit:l,disableRowLimit:u}=e;return i[0]!==s?(a=s?[s]:[],i[0]=s,i[1]=a):a=i[1],i[2]!==u||i[3]!==o||i[4]!==l||i[5]!==a?(r={chartConfigs:a,keys:o,limit:l,disableRowLimit:u},i[2]=u,i[3]=o,i[4]=l,i[5]=a,i[6]=r):r=i[6],$(r,t)}function F(e){let t=[],a=new Set;for(let n of e)for(let e of n){let n=s().sha1(e);a.has(n)||(a.add(n),t.push(e))}return t}},81973:(e,t,a)=>{a.d(t,{AF:()=>R,Al:()=>j,Dp:()=>V,Fo:()=>O,N8:()=>w,YI:()=>U,Ys:()=>P,fS:()=>B,kJ:()=>A,kg:()=>H,nd:()=>q,oE:()=>$,pM:()=>b,sr:()=>L,xg:()=>C});var n=a(75155),r=a(29594),i=a.n(r),s=a(79339),o=a.n(s),l=a(91985),u=a.n(l),c=a(35467),m=a(76089),d=a(82641),p=a(12482),g=a(93251),h=a(16932),f=a(6876),y=a(98142),E=a(92917);let A={resourceAttributesExpression:"ResourceAttributes",eventAttributesExpression:"LogAttributes",timestampValueExpression:"TimestampTime",implicitColumnExpression:"Body"},N={...A,timestampValueExpression:"Timestamp"},T="hdx-local-source";function S(e){u().transact(T,e,[])}function _(){if(u().has(T))return u().get(T,[])??[];try{let e=(0,E.Ol)(y.m6??"");if(null!=e)return e}catch(e){console.error("Error fetching default sources",e)}return[]}function R(e){return(0,m.AB)(e)[0]}function b(e){return e.spanNameExpression}function C(e){return e.displayedTimestampValueExpression??R(e.timestampValueExpression)}function w(e){let t=e.kind===d.GL.Trace?e.spanNameExpression??void 0:e.bodyExpression??e.implicitColumnExpression,a=(0,m.AB)(t??"");return 1===a.length?t:a[0]}function I(e){return{...e,timestampValueExpression:e.kind===d.GL.Session?e.timestampValueExpression||A.timestampValueExpression:e.timestampValueExpression}}function $(){let e,t=(0,n.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:["sources"],queryFn:x},t[0]=e):e=t[0],(0,p.I)(e)}async function x(){return y.VO?_():(await (0,f.Q5)("sources").json()).map(I)}function O(e){let t,a,r,i=(0,n.c)(6),{id:s}=e;i[0]===Symbol.for("react.memo_cache_sentinel")?(t=["sources"],i[0]=t):t=i[0],i[1]!==s?(a=e=>e.filter(e=>e.id===s)[0],i[1]=s,i[2]=a):a=i[2];let o=null!=s;return i[3]!==a||i[4]!==o?(r={queryKey:t,queryFn:v,select:a,enabled:o},i[3]=a,i[4]=o,i[5]=r):r=i[5],(0,p.I)(r)}async function v(){return y.VO?_():(await (0,f.Q5)("sources").json()).map(I)}function L(){let e,t=(0,n.c)(2),a=(0,g.jE)();return t[0]!==a?(e={mutationFn:F,onSuccess:()=>{a.invalidateQueries({queryKey:["sources"]})}},t[0]=a,t[1]=e):e=t[1],(0,h.n)(e)}async function F(e){let{source:t}=e;if(!y.VO)return await (0,f.Q5)(`sources/${t.id}`,{method:"PUT",json:t});S(e=>e.map(e=>e.id===t.id?t:e))}function q(){let e,t=(0,n.c)(2),a=(0,g.jE)();return t[0]!==a?(e={mutationFn:D,onSuccess:()=>{a.invalidateQueries({queryKey:["sources"]})}},t[0]=a,t[1]=e):e=t[1],(0,h.n)(e)}async function D(e){let{source:t}=e;if(y.VO){let e=_().find(e=>o()(i()(e,["kind","name","connection"]))===o()(i()(t,["kind","name","connection"])));if(e)return{...t,id:e.id};let a={...t,id:`l${(0,m.s5)(Math.random().toString())}`};return S(e=>[...e,a]),a}return(0,f.Q5)("sources",{method:"POST",json:t}).json()}function U(){let e,t=(0,n.c)(2),a=(0,g.jE)();return t[0]!==a?(e={mutationFn:M,onSuccess:()=>{a.invalidateQueries({queryKey:["sources"]})}},t[0]=a,t[1]=e):e=t[1],(0,h.n)(e)}async function M(e){let{id:t}=e;return y.VO?void S(e=>e.filter(e=>e.id!==t)):(0,f.Q5)(`sources/${t}`,{method:"DELETE"})}function k(e,t){let a=new Map(e.map(e=>[e.name,e]));return 0===Array.from(t).filter(e=>!a.has(e)).length}async function P({databaseName:e,tableName:t,connectionId:a,metadata:n}){let r=await n.getColumns({databaseName:e,tableName:t,connectionId:a}),i=(await n.getTableMetadata({databaseName:e,tableName:t,connectionId:a})).primary_key,s=new Set((0,c.bZ)(i)),o=k(r,["Timestamp","Body","SeverityText","TraceId","SpanId","ServiceName","LogAttributes","ResourceAttributes"]),l=k(r,["Timestamp","SpanName","Duration","SpanKind","TraceId","SpanId","ParentSpanId","ServiceName","SpanAttributes","ResourceAttributes","StatusCode","StatusMessage"]),u=r.some(e=>"Events.Timestamp"===e.name),m=(0,c.P1)(r,[c.A2.Date]),d=m?.find(e=>s.has(e.name));return{...null!=d?{timestampValueExpression:d.name}:{},...o?{defaultTableSelectExpression:"Timestamp, ServiceName as service, SeverityText as level, Body",serviceNameExpression:"ServiceName",bodyExpression:"Body",displayedTimestampValueExpression:"Timestamp",eventAttributesExpression:"LogAttributes",implicitColumnExpression:"Body",resourceAttributesExpression:"ResourceAttributes",spanIdExpression:"SpanId",traceIdExpression:"TraceId",severityTextExpression:"SeverityText"}:{},...l?{displayedTimestampValueExpression:"Timestamp",implicitColumnExpression:"SpanName",defaultTableSelectExpression:"Timestamp, ServiceName as service, StatusCode as level, round(Duration / 1e6) as duration, SpanName",eventAttributesExpression:"SpanAttributes",serviceNameExpression:"ServiceName",resourceAttributesExpression:"ResourceAttributes",durationExpression:"Duration",durationPrecision:9,parentSpanIdExpression:"ParentSpanId",spanIdExpression:"SpanId",spanKindExpression:"SpanKind",spanNameExpression:"SpanName",traceIdExpression:"TraceId",statusCodeExpression:"StatusCode",statusMessageExpression:"StatusMessage",...u?{spanEventsValueExpression:"Events"}:{}}:{}}}function V(e){return`(${e.durationExpression})/1e${(e.durationPrecision??9)-3}`}function H(e){return`(${e.durationExpression})/1e${e.durationPrecision??9}`}let W={[d.SX.Gauge]:["TimeUnix","ServiceName","MetricName","Value","Attributes","ResourceAttributes"],[d.SX.Histogram]:["TimeUnix","ServiceName","MetricName","Attributes","ResourceAttributes","Count","Sum","BucketCounts","ExplicitBounds"],[d.SX.Sum]:["TimeUnix","ServiceName","MetricName","Value","Attributes","ResourceAttributes"],[d.SX.Summary]:["Attributes","TimeUnix","Count","Sum","ValueAtQuantiles.Quantile","ValueAtQuantiles.Value","Flags","ServiceName","MetricName","ResourceAttributes"],[d.SX.ExponentialHistogram]:["Attributes","TimeUnix","Count","Sum","Scale","ZeroCount","PositiveOffset","PositiveBucketCounts","NegativeOffset","NegativeBucketCounts","Flags","ServiceName","MetricName","ResourceAttributes"]};async function B({databaseName:e,tableName:t,connectionId:a,metricType:n,metadata:r}){return!!t&&k(await r.getColumns({databaseName:e,tableName:t,connectionId:a}),W[n])}async function j({databaseName:e,tableName:t,connectionId:a,metadata:n}){if(!t)return!1;let r=await n.getColumns({databaseName:e,tableName:t,connectionId:a});return k(r,Object.values(A))||k(r,Object.values(N))}},82641:(e,t,a)=>{var n=a(20470);n.g,n.i,n.A,t.lZ=n.v,n.C,t.w5=n.u,t.Or=n.t,t.qQ=n.s,n.$,n.aa,n.p,t.fB=n.B,n.J,n.U,n.I,n.O,n.N,n.R,t.mJ=n.T,n.S,n.k,t.t2=n.b,n.E,n.h,n.o,n.Y,n.c,t.SX=n.a,n.G,t.K5=n.P,n.Q,n.j,n.d,n.K,n.F,n.f,n.e,n.l,n.q,n.n,n.m,t.GL=n.X,n.Z,n.D,n.V,n.W,n.L,n.M,t.x=n.r,n.H,t.z1=n._,t.Oq=n.x,n.w,n.y,n.z},88459:(e,t,a)=>{function n(e){let t,a=e[0],n=1;for(;na.call(t,...e)),t=void 0)}return a}function r(e){let t=n(e);return null==t||t}var i=a(9641);a(30404),a(31356),a(20470);var s=a(5216),o=(e,t)=>{t||(t={});let a=new URL(e instanceof URL?e:e instanceof Request?e.url:e),i=n([t,"access",e=>e.headers,"optionalAccess",e=>e.Authorization]),[s,o]=window.atob(i.substring(6)).split(":");return r([t,"access",e=>e.headers,"optionalAccess",e=>delete e.Authorization]),r([t,"access",e=>e.headers,"optionalAccess",e=>delete e.authorization]),s&&a.searchParams.set("user",s),o&&a.searchParams.set("password",o),fetch(`${a.toString()}`,t)},l=(e,t)=>(t||(t={}),r([t,"access",e=>e.headers,"optionalAccess",e=>delete e.Authorization]),r([t,"access",e=>e.headers,"optionalAccess",e=>delete e.authorization]),fetch(e,t)),u=t.Kc=async({host:e,username:t,password:a})=>{try{return(await new c({host:e,username:t,password:a}).query({query:"SELECT 1",format:"TabSeparatedRaw"})).text().then(e=>"1"===e.trim())}catch(e){return console.warn("Failed to test local connection",e),!1}},c=t.aP=class extends i.y{constructor(e){super(e)}buildClient(){var e,t,a,n;let r=this.host,i,u=null!=this.username&&null!=this.password,c={};u?(i=o,c.add_http_cors_header=1):(r=`${window.origin}${this.host}`,i=l);let m=new URL(r);return s.createClient.call(void 0,{url:m.origin,pathname:m.pathname,clickhouse_settings:c,username:(e=this.username,t=()=>"",null!=e?e:t()),password:(a=this.password,n=()=>"",null!=a?a:n()),keep_alive:{enabled:!1},fetch:i,request_timeout:this.requestTimeout,application:this.application})}async __query({query:e,format:t="JSON",query_params:a={},abort_signal:n,clickhouse_settings:r,connectionId:i,queryId:s}){null==this.client&&(this.client=this.buildClient()),this.logDebugQuery(e,a);let o=this.processClickhouseSettings(r),l={...i&&"local"!==i?{"x-hyperdx-connection-id":i}:{}};return this.getClient().query({query:e,query_params:a,format:t,abort_signal:n,http_headers:l,clickhouse_settings:o,query_id:s})}};t.aP=c,t.Kc=u},91021:(e,t,a)=>{a.d(t,{Kc:()=>b,HD:()=>_,zu:()=>R});var n=a(75155),r=a(35467),i=a(67270),s=a(76089),o=a(73854),l=a(93251),u=a(12482),c=a(43152),m=a(49672),d=a(98142),p=a(79339),g=a.n(p);let h="hyperdx",f=e=>{let t=g().sha1(e),a=(0,i.v4)(e.aggCondition);switch(e.aggFn){case"min":case"max":case"sum":case"avg":return{fieldName:t,fn:`${e.aggFn}${a?"If":""}`,args:["Nullable(Float64)",...a?["UInt8"]:[]]};case"count":return{fieldName:t,fn:`${e.aggFn}${a?"If":""}`,args:a?["UInt8"]:[]};default:throw Error(`Unsupported aggregation function: ${e.aggFn}`)}},y=async(e,t,a,n)=>{let s,o={...e,...Array.isArray(e.select)&&{select:e.select.map(e=>{let{fieldName:t,fn:a}=f(e);return{...e,aggFn:`${a}State`,alias:t}})},granularity:n??e.granularity,dateRange:void 0,orderBy:void 0,limit:void 0},l=await (0,i.PV)(o,t,a),u=g().sha1(l),c=`${e.from.tableName}_mv_${u}`,m={...e,...Array.isArray(e.select)&&{select:e.select.map(e=>{let{fieldName:t,fn:a}=f(e);return{aggFn:`${a}Merge`,valueExpression:t,alias:`${e.aggFn}(${e.valueExpression})`}})},timestampValueExpression:i.n_,from:{databaseName:h,tableName:c}};return{mtViewName:c,dataTableDDL:(0,r.l6)(((e,t)=>{if(!Array.isArray(t.select))throw Error("Only array select is supported");if((0,i.x1)(t))throw Error("Group by is not supported");return(0,r.kg)`CREATE TABLE IF NOT EXISTS ${h}.${{Identifier:e}} ( ${{Identifier:i.n_}} DateTime, ${t.select.map(e=>{let{args:t,fieldName:a,fn:n}=f(e),r=[n,...t].join(",");return`${a} AggregateFunction(${r})`}).join(",\n")} diff --git a/out/_next/static/chunks/6514-d4c2fa33e4b2ad5f.js b/out/_next/static/chunks/6514-9ab29f6b02cd025a.js similarity index 99% rename from out/_next/static/chunks/6514-d4c2fa33e4b2ad5f.js rename to out/_next/static/chunks/6514-9ab29f6b02cd025a.js index 74cc176..a7c2267 100644 --- a/out/_next/static/chunks/6514-d4c2fa33e4b2ad5f.js +++ b/out/_next/static/chunks/6514-9ab29f6b02cd025a.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6514],{43524:e=>{e.exports={navGhost:"AppNav_navGhost__eHfjO",nav:"AppNav_nav__aQ9CO",navFixed:"AppNav_navFixed__ZeKhY",navCollapsed:"AppNav_navCollapsed__lycT3",navLinks:"AppNav_navLinks__3ZFJ_",navItem:"AppNav_navItem__qtSLL",navItemIcon:"AppNav_navItemIcon__y86wX",header:"AppNav_header__2JQvX",headerExpanded:"AppNav_headerExpanded__yEAuu",headerCollapsed:"AppNav_headerCollapsed__qMGd8",logoLink:"AppNav_logoLink__FMsYw",logoIconWrapper:"AppNav_logoIconWrapper__OelwF",collapseButton:"AppNav_collapseButton__FDYcm",collapseButtonCollapsed:"AppNav_collapseButtonCollapsed__1j3qp",scrollContainer:"AppNav_scrollContainer__UQQtv",footer:"AppNav_footer__dHa_L",navItemActive:"AppNav_navItemActive__GN7le",navItemContent:"AppNav_navItemContent__YlStp",navItemBadge:"AppNav_navItemBadge__6VqCa",navItemToggle:"AppNav_navItemToggle__tfzhc",subMenu:"AppNav_subMenu__sdt7n",subMenuItem:"AppNav_subMenuItem___6SwX",subMenuItemActive:"AppNav_subMenuItemActive__jQhrk",groupLabel:"AppNav_groupLabel__rOCDt",groupDragOver:"AppNav_groupDragOver__7ZKjA",searchInput:"AppNav_searchInput__tW1sl",shortcutHint:"AppNav_shortcutHint__McknQ",shortcutHintCtrl:"AppNav_shortcutHintCtrl__nSE1_",emptyMessage:"AppNav_emptyMessage__s2J5J",userMenu:"AppNav_userMenu__7x8UA",userMenuCollapsed:"AppNav_userMenuCollapsed__YtJQm",userMenuInfo:"AppNav_userMenuInfo__GUaPj",userMenuName:"AppNav_userMenuName__7bXub",userMenuTeam:"AppNav_userMenuTeam__qL_0p",helpButton:"AppNav_helpButton__i5B5h",helpButtonCollapsed:"AppNav_helpButtonCollapsed__dXx2R",onboardingSection:"AppNav_onboardingSection__eOrci",scrollbar:"AppNav_scrollbar__YjKyG",thumb:"AppNav_thumb__IzI2H"}},56514:(e,s,t)=>{"use strict";t.d(s,{D:()=>sc});var a=t(6029),r=t(55729),n=t(82203),l=t.n(n),o=t(60481),i=t(53061),c=t(43517),d=t(75155),m=t(81278),h=t.n(m),u=t(75828),p=t.n(u),x=t(1885),f=t(6065),b=t(16162),j=t.n(b),v=t(82641),_=t(25062),g=t(20158),y=t(96061),S=t(22599),k=t(3635),N=t(43085),C=t(76013),A=t(94720),w=t(53993),z=t(22175),I=t(78341),M=t(71991),E=t(87104),D=t(86705),T=t(85318),L=t(16120),F=t(41279),O=t(70114),P=t(23474),W=t(53780),H=t(56447),Q=t(45519),B=t(46661),Y=t(95316),q=t(6876),G=t(98142),V=t(97344),$=t(27166),K=t(36517),U=t(74805),R=t(65234);function J(e){let s,t,n,l,o,i=(0,d.c)(12),{text:c,className:m,children:h}=e,[u,x]=(0,r.useState)(!1);return i[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{x(!0),setTimeout(()=>x(!1),2e3)},i[0]=s):s=i[0],i[1]!==m?(t=p()("text-decoration-none",m),i[1]=m,i[2]=t):t=i[2],i[3]!==h||i[4]!==u?(n=h({isCopied:u}),i[3]=h,i[4]=u,i[5]=n):n=i[5],i[6]!==t||i[7]!==n?(l=(0,a.jsx)(_.$,{variant:"secondary",p:0,className:t,size:"xs",fullWidth:!0,children:n}),i[6]=t,i[7]=n,i[8]=l):l=i[8],i[9]!==l||i[10]!==c?(o=(0,a.jsx)(R.CopyToClipboard,{text:c,onCopy:s,children:l}),i[9]=l,i[10]=c,i[11]=o):o=i[11],o}function X(e){let s,t,r=(0,d.c)(6),{label:n,value:l}=e,o=void 0===n?"":n;return r[0]!==o||r[1]!==l?(s=e=>{let{isCopied:s}=e;return(0,a.jsxs)("div",{className:p()("d-flex w-100 py-2 px-2 gap-2 rounded align-items-center justify-content-between cursor-pointer",{"text-success":s}),children:[(0,a.jsxs)("div",{className:"fs-7 d-flex text-truncate align-items-center",children:[o,(0,a.jsx)("pre",{className:"m-0 user-select-all d-inline text-truncate fs-7 lh-1",children:l})]}),(0,a.jsxs)(k.Y,{gap:2,wrap:"nowrap",className:p()("fs-7 text-end"),children:[s?(0,a.jsx)(K.A,{size:14}):(0,a.jsx)(U.A,{size:14}),s?"Copied!":"Copy"]})]})},r[0]=o,r[1]=l,r[2]=s):s=r[2],r[3]!==s||r[4]!==l?(t=(0,a.jsx)(J,{text:l,className:"d-flex mx-auto p-0 w-100",children:s}),r[3]=s,r[4]=l,r[5]=t):t=r[5],t}function Z(e){let s,t,r,n,l,o,i,c,m,h,u,p,x,f,b,j,v,g,y=(0,d.c)(25),{show:S,onHide:k}=e,{data:N}=q.Ay.useTeam();return y[0]!==N?(s=null!=N&&(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(X,{label:(0,a.jsxs)("span",{className:"text-muted me-2",children:["Your Ingestion API Key:"," "]}),value:N.apiKey})}),y[0]=N,y[1]=s):s=y[1],y[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.jsx)("div",{className:"fs-7 mb-4",children:"Click on a link below to view installation instructions for your application."}),r=(0,a.jsx)("div",{className:"fs-6 mb-2",children:"Backend"}),y[2]=t,y[3]=r):(t=y[2],r=y[3]),y[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/nodejs",target:"_blank",rel:"noreferrer",className:"text-link",children:"Node.js"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),y[4]=n):n=y[4],y[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/golang",target:"_blank",rel:"noreferrer",className:"text-link",children:"Go"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),y[5]=l):l=y[5],y[6]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/python",target:"_blank",rel:"noreferrer",className:"text-link",children:"Python"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),y[6]=o):o=y[6],y[7]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/java",target:"_blank",rel:"noreferrer",className:"text-link",children:"Java"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),y[7]=i):i=y[7],y[8]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/elixir",target:"_blank",rel:"noreferrer",className:"text-link",children:"Elixir"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs)"})]}),y[8]=c):c=y[8],y[9]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/ruby-on-rails",target:"_blank",rel:"noreferrer",className:"text-link",children:"Ruby on Rails"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Traces)"})]}),m=(0,a.jsx)("div",{className:"fs-6 mb-2 mt-4",children:"Platform"}),y[9]=m,y[10]=h):(m=y[9],h=y[10]),y[11]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/ingesting-data/kubernetes",target:"_blank",rel:"noreferrer",className:"text-link",children:"Kubernetes"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Metrics)"})]}),p=(0,a.jsx)("div",{className:"fs-6 mb-2 mt-4",children:"Browser"}),y[11]=u,y[12]=p):(u=y[11],p=y[12]),y[13]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/browser",target:"_blank",rel:"noreferrer",className:"text-link",children:"JavaScript/TypeScript"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),f=(0,a.jsx)("div",{className:"fs-6 mb-2 mt-4",children:"Data Collector"}),y[13]=x,y[14]=f):(x=y[13],f=y[14]),y[15]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/ingesting-data/opentelemetry#sending-otel-data",target:"_blank",rel:"noreferrer",className:"text-link",children:"OpenTelemetry"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),y[15]=b):b=y[15],y[16]!==k?(j=(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(_.$,{variant:"secondary",onClick:()=>k(),children:"Cancel"})}),y[16]=k,y[17]=j):j=y[17],y[18]!==s||y[19]!==j?(v=(0,a.jsxs)("div",{className:"inter",children:[s,t,r,n,l,o,i,c,h,m,u,p,x,f,b,j]}),y[18]=s,y[19]=j,y[20]=v):v=y[20],y[21]!==k||y[22]!==S||y[23]!==v?(g=(0,a.jsx)($.a,{opened:S,onClose:k,title:"Start Sending Telemetry",size:"lg",centered:!0,children:v}),y[21]=k,y[22]=S,y[23]=v,y[24]=g):g=y[24],g}var ee=t(34834),es=t(62801),et=t(8737),ea=t(58333),er=t(90515),en=t(88992),el=t(91021),eo=t(93108),ei=t(81973),ec=t(92917);let ed=Date.now(),em=e=>{let s,t,r,n,l,o,i,m,h,u,p,x,f,b,j,v,_,g,y,A,w,z,I,M=(0,d.c)(64),{onAddDataClick:E}=e,[D,T]=(0,ec.Mj)("onboardingChecklistCollapsed",!1),{data:L,isLoading:F}=q.Ay.useTeam(),{data:O,isLoading:W}=(0,eo.ZY)(),{data:H,isLoading:Q}=(0,ei.oE)();e:{let e,t;if(!L?.createdAt){s=!1;break e}M[0]===Symbol.for("react.memo_cache_sentinel")?(e=new Date(ed-2592e5),M[0]=e):e=M[0];let a=e;M[1]!==L.createdAt?(t=new Date(L.createdAt),M[1]=L.createdAt,M[2]=t):t=M[2],s=t>a}let B=s,Y=!1===F&&B,G=O?.[0];M[3]!==G?.id||M[4]!==H?(t=H?.filter(e=>e.connection===G?.id),M[3]=G?.id,M[4]=H,M[5]=t):t=M[5];let V=t;M[6]===Symbol.for("react.memo_cache_sentinel")?(r={databaseName:"system",tableName:"tables"},M[6]=r):r=M[6],M[7]!==V?(n=V??[],M[7]=V,M[8]=n):n=M[8],M[9]!==n?(l=n.map(eh),M[9]=n,M[10]=l):l=M[10];let $=G?.id??"";M[11]!==l||M[12]!==$?(o={select:"sum(total_rows) as total_rows",from:r,where:"",filtersLogicalOperator:"OR",filters:l,connection:$},M[11]=l,M[12]=$,M[13]=o):o=M[13];let K=o;M[14]!==Y?(i={enabled:Y},M[14]=Y,M[15]=i):i=M[15];let{data:U,isLoading:R}=(0,el.HD)(K,i),J=U?.data?.[0]?.total_rows>0,X=O&&O.length>0,Z=H&&H.length>0,et=X??!1,er=X?void 0:"/team";M[16]!==W||M[17]!==er||M[18]!==et?(m={id:"connection",title:"Connect to ClickHouse",description:"Set up your database connection",isComplete:et,isLoading:W,href:er},M[16]=W,M[17]=er,M[18]=et,M[19]=m):m=M[19];let en=Z??!1,em=Z?void 0:"/team";M[20]!==Q||M[21]!==en||M[22]!==em?(h={id:"sources",title:"Create Data Sources",description:"Configure where your data comes from",isComplete:en,isLoading:Q,href:em},M[20]=Q,M[21]=en,M[22]=em,M[23]=h):h=M[23];let ex=J?void 0:E;M[24]!==J||M[25]!==R||M[26]!==ex?(u={id:"data",title:"Add Data",description:"Start sending logs, metrics, or traces",isComplete:J,isLoading:R,onClick:ex},M[24]=J,M[25]=R,M[26]=ex,M[27]=u):u=M[27],M[28]!==m||M[29]!==h||M[30]!==u?(p=[m,h,u],M[28]=m,M[29]=h,M[30]=u,M[31]=p):p=M[31];let ef=p;M[32]!==ef?(x=ef.filter(eu),M[32]=ef,M[33]=x):x=M[33];let eb=x.length,ej=eb===ef.length;if(!Y)return null;let ev=D?0:"xs";M[34]===Symbol.for("react.memo_cache_sentinel")?(f=(0,a.jsx)(c.E,{size:"sm",fw:"bold",children:"Get Started"}),M[34]=f):f=M[34];let e_=ej?"green":"blue";M[35]!==eb||M[36]!==ef.length||M[37]!==e_?(b=(0,a.jsxs)(k.Y,{gap:"xs",align:"center",children:[f,(0,a.jsxs)(N.E,{size:"xs",color:e_,variant:"light",children:[eb,"/",ef.length]})]}),M[35]=eb,M[36]=ef.length,M[37]=e_,M[38]=b):b=M[38],M[39]!==D||M[40]!==T?(j=()=>T(!D),M[39]=D,M[40]=T,M[41]=j):j=M[41],M[42]!==D?(v=D?(0,a.jsx)(P.A,{size:12}):(0,a.jsx)(ea.A,{size:12}),M[42]=D,M[43]=v):v=M[43],M[44]!==j||M[45]!==v?(_=(0,a.jsx)(C.M,{variant:"subtle",size:"sm",onClick:j,children:v}),M[44]=j,M[45]=v,M[46]=_):_=M[46],M[47]!==ev||M[48]!==b||M[49]!==_?(g=(0,a.jsxs)(k.Y,{justify:"space-between",align:"center",mb:ev,children:[b,_]}),M[47]=ev,M[48]=b,M[49]=_,M[50]=g):g=M[50];let eg=!D;return M[51]!==ef?(y=ef.map(ep),M[51]=ef,M[52]=y):y=M[52],M[53]!==ej?(A=ej&&(0,a.jsx)(k.Y,{justify:"center",mt:"xs",p:"xs",children:(0,a.jsx)(c.E,{size:"sm",c:"green",fw:"bold",children:"\uD83C\uDF89 Great job! You're all set up."})}),M[53]=ej,M[54]=A):A=M[54],M[55]!==y||M[56]!==A?(w=(0,a.jsxs)(ee.B,{gap:"xs",children:[y,A]}),M[55]=y,M[56]=A,M[57]=w):w=M[57],M[58]!==eg||M[59]!==w?(z=(0,a.jsx)(S.S,{in:eg,children:w}),M[58]=eg,M[59]=w,M[60]=z):z=M[60],M[61]!==g||M[62]!==z?(I=(0,a.jsxs)(es.Z,{withBorder:!0,p:"xs",mb:"sm",radius:"md",children:[g,z]}),M[61]=g,M[62]=z,M[63]=I):I=M[63],I};function eh(e){return{type:"sql",condition:`table = '${e.from.tableName}' AND database = '${e.from.databaseName}'`}}function eu(e){return e.isComplete}function ep(e,s){let t=(0,a.jsxs)(k.Y,{gap:"sm",align:"center",w:"100%",children:[(0,a.jsx)("div",{style:{width:20,height:20,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",border:e.isComplete?"1px solid var(--color-text-brand)":"1px solid var(--color-border)",backgroundColor:e.isComplete?"transparent":"var(--color-bg-muted)",color:e.isComplete?"var(--color-text-brand)":"var(--color-text)",flexShrink:0},children:e.isLoading?(0,a.jsx)(A.a,{size:"xs",color:"gray"}):e.isComplete?(0,a.jsx)(er.A,{size:16,style:{fontSize:12,fontWeight:"bold",paddingTop:1}}):(0,a.jsx)(c.E,{size:"xs",fw:"bold",children:s+1})}),(0,a.jsxs)("div",{style:{flex:1},children:[(0,a.jsx)(c.E,{size:"sm",fw:"500",style:{textDecoration:e.isComplete?"line-through":"none",opacity:e.isComplete?.8:1},children:e.title}),(0,a.jsx)(c.E,{size:"xs",c:"dimmed",children:e.description})]}),!e.isComplete&&(e.href||e.onClick)&&(0,a.jsx)(en.A,{size:12,style:{color:"var(--color-text-muted)"}})]});return e.href&&!e.isComplete?(0,a.jsx)(l(),{href:e.href,style:{textDecoration:"none"},children:(0,a.jsx)(et.N,{w:"100%",py:"xs",style:{borderRadius:6,cursor:"pointer",":hover":{backgroundColor:"var(--color-bg-muted)"}},children:t})},e.id):e.onClick&&!e.isComplete?(0,a.jsx)(et.N,{w:"100%",py:"xs",onClick:e.onClick,style:{borderRadius:6,cursor:"pointer",":hover":{backgroundColor:"var(--color-bg-hover)"}},children:t},e.id):(0,a.jsx)("div",{style:{},children:t},e.id)}var ex=t(87095),ef=t(36600),eb=t(92789),ej=t(38206),ev=t(87989),e_=t(63085),eg=t(97787),ey=t(23994),eS=t(31071),ek=t(58202),eN=t(57820);let eC=[{label:"Dark",value:"dark"},{label:"Light",value:"light"}],eA=Object.values(ek.Zj).map(e=>({label:e.displayName,value:e.name})),ew=e=>{let s,t,r,n,l,o,i=(0,d.c)(12),{label:m,description:h,children:u}=e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(s={flex:1},i[0]=s):s=i[0],i[1]!==h?(t=h&&(0,a.jsx)(c.E,{size:"xs",mt:2,children:h}),i[1]=h,i[2]=t):t=i[2],i[3]!==m||i[4]!==t?(r=(0,a.jsxs)("div",{style:s,children:[m,t]}),i[3]=m,i[4]=t,i[5]=r):r=i[5],i[6]===Symbol.for("react.memo_cache_sentinel")?(n={flex:.8},i[6]=n):n=i[6],i[7]!==u?(l=(0,a.jsx)("div",{style:n,children:u}),i[7]=u,i[8]=l):l=i[8],i[9]!==r||i[10]!==l?(o=(0,a.jsxs)(k.Y,{align:"center",justify:"space-between",children:[r,l]}),i[9]=r,i[10]=l,i[11]=o):o=i[11],o},ez=e=>{let s,t,r,n,l,o,i,m,h,u,p,x,f,b,j=(0,d.c)(37),{opened:v,onClose:_}=e,{userPreferences:g,setUserPreference:y}=(0,eN.HW)(),{themeName:S,setTheme:C,isDev:A}=(0,ef.o3)();return j[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:"Preferences"}),(0,a.jsx)(c.E,{size:"xs",mt:6,children:"Customize your experience"})]}),j[0]=s):s=j[0],j[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.jsx)(eb.c,{label:"Date and Time",labelPosition:"left"}),j[1]=t):t=j[1],j[2]!==y?(r=e=>e&&y({timeFormat:e}),j[2]=y,j[3]=r):r=j[3],j[4]===Symbol.for("react.memo_cache_sentinel")?(n=["12h","24h"],j[4]=n):n=j[4],j[5]!==r||j[6]!==g.timeFormat?(l=(0,a.jsx)(ew,{label:"Time format",children:(0,a.jsx)(ej.l,{value:g.timeFormat,onChange:r,data:n,allowDeselect:!1})}),j[5]=r,j[6]=g.timeFormat,j[7]=l):l=j[7],j[8]!==y?(o=e=>y({isUTC:e.currentTarget.checked}),j[8]=y,j[9]=o):o=j[9],j[10]!==o||j[11]!==g.isUTC?(i=(0,a.jsx)(ew,{label:"Use UTC time",children:(0,a.jsx)(ev.d,{size:"md",onLabel:"UTC",checked:g.isUTC,onChange:o})}),j[10]=o,j[11]=g.isUTC,j[12]=i):i=j[12],j[13]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(eb.c,{label:(0,a.jsxs)(k.Y,{align:"center",gap:"xs",children:["Appearance",(0,a.jsx)(N.E,{variant:"light",fw:"normal",size:"xs",children:"Experimental"})]}),labelPosition:"left",mt:"sm"}),j[13]=m):m=j[13],j[14]!==y?(h=e=>e&&y({colorMode:e}),j[14]=y,j[15]=h):h=j[15],j[16]!==h||j[17]!==g.colorMode?(u=(0,a.jsx)(ew,{label:"Color Mode",description:"Switch between light and dark mode",children:(0,a.jsx)(ej.l,{value:g.colorMode,onChange:h,data:eC,allowDeselect:!1})}),j[16]=h,j[17]=g.colorMode,j[18]=u):u=j[18],j[19]!==A||j[20]!==C||j[21]!==S?(p=A&&(0,a.jsx)(ew,{label:(0,a.jsxs)(k.Y,{gap:"xs",children:["Brand Theme",(0,a.jsx)(e_.m,{label:"Only available in local/dev mode. Changes logo, colors, and branding.",multiline:!0,w:220,children:(0,a.jsx)(N.E,{variant:"light",color:"violet",fw:"normal",size:"xs",leftSection:(0,a.jsx)(ey.A,{size:10}),children:"Dev Only"})})]}),description:"Switch between HyperDX and ClickStack branding",children:(0,a.jsx)(ej.l,{value:S,onChange:e=>{e&&(0,ek.tc)(e)&&C(e)},data:eA,allowDeselect:!1})}),j[19]=A,j[20]=C,j[21]=S,j[22]=p):p=j[22],j[23]!==y||j[24]!==S||j[25]!==g.font?(x="clickstack"!==S&&(0,a.jsx)(ew,{label:"Font",description:"If using custom font, make sure it's installed on your system",children:(0,a.jsx)(eg.j,{value:g.font,filter:eI,onChange:e=>y({font:e}),data:eS.Al})}),j[23]=y,j[24]=S,j[25]=g.font,j[26]=x):x=j[26],j[27]!==u||j[28]!==p||j[29]!==x||j[30]!==l||j[31]!==i?(f=(0,a.jsxs)(ee.B,{gap:"lg",children:[t,l,i,m,u,p,x]}),j[27]=u,j[28]=p,j[29]=x,j[30]=l,j[31]=i,j[32]=f):f=j[32],j[33]!==_||j[34]!==v||j[35]!==f?(b=(0,a.jsx)($.a,{title:s,size:"lg",padding:"lg",keepMounted:!1,opened:v,onClose:_,children:f}),j[33]=_,j[34]=v,j[35]=f,j[36]=b):b=j[36],b};function eI(e){let{options:s}=e;return s}var eM=t(66992),eE=t(56513),eD=t(22623),eT=t(89533),eL=t(62861),eF=t(92334),eO=t(21604),eP=t(1146),eW=t(93938),eH=t(43524),eQ=t.n(eH);let eB=r.createContext({isCollapsed:!1,pathname:"/"}),eY=()=>{let e,s,t=(0,d.c)(2);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("span",{className:"fs-8",children:"Ready to deploy on ClickHouse Cloud?"}),t[0]=e):e=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsxs)("div",{className:"my-3 bg-muted rounded p-2 text-center",children:[e,(0,a.jsx)("div",{className:"mt-2 mb-2",children:(0,a.jsx)(_.$,{variant:"primary",size:"xs",component:"a",href:"https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started#deploy-with-clickhouse-cloud",target:"_blank",rel:"noopener noreferrer",children:"Get Started for Free"})})]}),t[1]=s):s=t[1],s},eq=e=>{let s,t,n,o,i,m,h,u,x,f,b,j,v,_=(0,d.c)(29),{userName:g,teamName:y,logoutUrl:S,onClickUserPreferences:N}=e,C=void 0===g?"User":g,{isCollapsed:A}=r.useContext(eB);_[0]!==C?(s=C.split(" ").map(e$).join(""),_[0]=C,_[1]=s):s=_[1];let w=s,z=G.VO?"Local mode":C;return _[2]===Symbol.for("react.memo_cache_sentinel")?(t={transition:"fade-up"},_[2]=t):t=_[2],_[3]!==A?(n=p()(eQ().userMenu,{[eQ().userMenuCollapsed]:A}),_[3]=A,_[4]=n):n=_[4],_[5]!==w?(o=(0,a.jsx)(eM.e,{size:"sm",radius:"xl",color:"gray",children:w}),_[5]=w,_[6]=o):o=_[6],_[7]!==z||_[8]!==A||_[9]!==y?(i=!A&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e_.m,{fz:"xs",color:"gray",ta:"center",label:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("strong",{children:z}),(0,a.jsx)("br",{}),y]}),openDelay:250,children:(0,a.jsxs)("div",{className:eQ().userMenuInfo,children:[(0,a.jsx)(c.E,{size:"xs",fw:"bold",lh:1.1,className:eQ().userMenuName,children:z}),(0,a.jsx)(c.E,{size:"xs",className:eQ().userMenuTeam,children:y})]})}),(0,a.jsx)(O.A,{size:14})]}),_[7]=z,_[8]=A,_[9]=y,_[10]=i):i=_[10],_[11]!==o||_[12]!==i?(m=(0,a.jsxs)(k.Y,{gap:"xs",wrap:"nowrap",miw:0,children:[o,i]}),_[11]=o,_[12]=i,_[13]=m):m=_[13],_[14]!==n||_[15]!==m?(h=(0,a.jsx)(eE.W.Target,{children:(0,a.jsx)(eD.t,{"data-testid":"user-menu-trigger",className:n,children:m})}),_[14]=n,_[15]=m,_[16]=h):h=_[16],_[17]===Symbol.for("react.memo_cache_sentinel")?(u=G.VO?(0,a.jsx)(eE.W.Label,{fz:"xs",children:"Local mode"}):(0,a.jsx)(eE.W.Item,{"data-testid":"team-settings-menu-item",href:"/team",component:l(),leftSection:(0,a.jsx)(Y.A,{size:16}),children:"Team Settings"}),_[17]=u):u=_[17],_[18]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsx)(eT.A,{size:16}),_[18]=x):x=_[18],_[19]!==N?(f=(0,a.jsx)(eE.W.Item,{"data-testid":"user-preferences-menu-item",leftSection:x,onClick:N,children:"User Preferences"}),_[19]=N,_[20]=f):f=_[20],_[21]!==S?(b=S&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eE.W.Divider,{}),(0,a.jsx)(eE.W.Item,{"data-testid":"logout-menu-item",color:"red",leftSection:(0,a.jsx)(eL.A,{size:16}),component:l(),href:S,children:"Logout"})]}),_[21]=S,_[22]=b):b=_[22],_[23]!==f||_[24]!==b?(j=(0,a.jsxs)(eE.W.Dropdown,{children:[u,f,b]}),_[23]=f,_[24]=b,_[25]=j):j=_[25],_[26]!==j||_[27]!==h?(v=(0,a.jsxs)(eE.W,{position:"top-start",transitionProps:t,children:[h,j]}),_[26]=j,_[27]=h,_[28]=v):v=_[28],v},eG=e=>{let s,t,n,l,o,i,m,h,u,x,f,b,j,v=(0,d.c)(25),{version:_,onAddDataClick:g}=e,{isCollapsed:y}=r.useContext(eB),[S,N]=(0,I.j)(!1),{close:C}=N;return v[0]!==y?(s=p()(eQ().helpButton,{[eQ().helpButtonCollapsed]:y}),v[0]=y,v[1]=s):s=v[1],v[2]===Symbol.for("react.memo_cache_sentinel")?(t={transition:"fade-up"},v[2]=t):t=v[2],v[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)(eE.W.Target,{children:(0,a.jsx)(et.N,{"data-testid":"help-menu-trigger",w:"100%",children:(0,a.jsx)(k.Y,{align:"center",justify:"center",h:28,children:(0,a.jsx)(eF.A,{size:16})})})}),v[3]=n):n=v[3],v[4]!==_?(l=_&&(0,a.jsxs)(c.E,{size:"xs",component:"span",children:["v",_]}),v[4]=_,v[5]=l):l=v[5],v[6]!==l?(o=(0,a.jsxs)(eE.W.Label,{children:["Help"," ",l]}),v[6]=l,v[7]=o):o=v[7],v[8]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(eE.W.Item,{"data-testid":"documentation-menu-item",href:"https://clickhouse.com/docs/use-cases/observability/clickstack",component:"a",target:"_blank",rel:"noopener noreferrer",leftSection:(0,a.jsx)(eO.A,{size:16}),children:"Documentation"}),v[8]=i):i=v[8],v[9]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(eE.W.Item,{"data-testid":"discord-menu-item",leftSection:(0,a.jsx)(eP.A,{size:16}),component:"a",href:"https://hyperdx.io/discord",target:"_blank",rel:"noopener noreferrer",children:"Discord Community"}),v[9]=m):m=v[9],v[10]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsx)(eW.A,{size:16}),v[10]=h):h=v[10],v[11]!==g?(u=(0,a.jsx)(eE.W.Item,{"data-testid":"setup-instructions-menu-item",leftSection:h,onClick:g,children:"Setup Instructions"}),v[11]=g,v[12]=u):u=v[12],v[13]!==u||v[14]!==o?(x=(0,a.jsxs)(eE.W,{withArrow:!0,position:"top-start",transitionProps:t,defaultOpened:!1,children:[n,(0,a.jsxs)(eE.W.Dropdown,{children:[o,i,m,u]})]}),v[13]=u,v[14]=o,v[15]=x):x=v[15],v[16]!==x||v[17]!==s?(f=(0,a.jsx)(eD.t,{className:s,children:x}),v[16]=x,v[17]=s,v[18]=f):f=v[18],v[19]!==C||v[20]!==S?(b=(0,a.jsx)(Z,{show:S,onHide:C}),v[19]=C,v[20]=S,v[21]=b):b=v[21],v[22]!==f||v[23]!==b?(j=(0,a.jsxs)(a.Fragment,{children:[f,b]}),v[22]=f,v[23]=b,v[24]=j):j=v[24],j},eV=e=>{let s,t,n,o,i,c,m,h,u,x,f,b,j=(0,d.c)(37),{className:v,label:_,icon:g,href:y,isExpanded:S,onToggle:k,isBeta:C}=e,{pathname:A,isCollapsed:w}=r.useContext(eB);j[0]!==y?(s=y.replace(/^\//,"").replace(/\//g,"-")||"home",j[0]=y,j[1]=s):s=j[1];let z=`nav-link-${s}`;j[2]!==k?(t=e=>{e.preventDefault(),e.stopPropagation(),k?.()},j[2]=k,j[3]=t):t=j[3];let I=t;if(j[4]!==v||j[5]!==y||j[6]!==A||j[7]!==z){let e=A===y||A?.startsWith(y+"/");n=l(),o=z,i=y,c=p()(eQ().navItem,{[eQ().navItemActive]:e},v),j[4]=v,j[5]=y,j[6]=A,j[7]=z,j[8]=n,j[9]=o,j[10]=i,j[11]=c}else n=j[8],o=j[9],i=j[10],c=j[11];return j[12]!==g?(m=(0,a.jsx)("span",{className:eQ().navItemIcon,children:g}),j[12]=g,j[13]=m):m=j[13],j[14]!==w||j[15]!==_?(h=!w&&(0,a.jsx)("span",{children:_}),j[14]=w,j[15]=_,j[16]=h):h=j[16],j[17]!==m||j[18]!==h?(u=(0,a.jsxs)("span",{className:eQ().navItemContent,children:[m,h]}),j[17]=m,j[18]=h,j[19]=u):u=j[19],j[20]!==C||j[21]!==w?(x=!w&&C&&(0,a.jsx)(N.E,{size:"xs",color:"blue",variant:"light",className:eQ().navItemBadge,children:"Beta"}),j[20]=C,j[21]=w,j[22]=x):x=j[22],j[23]!==I||j[24]!==w||j[25]!==S||j[26]!==k||j[27]!==z?(f=!w&&k&&(0,a.jsx)("button",{type:"button","data-testid":`${z}-toggle`,className:eQ().navItemToggle,onClick:I,children:S?(0,a.jsx)(ea.A,{size:14,className:"text-muted-hover"}):(0,a.jsx)(P.A,{size:14,className:"text-muted-hover"})}),j[23]=I,j[24]=w,j[25]=S,j[26]=k,j[27]=z,j[28]=f):f=j[28],j[29]!==n||j[30]!==f||j[31]!==o||j[32]!==i||j[33]!==c||j[34]!==u||j[35]!==x?(b=(0,a.jsxs)(n,{"data-testid":o,href:i,className:c,children:[u,x,f]}),j[29]=n,j[30]=f,j[31]=o,j[32]=i,j[33]=c,j[34]=u,j[35]=x,j[36]=b):b=j[36],b};function e$(e){return e[0].toUpperCase()}let eK="Saved Searches",eU="Saved Dashboards",eR=[{id:"chart",label:"Chart Explorer",href:"/chart",icon:(0,a.jsx)(M.A,{size:16})},{id:"alerts",label:"Alerts",href:"/alerts",icon:(0,a.jsx)(E.A,{size:16}),cloudOnly:!0},{id:"sessions",label:"Client Sessions",href:"/sessions",icon:(0,a.jsx)(D.A,{size:16})},{id:"service-map",label:"Service Map",href:"/service-map",icon:(0,a.jsx)(T.A,{size:16}),isBeta:!0}];function eJ(){let e,s,t,r=(0,d.c)(6),n=(0,V.mG)();if(G.VO){let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)(_.$,{component:l(),href:"/dashboards","data-testid":"create-dashboard-button",variant:"transparent",color:"var(--color-text)",py:"0px",px:"sm",fw:400,children:[(0,a.jsx)("span",{className:"pe-2",children:"+"})," Create Dashboard"]}),r[0]=e):e=r[0],e}return r[1]!==n?(e=()=>n.mutate({name:"My Dashboard",tiles:[],tags:[]},{onSuccess:eX}),r[1]=n,r[2]=e):e=r[2],r[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)("span",{className:"pe-2",children:"+"}),r[3]=s):s=r[3],r[4]!==e?(t=(0,a.jsxs)(_.$,{"data-testid":"create-dashboard-button",variant:"transparent",color:"var(--color-text)",py:"0px",px:"sm",fw:400,onClick:e,children:[s," Create Dashboard"]}),r[4]=e,r[5]=t):t=r[5],t}function eX(e){h().push(`/dashboards/${e.id}`)}function eZ(e){let s,t,r,n,l,o,i=(0,d.c)(15),{placeholder:c,value:m,onChange:h,onEnterDown:u}=e;i[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsxs)("div",{className:eQ().shortcutHint,children:[window.navigator.platform?.toUpperCase().includes("MAC")?(0,a.jsx)(L.A,{size:8}):(0,a.jsx)("span",{className:eQ().shortcutHintCtrl,children:"Ctrl"}),"\xa0K"]}),i[0]=s):s=i[0];let p=s;i[1]!==u?(t=e=>{"Enter"===e.key&&u?.()},i[1]=u,i[2]=t):t=i[2];let x=t;return i[3]!==h?(r=e=>h(e.currentTarget.value),i[3]=h,i[4]=r):r=i[4],i[5]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)(F.A,{size:16,className:"ps-1"}),i[5]=n):n=i[5],i[6]!==h||i[7]!==m?(l=m?(0,a.jsx)(g.J,{"data-testid":"nav-search-clear",tabIndex:-1,size:"xs",radius:"xl",onClick:()=>h("")}):p,i[6]=h,i[7]=m,i[8]=l):l=i[8],i[9]!==x||i[10]!==c||i[11]!==r||i[12]!==l||i[13]!==m?(o=(0,a.jsx)(y.p,{"data-testid":"nav-search-input",placeholder:c,value:m,onChange:r,leftSection:n,onKeyDown:x,rightSection:l,mt:8,mb:"sm",size:"xs",variant:"filled",radius:"xl",className:eQ().searchInput}),i[9]=x,i[10]=c,i[11]=r,i[12]=l,i[13]=m,i[14]=o):o=i[14],o}let e1=e=>{let s,t,r,n=(0,d.c)(8),{name:l,collapsed:o,onClick:i}=e;return n[0]!==o?(s=o?(0,a.jsx)(O.A,{size:14}):(0,a.jsx)(P.A,{size:14}),n[0]=o,n[1]=s):s=n[1],n[2]!==l?(t=(0,a.jsx)("div",{children:l}),n[2]=l,n[3]=t):t=n[3],n[4]!==i||n[5]!==s||n[6]!==t?(r=(0,a.jsxs)("div",{className:eQ().groupLabel,onClick:i,children:[s,t]}),n[4]=i,n[5]=s,n[6]=t,n[7]=r):r=n[7],r},e0=e=>{let s,t,n,l,o,i=(0,d.c)(23),{name:c,groups:m,renderLink:h,onDragEnd:u,forceExpandGroups:x}=e,f=void 0!==x&&x,b=`collapsedGroups-${c}`;i[0]===Symbol.for("react.memo_cache_sentinel")?(s={},i[0]=s):s=i[0],i[1]!==b?(t={key:b,defaultValue:s},i[1]=b,i[2]=t):t=i[2];let[j,v]=(0,z.M)(t);i[3]!==j||i[4]!==v?(n=e=>{v({...j,[e]:!j[e]})},i[3]=j,i[4]=v,i[5]=n):n=i[5];let _=n,[g,y]=(0,r.useState)(null);if(i[6]!==j||i[7]!==g||i[8]!==f||i[9]!==m||i[10]!==_||i[11]!==u||i[12]!==h){let e;i[14]!==j||i[15]!==g||i[16]!==f||i[17]!==_||i[18]!==u||i[19]!==h?(e=e=>(0,a.jsxs)("div",{className:p()(g===e.name&&eQ().groupDragOver),onDragOver:s=>{s.preventDefault(),s.dataTransfer.dropEffect="move",y(e.name)},onDragEnd:e=>{e.preventDefault(),u?.(e.target,g),y(null)},children:[(0,a.jsx)(e1,{onClick:()=>_(e.name),name:e.name,collapsed:j[e.name]}),(0,a.jsx)(S.S,{in:!j[e.name]||f,children:e.items.map(e=>h(e))})]},e.name),i[14]=j,i[15]=g,i[16]=f,i[17]=_,i[18]=u,i[19]=h,i[20]=e):e=i[20],l=m.map(e),i[6]=j,i[7]=g,i[8]=f,i[9]=m,i[10]=_,i[11]=u,i[12]=h,i[13]=l}else l=i[13];return i[21]!==l?(o=(0,a.jsx)(a.Fragment,{children:l}),i[21]=l,i[22]=o):o=i[22],o};function e2(e){let s,t,a,n,l=(0,d.c)(14),{items:o,untaggedGroupName:i}=e,c=void 0===i?"Other":i;l[0]!==o?(s=new x.A(o,{keys:["name"],threshold:.2,ignoreLocation:!0}),l[0]=o,l[1]=s):s=l[1];let m=s,[h,u]=(0,r.useState)("");e:{let e;if(""===h){t=o;break e}l[2]!==m||l[3]!==h?(e=m.search(h).map(e5),l[2]=m,l[3]=h,l[4]=e):e=l[4],t=e}let p=t;if(l[5]!==p||l[6]!==c){let e,s={},t=[];p.forEach(e=>{e.tags?.length?e.tags.forEach(t=>{s[t]=s[t]??[],s[t].push(e)}):t.push(e)}),t.length&&(s[c]=t),l[8]!==c?(e=(e,s)=>e.name===c?1:s.name===c?-1:e.name.localeCompare(s.name),l[8]=c,l[9]=e):e=l[9],a=Object.entries(s).map(e3).sort(e),l[5]=p,l[6]=c,l[7]=a}else a=l[7];let f=a;return l[10]!==p||l[11]!==f||l[12]!==h?(n={filteredList:p,groupedFilteredList:f,q:h,setQ:u},l[10]=p,l[11]=f,l[12]=h,l[13]=n):n=l[13],n}function e3(e){let[s,t]=e;return{name:s,items:t}}function e5(e){return e.item}function e4(e){let s,t,n,o,i,c,h,u,x,b,v,_,g,y,M,D,T,L,F,O,P,$,K,U,R,J,X,ee,es,et,ea,er,en,el,eo,ei,ed,eh,eu,ep,eb,ej,ev,e_,eg,ey,eS,ek,eC,eA,ew,eI,eM,eE,eD,eT,eL,eF=(0,d.c)(163),{fixed:eO}=e,eP=void 0!==eO&&eO,eW=(0,ef.PH)();eF[0]===Symbol.for("react.memo_cache_sentinel")?(s={size:22},eF[0]=s):s=eF[0];let eH=(0,ef.GV)(s);eF[1]===Symbol.for("react.memo_cache_sentinel")?(t=[],eF[1]=t):t=eF[1],(0,r.useEffect)(se,t);let{data:e$,isLoading:eX,refetch:e3}=(0,ex.PY)();eF[2]!==e$?(n=e$??[],eF[2]=e$,eF[3]=n):n=eF[3];let e5=n,e4=(0,V.vY)(),ss=(0,ex.CI)(),{data:st,isLoading:sa,refetch:sr}=(0,V.L9)();eF[4]!==st?(o=st??[],eF[4]=st,eF[5]=o):o=eF[5];let sn=o,{pathname:sl,query:so}=(0,m.useRouter)();eF[6]===Symbol.for("react.memo_cache_sentinel")?(i={from:(0,f.withDefault)(f.NumberParam,-1),to:(0,f.withDefault)(f.NumberParam,-1)},eF[6]=i):i=eF[6];let[si]=(0,f.useQueryParams)(i);eF[7]===Symbol.for("react.memo_cache_sentinel")?(c=(0,f.withDefault)(f.StringParam,""),h={updateType:"pushIn",enableBatching:!0},eF[7]=c,eF[8]=h):(c=eF[7],h=eF[8]);let[sc]=(0,f.useQueryParam)("tq",c,h),{data:sd}=q.Ay.useMe();eF[9]===Symbol.for("react.memo_cache_sentinel")?(u={key:"isSearchExpanded",defaultValue:!0},eF[9]=u):u=eF[9];let[sm,sh]=(0,z.M)(u);eF[10]===Symbol.for("react.memo_cache_sentinel")?(x={key:"isDashboardsExpanded",defaultValue:!0},eF[10]=x):x=eF[10];let[su,sp]=(0,z.M)(x),{width:sx}=(0,ec.lW)();eF[11]===Symbol.for("react.memo_cache_sentinel")?(b={key:"isNavCollapsed",defaultValue:!1},eF[11]=b):b=eF[11];let[sf,sb]=(0,z.M)(b),sj=(sx??1e3)<900||sf,sv=sj?50:250;eF[12]!==sl||eF[13]!==so?(v=()=>{j().addAction("user navigated",{route:sl,query:JSON.stringify(so)})},_=[sl,so],eF[12]=sl,eF[13]=so,eF[14]=v,eF[15]=_):(v=eF[14],_=eF[15]),(0,r.useEffect)(v,_),eF[16]!==sd?(g=()=>{null!=sd&&(j().enableAdvancedNetworkCapture(),j().setGlobalAttributes({userEmail:sd.email,userName:sd.name,teamName:sd.team.name}))},y=[sd],eF[16]=sd,eF[17]=g,eF[18]=y):(g=eF[17],y=eF[18]),(0,r.useEffect)(g,y),eF[19]!==e5?(M={items:e5,untaggedGroupName:eK},eF[19]=e5,eF[20]=M):M=eF[20];let{q:s_,setQ:sg,filteredList:sy,groupedFilteredList:sS}=e2(M);eF[21]!==sn?(D={items:sn,untaggedGroupName:eU},eF[21]=sn,eF[22]=D):D=eF[22];let{q:sk,setQ:sN,filteredList:sC,groupedFilteredList:sA}=e2(D);eF[23]===Symbol.for("react.memo_cache_sentinel")?(T={key:"isDashboardsPresetsCollapsed",defaultValue:!1},eF[23]=T):T=eF[23];let[sw,sz]=(0,z.M)(T),sI=(0,r.useRef)(null),sM=(0,r.useRef)(null);eF[24]!==sc||eF[25]!==so.savedSearchId||eF[26]!==si.from||eF[27]!==si.to?(L=e=>(0,a.jsx)(l(),{href:`/search/${e.id}?${new URLSearchParams(-1!=si.from&&-1!=si.to?{from:si.from.toString(),to:si.to.toString(),tq:sc}:{}).toString()}`,tabIndex:0,className:p()(eQ().subMenuItem,e.id===so.savedSearchId&&eQ().subMenuItemActive),title:e.name,draggable:!0,"data-savedsearchid":e.id,children:(0,a.jsxs)(k.Y,{gap:2,children:[(0,a.jsx)("div",{className:"d-inline-block text-truncate",children:e.name}),Array.isArray(e.alerts)&&e.alerts.length>0?e.alerts.some(e9)?(0,a.jsx)(W.A,{size:14,className:"float-end text-danger ms-1","aria-label":"Has Alerts and is in ALERT state"}):(0,a.jsx)(E.A,{size:14,className:"float-end ms-1","aria-label":"Has Alerts and is in OK state"}):null]})},e.id),eF[24]=sc,eF[25]=so.savedSearchId,eF[26]=si.from,eF[27]=si.to,eF[28]=L):L=eF[28];let sE=L;eF[29]!==e5||eF[30]!==e3||eF[31]!==ss?(F=(e,s)=>{if(!e?.dataset.savedsearchid||null==s)return;let t=e5.find(s=>s.id===e.dataset.savedsearchid);t?.tags?.includes(s)||ss.mutate({id:e.dataset.savedsearchid,tags:s===eK?[]:[s]},{onSuccess:()=>{e3()}})},eF[29]=e5,eF[30]=e3,eF[31]=ss,eF[32]=F):F=eF[32];let sD=F;eF[33]!==so.dashboardId?(O=e=>(0,a.jsx)(l(),{href:`/dashboards/${e.id}`,tabIndex:0,className:p()(eQ().subMenuItem,{[eQ().subMenuItemActive]:e.id===so.dashboardId}),draggable:!0,"data-dashboardid":e.id,children:e.name},e.id),eF[33]=so.dashboardId,eF[34]=O):O=eF[34];let sT=O;eF[35]!==sn||eF[36]!==sr||eF[37]!==e4?(P=(e,s)=>{if(!e?.dataset.dashboardid||null==s)return;let t=sn.find(s=>s.id===e.dataset.dashboardid);t?.tags?.includes(s)||e4.mutate({id:e.dataset.dashboardid,tags:s===eU?[]:[s]},{onSuccess:()=>{sr()}})},eF[35]=sn,eF[36]=sr,eF[37]=e4,eF[38]=P):P=eF[38];let sL=P,[sF,sO]=(0,I.j)(!1),{close:sP,open:sW}=sO,{userPreferences:sH}=(0,eN.HW)(),{isUTC:sQ}=sH,[sB,sY]=(0,I.j)(!1),{open:sq,close:sG}=sY;eF[39]!==sj||eF[40]!==sl?($={isCollapsed:sj,pathname:sl},eF[39]=sj,eF[40]=sl,eF[41]=$):$=eF[41],eF[42]!==eP||eF[43]!==sv?(K=eP&&(0,a.jsx)("div",{className:eQ().navGhost,style:{width:sv+1,minWidth:sv+1}}),eF[42]=eP,eF[43]=sv,eF[44]=K):K=eF[44],eF[45]!==sG||eF[46]!==sB?(U=(0,a.jsx)(Z,{show:sB,onHide:sG}),eF[45]=sG,eF[46]=sB,eF[47]=U):U=eF[47],eF[48]!==eP||eF[49]!==sj?(R=p()(eQ().nav,{[eQ().navFixed]:eP,[eQ().navCollapsed]:sj}),eF[48]=eP,eF[49]=sj,eF[50]=R):R=eF[50],eF[51]!==sv?(J={width:sv},X={width:sv},eF[51]=sv,eF[52]=J,eF[53]=X):(J=eF[52],X=eF[53]);let sV=!sj;eF[54]!==sj||eF[55]!==sV?(ee=p()(eQ().header,{[eQ().headerExpanded]:sV,[eQ().headerCollapsed]:sj}),eF[54]=sj,eF[55]=sV,eF[56]=ee):ee=eF[56],eF[57]!==sj||eF[58]!==sQ||eF[59]!==eH||eF[60]!==eW?(es=(0,a.jsx)(l(),{href:"/search",className:eQ().logoLink,children:sj?(0,a.jsx)("div",{className:eQ().logoIconWrapper,children:eH}):(0,a.jsxs)(k.Y,{gap:"xs",align:"center",children:[eW,sQ&&(0,a.jsx)(N.E,{size:"xs",color:"gray",variant:"light",fw:"normal",title:"Showing time in UTC",children:"UTC"})]})}),eF[57]=sj,eF[58]=sQ,eF[59]=eH,eF[60]=eW,eF[61]=es):es=eF[61],eF[62]!==sj?(et=p()(eQ().collapseButton,{[eQ().collapseButtonCollapsed]:sj}),eF[62]=sj,eF[63]=et):et=eF[63],eF[64]!==sb?(ea=()=>sb(e8),eF[64]=sb,eF[65]=ea):ea=eF[65],eF[66]===Symbol.for("react.memo_cache_sentinel")?(er=(0,a.jsx)(H.A,{size:16}),eF[66]=er):er=eF[66],eF[67]!==et||eF[68]!==ea?(en=(0,a.jsx)(C.M,{variant:"transparent",size:"sm",className:et,title:"Collapse/Expand Navigation",onClick:ea,children:er}),eF[67]=et,eF[68]=ea,eF[69]=en):en=eF[69],eF[70]!==ee||eF[71]!==es||eF[72]!==en?(el=(0,a.jsxs)("div",{className:ee,children:[es,en]}),eF[70]=ee,eF[71]=es,eF[72]=en,eF[73]=el):el=eF[73],eF[74]!==X||eF[75]!==el?(eo=(0,a.jsx)("div",{style:X,children:el}),eF[74]=X,eF[75]=el,eF[76]=eo):eo=eF[76],eF[77]!==sv?(ei={width:sv},eF[77]=sv,eF[78]=ei):ei=eF[78],eF[79]===Symbol.for("react.memo_cache_sentinel")?(ed=(0,a.jsx)(Q.A,{size:16}),eF[79]=ed):ed=eF[79],eF[80]!==sm||eF[81]!==sh?(eh=G.VO?void 0:()=>sh(!sm),eF[80]=sm,eF[81]=sh,eF[82]=eh):eh=eF[82],eF[83]!==sm||eF[84]!==eh?(eu=(0,a.jsx)(eV,{label:"Search",icon:ed,href:"/search",isExpanded:sm,onToggle:eh}),eF[83]=sm,eF[84]=eh,eF[85]=eu):eu=eF[85],eF[86]!==sy||eF[87]!==sS||eF[88]!==sD||eF[89]!==sj||eF[90]!==eX||eF[91]!==sm||eF[92]!==e5||eF[93]!==sE||eF[94]!==s_||eF[95]!==sg?(ep=!sj&&(0,a.jsx)(S.S,{in:sm,children:(0,a.jsx)("div",{className:eQ().subMenu,children:eX?(0,a.jsx)(A.a,{variant:"dots",mx:"md",my:"xs",size:"sm"}):!G.VO&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eZ,{placeholder:"Saved Searches",value:s_,onChange:sg,onEnterDown:()=>{sI?.current?.firstChild?.focus?.()}}),0===e5.length&&(0,a.jsx)("div",{className:eQ().emptyMessage,children:"No saved searches"}),(0,a.jsx)("div",{ref:sI,children:(0,a.jsx)(e0,{name:"saved-searches",groups:sS,renderLink:sE,forceExpandGroups:!!s_,onDragEnd:sD})}),s_&&0===sy.length?(0,a.jsxs)("div",{className:eQ().emptyMessage,children:["No results matching ",(0,a.jsx)("i",{children:s_})]}):null]})})}),eF[86]=sy,eF[87]=sS,eF[88]=sD,eF[89]=sj,eF[90]=eX,eF[91]=sm,eF[92]=e5,eF[93]=sE,eF[94]=s_,eF[95]=sg,eF[96]=ep):ep=eF[96],eF[97]===Symbol.for("react.memo_cache_sentinel")?(eb=eR.filter(e7).map(e6),eF[97]=eb):eb=eF[97],eF[98]===Symbol.for("react.memo_cache_sentinel")?(ej=(0,a.jsx)(B.A,{size:16}),eF[98]=ej):ej=eF[98],eF[99]!==su||eF[100]!==sp?(ev=()=>sp(!su),eF[99]=su,eF[100]=sp,eF[101]=ev):ev=eF[101],eF[102]!==su||eF[103]!==ev?(e_=(0,a.jsx)(eV,{label:"Dashboards",href:"/dashboards",icon:ej,isExpanded:su,onToggle:ev}),eF[102]=su,eF[103]=ev,eF[104]=e_):e_=eF[104],eF[105]!==sn||eF[106]!==sk||eF[107]!==sC||eF[108]!==sA||eF[109]!==sL||eF[110]!==sj||eF[111]!==su||eF[112]!==sa||eF[113]!==sw||eF[114]!==sl||eF[115]!==sT||eF[116]!==sN||eF[117]!==sz?(eg=!sj&&(0,a.jsx)(S.S,{in:su,children:(0,a.jsxs)("div",{className:eQ().subMenu,children:[(0,a.jsx)(eJ,{}),sa?(0,a.jsx)(A.a,{variant:"dots",mx:"md",my:"xs",size:"sm"}):!G.VO&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eZ,{placeholder:"Saved Dashboards",value:sk,onChange:sN,onEnterDown:()=>{sM?.current?.firstChild?.focus?.()}}),(0,a.jsx)(e0,{name:"dashboards",groups:sA,renderLink:sT,forceExpandGroups:!!sk,onDragEnd:sL}),0===sn.length&&(0,a.jsx)("div",{className:eQ().emptyMessage,children:"No saved dashboards"}),sk&&0===sC.length?(0,a.jsxs)("div",{className:eQ().emptyMessage,children:["No results matching ",(0,a.jsx)("i",{children:sk})]}):null]}),(0,a.jsx)(e1,{name:"Presets",collapsed:sw,onClick:()=>sz(!sw)}),(0,a.jsxs)(S.S,{in:!sw,children:[(0,a.jsx)(l(),{href:"/clickhouse",tabIndex:0,className:p()(eQ().subMenuItem,{[eQ().subMenuItemActive]:sl.startsWith("/clickhouse")}),"data-testid":"nav-link-clickhouse-dashboard",children:"ClickHouse"}),(0,a.jsx)(l(),{href:"/services",tabIndex:0,className:p()(eQ().subMenuItem,{[eQ().subMenuItemActive]:sl.startsWith("/services")}),"data-testid":"nav-link-services-dashboard",children:"Services"}),G.TS&&(0,a.jsx)(l(),{href:"/kubernetes",tabIndex:0,className:p()(eQ().subMenuItem,{[eQ().subMenuItemActive]:sl.startsWith("/kubernetes")}),"data-testid":"nav-link-k8s-dashboard",children:"Kubernetes"})]})]})}),eF[105]=sn,eF[106]=sk,eF[107]=sC,eF[108]=sA,eF[109]=sL,eF[110]=sj,eF[111]=su,eF[112]=sa,eF[113]=sw,eF[114]=sl,eF[115]=sT,eF[116]=sN,eF[117]=sz,eF[118]=eg):eg=eF[118],eF[119]===Symbol.for("react.memo_cache_sentinel")?(ey=!G.VO&&(0,a.jsx)(eV,{label:"Team Settings",href:"/team",icon:(0,a.jsx)(Y.A,{size:16})}),eF[119]=ey):ey=eF[119],eF[120]!==ei||eF[121]!==eu||eF[122]!==ep||eF[123]!==e_||eF[124]!==eg?(eS=(0,a.jsxs)("div",{style:ei,className:eQ().navLinks,children:[eu,ep,eb,e_,eg,ey]}),eF[120]=ei,eF[121]=eu,eF[122]=ep,eF[123]=e_,eF[124]=eg,eF[125]=eS):eS=eF[125],eF[126]!==sj||eF[127]!==sv||eF[128]!==sq?(ek=!sj&&(0,a.jsxs)("div",{style:{width:sv},className:eQ().onboardingSection,children:[(0,a.jsx)(em,{onAddDataClick:sq}),(0,a.jsx)(eY,{})]}),eF[126]=sj,eF[127]=sv,eF[128]=sq,eF[129]=ek):ek=eF[129],eF[130]!==eS||eF[131]!==ek?(eC=(0,a.jsxs)(w.F,{type:"scroll",scrollbarSize:6,scrollHideDelay:100,classNames:eQ(),className:eQ().scrollContainer,children:[eS,ek]}),eF[130]=eS,eF[131]=ek,eF[132]=eC):eC=eF[132],eF[133]!==sv?(eA={width:sv},eF[133]=sv,eF[134]=eA):eA=eF[134],eF[135]!==sq?(ew=(0,a.jsx)(eG,{version:"2.16.0",onAddDataClick:sq}),eF[135]=sq,eF[136]=ew):ew=eF[136];let s$=sd?.name,sK=sd?.team?.name;return eF[137]!==sW||eF[138]!==s$||eF[139]!==sK?(eI=(0,a.jsx)(eq,{userName:s$,teamName:sK,onClickUserPreferences:sW,logoutUrl:G.VO?null:"/api/logout"}),eF[137]=sW,eF[138]=s$,eF[139]=sK,eF[140]=eI):eI=eF[140],eF[141]!==sd?(eM=sd&&sd.usageStatsEnabled&&(0,a.jsx)("img",{referrerPolicy:"no-referrer-when-downgrade",src:"https://static.scarf.sh/a.png?x-pxid=bbc99c42-7a75-4eee-9fb9-2b161fc4acd6"}),eF[141]=sd,eF[142]=eM):eM=eF[142],eF[143]!==eA||eF[144]!==ew||eF[145]!==eI||eF[146]!==eM?(eE=(0,a.jsxs)("div",{className:eQ().footer,style:eA,children:[ew,eI,eM]}),eF[143]=eA,eF[144]=ew,eF[145]=eI,eF[146]=eM,eF[147]=eE):eE=eF[147],eF[148]!==R||eF[149]!==J||eF[150]!==eo||eF[151]!==eC||eF[152]!==eE?(eD=(0,a.jsxs)("div",{className:R,style:J,children:[eo,eC,eE]}),eF[148]=R,eF[149]=J,eF[150]=eo,eF[151]=eC,eF[152]=eE,eF[153]=eD):eD=eF[153],eF[154]!==sF||eF[155]!==sP?(eT=(0,a.jsx)(ez,{opened:sF,onClose:sP}),eF[154]=sF,eF[155]=sP,eF[156]=eT):eT=eF[156],eF[157]!==$||eF[158]!==K||eF[159]!==U||eF[160]!==eD||eF[161]!==eT?(eL=(0,a.jsxs)(eB.Provider,{value:$,children:[K,U,eD,eT]}),eF[157]=$,eF[158]=K,eF[159]=U,eF[160]=eD,eF[161]=eT,eF[162]=eL):eL=eF[162],eL}function e6(e){return(0,a.jsx)(eV,{label:e.label,href:e.href,icon:e.icon,isBeta:e.isBeta},e.id)}function e7(e){return!e.cloudOnly||!G.VO}function e8(e){return!e}function e9(e){return e.state===v.Or.ALERT}function se(){let e;try{e=window.sessionStorage.getItem("hdx-login-redirect-url")}catch(e){console.error(e)}e&&(window.sessionStorage.removeItem("hdx-login-redirect-url"),h().push(e))}var ss=t(74862),st=t(54134),sa=t(42717),sr=t(9841),sn=t(84479),sl=t(80170),so=t(97702);t(86502);let si=e=>{let s,t,r,n,l=(0,d.c)(7),{children:o}=e,{actions:i}=(()=>{let e,s,t,r=(0,d.c)(43),n=(0,m.useRouter)();r[0]===Symbol.for("react.memo_cache_sentinel")?(e={size:16},r[0]=e):e=r[0];let l=(0,ef.GV)(e),{data:o}=(0,ex.PY)(),{data:i}=q.Ay.useDashboards();if(r[1]!==i||r[2]!==o||r[3]!==l||r[4]!==n){let e,t,c,d,m,h,u,p,x,f,b,j,v,_,g,y,S,k,N,C,A,w,z,I,M=i??[];s=[],(o??[]).forEach(e=>{s.push({id:e.id,group:"Saved searches",leftSection:(0,a.jsx)(st.A,{size:16}),label:e.name,keywords:["search","log","saved"],onClick:()=>{n.push(`/search/${e.id}`)}})}),M.forEach(e=>{s.push({id:e.id,group:"Dashboards",leftSection:(0,a.jsx)(sa.A,{size:16}),label:e.name,keywords:["dashboard"],onClick:()=>{n.push(`/dashboards/${e.id}`)}})}),r[6]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(st.A,{size:16}),r[6]=e):e=r[6],r[7]===Symbol.for("react.memo_cache_sentinel")?(t=["log","events","logs"],r[7]=t):t=r[7],r[8]!==n?(c={id:"search",group:"Menu",leftSection:e,label:"Search",description:"Start a new search",keywords:t,onClick:()=>{n.push("/search")}},r[8]=n,r[9]=c):c=r[9],r[10]===Symbol.for("react.memo_cache_sentinel")?(d=(0,a.jsx)(sr.A,{size:16}),r[10]=d):d=r[10],r[11]===Symbol.for("react.memo_cache_sentinel")?(m=["graph","metrics"],r[11]=m):m=r[11],r[12]!==n?(h={id:"chart-explorer",group:"Menu",leftSection:d,label:"Chart Explorer",description:"Explore your data",keywords:m,onClick:()=>{n.push("/chart")}},r[12]=n,r[13]=h):h=r[13],r[14]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsx)(sn.A,{size:16}),r[14]=u):u=r[14],r[15]===Symbol.for("react.memo_cache_sentinel")?(p=["graph"],r[15]=p):p=r[15],r[16]!==n?(x={id:"new-dashboard",group:"Menu",leftSection:u,label:"New Dashboard",description:"Create a new dashboard",keywords:p,onClick:()=>{n.push("/dashboards")}},r[16]=n,r[17]=x):x=r[17],r[18]===Symbol.for("react.memo_cache_sentinel")?(f=(0,a.jsx)(D.A,{size:16}),r[18]=f):f=r[18],r[19]===Symbol.for("react.memo_cache_sentinel")?(b=["browser","web"],r[19]=b):b=r[19],r[20]!==n?(j={id:"sessions",group:"Menu",leftSection:f,label:"Client Sessions",description:"View client sessions",keywords:b,onClick:()=>{n.push("/sessions")}},r[20]=n,r[21]=j):j=r[21],r[22]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(E.A,{size:16}),r[22]=v):v=r[22],r[23]!==n?(_={id:"alerts",group:"Menu",leftSection:v,label:"Alerts",description:"View and manage alerts",onClick:()=>{n.push("/alerts")}},r[23]=n,r[24]=_):_=r[24],r[25]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(sl.A,{size:16}),r[25]=g):g=r[25],r[26]!==n?(y={id:"service-health",group:"Menu",label:"Service Health",leftSection:g,description:"HTTP, Database and Infrastructure metrics",onClick:()=>{n.push("/services")}},r[26]=n,r[27]=y):y=r[27],r[28]===Symbol.for("react.memo_cache_sentinel")?(S=(0,a.jsx)(Y.A,{size:16}),r[28]=S):S=r[28],r[29]!==n?(k={id:"team-settings",group:"Menu",leftSection:S,label:"Team Settings",onClick:()=>{n.push("/team")}},r[29]=n,r[30]=k):k=r[30],r[31]===Symbol.for("react.memo_cache_sentinel")?(N=(0,a.jsx)(so.A,{size:16}),r[31]=N):N=r[31],r[32]===Symbol.for("react.memo_cache_sentinel")?(C=["help","docs"],r[32]=C):C=r[32],r[33]!==n?(A={id:"documentation",group:"Menu",leftSection:N,label:"Documentation",keywords:C,onClick:()=>{n.push("https://clickhouse.com/docs/use-cases/observability/clickstack")}},r[33]=n,r[34]=A):A=r[34],r[35]===Symbol.for("react.memo_cache_sentinel")?(w=["account","profile"],r[35]=w):w=r[35],r[36]!==n?(z=()=>{n.push("https://hyperdx.io/register")},r[36]=n,r[37]=z):z=r[37],r[38]!==l||r[39]!==z?(I={id:"cloud",group:"Menu",leftSection:l,label:"HyperDX Cloud",description:"Ready to use HyperDX Cloud? Get started for free.",keywords:w,onClick:z},r[38]=l,r[39]=z,r[40]=I):I=r[40],s.push(c,h,x,j,_,y,k,A,I),r[1]=i,r[2]=o,r[3]=l,r[4]=n,r[5]=s}else s=r[5];let c=s;return r[41]!==c?(t={actions:c},r[41]=c,r[42]=t):t=r[42],t})();return l[0]===Symbol.for("react.memo_cache_sentinel")?(s={leftSection:(0,a.jsx)(F.A,{size:16}),placeholder:"Search"},l[0]=s):s=l[0],l[1]===Symbol.for("react.memo_cache_sentinel")?(t=[],l[1]=t):t=l[1],l[2]!==i?(r=(0,a.jsx)(ss.L,{shortcut:"mod + K",searchProps:s,nothingFound:"Nothing found",zIndex:200001,tagsToIgnore:t,highlightQuery:!0,actions:i,limit:7,scrollable:!0}),l[2]=i,l[3]=r):r=l[3],l[4]!==o||l[5]!==r?(n=(0,a.jsxs)("div",{className:"notranslate",translate:"no",children:[o,r]}),l[4]=o,l[5]=r,l[6]=n):n=l[6],n},sc=e=>(0,a.jsx)(si,{children:(0,a.jsxs)("div",{className:G.Ju?"app-layout-with-banner":"app-layout",children:[G.Ju&&(0,a.jsx)(o.a,{bg:"var(--color-text-primary)",children:(0,a.jsx)(i.o,{children:(0,a.jsxs)(c.E,{py:"xs",size:"sm",c:"var(--color-text-inverted)",children:["This is not recommended for production use and is lacking core ClickStack features such as alerts and saved searches. For a proper experience, visit the"," ",(0,a.jsx)("strong",{children:(0,a.jsx)(l(),{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started",target:"_blank",rel:"noopener norefe\x03er",children:"ClickStack Docs"})})]})})}),(0,a.jsxs)("div",{className:"d-flex",style:{height:"100%",overflow:"hidden"},children:[(0,a.jsx)(e4,{}),(0,a.jsx)("div",{className:"w-100 min-w-0",style:{minWidth:0,overflow:"auto"},children:e})]})]})})},87095:(e,s,t)=>{"use strict";t.d(s,{CI:()=>x,PY:()=>c,V3:()=>u,c_:()=>b,rs:()=>m});var a=t(75155),r=t(12482),n=t(93251),l=t(16932),o=t(6876),i=t(98142);function c(){let e,s=(0,a.c)(1);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:["saved-search"],queryFn:d},s[0]=e):e=s[0],(0,r.I)(e)}async function d(){return i.VO?[]:(0,o.Q5)("saved-search").json()}function m(e,s){let t,n,l,o,i=(0,a.c)(8),{id:c}=e;i[0]!==s?(t=void 0===s?{}:s,i[0]=s,i[1]=t):t=i[1];let d=t;return i[2]===Symbol.for("react.memo_cache_sentinel")?(n=["saved-search"],i[2]=n):n=i[2],i[3]!==c?(l=e=>e.find(e=>e.id===c),i[3]=c,i[4]=l):l=i[4],i[5]!==d||i[6]!==l?(o={queryKey:n,queryFn:h,select:l,...d},i[5]=d,i[6]=l,i[7]=o):o=i[7],(0,r.I)(o)}function h(){return i.VO?[]:(0,o.Q5)("saved-search").json()}function u(){let e,s=(0,a.c)(2),t=(0,n.jE)();return s[0]!==t?(e={mutationFn:p,onSuccess:()=>{t.invalidateQueries({queryKey:["saved-search"]})}},s[0]=t,s[1]=e):e=s[1],(0,l.n)(e)}function p(e){return(0,o.Q5)("saved-search",{method:"POST",json:e}).json()}function x(){let e,s=(0,a.c)(2),t=(0,n.jE)();return s[0]!==t?(e={mutationFn:f,onSuccess:()=>{t.invalidateQueries({queryKey:["saved-search"]})}},s[0]=t,s[1]=e):e=s[1],(0,l.n)(e)}function f(e){return(0,o.Q5)(`saved-search/${e.id}`,{method:"PATCH",json:e}).json()}function b(){let e,s=(0,a.c)(2),t=(0,n.jE)();return s[0]!==t?(e={mutationFn:j,onSuccess:()=>{t.invalidateQueries({queryKey:["saved-search"]})}},s[0]=t,s[1]=e):e=s[1],(0,l.n)(e)}function j(e){return(0,o.Q5)(`saved-search/${e}`,{method:"DELETE"}).json()}},97344:(e,s,t)=>{"use strict";t.d(s,{L9:()=>b,MZ:()=>v,mG:()=>x,pc:()=>g,vY:()=>u});var a=t(75155),r=t(55729),n=t(41038),l=t(60665),o=t(93251),i=t(16932),c=t(12482),d=t(92917),m=t(6876),h=t(98142);function u(){let e,s=(0,a.c)(2),t=(0,o.jE)();return s[0]!==t?(e={mutationFn:p,onSuccess:()=>{t.invalidateQueries({queryKey:["dashboards"]})}},s[0]=t,s[1]=e):e=s[1],(0,i.n)(e)}async function p(e){await (0,m.Q5)(`dashboards/${e.id}`,{method:"PATCH",json:e})}function x(){let e,s=(0,a.c)(2),t=(0,o.jE)();return s[0]!==t?(e={mutationFn:f,onSuccess:()=>{t.invalidateQueries({queryKey:["dashboards"]})}},s[0]=t,s[1]=e):e=s[1],(0,i.n)(e)}async function f(e){return(0,m.Q5)("dashboards",{method:"POST",json:e}).json()}function b(){let e,s=(0,a.c)(1);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:["dashboards"],queryFn:j},s[0]=e):e=s[0],(0,c.I)(e)}async function j(){return h.VO?[]:(0,m.Q5)("dashboards").json()}function v(e){let s,t,o,i,m,h,p,x,f,b=(0,a.c)(23),{dashboardId:j,presetConfig:v}=e;b[0]!==v?(s=v??{id:"",name:"My New Dashboard",tiles:[],tags:[]},b[0]=v,b[1]=s):s=b[1];let g=s;b[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,n.os)(),b[2]=t):t=b[2];let[y,S]=(0,n.ZA)("dashboard",t),k=u();b[3]===Symbol.for("react.memo_cache_sentinel")?(o=["dashboards"],b[3]=o):o=b[3],b[4]!==j?(i=e=>e.find(e=>e.id===j),b[4]=j,b[5]=i):i=b[5];let N=null!=j;b[6]!==i||b[7]!==N?(m={queryKey:o,queryFn:_,select:i,enabled:N},b[6]=i,b[7]=N,b[8]=m):m=b[8];let{data:C,isFetching:A}=(0,c.I)(m),[w,z]=(0,r.useState)(!1),I=null==j;e:{if(I){h=y??g;break e}h=C}let M=h;b[9]!==I||b[10]!==S||b[11]!==k?(p=(e,s,t)=>{if(!I)return z(!0),k.mutate(e,{onSuccess:()=>{z(!1),s?.()},onError:e=>{z(!1),l.$e.show({color:"red",title:"Unable to save dashboard",message:e.message.slice(0,100),autoClose:5e3}),t?.()}});S(e),s?.()},b[9]=I,b[10]=S,b[11]=k,b[12]=p):p=b[12];let E=p;b[13]!==M||b[14]!==j?(x=null!=j?j:(0,d.s5)(`${JSON.stringify(M)}`),b[13]=M,b[14]=j,b[15]=x):x=b[15];let D=x;return b[16]!==M||b[17]!==D||b[18]!==A||b[19]!==I||b[20]!==w||b[21]!==E?(f={dashboard:M,setDashboard:E,dashboardHash:D,isLocalDashboard:I,isFetching:A,isSetting:w},b[16]=M,b[17]=D,b[18]=A,b[19]=I,b[20]=w,b[21]=E,b[22]=f):f=b[22],f}function _(){return(0,m.Q5)("dashboards").json()}function g(){let e,s=(0,a.c)(2),t=(0,o.jE)();return s[0]!==t?(e={mutationFn:y,onSuccess:()=>{t.invalidateQueries({queryKey:["dashboards"]})}},s[0]=t,s[1]=e):e=s[1],(0,i.n)(e)}function y(e){return(0,m.Q5)(`dashboards/${e}`,{method:"DELETE"}).json()}}}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6514],{43524:e=>{e.exports={navGhost:"AppNav_navGhost__eHfjO",nav:"AppNav_nav__aQ9CO",navFixed:"AppNav_navFixed__ZeKhY",navCollapsed:"AppNav_navCollapsed__lycT3",navLinks:"AppNav_navLinks__3ZFJ_",navItem:"AppNav_navItem__qtSLL",navItemIcon:"AppNav_navItemIcon__y86wX",header:"AppNav_header__2JQvX",headerExpanded:"AppNav_headerExpanded__yEAuu",headerCollapsed:"AppNav_headerCollapsed__qMGd8",logoLink:"AppNav_logoLink__FMsYw",logoIconWrapper:"AppNav_logoIconWrapper__OelwF",collapseButton:"AppNav_collapseButton__FDYcm",collapseButtonCollapsed:"AppNav_collapseButtonCollapsed__1j3qp",scrollContainer:"AppNav_scrollContainer__UQQtv",footer:"AppNav_footer__dHa_L",navItemActive:"AppNav_navItemActive__GN7le",navItemContent:"AppNav_navItemContent__YlStp",navItemBadge:"AppNav_navItemBadge__6VqCa",navItemToggle:"AppNav_navItemToggle__tfzhc",subMenu:"AppNav_subMenu__sdt7n",subMenuItem:"AppNav_subMenuItem___6SwX",subMenuItemActive:"AppNav_subMenuItemActive__jQhrk",groupLabel:"AppNav_groupLabel__rOCDt",groupDragOver:"AppNav_groupDragOver__7ZKjA",searchInput:"AppNav_searchInput__tW1sl",shortcutHint:"AppNav_shortcutHint__McknQ",shortcutHintCtrl:"AppNav_shortcutHintCtrl__nSE1_",emptyMessage:"AppNav_emptyMessage__s2J5J",userMenu:"AppNav_userMenu__7x8UA",userMenuCollapsed:"AppNav_userMenuCollapsed__YtJQm",userMenuInfo:"AppNav_userMenuInfo__GUaPj",userMenuName:"AppNav_userMenuName__7bXub",userMenuTeam:"AppNav_userMenuTeam__qL_0p",helpButton:"AppNav_helpButton__i5B5h",helpButtonCollapsed:"AppNav_helpButtonCollapsed__dXx2R",onboardingSection:"AppNav_onboardingSection__eOrci",scrollbar:"AppNav_scrollbar__YjKyG",thumb:"AppNav_thumb__IzI2H"}},56514:(e,s,t)=>{"use strict";t.d(s,{D:()=>sc});var a=t(6029),r=t(55729),n=t(82203),l=t.n(n),o=t(60481),i=t(53061),c=t(43517),d=t(75155),m=t(81278),h=t.n(m),u=t(75828),p=t.n(u),x=t(1885),f=t(6065),b=t(16162),j=t.n(b),v=t(82641),_=t(25062),g=t(20158),y=t(96061),S=t(22599),k=t(3635),N=t(43085),C=t(76013),A=t(94720),w=t(53993),z=t(22175),I=t(78341),M=t(71991),E=t(87104),D=t(86705),T=t(85318),L=t(16120),F=t(41279),O=t(70114),P=t(23474),W=t(53780),H=t(56447),Q=t(45519),B=t(46661),Y=t(95316),q=t(6876),G=t(98142),V=t(97344),$=t(27166),K=t(36517),U=t(74805),R=t(65234);function J(e){let s,t,n,l,o,i=(0,d.c)(12),{text:c,className:m,children:h}=e,[u,x]=(0,r.useState)(!1);return i[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{x(!0),setTimeout(()=>x(!1),2e3)},i[0]=s):s=i[0],i[1]!==m?(t=p()("text-decoration-none",m),i[1]=m,i[2]=t):t=i[2],i[3]!==h||i[4]!==u?(n=h({isCopied:u}),i[3]=h,i[4]=u,i[5]=n):n=i[5],i[6]!==t||i[7]!==n?(l=(0,a.jsx)(_.$,{variant:"secondary",p:0,className:t,size:"xs",fullWidth:!0,children:n}),i[6]=t,i[7]=n,i[8]=l):l=i[8],i[9]!==l||i[10]!==c?(o=(0,a.jsx)(R.CopyToClipboard,{text:c,onCopy:s,children:l}),i[9]=l,i[10]=c,i[11]=o):o=i[11],o}function X(e){let s,t,r=(0,d.c)(6),{label:n,value:l}=e,o=void 0===n?"":n;return r[0]!==o||r[1]!==l?(s=e=>{let{isCopied:s}=e;return(0,a.jsxs)("div",{className:p()("d-flex w-100 py-2 px-2 gap-2 rounded align-items-center justify-content-between cursor-pointer",{"text-success":s}),children:[(0,a.jsxs)("div",{className:"fs-7 d-flex text-truncate align-items-center",children:[o,(0,a.jsx)("pre",{className:"m-0 user-select-all d-inline text-truncate fs-7 lh-1",children:l})]}),(0,a.jsxs)(k.Y,{gap:2,wrap:"nowrap",className:p()("fs-7 text-end"),children:[s?(0,a.jsx)(K.A,{size:14}):(0,a.jsx)(U.A,{size:14}),s?"Copied!":"Copy"]})]})},r[0]=o,r[1]=l,r[2]=s):s=r[2],r[3]!==s||r[4]!==l?(t=(0,a.jsx)(J,{text:l,className:"d-flex mx-auto p-0 w-100",children:s}),r[3]=s,r[4]=l,r[5]=t):t=r[5],t}function Z(e){let s,t,r,n,l,o,i,c,m,h,u,p,x,f,b,j,v,g,y=(0,d.c)(25),{show:S,onHide:k}=e,{data:N}=q.Ay.useTeam();return y[0]!==N?(s=null!=N&&(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(X,{label:(0,a.jsxs)("span",{className:"text-muted me-2",children:["Your Ingestion API Key:"," "]}),value:N.apiKey})}),y[0]=N,y[1]=s):s=y[1],y[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.jsx)("div",{className:"fs-7 mb-4",children:"Click on a link below to view installation instructions for your application."}),r=(0,a.jsx)("div",{className:"fs-6 mb-2",children:"Backend"}),y[2]=t,y[3]=r):(t=y[2],r=y[3]),y[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/nodejs",target:"_blank",rel:"noreferrer",className:"text-link",children:"Node.js"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),y[4]=n):n=y[4],y[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/golang",target:"_blank",rel:"noreferrer",className:"text-link",children:"Go"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),y[5]=l):l=y[5],y[6]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/python",target:"_blank",rel:"noreferrer",className:"text-link",children:"Python"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),y[6]=o):o=y[6],y[7]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/java",target:"_blank",rel:"noreferrer",className:"text-link",children:"Java"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),y[7]=i):i=y[7],y[8]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/elixir",target:"_blank",rel:"noreferrer",className:"text-link",children:"Elixir"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs)"})]}),y[8]=c):c=y[8],y[9]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/ruby-on-rails",target:"_blank",rel:"noreferrer",className:"text-link",children:"Ruby on Rails"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Traces)"})]}),m=(0,a.jsx)("div",{className:"fs-6 mb-2 mt-4",children:"Platform"}),y[9]=m,y[10]=h):(m=y[9],h=y[10]),y[11]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/ingesting-data/kubernetes",target:"_blank",rel:"noreferrer",className:"text-link",children:"Kubernetes"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Metrics)"})]}),p=(0,a.jsx)("div",{className:"fs-6 mb-2 mt-4",children:"Browser"}),y[11]=u,y[12]=p):(u=y[11],p=y[12]),y[13]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/sdks/browser",target:"_blank",rel:"noreferrer",className:"text-link",children:"JavaScript/TypeScript"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),f=(0,a.jsx)("div",{className:"fs-6 mb-2 mt-4",children:"Data Collector"}),y[13]=x,y[14]=f):(x=y[13],f=y[14]),y[15]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("a",{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/ingesting-data/opentelemetry#sending-otel-data",target:"_blank",rel:"noreferrer",className:"text-link",children:"OpenTelemetry"}),(0,a.jsx)("span",{className:"ms-2 text-muted",children:"(Logs + Traces)"})]}),y[15]=b):b=y[15],y[16]!==k?(j=(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(_.$,{variant:"secondary",onClick:()=>k(),children:"Cancel"})}),y[16]=k,y[17]=j):j=y[17],y[18]!==s||y[19]!==j?(v=(0,a.jsxs)("div",{className:"inter",children:[s,t,r,n,l,o,i,c,h,m,u,p,x,f,b,j]}),y[18]=s,y[19]=j,y[20]=v):v=y[20],y[21]!==k||y[22]!==S||y[23]!==v?(g=(0,a.jsx)($.a,{opened:S,onClose:k,title:"Start Sending Telemetry",size:"lg",centered:!0,children:v}),y[21]=k,y[22]=S,y[23]=v,y[24]=g):g=y[24],g}var ee=t(34834),es=t(62801),et=t(8737),ea=t(58333),er=t(90515),en=t(88992),el=t(91021),eo=t(93108),ei=t(81973),ec=t(92917);let ed=Date.now(),em=e=>{let s,t,r,n,l,o,i,m,h,u,p,x,f,b,j,v,_,g,y,A,w,z,I,M=(0,d.c)(64),{onAddDataClick:E}=e,[D,T]=(0,ec.Mj)("onboardingChecklistCollapsed",!1),{data:L,isLoading:F}=q.Ay.useTeam(),{data:O,isLoading:W}=(0,eo.ZY)(),{data:H,isLoading:Q}=(0,ei.oE)();e:{let e,t;if(!L?.createdAt){s=!1;break e}M[0]===Symbol.for("react.memo_cache_sentinel")?(e=new Date(ed-2592e5),M[0]=e):e=M[0];let a=e;M[1]!==L.createdAt?(t=new Date(L.createdAt),M[1]=L.createdAt,M[2]=t):t=M[2],s=t>a}let B=s,Y=!1===F&&B,G=O?.[0];M[3]!==G?.id||M[4]!==H?(t=H?.filter(e=>e.connection===G?.id),M[3]=G?.id,M[4]=H,M[5]=t):t=M[5];let V=t;M[6]===Symbol.for("react.memo_cache_sentinel")?(r={databaseName:"system",tableName:"tables"},M[6]=r):r=M[6],M[7]!==V?(n=V??[],M[7]=V,M[8]=n):n=M[8],M[9]!==n?(l=n.map(eh),M[9]=n,M[10]=l):l=M[10];let $=G?.id??"";M[11]!==l||M[12]!==$?(o={select:"sum(total_rows) as total_rows",from:r,where:"",filtersLogicalOperator:"OR",filters:l,connection:$},M[11]=l,M[12]=$,M[13]=o):o=M[13];let K=o;M[14]!==Y?(i={enabled:Y},M[14]=Y,M[15]=i):i=M[15];let{data:U,isLoading:R}=(0,el.HD)(K,i),J=U?.data?.[0]?.total_rows>0,X=O&&O.length>0,Z=H&&H.length>0,et=X??!1,er=X?void 0:"/team";M[16]!==W||M[17]!==er||M[18]!==et?(m={id:"connection",title:"Connect to ClickHouse",description:"Set up your database connection",isComplete:et,isLoading:W,href:er},M[16]=W,M[17]=er,M[18]=et,M[19]=m):m=M[19];let en=Z??!1,em=Z?void 0:"/team";M[20]!==Q||M[21]!==en||M[22]!==em?(h={id:"sources",title:"Create Data Sources",description:"Configure where your data comes from",isComplete:en,isLoading:Q,href:em},M[20]=Q,M[21]=en,M[22]=em,M[23]=h):h=M[23];let ex=J?void 0:E;M[24]!==J||M[25]!==R||M[26]!==ex?(u={id:"data",title:"Add Data",description:"Start sending logs, metrics, or traces",isComplete:J,isLoading:R,onClick:ex},M[24]=J,M[25]=R,M[26]=ex,M[27]=u):u=M[27],M[28]!==m||M[29]!==h||M[30]!==u?(p=[m,h,u],M[28]=m,M[29]=h,M[30]=u,M[31]=p):p=M[31];let ef=p;M[32]!==ef?(x=ef.filter(eu),M[32]=ef,M[33]=x):x=M[33];let eb=x.length,ej=eb===ef.length;if(!Y)return null;let ev=D?0:"xs";M[34]===Symbol.for("react.memo_cache_sentinel")?(f=(0,a.jsx)(c.E,{size:"sm",fw:"bold",children:"Get Started"}),M[34]=f):f=M[34];let e_=ej?"green":"blue";M[35]!==eb||M[36]!==ef.length||M[37]!==e_?(b=(0,a.jsxs)(k.Y,{gap:"xs",align:"center",children:[f,(0,a.jsxs)(N.E,{size:"xs",color:e_,variant:"light",children:[eb,"/",ef.length]})]}),M[35]=eb,M[36]=ef.length,M[37]=e_,M[38]=b):b=M[38],M[39]!==D||M[40]!==T?(j=()=>T(!D),M[39]=D,M[40]=T,M[41]=j):j=M[41],M[42]!==D?(v=D?(0,a.jsx)(P.A,{size:12}):(0,a.jsx)(ea.A,{size:12}),M[42]=D,M[43]=v):v=M[43],M[44]!==j||M[45]!==v?(_=(0,a.jsx)(C.M,{variant:"subtle",size:"sm",onClick:j,children:v}),M[44]=j,M[45]=v,M[46]=_):_=M[46],M[47]!==ev||M[48]!==b||M[49]!==_?(g=(0,a.jsxs)(k.Y,{justify:"space-between",align:"center",mb:ev,children:[b,_]}),M[47]=ev,M[48]=b,M[49]=_,M[50]=g):g=M[50];let eg=!D;return M[51]!==ef?(y=ef.map(ep),M[51]=ef,M[52]=y):y=M[52],M[53]!==ej?(A=ej&&(0,a.jsx)(k.Y,{justify:"center",mt:"xs",p:"xs",children:(0,a.jsx)(c.E,{size:"sm",c:"green",fw:"bold",children:"\uD83C\uDF89 Great job! You're all set up."})}),M[53]=ej,M[54]=A):A=M[54],M[55]!==y||M[56]!==A?(w=(0,a.jsxs)(ee.B,{gap:"xs",children:[y,A]}),M[55]=y,M[56]=A,M[57]=w):w=M[57],M[58]!==eg||M[59]!==w?(z=(0,a.jsx)(S.S,{in:eg,children:w}),M[58]=eg,M[59]=w,M[60]=z):z=M[60],M[61]!==g||M[62]!==z?(I=(0,a.jsxs)(es.Z,{withBorder:!0,p:"xs",mb:"sm",radius:"md",children:[g,z]}),M[61]=g,M[62]=z,M[63]=I):I=M[63],I};function eh(e){return{type:"sql",condition:`table = '${e.from.tableName}' AND database = '${e.from.databaseName}'`}}function eu(e){return e.isComplete}function ep(e,s){let t=(0,a.jsxs)(k.Y,{gap:"sm",align:"center",w:"100%",children:[(0,a.jsx)("div",{style:{width:20,height:20,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",border:e.isComplete?"1px solid var(--color-text-brand)":"1px solid var(--color-border)",backgroundColor:e.isComplete?"transparent":"var(--color-bg-muted)",color:e.isComplete?"var(--color-text-brand)":"var(--color-text)",flexShrink:0},children:e.isLoading?(0,a.jsx)(A.a,{size:"xs",color:"gray"}):e.isComplete?(0,a.jsx)(er.A,{size:16,style:{fontSize:12,fontWeight:"bold",paddingTop:1}}):(0,a.jsx)(c.E,{size:"xs",fw:"bold",children:s+1})}),(0,a.jsxs)("div",{style:{flex:1},children:[(0,a.jsx)(c.E,{size:"sm",fw:"500",style:{textDecoration:e.isComplete?"line-through":"none",opacity:e.isComplete?.8:1},children:e.title}),(0,a.jsx)(c.E,{size:"xs",c:"dimmed",children:e.description})]}),!e.isComplete&&(e.href||e.onClick)&&(0,a.jsx)(en.A,{size:12,style:{color:"var(--color-text-muted)"}})]});return e.href&&!e.isComplete?(0,a.jsx)(l(),{href:e.href,style:{textDecoration:"none"},children:(0,a.jsx)(et.N,{w:"100%",py:"xs",style:{borderRadius:6,cursor:"pointer",":hover":{backgroundColor:"var(--color-bg-muted)"}},children:t})},e.id):e.onClick&&!e.isComplete?(0,a.jsx)(et.N,{w:"100%",py:"xs",onClick:e.onClick,style:{borderRadius:6,cursor:"pointer",":hover":{backgroundColor:"var(--color-bg-hover)"}},children:t},e.id):(0,a.jsx)("div",{style:{},children:t},e.id)}var ex=t(87095),ef=t(36600),eb=t(92789),ej=t(38206),ev=t(87989),e_=t(63085),eg=t(97787),ey=t(23994),eS=t(31071),ek=t(58202),eN=t(57820);let eC=[{label:"Dark",value:"dark"},{label:"Light",value:"light"}],eA=Object.values(ek.Zj).map(e=>({label:e.displayName,value:e.name})),ew=e=>{let s,t,r,n,l,o,i=(0,d.c)(12),{label:m,description:h,children:u}=e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(s={flex:1},i[0]=s):s=i[0],i[1]!==h?(t=h&&(0,a.jsx)(c.E,{size:"xs",mt:2,children:h}),i[1]=h,i[2]=t):t=i[2],i[3]!==m||i[4]!==t?(r=(0,a.jsxs)("div",{style:s,children:[m,t]}),i[3]=m,i[4]=t,i[5]=r):r=i[5],i[6]===Symbol.for("react.memo_cache_sentinel")?(n={flex:.8},i[6]=n):n=i[6],i[7]!==u?(l=(0,a.jsx)("div",{style:n,children:u}),i[7]=u,i[8]=l):l=i[8],i[9]!==r||i[10]!==l?(o=(0,a.jsxs)(k.Y,{align:"center",justify:"space-between",children:[r,l]}),i[9]=r,i[10]=l,i[11]=o):o=i[11],o},ez=e=>{let s,t,r,n,l,o,i,m,h,u,p,x,f,b,j=(0,d.c)(37),{opened:v,onClose:_}=e,{userPreferences:g,setUserPreference:y}=(0,eN.HW)(),{themeName:S,setTheme:C,isDev:A}=(0,ef.o3)();return j[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:"Preferences"}),(0,a.jsx)(c.E,{size:"xs",mt:6,children:"Customize your experience"})]}),j[0]=s):s=j[0],j[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.jsx)(eb.c,{label:"Date and Time",labelPosition:"left"}),j[1]=t):t=j[1],j[2]!==y?(r=e=>e&&y({timeFormat:e}),j[2]=y,j[3]=r):r=j[3],j[4]===Symbol.for("react.memo_cache_sentinel")?(n=["12h","24h"],j[4]=n):n=j[4],j[5]!==r||j[6]!==g.timeFormat?(l=(0,a.jsx)(ew,{label:"Time format",children:(0,a.jsx)(ej.l,{value:g.timeFormat,onChange:r,data:n,allowDeselect:!1})}),j[5]=r,j[6]=g.timeFormat,j[7]=l):l=j[7],j[8]!==y?(o=e=>y({isUTC:e.currentTarget.checked}),j[8]=y,j[9]=o):o=j[9],j[10]!==o||j[11]!==g.isUTC?(i=(0,a.jsx)(ew,{label:"Use UTC time",children:(0,a.jsx)(ev.d,{size:"md",onLabel:"UTC",checked:g.isUTC,onChange:o})}),j[10]=o,j[11]=g.isUTC,j[12]=i):i=j[12],j[13]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(eb.c,{label:(0,a.jsxs)(k.Y,{align:"center",gap:"xs",children:["Appearance",(0,a.jsx)(N.E,{variant:"light",fw:"normal",size:"xs",children:"Experimental"})]}),labelPosition:"left",mt:"sm"}),j[13]=m):m=j[13],j[14]!==y?(h=e=>e&&y({colorMode:e}),j[14]=y,j[15]=h):h=j[15],j[16]!==h||j[17]!==g.colorMode?(u=(0,a.jsx)(ew,{label:"Color Mode",description:"Switch between light and dark mode",children:(0,a.jsx)(ej.l,{value:g.colorMode,onChange:h,data:eC,allowDeselect:!1})}),j[16]=h,j[17]=g.colorMode,j[18]=u):u=j[18],j[19]!==A||j[20]!==C||j[21]!==S?(p=A&&(0,a.jsx)(ew,{label:(0,a.jsxs)(k.Y,{gap:"xs",children:["Brand Theme",(0,a.jsx)(e_.m,{label:"Only available in local/dev mode. Changes logo, colors, and branding.",multiline:!0,w:220,children:(0,a.jsx)(N.E,{variant:"light",color:"violet",fw:"normal",size:"xs",leftSection:(0,a.jsx)(ey.A,{size:10}),children:"Dev Only"})})]}),description:"Switch between HyperDX and ClickStack branding",children:(0,a.jsx)(ej.l,{value:S,onChange:e=>{e&&(0,ek.tc)(e)&&C(e)},data:eA,allowDeselect:!1})}),j[19]=A,j[20]=C,j[21]=S,j[22]=p):p=j[22],j[23]!==y||j[24]!==S||j[25]!==g.font?(x="clickstack"!==S&&(0,a.jsx)(ew,{label:"Font",description:"If using custom font, make sure it's installed on your system",children:(0,a.jsx)(eg.j,{value:g.font,filter:eI,onChange:e=>y({font:e}),data:eS.Al})}),j[23]=y,j[24]=S,j[25]=g.font,j[26]=x):x=j[26],j[27]!==u||j[28]!==p||j[29]!==x||j[30]!==l||j[31]!==i?(f=(0,a.jsxs)(ee.B,{gap:"lg",children:[t,l,i,m,u,p,x]}),j[27]=u,j[28]=p,j[29]=x,j[30]=l,j[31]=i,j[32]=f):f=j[32],j[33]!==_||j[34]!==v||j[35]!==f?(b=(0,a.jsx)($.a,{title:s,size:"lg",padding:"lg",keepMounted:!1,opened:v,onClose:_,children:f}),j[33]=_,j[34]=v,j[35]=f,j[36]=b):b=j[36],b};function eI(e){let{options:s}=e;return s}var eM=t(66992),eE=t(56513),eD=t(22623),eT=t(89533),eL=t(62861),eF=t(92334),eO=t(21604),eP=t(1146),eW=t(93938),eH=t(43524),eQ=t.n(eH);let eB=r.createContext({isCollapsed:!1,pathname:"/"}),eY=()=>{let e,s,t=(0,d.c)(2);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("span",{className:"fs-8",children:"Ready to deploy on ClickHouse Cloud?"}),t[0]=e):e=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsxs)("div",{className:"my-3 bg-muted rounded p-2 text-center",children:[e,(0,a.jsx)("div",{className:"mt-2 mb-2",children:(0,a.jsx)(_.$,{variant:"primary",size:"xs",component:"a",href:"https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started#deploy-with-clickhouse-cloud",target:"_blank",rel:"noopener noreferrer",children:"Get Started for Free"})})]}),t[1]=s):s=t[1],s},eq=e=>{let s,t,n,o,i,m,h,u,x,f,b,j,v,_=(0,d.c)(29),{userName:g,teamName:y,logoutUrl:S,onClickUserPreferences:N}=e,C=void 0===g?"User":g,{isCollapsed:A}=r.useContext(eB);_[0]!==C?(s=C.split(" ").map(e$).join(""),_[0]=C,_[1]=s):s=_[1];let w=s,z=G.VO?"Local mode":C;return _[2]===Symbol.for("react.memo_cache_sentinel")?(t={transition:"fade-up"},_[2]=t):t=_[2],_[3]!==A?(n=p()(eQ().userMenu,{[eQ().userMenuCollapsed]:A}),_[3]=A,_[4]=n):n=_[4],_[5]!==w?(o=(0,a.jsx)(eM.e,{size:"sm",radius:"xl",color:"gray",children:w}),_[5]=w,_[6]=o):o=_[6],_[7]!==z||_[8]!==A||_[9]!==y?(i=!A&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e_.m,{fz:"xs",color:"gray",ta:"center",label:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("strong",{children:z}),(0,a.jsx)("br",{}),y]}),openDelay:250,children:(0,a.jsxs)("div",{className:eQ().userMenuInfo,children:[(0,a.jsx)(c.E,{size:"xs",fw:"bold",lh:1.1,className:eQ().userMenuName,children:z}),(0,a.jsx)(c.E,{size:"xs",className:eQ().userMenuTeam,children:y})]})}),(0,a.jsx)(O.A,{size:14})]}),_[7]=z,_[8]=A,_[9]=y,_[10]=i):i=_[10],_[11]!==o||_[12]!==i?(m=(0,a.jsxs)(k.Y,{gap:"xs",wrap:"nowrap",miw:0,children:[o,i]}),_[11]=o,_[12]=i,_[13]=m):m=_[13],_[14]!==n||_[15]!==m?(h=(0,a.jsx)(eE.W.Target,{children:(0,a.jsx)(eD.t,{"data-testid":"user-menu-trigger",className:n,children:m})}),_[14]=n,_[15]=m,_[16]=h):h=_[16],_[17]===Symbol.for("react.memo_cache_sentinel")?(u=G.VO?(0,a.jsx)(eE.W.Label,{fz:"xs",children:"Local mode"}):(0,a.jsx)(eE.W.Item,{"data-testid":"team-settings-menu-item",href:"/team",component:l(),leftSection:(0,a.jsx)(Y.A,{size:16}),children:"Team Settings"}),_[17]=u):u=_[17],_[18]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsx)(eT.A,{size:16}),_[18]=x):x=_[18],_[19]!==N?(f=(0,a.jsx)(eE.W.Item,{"data-testid":"user-preferences-menu-item",leftSection:x,onClick:N,children:"User Preferences"}),_[19]=N,_[20]=f):f=_[20],_[21]!==S?(b=S&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eE.W.Divider,{}),(0,a.jsx)(eE.W.Item,{"data-testid":"logout-menu-item",color:"red",leftSection:(0,a.jsx)(eL.A,{size:16}),component:l(),href:S,children:"Logout"})]}),_[21]=S,_[22]=b):b=_[22],_[23]!==f||_[24]!==b?(j=(0,a.jsxs)(eE.W.Dropdown,{children:[u,f,b]}),_[23]=f,_[24]=b,_[25]=j):j=_[25],_[26]!==j||_[27]!==h?(v=(0,a.jsxs)(eE.W,{position:"top-start",transitionProps:t,children:[h,j]}),_[26]=j,_[27]=h,_[28]=v):v=_[28],v},eG=e=>{let s,t,n,l,o,i,m,h,u,x,f,b,j,v=(0,d.c)(25),{version:_,onAddDataClick:g}=e,{isCollapsed:y}=r.useContext(eB),[S,N]=(0,I.j)(!1),{close:C}=N;return v[0]!==y?(s=p()(eQ().helpButton,{[eQ().helpButtonCollapsed]:y}),v[0]=y,v[1]=s):s=v[1],v[2]===Symbol.for("react.memo_cache_sentinel")?(t={transition:"fade-up"},v[2]=t):t=v[2],v[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)(eE.W.Target,{children:(0,a.jsx)(et.N,{"data-testid":"help-menu-trigger",w:"100%",children:(0,a.jsx)(k.Y,{align:"center",justify:"center",h:28,children:(0,a.jsx)(eF.A,{size:16})})})}),v[3]=n):n=v[3],v[4]!==_?(l=_&&(0,a.jsxs)(c.E,{size:"xs",component:"span",children:["v",_]}),v[4]=_,v[5]=l):l=v[5],v[6]!==l?(o=(0,a.jsxs)(eE.W.Label,{children:["Help"," ",l]}),v[6]=l,v[7]=o):o=v[7],v[8]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(eE.W.Item,{"data-testid":"documentation-menu-item",href:"https://clickhouse.com/docs/use-cases/observability/clickstack",component:"a",target:"_blank",rel:"noopener noreferrer",leftSection:(0,a.jsx)(eO.A,{size:16}),children:"Documentation"}),v[8]=i):i=v[8],v[9]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(eE.W.Item,{"data-testid":"discord-menu-item",leftSection:(0,a.jsx)(eP.A,{size:16}),component:"a",href:"https://hyperdx.io/discord",target:"_blank",rel:"noopener noreferrer",children:"Discord Community"}),v[9]=m):m=v[9],v[10]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsx)(eW.A,{size:16}),v[10]=h):h=v[10],v[11]!==g?(u=(0,a.jsx)(eE.W.Item,{"data-testid":"setup-instructions-menu-item",leftSection:h,onClick:g,children:"Setup Instructions"}),v[11]=g,v[12]=u):u=v[12],v[13]!==u||v[14]!==o?(x=(0,a.jsxs)(eE.W,{withArrow:!0,position:"top-start",transitionProps:t,defaultOpened:!1,children:[n,(0,a.jsxs)(eE.W.Dropdown,{children:[o,i,m,u]})]}),v[13]=u,v[14]=o,v[15]=x):x=v[15],v[16]!==x||v[17]!==s?(f=(0,a.jsx)(eD.t,{className:s,children:x}),v[16]=x,v[17]=s,v[18]=f):f=v[18],v[19]!==C||v[20]!==S?(b=(0,a.jsx)(Z,{show:S,onHide:C}),v[19]=C,v[20]=S,v[21]=b):b=v[21],v[22]!==f||v[23]!==b?(j=(0,a.jsxs)(a.Fragment,{children:[f,b]}),v[22]=f,v[23]=b,v[24]=j):j=v[24],j},eV=e=>{let s,t,n,o,i,c,m,h,u,x,f,b,j=(0,d.c)(37),{className:v,label:_,icon:g,href:y,isExpanded:S,onToggle:k,isBeta:C}=e,{pathname:A,isCollapsed:w}=r.useContext(eB);j[0]!==y?(s=y.replace(/^\//,"").replace(/\//g,"-")||"home",j[0]=y,j[1]=s):s=j[1];let z=`nav-link-${s}`;j[2]!==k?(t=e=>{e.preventDefault(),e.stopPropagation(),k?.()},j[2]=k,j[3]=t):t=j[3];let I=t;if(j[4]!==v||j[5]!==y||j[6]!==A||j[7]!==z){let e=A===y||A?.startsWith(y+"/");n=l(),o=z,i=y,c=p()(eQ().navItem,{[eQ().navItemActive]:e},v),j[4]=v,j[5]=y,j[6]=A,j[7]=z,j[8]=n,j[9]=o,j[10]=i,j[11]=c}else n=j[8],o=j[9],i=j[10],c=j[11];return j[12]!==g?(m=(0,a.jsx)("span",{className:eQ().navItemIcon,children:g}),j[12]=g,j[13]=m):m=j[13],j[14]!==w||j[15]!==_?(h=!w&&(0,a.jsx)("span",{children:_}),j[14]=w,j[15]=_,j[16]=h):h=j[16],j[17]!==m||j[18]!==h?(u=(0,a.jsxs)("span",{className:eQ().navItemContent,children:[m,h]}),j[17]=m,j[18]=h,j[19]=u):u=j[19],j[20]!==C||j[21]!==w?(x=!w&&C&&(0,a.jsx)(N.E,{size:"xs",color:"blue",variant:"light",className:eQ().navItemBadge,children:"Beta"}),j[20]=C,j[21]=w,j[22]=x):x=j[22],j[23]!==I||j[24]!==w||j[25]!==S||j[26]!==k||j[27]!==z?(f=!w&&k&&(0,a.jsx)("button",{type:"button","data-testid":`${z}-toggle`,className:eQ().navItemToggle,onClick:I,children:S?(0,a.jsx)(ea.A,{size:14,className:"text-muted-hover"}):(0,a.jsx)(P.A,{size:14,className:"text-muted-hover"})}),j[23]=I,j[24]=w,j[25]=S,j[26]=k,j[27]=z,j[28]=f):f=j[28],j[29]!==n||j[30]!==f||j[31]!==o||j[32]!==i||j[33]!==c||j[34]!==u||j[35]!==x?(b=(0,a.jsxs)(n,{"data-testid":o,href:i,className:c,children:[u,x,f]}),j[29]=n,j[30]=f,j[31]=o,j[32]=i,j[33]=c,j[34]=u,j[35]=x,j[36]=b):b=j[36],b};function e$(e){return e[0].toUpperCase()}let eK="Saved Searches",eU="Saved Dashboards",eR=[{id:"chart",label:"Chart Explorer",href:"/chart",icon:(0,a.jsx)(M.A,{size:16})},{id:"alerts",label:"Alerts",href:"/alerts",icon:(0,a.jsx)(E.A,{size:16}),cloudOnly:!0},{id:"sessions",label:"Client Sessions",href:"/sessions",icon:(0,a.jsx)(D.A,{size:16})},{id:"service-map",label:"Service Map",href:"/service-map",icon:(0,a.jsx)(T.A,{size:16}),isBeta:!0}];function eJ(){let e,s,t,r=(0,d.c)(6),n=(0,V.mG)();if(G.VO){let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)(_.$,{component:l(),href:"/dashboards","data-testid":"create-dashboard-button",variant:"transparent",color:"var(--color-text)",py:"0px",px:"sm",fw:400,children:[(0,a.jsx)("span",{className:"pe-2",children:"+"})," Create Dashboard"]}),r[0]=e):e=r[0],e}return r[1]!==n?(e=()=>n.mutate({name:"My Dashboard",tiles:[],tags:[]},{onSuccess:eX}),r[1]=n,r[2]=e):e=r[2],r[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)("span",{className:"pe-2",children:"+"}),r[3]=s):s=r[3],r[4]!==e?(t=(0,a.jsxs)(_.$,{"data-testid":"create-dashboard-button",variant:"transparent",color:"var(--color-text)",py:"0px",px:"sm",fw:400,onClick:e,children:[s," Create Dashboard"]}),r[4]=e,r[5]=t):t=r[5],t}function eX(e){h().push(`/dashboards/${e.id}`)}function eZ(e){let s,t,r,n,l,o,i=(0,d.c)(15),{placeholder:c,value:m,onChange:h,onEnterDown:u}=e;i[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsxs)("div",{className:eQ().shortcutHint,children:[window.navigator.platform?.toUpperCase().includes("MAC")?(0,a.jsx)(L.A,{size:8}):(0,a.jsx)("span",{className:eQ().shortcutHintCtrl,children:"Ctrl"}),"\xa0K"]}),i[0]=s):s=i[0];let p=s;i[1]!==u?(t=e=>{"Enter"===e.key&&u?.()},i[1]=u,i[2]=t):t=i[2];let x=t;return i[3]!==h?(r=e=>h(e.currentTarget.value),i[3]=h,i[4]=r):r=i[4],i[5]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)(F.A,{size:16,className:"ps-1"}),i[5]=n):n=i[5],i[6]!==h||i[7]!==m?(l=m?(0,a.jsx)(g.J,{"data-testid":"nav-search-clear",tabIndex:-1,size:"xs",radius:"xl",onClick:()=>h("")}):p,i[6]=h,i[7]=m,i[8]=l):l=i[8],i[9]!==x||i[10]!==c||i[11]!==r||i[12]!==l||i[13]!==m?(o=(0,a.jsx)(y.p,{"data-testid":"nav-search-input",placeholder:c,value:m,onChange:r,leftSection:n,onKeyDown:x,rightSection:l,mt:8,mb:"sm",size:"xs",variant:"filled",radius:"xl",className:eQ().searchInput}),i[9]=x,i[10]=c,i[11]=r,i[12]=l,i[13]=m,i[14]=o):o=i[14],o}let e1=e=>{let s,t,r,n=(0,d.c)(8),{name:l,collapsed:o,onClick:i}=e;return n[0]!==o?(s=o?(0,a.jsx)(O.A,{size:14}):(0,a.jsx)(P.A,{size:14}),n[0]=o,n[1]=s):s=n[1],n[2]!==l?(t=(0,a.jsx)("div",{children:l}),n[2]=l,n[3]=t):t=n[3],n[4]!==i||n[5]!==s||n[6]!==t?(r=(0,a.jsxs)("div",{className:eQ().groupLabel,onClick:i,children:[s,t]}),n[4]=i,n[5]=s,n[6]=t,n[7]=r):r=n[7],r},e0=e=>{let s,t,n,l,o,i=(0,d.c)(23),{name:c,groups:m,renderLink:h,onDragEnd:u,forceExpandGroups:x}=e,f=void 0!==x&&x,b=`collapsedGroups-${c}`;i[0]===Symbol.for("react.memo_cache_sentinel")?(s={},i[0]=s):s=i[0],i[1]!==b?(t={key:b,defaultValue:s},i[1]=b,i[2]=t):t=i[2];let[j,v]=(0,z.M)(t);i[3]!==j||i[4]!==v?(n=e=>{v({...j,[e]:!j[e]})},i[3]=j,i[4]=v,i[5]=n):n=i[5];let _=n,[g,y]=(0,r.useState)(null);if(i[6]!==j||i[7]!==g||i[8]!==f||i[9]!==m||i[10]!==_||i[11]!==u||i[12]!==h){let e;i[14]!==j||i[15]!==g||i[16]!==f||i[17]!==_||i[18]!==u||i[19]!==h?(e=e=>(0,a.jsxs)("div",{className:p()(g===e.name&&eQ().groupDragOver),onDragOver:s=>{s.preventDefault(),s.dataTransfer.dropEffect="move",y(e.name)},onDragEnd:e=>{e.preventDefault(),u?.(e.target,g),y(null)},children:[(0,a.jsx)(e1,{onClick:()=>_(e.name),name:e.name,collapsed:j[e.name]}),(0,a.jsx)(S.S,{in:!j[e.name]||f,children:e.items.map(e=>h(e))})]},e.name),i[14]=j,i[15]=g,i[16]=f,i[17]=_,i[18]=u,i[19]=h,i[20]=e):e=i[20],l=m.map(e),i[6]=j,i[7]=g,i[8]=f,i[9]=m,i[10]=_,i[11]=u,i[12]=h,i[13]=l}else l=i[13];return i[21]!==l?(o=(0,a.jsx)(a.Fragment,{children:l}),i[21]=l,i[22]=o):o=i[22],o};function e2(e){let s,t,a,n,l=(0,d.c)(14),{items:o,untaggedGroupName:i}=e,c=void 0===i?"Other":i;l[0]!==o?(s=new x.A(o,{keys:["name"],threshold:.2,ignoreLocation:!0}),l[0]=o,l[1]=s):s=l[1];let m=s,[h,u]=(0,r.useState)("");e:{let e;if(""===h){t=o;break e}l[2]!==m||l[3]!==h?(e=m.search(h).map(e5),l[2]=m,l[3]=h,l[4]=e):e=l[4],t=e}let p=t;if(l[5]!==p||l[6]!==c){let e,s={},t=[];p.forEach(e=>{e.tags?.length?e.tags.forEach(t=>{s[t]=s[t]??[],s[t].push(e)}):t.push(e)}),t.length&&(s[c]=t),l[8]!==c?(e=(e,s)=>e.name===c?1:s.name===c?-1:e.name.localeCompare(s.name),l[8]=c,l[9]=e):e=l[9],a=Object.entries(s).map(e3).sort(e),l[5]=p,l[6]=c,l[7]=a}else a=l[7];let f=a;return l[10]!==p||l[11]!==f||l[12]!==h?(n={filteredList:p,groupedFilteredList:f,q:h,setQ:u},l[10]=p,l[11]=f,l[12]=h,l[13]=n):n=l[13],n}function e3(e){let[s,t]=e;return{name:s,items:t}}function e5(e){return e.item}function e4(e){let s,t,n,o,i,c,h,u,x,b,v,_,g,y,M,D,T,L,F,O,P,$,K,U,R,J,X,ee,es,et,ea,er,en,el,eo,ei,ed,eh,eu,ep,eb,ej,ev,e_,eg,ey,eS,ek,eC,eA,ew,eI,eM,eE,eD,eT,eL,eF=(0,d.c)(163),{fixed:eO}=e,eP=void 0!==eO&&eO,eW=(0,ef.PH)();eF[0]===Symbol.for("react.memo_cache_sentinel")?(s={size:22},eF[0]=s):s=eF[0];let eH=(0,ef.GV)(s);eF[1]===Symbol.for("react.memo_cache_sentinel")?(t=[],eF[1]=t):t=eF[1],(0,r.useEffect)(se,t);let{data:e$,isLoading:eX,refetch:e3}=(0,ex.PY)();eF[2]!==e$?(n=e$??[],eF[2]=e$,eF[3]=n):n=eF[3];let e5=n,e4=(0,V.vY)(),ss=(0,ex.CI)(),{data:st,isLoading:sa,refetch:sr}=(0,V.L9)();eF[4]!==st?(o=st??[],eF[4]=st,eF[5]=o):o=eF[5];let sn=o,{pathname:sl,query:so}=(0,m.useRouter)();eF[6]===Symbol.for("react.memo_cache_sentinel")?(i={from:(0,f.withDefault)(f.NumberParam,-1),to:(0,f.withDefault)(f.NumberParam,-1)},eF[6]=i):i=eF[6];let[si]=(0,f.useQueryParams)(i);eF[7]===Symbol.for("react.memo_cache_sentinel")?(c=(0,f.withDefault)(f.StringParam,""),h={updateType:"pushIn",enableBatching:!0},eF[7]=c,eF[8]=h):(c=eF[7],h=eF[8]);let[sc]=(0,f.useQueryParam)("tq",c,h),{data:sd}=q.Ay.useMe();eF[9]===Symbol.for("react.memo_cache_sentinel")?(u={key:"isSearchExpanded",defaultValue:!0},eF[9]=u):u=eF[9];let[sm,sh]=(0,z.M)(u);eF[10]===Symbol.for("react.memo_cache_sentinel")?(x={key:"isDashboardsExpanded",defaultValue:!0},eF[10]=x):x=eF[10];let[su,sp]=(0,z.M)(x),{width:sx}=(0,ec.lW)();eF[11]===Symbol.for("react.memo_cache_sentinel")?(b={key:"isNavCollapsed",defaultValue:!1},eF[11]=b):b=eF[11];let[sf,sb]=(0,z.M)(b),sj=(sx??1e3)<900||sf,sv=sj?50:250;eF[12]!==sl||eF[13]!==so?(v=()=>{j().addAction("user navigated",{route:sl,query:JSON.stringify(so)})},_=[sl,so],eF[12]=sl,eF[13]=so,eF[14]=v,eF[15]=_):(v=eF[14],_=eF[15]),(0,r.useEffect)(v,_),eF[16]!==sd?(g=()=>{null!=sd&&(j().enableAdvancedNetworkCapture(),j().setGlobalAttributes({userEmail:sd.email,userName:sd.name,teamName:sd.team.name}))},y=[sd],eF[16]=sd,eF[17]=g,eF[18]=y):(g=eF[17],y=eF[18]),(0,r.useEffect)(g,y),eF[19]!==e5?(M={items:e5,untaggedGroupName:eK},eF[19]=e5,eF[20]=M):M=eF[20];let{q:s_,setQ:sg,filteredList:sy,groupedFilteredList:sS}=e2(M);eF[21]!==sn?(D={items:sn,untaggedGroupName:eU},eF[21]=sn,eF[22]=D):D=eF[22];let{q:sk,setQ:sN,filteredList:sC,groupedFilteredList:sA}=e2(D);eF[23]===Symbol.for("react.memo_cache_sentinel")?(T={key:"isDashboardsPresetsCollapsed",defaultValue:!1},eF[23]=T):T=eF[23];let[sw,sz]=(0,z.M)(T),sI=(0,r.useRef)(null),sM=(0,r.useRef)(null);eF[24]!==sc||eF[25]!==so.savedSearchId||eF[26]!==si.from||eF[27]!==si.to?(L=e=>(0,a.jsx)(l(),{href:`/search/${e.id}?${new URLSearchParams(-1!=si.from&&-1!=si.to?{from:si.from.toString(),to:si.to.toString(),tq:sc}:{}).toString()}`,tabIndex:0,className:p()(eQ().subMenuItem,e.id===so.savedSearchId&&eQ().subMenuItemActive),title:e.name,draggable:!0,"data-savedsearchid":e.id,children:(0,a.jsxs)(k.Y,{gap:2,children:[(0,a.jsx)("div",{className:"d-inline-block text-truncate",children:e.name}),Array.isArray(e.alerts)&&e.alerts.length>0?e.alerts.some(e9)?(0,a.jsx)(W.A,{size:14,className:"float-end text-danger ms-1","aria-label":"Has Alerts and is in ALERT state"}):(0,a.jsx)(E.A,{size:14,className:"float-end ms-1","aria-label":"Has Alerts and is in OK state"}):null]})},e.id),eF[24]=sc,eF[25]=so.savedSearchId,eF[26]=si.from,eF[27]=si.to,eF[28]=L):L=eF[28];let sE=L;eF[29]!==e5||eF[30]!==e3||eF[31]!==ss?(F=(e,s)=>{if(!e?.dataset.savedsearchid||null==s)return;let t=e5.find(s=>s.id===e.dataset.savedsearchid);t?.tags?.includes(s)||ss.mutate({id:e.dataset.savedsearchid,tags:s===eK?[]:[s]},{onSuccess:()=>{e3()}})},eF[29]=e5,eF[30]=e3,eF[31]=ss,eF[32]=F):F=eF[32];let sD=F;eF[33]!==so.dashboardId?(O=e=>(0,a.jsx)(l(),{href:`/dashboards/${e.id}`,tabIndex:0,className:p()(eQ().subMenuItem,{[eQ().subMenuItemActive]:e.id===so.dashboardId}),draggable:!0,"data-dashboardid":e.id,children:e.name},e.id),eF[33]=so.dashboardId,eF[34]=O):O=eF[34];let sT=O;eF[35]!==sn||eF[36]!==sr||eF[37]!==e4?(P=(e,s)=>{if(!e?.dataset.dashboardid||null==s)return;let t=sn.find(s=>s.id===e.dataset.dashboardid);t?.tags?.includes(s)||e4.mutate({id:e.dataset.dashboardid,tags:s===eU?[]:[s]},{onSuccess:()=>{sr()}})},eF[35]=sn,eF[36]=sr,eF[37]=e4,eF[38]=P):P=eF[38];let sL=P,[sF,sO]=(0,I.j)(!1),{close:sP,open:sW}=sO,{userPreferences:sH}=(0,eN.HW)(),{isUTC:sQ}=sH,[sB,sY]=(0,I.j)(!1),{open:sq,close:sG}=sY;eF[39]!==sj||eF[40]!==sl?($={isCollapsed:sj,pathname:sl},eF[39]=sj,eF[40]=sl,eF[41]=$):$=eF[41],eF[42]!==eP||eF[43]!==sv?(K=eP&&(0,a.jsx)("div",{className:eQ().navGhost,style:{width:sv+1,minWidth:sv+1}}),eF[42]=eP,eF[43]=sv,eF[44]=K):K=eF[44],eF[45]!==sG||eF[46]!==sB?(U=(0,a.jsx)(Z,{show:sB,onHide:sG}),eF[45]=sG,eF[46]=sB,eF[47]=U):U=eF[47],eF[48]!==eP||eF[49]!==sj?(R=p()(eQ().nav,{[eQ().navFixed]:eP,[eQ().navCollapsed]:sj}),eF[48]=eP,eF[49]=sj,eF[50]=R):R=eF[50],eF[51]!==sv?(J={width:sv},X={width:sv},eF[51]=sv,eF[52]=J,eF[53]=X):(J=eF[52],X=eF[53]);let sV=!sj;eF[54]!==sj||eF[55]!==sV?(ee=p()(eQ().header,{[eQ().headerExpanded]:sV,[eQ().headerCollapsed]:sj}),eF[54]=sj,eF[55]=sV,eF[56]=ee):ee=eF[56],eF[57]!==sj||eF[58]!==sQ||eF[59]!==eH||eF[60]!==eW?(es=(0,a.jsx)(l(),{href:"/search",className:eQ().logoLink,children:sj?(0,a.jsx)("div",{className:eQ().logoIconWrapper,children:eH}):(0,a.jsxs)(k.Y,{gap:"xs",align:"center",children:[eW,sQ&&(0,a.jsx)(N.E,{size:"xs",color:"gray",variant:"light",fw:"normal",title:"Showing time in UTC",children:"UTC"})]})}),eF[57]=sj,eF[58]=sQ,eF[59]=eH,eF[60]=eW,eF[61]=es):es=eF[61],eF[62]!==sj?(et=p()(eQ().collapseButton,{[eQ().collapseButtonCollapsed]:sj}),eF[62]=sj,eF[63]=et):et=eF[63],eF[64]!==sb?(ea=()=>sb(e8),eF[64]=sb,eF[65]=ea):ea=eF[65],eF[66]===Symbol.for("react.memo_cache_sentinel")?(er=(0,a.jsx)(H.A,{size:16}),eF[66]=er):er=eF[66],eF[67]!==et||eF[68]!==ea?(en=(0,a.jsx)(C.M,{variant:"transparent",size:"sm",className:et,title:"Collapse/Expand Navigation",onClick:ea,children:er}),eF[67]=et,eF[68]=ea,eF[69]=en):en=eF[69],eF[70]!==ee||eF[71]!==es||eF[72]!==en?(el=(0,a.jsxs)("div",{className:ee,children:[es,en]}),eF[70]=ee,eF[71]=es,eF[72]=en,eF[73]=el):el=eF[73],eF[74]!==X||eF[75]!==el?(eo=(0,a.jsx)("div",{style:X,children:el}),eF[74]=X,eF[75]=el,eF[76]=eo):eo=eF[76],eF[77]!==sv?(ei={width:sv},eF[77]=sv,eF[78]=ei):ei=eF[78],eF[79]===Symbol.for("react.memo_cache_sentinel")?(ed=(0,a.jsx)(Q.A,{size:16}),eF[79]=ed):ed=eF[79],eF[80]!==sm||eF[81]!==sh?(eh=G.VO?void 0:()=>sh(!sm),eF[80]=sm,eF[81]=sh,eF[82]=eh):eh=eF[82],eF[83]!==sm||eF[84]!==eh?(eu=(0,a.jsx)(eV,{label:"Search",icon:ed,href:"/search",isExpanded:sm,onToggle:eh}),eF[83]=sm,eF[84]=eh,eF[85]=eu):eu=eF[85],eF[86]!==sy||eF[87]!==sS||eF[88]!==sD||eF[89]!==sj||eF[90]!==eX||eF[91]!==sm||eF[92]!==e5||eF[93]!==sE||eF[94]!==s_||eF[95]!==sg?(ep=!sj&&(0,a.jsx)(S.S,{in:sm,children:(0,a.jsx)("div",{className:eQ().subMenu,children:eX?(0,a.jsx)(A.a,{variant:"dots",mx:"md",my:"xs",size:"sm"}):!G.VO&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eZ,{placeholder:"Saved Searches",value:s_,onChange:sg,onEnterDown:()=>{sI?.current?.firstChild?.focus?.()}}),0===e5.length&&(0,a.jsx)("div",{className:eQ().emptyMessage,children:"No saved searches"}),(0,a.jsx)("div",{ref:sI,children:(0,a.jsx)(e0,{name:"saved-searches",groups:sS,renderLink:sE,forceExpandGroups:!!s_,onDragEnd:sD})}),s_&&0===sy.length?(0,a.jsxs)("div",{className:eQ().emptyMessage,children:["No results matching ",(0,a.jsx)("i",{children:s_})]}):null]})})}),eF[86]=sy,eF[87]=sS,eF[88]=sD,eF[89]=sj,eF[90]=eX,eF[91]=sm,eF[92]=e5,eF[93]=sE,eF[94]=s_,eF[95]=sg,eF[96]=ep):ep=eF[96],eF[97]===Symbol.for("react.memo_cache_sentinel")?(eb=eR.filter(e7).map(e6),eF[97]=eb):eb=eF[97],eF[98]===Symbol.for("react.memo_cache_sentinel")?(ej=(0,a.jsx)(B.A,{size:16}),eF[98]=ej):ej=eF[98],eF[99]!==su||eF[100]!==sp?(ev=()=>sp(!su),eF[99]=su,eF[100]=sp,eF[101]=ev):ev=eF[101],eF[102]!==su||eF[103]!==ev?(e_=(0,a.jsx)(eV,{label:"Dashboards",href:"/dashboards",icon:ej,isExpanded:su,onToggle:ev}),eF[102]=su,eF[103]=ev,eF[104]=e_):e_=eF[104],eF[105]!==sn||eF[106]!==sk||eF[107]!==sC||eF[108]!==sA||eF[109]!==sL||eF[110]!==sj||eF[111]!==su||eF[112]!==sa||eF[113]!==sw||eF[114]!==sl||eF[115]!==sT||eF[116]!==sN||eF[117]!==sz?(eg=!sj&&(0,a.jsx)(S.S,{in:su,children:(0,a.jsxs)("div",{className:eQ().subMenu,children:[(0,a.jsx)(eJ,{}),sa?(0,a.jsx)(A.a,{variant:"dots",mx:"md",my:"xs",size:"sm"}):!G.VO&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eZ,{placeholder:"Saved Dashboards",value:sk,onChange:sN,onEnterDown:()=>{sM?.current?.firstChild?.focus?.()}}),(0,a.jsx)(e0,{name:"dashboards",groups:sA,renderLink:sT,forceExpandGroups:!!sk,onDragEnd:sL}),0===sn.length&&(0,a.jsx)("div",{className:eQ().emptyMessage,children:"No saved dashboards"}),sk&&0===sC.length?(0,a.jsxs)("div",{className:eQ().emptyMessage,children:["No results matching ",(0,a.jsx)("i",{children:sk})]}):null]}),(0,a.jsx)(e1,{name:"Presets",collapsed:sw,onClick:()=>sz(!sw)}),(0,a.jsxs)(S.S,{in:!sw,children:[(0,a.jsx)(l(),{href:"/clickhouse",tabIndex:0,className:p()(eQ().subMenuItem,{[eQ().subMenuItemActive]:sl.startsWith("/clickhouse")}),"data-testid":"nav-link-clickhouse-dashboard",children:"ClickHouse"}),(0,a.jsx)(l(),{href:"/services",tabIndex:0,className:p()(eQ().subMenuItem,{[eQ().subMenuItemActive]:sl.startsWith("/services")}),"data-testid":"nav-link-services-dashboard",children:"Services"}),G.TS&&(0,a.jsx)(l(),{href:"/kubernetes",tabIndex:0,className:p()(eQ().subMenuItem,{[eQ().subMenuItemActive]:sl.startsWith("/kubernetes")}),"data-testid":"nav-link-k8s-dashboard",children:"Kubernetes"})]})]})}),eF[105]=sn,eF[106]=sk,eF[107]=sC,eF[108]=sA,eF[109]=sL,eF[110]=sj,eF[111]=su,eF[112]=sa,eF[113]=sw,eF[114]=sl,eF[115]=sT,eF[116]=sN,eF[117]=sz,eF[118]=eg):eg=eF[118],eF[119]===Symbol.for("react.memo_cache_sentinel")?(ey=!G.VO&&(0,a.jsx)(eV,{label:"Team Settings",href:"/team",icon:(0,a.jsx)(Y.A,{size:16})}),eF[119]=ey):ey=eF[119],eF[120]!==ei||eF[121]!==eu||eF[122]!==ep||eF[123]!==e_||eF[124]!==eg?(eS=(0,a.jsxs)("div",{style:ei,className:eQ().navLinks,children:[eu,ep,eb,e_,eg,ey]}),eF[120]=ei,eF[121]=eu,eF[122]=ep,eF[123]=e_,eF[124]=eg,eF[125]=eS):eS=eF[125],eF[126]!==sj||eF[127]!==sv||eF[128]!==sq?(ek=!sj&&(0,a.jsxs)("div",{style:{width:sv},className:eQ().onboardingSection,children:[(0,a.jsx)(em,{onAddDataClick:sq}),(0,a.jsx)(eY,{})]}),eF[126]=sj,eF[127]=sv,eF[128]=sq,eF[129]=ek):ek=eF[129],eF[130]!==eS||eF[131]!==ek?(eC=(0,a.jsxs)(w.F,{type:"scroll",scrollbarSize:6,scrollHideDelay:100,classNames:eQ(),className:eQ().scrollContainer,children:[eS,ek]}),eF[130]=eS,eF[131]=ek,eF[132]=eC):eC=eF[132],eF[133]!==sv?(eA={width:sv},eF[133]=sv,eF[134]=eA):eA=eF[134],eF[135]!==sq?(ew=(0,a.jsx)(eG,{version:"2.17.0",onAddDataClick:sq}),eF[135]=sq,eF[136]=ew):ew=eF[136];let s$=sd?.name,sK=sd?.team?.name;return eF[137]!==sW||eF[138]!==s$||eF[139]!==sK?(eI=(0,a.jsx)(eq,{userName:s$,teamName:sK,onClickUserPreferences:sW,logoutUrl:G.VO?null:"/api/logout"}),eF[137]=sW,eF[138]=s$,eF[139]=sK,eF[140]=eI):eI=eF[140],eF[141]!==sd?(eM=sd&&sd.usageStatsEnabled&&(0,a.jsx)("img",{referrerPolicy:"no-referrer-when-downgrade",src:"https://static.scarf.sh/a.png?x-pxid=bbc99c42-7a75-4eee-9fb9-2b161fc4acd6"}),eF[141]=sd,eF[142]=eM):eM=eF[142],eF[143]!==eA||eF[144]!==ew||eF[145]!==eI||eF[146]!==eM?(eE=(0,a.jsxs)("div",{className:eQ().footer,style:eA,children:[ew,eI,eM]}),eF[143]=eA,eF[144]=ew,eF[145]=eI,eF[146]=eM,eF[147]=eE):eE=eF[147],eF[148]!==R||eF[149]!==J||eF[150]!==eo||eF[151]!==eC||eF[152]!==eE?(eD=(0,a.jsxs)("div",{className:R,style:J,children:[eo,eC,eE]}),eF[148]=R,eF[149]=J,eF[150]=eo,eF[151]=eC,eF[152]=eE,eF[153]=eD):eD=eF[153],eF[154]!==sF||eF[155]!==sP?(eT=(0,a.jsx)(ez,{opened:sF,onClose:sP}),eF[154]=sF,eF[155]=sP,eF[156]=eT):eT=eF[156],eF[157]!==$||eF[158]!==K||eF[159]!==U||eF[160]!==eD||eF[161]!==eT?(eL=(0,a.jsxs)(eB.Provider,{value:$,children:[K,U,eD,eT]}),eF[157]=$,eF[158]=K,eF[159]=U,eF[160]=eD,eF[161]=eT,eF[162]=eL):eL=eF[162],eL}function e6(e){return(0,a.jsx)(eV,{label:e.label,href:e.href,icon:e.icon,isBeta:e.isBeta},e.id)}function e7(e){return!e.cloudOnly||!G.VO}function e8(e){return!e}function e9(e){return e.state===v.Or.ALERT}function se(){let e;try{e=window.sessionStorage.getItem("hdx-login-redirect-url")}catch(e){console.error(e)}e&&(window.sessionStorage.removeItem("hdx-login-redirect-url"),h().push(e))}var ss=t(74862),st=t(54134),sa=t(42717),sr=t(9841),sn=t(84479),sl=t(80170),so=t(97702);t(86502);let si=e=>{let s,t,r,n,l=(0,d.c)(7),{children:o}=e,{actions:i}=(()=>{let e,s,t,r=(0,d.c)(43),n=(0,m.useRouter)();r[0]===Symbol.for("react.memo_cache_sentinel")?(e={size:16},r[0]=e):e=r[0];let l=(0,ef.GV)(e),{data:o}=(0,ex.PY)(),{data:i}=q.Ay.useDashboards();if(r[1]!==i||r[2]!==o||r[3]!==l||r[4]!==n){let e,t,c,d,m,h,u,p,x,f,b,j,v,_,g,y,S,k,N,C,A,w,z,I,M=i??[];s=[],(o??[]).forEach(e=>{s.push({id:e.id,group:"Saved searches",leftSection:(0,a.jsx)(st.A,{size:16}),label:e.name,keywords:["search","log","saved"],onClick:()=>{n.push(`/search/${e.id}`)}})}),M.forEach(e=>{s.push({id:e.id,group:"Dashboards",leftSection:(0,a.jsx)(sa.A,{size:16}),label:e.name,keywords:["dashboard"],onClick:()=>{n.push(`/dashboards/${e.id}`)}})}),r[6]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(st.A,{size:16}),r[6]=e):e=r[6],r[7]===Symbol.for("react.memo_cache_sentinel")?(t=["log","events","logs"],r[7]=t):t=r[7],r[8]!==n?(c={id:"search",group:"Menu",leftSection:e,label:"Search",description:"Start a new search",keywords:t,onClick:()=>{n.push("/search")}},r[8]=n,r[9]=c):c=r[9],r[10]===Symbol.for("react.memo_cache_sentinel")?(d=(0,a.jsx)(sr.A,{size:16}),r[10]=d):d=r[10],r[11]===Symbol.for("react.memo_cache_sentinel")?(m=["graph","metrics"],r[11]=m):m=r[11],r[12]!==n?(h={id:"chart-explorer",group:"Menu",leftSection:d,label:"Chart Explorer",description:"Explore your data",keywords:m,onClick:()=>{n.push("/chart")}},r[12]=n,r[13]=h):h=r[13],r[14]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsx)(sn.A,{size:16}),r[14]=u):u=r[14],r[15]===Symbol.for("react.memo_cache_sentinel")?(p=["graph"],r[15]=p):p=r[15],r[16]!==n?(x={id:"new-dashboard",group:"Menu",leftSection:u,label:"New Dashboard",description:"Create a new dashboard",keywords:p,onClick:()=>{n.push("/dashboards")}},r[16]=n,r[17]=x):x=r[17],r[18]===Symbol.for("react.memo_cache_sentinel")?(f=(0,a.jsx)(D.A,{size:16}),r[18]=f):f=r[18],r[19]===Symbol.for("react.memo_cache_sentinel")?(b=["browser","web"],r[19]=b):b=r[19],r[20]!==n?(j={id:"sessions",group:"Menu",leftSection:f,label:"Client Sessions",description:"View client sessions",keywords:b,onClick:()=>{n.push("/sessions")}},r[20]=n,r[21]=j):j=r[21],r[22]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(E.A,{size:16}),r[22]=v):v=r[22],r[23]!==n?(_={id:"alerts",group:"Menu",leftSection:v,label:"Alerts",description:"View and manage alerts",onClick:()=>{n.push("/alerts")}},r[23]=n,r[24]=_):_=r[24],r[25]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(sl.A,{size:16}),r[25]=g):g=r[25],r[26]!==n?(y={id:"service-health",group:"Menu",label:"Service Health",leftSection:g,description:"HTTP, Database and Infrastructure metrics",onClick:()=>{n.push("/services")}},r[26]=n,r[27]=y):y=r[27],r[28]===Symbol.for("react.memo_cache_sentinel")?(S=(0,a.jsx)(Y.A,{size:16}),r[28]=S):S=r[28],r[29]!==n?(k={id:"team-settings",group:"Menu",leftSection:S,label:"Team Settings",onClick:()=>{n.push("/team")}},r[29]=n,r[30]=k):k=r[30],r[31]===Symbol.for("react.memo_cache_sentinel")?(N=(0,a.jsx)(so.A,{size:16}),r[31]=N):N=r[31],r[32]===Symbol.for("react.memo_cache_sentinel")?(C=["help","docs"],r[32]=C):C=r[32],r[33]!==n?(A={id:"documentation",group:"Menu",leftSection:N,label:"Documentation",keywords:C,onClick:()=>{n.push("https://clickhouse.com/docs/use-cases/observability/clickstack")}},r[33]=n,r[34]=A):A=r[34],r[35]===Symbol.for("react.memo_cache_sentinel")?(w=["account","profile"],r[35]=w):w=r[35],r[36]!==n?(z=()=>{n.push("https://hyperdx.io/register")},r[36]=n,r[37]=z):z=r[37],r[38]!==l||r[39]!==z?(I={id:"cloud",group:"Menu",leftSection:l,label:"HyperDX Cloud",description:"Ready to use HyperDX Cloud? Get started for free.",keywords:w,onClick:z},r[38]=l,r[39]=z,r[40]=I):I=r[40],s.push(c,h,x,j,_,y,k,A,I),r[1]=i,r[2]=o,r[3]=l,r[4]=n,r[5]=s}else s=r[5];let c=s;return r[41]!==c?(t={actions:c},r[41]=c,r[42]=t):t=r[42],t})();return l[0]===Symbol.for("react.memo_cache_sentinel")?(s={leftSection:(0,a.jsx)(F.A,{size:16}),placeholder:"Search"},l[0]=s):s=l[0],l[1]===Symbol.for("react.memo_cache_sentinel")?(t=[],l[1]=t):t=l[1],l[2]!==i?(r=(0,a.jsx)(ss.L,{shortcut:"mod + K",searchProps:s,nothingFound:"Nothing found",zIndex:200001,tagsToIgnore:t,highlightQuery:!0,actions:i,limit:7,scrollable:!0}),l[2]=i,l[3]=r):r=l[3],l[4]!==o||l[5]!==r?(n=(0,a.jsxs)("div",{className:"notranslate",translate:"no",children:[o,r]}),l[4]=o,l[5]=r,l[6]=n):n=l[6],n},sc=e=>(0,a.jsx)(si,{children:(0,a.jsxs)("div",{className:G.Ju?"app-layout-with-banner":"app-layout",children:[G.Ju&&(0,a.jsx)(o.a,{bg:"var(--color-text-primary)",children:(0,a.jsx)(i.o,{children:(0,a.jsxs)(c.E,{py:"xs",size:"sm",c:"var(--color-text-inverted)",children:["This is not recommended for production use and is lacking core ClickStack features such as alerts and saved searches. For a proper experience, visit the"," ",(0,a.jsx)("strong",{children:(0,a.jsx)(l(),{href:"https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started",target:"_blank",rel:"noopener norefe\x03er",children:"ClickStack Docs"})})]})})}),(0,a.jsxs)("div",{className:"d-flex",style:{height:"100%",overflow:"hidden"},children:[(0,a.jsx)(e4,{}),(0,a.jsx)("div",{className:"w-100 min-w-0",style:{minWidth:0,overflow:"auto"},children:e})]})]})})},87095:(e,s,t)=>{"use strict";t.d(s,{CI:()=>x,PY:()=>c,V3:()=>u,c_:()=>b,rs:()=>m});var a=t(75155),r=t(12482),n=t(93251),l=t(16932),o=t(6876),i=t(98142);function c(){let e,s=(0,a.c)(1);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:["saved-search"],queryFn:d},s[0]=e):e=s[0],(0,r.I)(e)}async function d(){return i.VO?[]:(0,o.Q5)("saved-search").json()}function m(e,s){let t,n,l,o,i=(0,a.c)(8),{id:c}=e;i[0]!==s?(t=void 0===s?{}:s,i[0]=s,i[1]=t):t=i[1];let d=t;return i[2]===Symbol.for("react.memo_cache_sentinel")?(n=["saved-search"],i[2]=n):n=i[2],i[3]!==c?(l=e=>e.find(e=>e.id===c),i[3]=c,i[4]=l):l=i[4],i[5]!==d||i[6]!==l?(o={queryKey:n,queryFn:h,select:l,...d},i[5]=d,i[6]=l,i[7]=o):o=i[7],(0,r.I)(o)}function h(){return i.VO?[]:(0,o.Q5)("saved-search").json()}function u(){let e,s=(0,a.c)(2),t=(0,n.jE)();return s[0]!==t?(e={mutationFn:p,onSuccess:()=>{t.invalidateQueries({queryKey:["saved-search"]})}},s[0]=t,s[1]=e):e=s[1],(0,l.n)(e)}function p(e){return(0,o.Q5)("saved-search",{method:"POST",json:e}).json()}function x(){let e,s=(0,a.c)(2),t=(0,n.jE)();return s[0]!==t?(e={mutationFn:f,onSuccess:()=>{t.invalidateQueries({queryKey:["saved-search"]})}},s[0]=t,s[1]=e):e=s[1],(0,l.n)(e)}function f(e){return(0,o.Q5)(`saved-search/${e.id}`,{method:"PATCH",json:e}).json()}function b(){let e,s=(0,a.c)(2),t=(0,n.jE)();return s[0]!==t?(e={mutationFn:j,onSuccess:()=>{t.invalidateQueries({queryKey:["saved-search"]})}},s[0]=t,s[1]=e):e=s[1],(0,l.n)(e)}function j(e){return(0,o.Q5)(`saved-search/${e}`,{method:"DELETE"}).json()}},97344:(e,s,t)=>{"use strict";t.d(s,{L9:()=>b,MZ:()=>v,mG:()=>x,pc:()=>g,vY:()=>u});var a=t(75155),r=t(55729),n=t(41038),l=t(60665),o=t(93251),i=t(16932),c=t(12482),d=t(92917),m=t(6876),h=t(98142);function u(){let e,s=(0,a.c)(2),t=(0,o.jE)();return s[0]!==t?(e={mutationFn:p,onSuccess:()=>{t.invalidateQueries({queryKey:["dashboards"]})}},s[0]=t,s[1]=e):e=s[1],(0,i.n)(e)}async function p(e){await (0,m.Q5)(`dashboards/${e.id}`,{method:"PATCH",json:e})}function x(){let e,s=(0,a.c)(2),t=(0,o.jE)();return s[0]!==t?(e={mutationFn:f,onSuccess:()=>{t.invalidateQueries({queryKey:["dashboards"]})}},s[0]=t,s[1]=e):e=s[1],(0,i.n)(e)}async function f(e){return(0,m.Q5)("dashboards",{method:"POST",json:e}).json()}function b(){let e,s=(0,a.c)(1);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:["dashboards"],queryFn:j},s[0]=e):e=s[0],(0,c.I)(e)}async function j(){return h.VO?[]:(0,m.Q5)("dashboards").json()}function v(e){let s,t,o,i,m,h,p,x,f,b=(0,a.c)(23),{dashboardId:j,presetConfig:v}=e;b[0]!==v?(s=v??{id:"",name:"My New Dashboard",tiles:[],tags:[]},b[0]=v,b[1]=s):s=b[1];let g=s;b[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,n.os)(),b[2]=t):t=b[2];let[y,S]=(0,n.ZA)("dashboard",t),k=u();b[3]===Symbol.for("react.memo_cache_sentinel")?(o=["dashboards"],b[3]=o):o=b[3],b[4]!==j?(i=e=>e.find(e=>e.id===j),b[4]=j,b[5]=i):i=b[5];let N=null!=j;b[6]!==i||b[7]!==N?(m={queryKey:o,queryFn:_,select:i,enabled:N},b[6]=i,b[7]=N,b[8]=m):m=b[8];let{data:C,isFetching:A}=(0,c.I)(m),[w,z]=(0,r.useState)(!1),I=null==j;e:{if(I){h=y??g;break e}h=C}let M=h;b[9]!==I||b[10]!==S||b[11]!==k?(p=(e,s,t)=>{if(!I)return z(!0),k.mutate(e,{onSuccess:()=>{z(!1),s?.()},onError:e=>{z(!1),l.$e.show({color:"red",title:"Unable to save dashboard",message:e.message.slice(0,100),autoClose:5e3}),t?.()}});S(e),s?.()},b[9]=I,b[10]=S,b[11]=k,b[12]=p):p=b[12];let E=p;b[13]!==M||b[14]!==j?(x=null!=j?j:(0,d.s5)(`${JSON.stringify(M)}`),b[13]=M,b[14]=j,b[15]=x):x=b[15];let D=x;return b[16]!==M||b[17]!==D||b[18]!==A||b[19]!==I||b[20]!==w||b[21]!==E?(f={dashboard:M,setDashboard:E,dashboardHash:D,isLocalDashboard:I,isFetching:A,isSetting:w},b[16]=M,b[17]=D,b[18]=A,b[19]=I,b[20]=w,b[21]=E,b[22]=f):f=b[22],f}function _(){return(0,m.Q5)("dashboards").json()}function g(){let e,s=(0,a.c)(2),t=(0,o.jE)();return s[0]!==t?(e={mutationFn:y,onSuccess:()=>{t.invalidateQueries({queryKey:["dashboards"]})}},s[0]=t,s[1]=e):e=s[1],(0,i.n)(e)}function y(e){return(0,m.Q5)(`dashboards/${e}`,{method:"DELETE"}).json()}}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/8374-75e52bdef51a4632.js b/out/_next/static/chunks/8374-75e52bdef51a4632.js deleted file mode 100644 index b23c269..0000000 --- a/out/_next/static/chunks/8374-75e52bdef51a4632.js +++ /dev/null @@ -1,17 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8374],{57478:(e,t,s)=>{"use strict";s.d(t,{J:()=>h,W:()=>v});var r=s(6029),a=s(75155),n=s(55729),i=s(8737),l=s(48259),o=s(17283),c=s(9211),u=s(98142),d=s(81973),m=s(89011),p=s.n(m);let h=({sourceSchemaPreview:e})=>e?{rightSection:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.N,{onClick:e=>{e.stopPropagation(),e.preventDefault()},className:p().sourceSchemaPreviewButton,children:e}),(0,r.jsx)(l.l,{})]}),rightSectionWidth:70}:{rightSection:(0,r.jsx)(l.l,{})};function g(e,t){return e.label.localeCompare(t.label)}function x(e){return{value:e.id,label:e.name}}let v=(0,n.memo)(function(e){let t,s,n,i,l,m,p,v,f,S,y,j=(0,a.c)(25);j[0]!==e?({size:l,onCreate:n,allowedSourceKinds:t,comboboxProps:s,sourceSchemaPreview:m,...i}=e,j[0]=e,j[1]=t,j[2]=s,j[3]=n,j[4]=i,j[5]=l,j[6]=m):(t=j[1],s=j[2],n=j[3],i=j[4],l=j[5],m=j[6]);let{data:b}=(0,d.oE)(),C=!!u.m6;if(j[7]!==t||j[8]!==b||j[9]!==n){let e;j[11]!==n?(e=n&&!C?[{value:"_create_new_value",label:"Create New Source"}]:[],j[11]=n,j[12]=e):e=j[12],p=[...(b?.filter(e=>!t||t.includes(e.kind)).map(x)??[]).sort(g),...e],j[7]=t,j[8]=b,j[9]=n,j[10]=p}else p=j[10];let N=p;j[13]!==m?(v=h({sourceSchemaPreview:m}),j[13]=m,j[14]=v):v=j[14];let _=v;return j[15]!==s?(f={withinPortal:!1,...s},j[15]=s,j[16]=f):f=j[16],j[17]===Symbol.for("react.memo_cache_sentinel")?(S=(0,r.jsx)(o.A,{size:16}),j[17]=S):S=j[17],j[18]!==n||j[19]!==i||j[20]!==_||j[21]!==l||j[22]!==f||j[23]!==N?(y=(0,r.jsx)(c.A,{...i,data:N,comboboxProps:f,searchable:!0,placeholder:"Data Source",leftSection:S,maxDropdownHeight:280,size:l,onCreate:n,..._}),j[18]=n,j[19]=i,j[20]=_,j[21]=l,j[22]=f,j[23]=N,j[24]=y):y=j[24],y})},58153:(e,t,s)=>{"use strict";s.d(t,{A:()=>$});var r,a=s(6029),n=s(75155),i=s(55729),l=s(91715),o=s(43465),c=s(86508),u=s(67549),d=s(83595),m=s(66692),p=s(43517),h=s(37659),g=s(59029),x=s(3635),v=s(63085),f=s(87989),S=s(25062),y=s(20158),j=s(62801),b=s(53993),C=s(34834),N=s(92789),_=s(90124),q=s(38206),E=s(59705),R=s(58061),w=s(78341),D=s(27798),k=s(14105),P=s(57820),A=((r={}).Range="Time range",r.Around="Around a time",r),I=s(75071),M=s(13759);let T=(0,d.tG)("hdx-time-picker-mode",A.Range),B=e=>{let t,s=(0,n.c)(2);return s[0]!==e?(t=(0,a.jsx)(R.J,{size:"xs",highlightToday:!0,placeholder:"YYY-MM-DD HH:mm:ss",valueFormat:"YYYY-MM-DD HH:mm:ss",variant:"filled",dateParser:M.ad,onKeyDown:L,...e}),s[0]=e,s[1]=t):t=s[1],t},z=e=>{let t,s=(0,n.c)(2),{children:r}=e;return s[0]!==r?(t=(0,a.jsx)(p.E,{size:"xxs",c:"dimmed",lh:1.1,children:r}),s[0]=r,s[1]=t):t=s[1],t},$=(0,i.memo)(({inputValue:e,setInputValue:t,onSearch:s,onRelativeSearch:r,onSubmit:d,showLive:R=!1,isLiveMode:$=!1,defaultRelativeTimeMode:L=!1})=>{let{userPreferences:{timeFormat:V}}=(0,P.HW)(),[F,{close:H,toggle:K}]=(0,w.j)(!1);(0,m.vC)("d",()=>K(),{preventDefault:!0},[K]);let Y=i.useMemo(()=>new Date,[]),O=i.useMemo(()=>[...R?[[M.pA,M.e2],"divider"]:[],...M.gw],[R]),[W,G]=(0,u.fp)(T),U=(e=>{let t,s,r=(0,n.c)(3),{mode:a}=e;r[0]===Symbol.for("react.memo_cache_sentinel")?(t={startDate:null,endDate:null,duration:"15m"},r[0]=t):t=r[0],r[1]!==a?(s=e=>{if(a===A.Range&&(!e.startDate||!e.endDate))return{startDate:"Required",endDate:"Required"};if(a===A.Around){if(!e.startDate)return{time:"Required"};if(!e.duration)return{duration:"Required"}}return{}},r[1]=a,r[2]=s):s=r[2];let i=(0,I.m)({mode:"controlled",initialValues:t,validate:s,onValuesChange:e=>{e.endDate&&e.startDate&&e.endDate(0,M.c0)(e),[e]);i.useEffect(()=>{if(!F&&J[0]&&J[1]){if(W===A.Range)U.setValues({startDate:J[0],endDate:J[1]});else if(W===A.Around){let e=new Date((J[0].getTime()+J[1].getTime())/2);U.setFieldValue("startDate",e)}}},[J,F,W]);let X=i.useCallback((e,s)=>{t(e),r?.(s),H()},[H,t,r]),Q=i.useCallback(e=>{if("string"==typeof e){t(e),s(e),H();return}let[r,a]=e;if(!r||!a)return;let n="24h"===V?"MMM d HH:mm:ss":"MMM d h:mm:ss a",i=[r,a].map(e=>e&&(0,l.A)(e,n)).join(" - ");t(i),s(i),H()},[H,t,s,V]),Z=i.useCallback(()=>{if(!U.isValid()||!F)return;let{startDate:e,endDate:t}=U.values;if(W===A.Range&&(Q([e,t]),H()),W===A.Around){let t=M.eh[U.values.duration];Q([e&&(0,o.A)(e,t),e&&(0,c.A)(e,t)]),H()}},[H,U,Q,W,F]);(0,m.vC)("Enter",Z,[Z]);let ee=i.useCallback(e=>{let{startDate:t,endDate:s}=U.values;Q([t&&(0,c.A)(t,e),s&&(0,c.A)(s,e)])},[U.values,Q]),[et,es]=(0,i.useState)(L),[er,ea]=(0,i.useState)(null),en=(0,i.useMemo)(()=>({portalProps:{target:er??void 0}}),[er]);return(0,a.jsxs)(h.A,{position:"bottom-start",closeOnEscape:!0,opened:F,onClose:H,children:[(0,a.jsx)(h.A.Target,{children:(0,a.jsx)(g.k,{"data-testid":"time-picker-input",leftSection:$?(0,a.jsx)(D.A,{size:16,className:"text-brand"}):(0,a.jsx)(k.A,{size:16}),styles:{input:{color:$?"var(--color-text-brand)":"var(--color-text)"}},rightSection:F&&(0,a.jsx)(p.E,{size:"xxs",bg:"var(--color-bg-neutral)",px:4,c:"white",children:"d"}),value:e,onChange:e=>t(e.currentTarget.value),onClick:K,placeholder:"Time Range",size:"sm",w:350,onKeyDown:e=>{"Enter"===e.key&&e.target instanceof HTMLInputElement&&(d?.(e.target.value),H()),"Escape"===e.key&&e.target instanceof HTMLInputElement&&(e.target.blur(),H())}})}),(0,a.jsxs)(h.A.Dropdown,{p:0,"data-testid":"time-picker-popover",ref:ea,children:[(0,a.jsxs)(x.Y,{justify:"space-between",gap:4,px:"xs",py:4,children:[(0,a.jsx)(x.Y,{gap:4,children:"function"==typeof r&&(0,a.jsx)(v.m,{label:"Set how far back Live Tail begins streaming logs.",refProp:"rootRef",children:(0,a.jsx)(f.d,{"data-testid":"time-picker-relative-switch",size:"xs",checked:et,onChange:e=>es(e.currentTarget.checked),label:"Relative Time",labelPosition:"right",styles:{label:{paddingLeft:"5px"}}})})}),(0,a.jsxs)(x.Y,{gap:4,children:[(0,a.jsx)(S.$,{"data-testid":"time-picker-1h-back",size:"compact-xs",variant:"secondary",onClick:ee.bind(null,{hours:-1}),disabled:$||et,children:"1h back"}),(0,a.jsx)(S.$,{"data-testid":"time-picker-1h-forward",size:"compact-xs",variant:"secondary",onClick:ee.bind(null,{hours:1}),disabled:$||et,children:"1h forward"}),(0,a.jsx)(y.J,{"data-testid":"time-picker-close",onClick:H})]})]}),(0,a.jsxs)(x.Y,{gap:1,align:"stretch",children:[(0,a.jsx)(j.Z,{w:180,p:0,children:(0,a.jsx)(b.F,{h:300,scrollbarSize:5,children:(0,a.jsx)(C.B,{gap:0,p:"xs",children:O.map((t,s)=>"divider"===t?(0,a.jsx)(N.c,{my:4},s):(0,a.jsx)(S.$,{disabled:et&&!t[2]&&t[0]!==M.pA,onClick:()=>{et||t[0]===M.pA?X?.(t[0],t[1]):Q(t[0])},w:"100%",size:"compact-xs",color:"gray",variant:e===t[0]?"filled":"subtle",fw:"normal",fz:"xs",fullWidth:!0,justify:"space-between",children:t[0]},t[0]))})})}),(0,a.jsxs)(j.Z,{w:280,p:"xs",children:[(0,a.jsxs)(C.B,{gap:8,mb:"sm",children:[(0,a.jsx)(_.I,{size:"xs",mb:"xs",data:[A.Range,A.Around],value:W,disabled:et,onChange:e=>{if(G(e),e===A.Around&&U.values.startDate&&U.values.endDate){let e=new Date((U.values.startDate.getTime()+U.values.endDate.getTime())/2),t=(U.values.endDate.getTime()-U.values.startDate.getTime())/2/6e4,s="15m";s=t<=.5?"30s":t<=1?"1m":t<=5?"5m":t<=15?"15m":t<=30?"30m":t<=60?"1h":t<=180?"3h":t<=360?"6h":"12h",U.setValues({startDate:e,duration:s})}}}),W===A.Range?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(z,{children:"Start time"}),(0,a.jsx)(B,{disabled:et,popoverProps:en,maxDate:Y,mb:"xs",...U.getInputProps("startDate")}),(0,a.jsx)(z,{children:"End time"}),(0,a.jsx)(B,{popoverProps:en,maxDate:Y,minDate:U.values.startDate??void 0,disabled:et,...U.getInputProps("endDate")})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(z,{children:"Time"}),(0,a.jsx)(B,{disabled:et,popoverProps:en,maxDate:Y,mb:"xs",...U.getInputProps("startDate")}),(0,a.jsx)(z,{children:"Duration \xb1"}),(0,a.jsx)(q.l,{placeholder:"Pick value",data:M.U$,comboboxProps:en,searchable:!0,size:"xs",disabled:et,variant:"filled",...U.getInputProps("duration")})]})]}),(0,a.jsx)(p.E,{size:"xxs",lh:1.2,children:"You can use natural language to select dates (e.g. yesterday, last monday at 5pm)"}),(0,a.jsx)(E.$,{flex:1}),(0,a.jsx)(x.Y,{justify:"flex-end",mt:8,pt:8,style:{borderTop:"1px solid var(--color-border)"},children:(0,a.jsx)(S.$,{"data-testid":"time-picker-apply",size:"compact-sm",variant:"primary",disabled:!U.isValid()||et,onClick:Z,children:"Apply"})})]})]})]})]})});function L(e){"Enter"===e.key&&e.target instanceof HTMLInputElement&&e.target.blur()}},89011:e=>{e.exports={sourceSchemaPreviewButton:"SourceSelectControlled_sourceSchemaPreviewButton__qKlsK"}},89962:e=>{e.exports={container:"ServiceMap_container__gQ6W_",toolbar:"ServiceMap_toolbar__ORSDP",linkButton:"ServiceMap_linkButton__vWK1Q",serviceNode:"ServiceMap_serviceNode__ixi_4",body:"ServiceMap_body___HL8_",circle:"ServiceMap_circle__N0cV2"}},98287:(e,t,s)=>{"use strict";s.d(t,{A:()=>$});var r=s(6029),a=s(75155),n=s(55729),i=s(56992),l=s.n(i),o=s(35467),c=s(53061),u=s(94720),d=s(43517),m=s(24589),p=s(60481),h=s(60665),g=s(57703),x=s(22476),v=s(80519),f=s.n(v),S=s(67270),y=s(12482),j=s(49672),b=s(78550);async function C({source:e,dateRange:t,traceId:s,metadata:r,samplingFactor:a}){let n=s?1:a,i={from:e.from,connection:e.connection,dateRange:t,timestampValueExpression:e.timestampValueExpression,filters:[{type:"sql",condition:`cityHash64(${e.traceIdExpression}) % ${n} = 0`},...s?[{type:"sql",condition:f().format("?? = ?",[e.traceIdExpression,s])}]:[]],select:[{valueExpression:e.traceIdExpression??"TraceId",alias:"traceId"},{valueExpression:e.spanIdExpression??"SpanId",alias:"spanId"},{valueExpression:e.serviceNameExpression??"ServiceName",alias:"serviceName"},{valueExpression:e.parentSpanIdExpression??"ParentSpanId",alias:"parentSpanId"},{valueExpression:e.statusCodeExpression??"StatusCode",alias:"statusCode"}]},[l,c]=await Promise.all([(0,S.PV)({...i,filters:[...i.filters,{type:"sql",condition:`${e.spanKindExpression} IN ('Server', 'Consumer', 'SPAN_KIND_SERVER', 'SPAN_KIND_CONSUMER')`}],where:""},r,e.querySettings),(0,S.PV)({...i,filters:[...i.filters,{type:"sql",condition:`${e.spanKindExpression} IN ('Client', 'Producer', 'SPAN_KIND_CLIENT', 'SPAN_KIND_PRODUCER')`}],where:""},r,e.querySettings)]);return(0,o.kg)` - WITH - ServerSpans AS (${l}), - ClientSpans AS (${c}) - SELECT - ServerSpans.serviceName AS serverServiceName, - ServerSpans.statusCode AS serverStatusCode, - ClientSpans.serviceName AS clientServiceName, - count(*) * ${{Int64:n}} as requestCount - FROM ServerSpans - LEFT JOIN ClientSpans - ON ServerSpans.traceId = ClientSpans.traceId - AND ServerSpans.parentSpanId = ClientSpans.spanId - WHERE (ClientSpans.serviceName IS NULL OR ServerSpans.serviceName != ClientSpans.serviceName) - GROUP BY serverServiceName, serverStatusCode, clientServiceName - ORDER BY serverServiceName, serverStatusCode, clientServiceName - `}function N(e){return e.data.map(_)}function _(e){return{serverServiceName:e.serverServiceName,serverStatusCode:e.serverStatusCode,clientServiceName:e.clientServiceName,requestCount:Number.parseInt(e.requestCount)}}function q(e){return e.json()}var E=s(88339),R=s(8737),w=s(81278),D=s.n(w);function k({dateRange:e,source:t,where:s}){let r=e[0].getTime().toString(),a=e[1].getTime().toString(),n=new URLSearchParams({isLive:"false",source:t?.id,where:s,whereLanguage:"sql",from:r,to:a});D().push(`/search?${n.toString()}`)}var P=s(89962),A=s.n(P);function I(e){let t,s,n,i,l,o=(0,a.c)(19),{totalRequests:c,errorPercentage:u,source:d,dateRange:m,serviceName:p,isSingleTrace:h}=e;o[0]!==m||o[1]!==p||o[2]!==d?(t=()=>k({dateRange:m,source:d,where:f().format("? = ? AND ? IN ('Server', 'Consumer')",[f().raw(d.serviceNameExpression??"ServiceName"),p,f().raw(d.spanKindExpression??"SpanKind")])}),o[0]=m,o[1]=p,o[2]=d,o[3]=t):t=o[3],o[4]!==h||o[5]!==c?(s=h?c:function(e){if(e<1e3)return`~${e.toString()}`;if(e<1e6){let t=e/1e3;return`~${Math.round(t)}k`}if(e<1e9){let t=e/1e6;return`~${Math.round(t)}M`}let t=e/1e9;return`~${Math.round(t)}B`}(c),o[4]=h,o[5]=c,o[6]=s):s=o[6];let g=1!==c?"s":"";return o[7]!==t||o[8]!==s||o[9]!==g?(n=(0,r.jsxs)(R.N,{onClick:t,className:A().linkButton,children:[s," ","request",g]}),o[7]=t,o[8]=s,o[9]=g,o[10]=n):n=o[10],o[11]!==m||o[12]!==u||o[13]!==p||o[14]!==d?(i=u>0?(0,r.jsxs)(r.Fragment,{children:[", ",(0,r.jsxs)(R.N,{onClick:()=>k({dateRange:m,source:d,where:f().format("? = ? AND ? IN ('Server', 'Consumer') AND ? = 'Error'",[f().raw(d.serviceNameExpression??"ServiceName"),p,f().raw(d.spanKindExpression??"SpanKind"),f().raw(d.statusCodeExpression??"StatusCode")])}),className:A().linkButton,children:[u.toFixed(2),"% error"]})]}):null,o[11]=m,o[12]=u,o[13]=p,o[14]=d,o[15]=i):i=o[15],o[16]!==n||o[17]!==i?(l=(0,r.jsxs)("div",{className:A().toolbar,children:[n,i]}),o[16]=n,o[17]=i,o[18]=l):l=o[18],l}let M={service:function(e){let t,s,n,i,l,o,c,u,m,p,h=(0,a.c)(27),{data:v}=e,{serviceName:f,incomingRequests:S,source:y,dateRange:j,maxErrorPercentage:b,isSingleTrace:C}=v,{totalRequests:N,errorPercentage:_}=S;if(h[0]!==_||h[1]!==b||h[2]!==e.selected){var q;let s;q=e.selected,s=b>0?Math.min(_,b)/b*100:0,t={backgroundColor:`hsl(0 ${s}% 80%)`,borderColor:q?"white":`hsl(0 ${s}% 40%)`},h[0]=_,h[1]=b,h[2]=e.selected,h[3]=t}else t=h[3];let{backgroundColor:E,borderColor:R}=t;return h[4]!==j||h[5]!==_||h[6]!==C||h[7]!==f||h[8]!==y||h[9]!==N?(s=(0,r.jsx)(x.ER,{position:g.yX.Top,align:"center",children:(0,r.jsx)(I,{errorPercentage:_,totalRequests:N,source:y,dateRange:j,serviceName:f,isSingleTrace:C})}),h[4]=j,h[5]=_,h[6]=C,h[7]=f,h[8]=y,h[9]=N,h[10]=s):s=h[10],h[11]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsx)("div",{className:"position-relative",children:(0,r.jsx)(x.h7,{type:"target",position:g.yX.Left,style:{visibility:"hidden",marginLeft:3}})}),h[11]=n):n=h[11],h[12]!==E||h[13]!==R?(i=(0,r.jsx)("div",{className:A().circle,style:{backgroundColor:E,borderColor:R}}),h[12]=E,h[13]=R,h[14]=i):i=h[14],h[15]===Symbol.for("react.memo_cache_sentinel")?(l={marginLeft:-3},h[15]=l):l=h[15],h[16]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)("div",{className:"position-relative",style:l,children:(0,r.jsx)(x.h7,{type:"source",position:g.yX.Right,style:{visibility:"hidden"}})}),h[16]=o):o=h[16],h[17]!==i?(c=(0,r.jsxs)("div",{className:A().body,children:[n,i,o]}),h[17]=i,h[18]=c):c=h[18],h[19]!==f?(u=(0,r.jsx)(d.E,{size:"xxs",children:f}),h[19]=f,h[20]=u):u=h[20],h[21]!==c||h[22]!==u?(m=(0,r.jsxs)("div",{className:`${A().serviceNode}`,children:[c,u]}),h[21]=c,h[22]=u,h[23]=m):m=h[23],h[24]!==s||h[25]!==m?(p=(0,r.jsxs)(r.Fragment,{children:[s,m]}),h[24]=s,h[25]=m,h[26]=p):p=h[26],p}},T={request:function(e){let t,s,n,i,l,o=(0,a.c)(21);o[0]!==e?(t=(0,g.Fp)(e),o[0]=e,o[1]=t):t=o[1];let[c,u,d]=t;if(!e.data)return null;let{totalRequests:m,errorPercentage:p,dateRange:h,serviceName:v,source:f,isSingleTrace:S}=e.data;return o[2]!==c||o[3]!==e.id?(s=(0,r.jsx)(x.tE,{id:e.id,path:c}),o[2]=c,o[3]=e.id,o[4]=s):s=o[4],o[5]!==h||o[6]!==p||o[7]!==S||o[8]!==v||o[9]!==f||o[10]!==m?(n=(0,r.jsx)(I,{totalRequests:m,errorPercentage:p,source:f,dateRange:h,serviceName:v,isSingleTrace:S}),o[5]=h,o[6]=p,o[7]=S,o[8]=v,o[9]=f,o[10]=m,o[11]=n):n=o[11],o[12]!==u||o[13]!==d||o[14]!==e.id||o[15]!==e.selected||o[16]!==n?(i=(0,r.jsx)(x.dN,{edgeId:e.id,x:u,y:d,isVisible:e.selected,children:n}),o[12]=u,o[13]=d,o[14]=e.id,o[15]=e.selected,o[16]=n,o[17]=i):i=o[17],o[18]!==s||o[19]!==i?(l=(0,r.jsxs)(r.Fragment,{children:[s,i]}),o[18]=s,o[19]=i,o[20]=l):l=o[20],l}};function B(e){let t,s,i,h,v,f,S,y,j,b,C,N,_=(0,a.c)(36),{services:q,isLoading:R,error:w,dateRange:D,source:k,isSingleTrace:P}=e;_[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],_[0]=t):t=_[0];let[I,B]=(0,n.useState)(t);_[1]===Symbol.for("react.memo_cache_sentinel")?(s=[],_[1]=s):s=_[1];let[$,L]=(0,n.useState)(s),{fitView:V}=(0,x.VH)();_[2]!==V?(i=()=>{V()},_[2]=V,_[3]=i):i=_[3],_[4]!==V||_[5]!==q?(h=[V,q],_[4]=V,_[5]=q,_[6]=h):h=_[6],(0,n.useEffect)(i,h),_[7]===Symbol.for("react.memo_cache_sentinel")?(v=e=>B(t=>(0,x._0)(e,t)),_[7]=v):v=_[7];let F=v;_[8]===Symbol.for("react.memo_cache_sentinel")?(f=e=>L(t=>(0,x.zW)(e,t)),_[8]=f):f=_[8];let H=f,K=0;if(_[9]!==K||_[10]!==q){for(let e of q?.values()??[])K=Math.max(e.incomingRequests.errorPercentage,K);_[9]=K,_[10]=q,_[11]=K}else K=_[11];let Y=K;if(_[12]!==D||_[13]!==P||_[14]!==Y||_[15]!==q||_[16]!==k?(S=()=>{let e=Array.from(q?.values()??[]).map((e,t)=>({id:e.serviceName,data:{...e,dateRange:D,source:k,maxErrorPercentage:Y,isSingleTrace:P},position:{x:150*t,y:100},type:"service"}))??[],t=Array.from(q?.values()??[]).filter(z).flatMap(e=>{let{serviceName:t,incomingRequestsByClient:s}=e;return Array.from(s.entries()).map(e=>{let[s,r]=e,{totalRequests:a,errorPercentage:n}=r;return{id:`${t}-${s}`,source:s,target:t,animated:!0,type:"request",data:{totalRequests:a,errorPercentage:n,source:k,dateRange:D,serviceName:t,isSingleTrace:P}}})});B(function(e,t){let s=new(l()).graphlib.Graph().setDefaultEdgeLabel(()=>({}));for(let t of(s.setGraph({rankdir:"LR"}),e))s.setNode(t.id,{width:80,height:40});for(let e of t)s.setEdge(e.source,e.target);return l().layout(s),e.map(e=>{let t=s.node(e.id);return{...e,targetPosition:g.yX.Left,sourcePosition:g.yX.Right,position:{x:t.x-40,y:t.y-40}}})}(e,t)),L(t)},y=[q,D,k,Y,P],_[12]=D,_[13]=P,_[14]=Y,_[15]=q,_[16]=k,_[17]=S,_[18]=y):(S=_[17],y=_[18]),(0,n.useEffect)(S,y),R){let e;return _[19]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(c.o,{className:`${A().graphContainer} h-100 w-100`,children:(0,r.jsx)(u.a,{size:"lg"})}),_[19]=e):e=_[19],e}if(q&&0===q.size){let e;return _[20]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(c.o,{className:"w-100 h-100",children:(0,r.jsx)(d.E,{size:"sm",c:"gray.5",children:"No services found. The Service Map shows links between services with related Client- and Server-kind spans."})}),_[20]=e):e=_[20],e}if(w){let e,t,s,a,n;_[21]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(d.E,{my:"sm",size:"sm",children:"Error message:"}),_[21]=e):e=_[21],_[22]===Symbol.for("react.memo_cache_sentinel")?(t={whiteSpace:"pre-wrap"},_[22]=t):t=_[22];let i=w?.message;return _[23]!==i?(s=(0,r.jsx)(m.C,{block:!0,style:t,children:i}),_[23]=i,_[24]=s):s=_[24],_[25]!==w?(a=w instanceof o.p1&&(0,r.jsxs)(p.a,{mt:"lg",children:[(0,r.jsx)(d.E,{my:"sm",size:"sm",children:"Original query:"}),(0,r.jsx)(m.C,{block:!0,style:{whiteSpace:"pre-wrap"},children:(0,r.jsx)(E.V,{data:w.query,formatData:!0})})]}),_[25]=w,_[26]=a):a=_[26],_[27]!==s||_[28]!==a?(n=(0,r.jsxs)(p.a,{children:[e,s,a]}),_[27]=s,_[28]=a,_[29]=n):n=_[29],n}return _[30]===Symbol.for("react.memo_cache_sentinel")?(j={backgroundColor:"inherit"},_[30]=j):j=_[30],_[31]===Symbol.for("react.memo_cache_sentinel")?(b={hideAttribution:!0},C=(0,r.jsx)(x.H2,{showInteractive:!1}),_[31]=b,_[32]=C):(b=_[31],C=_[32]),_[33]!==$||_[34]!==I?(N=(0,r.jsx)("div",{className:A().container,children:(0,r.jsx)(x.Gc,{style:j,nodes:I,edges:$,onNodesChange:F,onEdgesChange:H,nodeTypes:M,edgeTypes:T,fitView:!0,colorMode:"dark",proOptions:b,children:C})}),_[33]=$,_[34]=I,_[35]=N):N=_[35],N}function z(e){return e.incomingRequestsByClient.size>0}function $(e){let t,s,i,l,o=(0,a.c)(15),{traceId:c,traceTableSource:u,dateRange:d,samplingFactor:m,isSingleTrace:p}=e,g=void 0===m?1:m;o[0]!==d||o[1]!==g||o[2]!==c||o[3]!==u?(t={traceId:c,source:u,dateRange:d,samplingFactor:g},o[0]=d,o[1]=g,o[2]=c,o[3]=u,o[4]=t):t=o[4];let{isLoading:v,data:f,error:S}=function(e){let t,s,r,n=(0,a.c)(15),{source:i,dateRange:l,traceId:o,samplingFactor:c}=e,u=(0,j.fu)(),d=(0,b.Ge)();return n[0]!==l||n[1]!==c||n[2]!==i||n[3]!==o?(t=["serviceMapData",o,i,l,c],n[0]=l,n[1]=c,n[2]=i,n[3]=o,n[4]=t):t=n[4],n[5]!==u||n[6]!==l||n[7]!==d||n[8]!==c||n[9]!==i||n[10]!==o?(s=async e=>{let{signal:t}=e,s=await C({source:i,dateRange:l,traceId:o,metadata:d,samplingFactor:c});return function(e){let t=new Map;for(let s of e){let{serverServiceName:e,serverStatusCode:r,clientServiceName:a,requestCount:n}=s;t.has(e)||t.set(e,{serviceName:e,incomingRequests:{totalRequests:0,requestCountByStatus:new Map,errorPercentage:0},incomingRequestsByClient:new Map});let i=t.get(e);i.incomingRequests.totalRequests+=n;let l=i.incomingRequests.requestCountByStatus.get(r)||0;if(i.incomingRequests.requestCountByStatus.set(r,l+n),a){i.incomingRequestsByClient.has(a)||i.incomingRequestsByClient.set(a,{totalRequests:0,requestCountByStatus:new Map,errorPercentage:0});let e=i.incomingRequestsByClient.get(a);e.totalRequests+=n;let s=e.requestCountByStatus.get(r)||0;e.requestCountByStatus.set(r,s+n),t.has(a)||t.set(a,{serviceName:a,incomingRequests:{totalRequests:0,requestCountByStatus:new Map,errorPercentage:0},incomingRequestsByClient:new Map})}}for(let e of t.values()){let t=e.incomingRequests.requestCountByStatus.get("Error")||0;for(let s of(e.incomingRequests.errorPercentage=e.incomingRequests.totalRequests>0?t/e.incomingRequests.totalRequests*100:0,e.incomingRequestsByClient.values())){let e=s.requestCountByStatus.get("Error")||0;s.errorPercentage=s.totalRequests>0?e/s.totalRequests*100:0}}return t}(await u.query({query:s.sql,query_params:s.params,connectionId:i.connection,format:"JSON",abort_signal:t,clickhouse_settings:{max_execution_time:60,join_algorithm:"auto"}}).then(q).then(N))},n[5]=u,n[6]=l,n[7]=d,n[8]=c,n[9]=i,n[10]=o,n[11]=s):s=n[11],n[12]!==t||n[13]!==s?(r={queryKey:t,queryFn:s,staleTime:1/0,refetchOnWindowFocus:!1,retry:1},n[12]=t,n[13]=s,n[14]=r):r=n[14],(0,y.I)(r)}(t);return o[5]!==S?(s=()=>{S&&h.$e.show({title:"Error loading service map",message:S.message,color:"red"})},i=[S],o[5]=S,o[6]=s,o[7]=i):(s=o[6],i=o[7]),(0,n.useEffect)(s,i),o[8]!==d||o[9]!==S||o[10]!==v||o[11]!==p||o[12]!==f||o[13]!==u?(l=(0,r.jsx)(x.Ln,{children:(0,r.jsx)(B,{services:f,isLoading:v,error:S,dateRange:d,source:u,isSingleTrace:p})}),o[8]=d,o[9]=S,o[10]=v,o[11]=p,o[12]=f,o[13]=u,o[14]=l):l=o[14],l}}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/8374-cb38bfbe77b4240b.js b/out/_next/static/chunks/8374-cb38bfbe77b4240b.js new file mode 100644 index 0000000..2096047 --- /dev/null +++ b/out/_next/static/chunks/8374-cb38bfbe77b4240b.js @@ -0,0 +1,17 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8374],{57478:(e,t,s)=>{"use strict";s.d(t,{J:()=>h,W:()=>v});var r=s(6029),a=s(75155),n=s(55729),i=s(8737),o=s(48259),l=s(17283),c=s(9211),u=s(98142),d=s(81973),m=s(89011),p=s.n(m);let h=({sourceSchemaPreview:e})=>e?{rightSection:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.N,{onClick:e=>{e.stopPropagation(),e.preventDefault()},className:p().sourceSchemaPreviewButton,children:e}),(0,r.jsx)(o.l,{})]}),rightSectionWidth:70}:{rightSection:(0,r.jsx)(o.l,{})};function g(e,t){return e.label.localeCompare(t.label)}function x(e){return{value:e.id,label:e.name}}let v=(0,n.memo)(function(e){let t,s,n,i,o,m,p,v,f,S,y,b=(0,a.c)(25);b[0]!==e?({size:o,onCreate:n,allowedSourceKinds:t,comboboxProps:s,sourceSchemaPreview:m,...i}=e,b[0]=e,b[1]=t,b[2]=s,b[3]=n,b[4]=i,b[5]=o,b[6]=m):(t=b[1],s=b[2],n=b[3],i=b[4],o=b[5],m=b[6]);let{data:j}=(0,d.oE)(),C=!!u.m6;if(b[7]!==t||b[8]!==j||b[9]!==n){let e;b[11]!==n?(e=n&&!C?[{value:"_create_new_value",label:"Create New Source"}]:[],b[11]=n,b[12]=e):e=b[12],p=[...(j?.filter(e=>!t||t.includes(e.kind)).map(x)??[]).sort(g),...e],b[7]=t,b[8]=j,b[9]=n,b[10]=p}else p=b[10];let _=p;b[13]!==m?(v=h({sourceSchemaPreview:m}),b[13]=m,b[14]=v):v=b[14];let N=v;return b[15]!==s?(f={withinPortal:!1,...s},b[15]=s,b[16]=f):f=b[16],b[17]===Symbol.for("react.memo_cache_sentinel")?(S=(0,r.jsx)(l.A,{size:16}),b[17]=S):S=b[17],b[18]!==n||b[19]!==i||b[20]!==N||b[21]!==o||b[22]!==f||b[23]!==_?(y=(0,r.jsx)(c.A,{...i,data:_,comboboxProps:f,searchable:!0,placeholder:"Data Source",leftSection:S,maxDropdownHeight:280,size:o,onCreate:n,...N}),b[18]=n,b[19]=i,b[20]=N,b[21]=o,b[22]=f,b[23]=_,b[24]=y):y=b[24],y})},58153:(e,t,s)=>{"use strict";s.d(t,{A:()=>B});var r,a=s(6029),n=s(75155),i=s(55729),o=s(91715),l=s(43465),c=s(86508),u=s(67549),d=s(83595),m=s(66692),p=s(43517),h=s(37659),g=s(59029),x=s(3635),v=s(63085),f=s(87989),S=s(25062),y=s(20158),b=s(62801),j=s(53993),C=s(34834),_=s(92789),N=s(90124),q=s(38206),E=s(59705),R=s(58061),w=s(78341),D=s(27798),k=s(14105),A=s(57820),P=((r={}).Range="Time range",r.Around="Around a time",r),I=s(75071),M=s(13759);let T=(0,d.tG)("hdx-time-picker-mode",P.Range),z=e=>{let t,s=(0,n.c)(2);return s[0]!==e?(t=(0,a.jsx)(R.J,{size:"xs",highlightToday:!0,placeholder:"YYY-MM-DD HH:mm:ss",valueFormat:"YYYY-MM-DD HH:mm:ss",variant:"filled",dateParser:M.ad,onKeyDown:L,...e}),s[0]=e,s[1]=t):t=s[1],t},$=e=>{let t,s=(0,n.c)(2),{children:r}=e;return s[0]!==r?(t=(0,a.jsx)(p.E,{size:"xxs",c:"dimmed",lh:1.1,children:r}),s[0]=r,s[1]=t):t=s[1],t},B=(0,i.memo)(({inputValue:e,setInputValue:t,onSearch:s,onRelativeSearch:r,onSubmit:d,showLive:R=!1,isLiveMode:B=!1,defaultRelativeTimeMode:L=!1})=>{let{userPreferences:{timeFormat:V}}=(0,A.HW)(),[F,{close:H,toggle:K}]=(0,w.j)(!1);(0,m.vC)("d",()=>K(),{preventDefault:!0},[K]);let Y=i.useMemo(()=>new Date,[]),O=i.useMemo(()=>[...R?[[M.pA,M.e2],"divider"]:[],...M.gw],[R]),[W,G]=(0,u.fp)(T),U=(e=>{let t,s,r=(0,n.c)(3),{mode:a}=e;r[0]===Symbol.for("react.memo_cache_sentinel")?(t={startDate:null,endDate:null,duration:"15m"},r[0]=t):t=r[0],r[1]!==a?(s=e=>{if(a===P.Range&&(!e.startDate||!e.endDate))return{startDate:"Required",endDate:"Required"};if(a===P.Around){if(!e.startDate)return{time:"Required"};if(!e.duration)return{duration:"Required"}}return{}},r[1]=a,r[2]=s):s=r[2];let i=(0,I.m)({mode:"controlled",initialValues:t,validate:s,onValuesChange:e=>{e.endDate&&e.startDate&&e.endDate(0,M.c0)(e),[e]);i.useEffect(()=>{if(!F&&J[0]&&J[1]){if(W===P.Range)U.setValues({startDate:J[0],endDate:J[1]});else if(W===P.Around){let e=new Date((J[0].getTime()+J[1].getTime())/2);U.setFieldValue("startDate",e)}}},[J,F,W]);let X=i.useCallback((e,s)=>{t(e),r?.(s),H()},[H,t,r]),Z=i.useCallback(e=>{if("string"==typeof e){t(e),s(e),H();return}let[r,a]=e;if(!r||!a)return;let n="24h"===V?"MMM d HH:mm:ss":"MMM d h:mm:ss a",i=[r,a].map(e=>e&&(0,o.A)(e,n)).join(" - ");t(i),s(i),H()},[H,t,s,V]),Q=i.useCallback(()=>{if(!U.isValid()||!F)return;let{startDate:e,endDate:t}=U.values;if(W===P.Range&&(Z([e,t]),H()),W===P.Around){let t=M.eh[U.values.duration];Z([e&&(0,l.A)(e,t),e&&(0,c.A)(e,t)]),H()}},[H,U,Z,W,F]);(0,m.vC)("Enter",Q,[Q]);let ee=i.useCallback(e=>{let{startDate:t,endDate:s}=U.values;Z([t&&(0,c.A)(t,e),s&&(0,c.A)(s,e)])},[U.values,Z]),[et,es]=(0,i.useState)(L),[er,ea]=(0,i.useState)(null),en=(0,i.useMemo)(()=>({portalProps:{target:er??void 0}}),[er]);return(0,a.jsxs)(h.A,{position:"bottom-start",closeOnEscape:!0,opened:F,onClose:H,children:[(0,a.jsx)(h.A.Target,{children:(0,a.jsx)(g.k,{"data-testid":"time-picker-input",leftSection:B?(0,a.jsx)(D.A,{size:16,className:"text-brand"}):(0,a.jsx)(k.A,{size:16}),styles:{input:{color:B?"var(--color-text-brand)":"var(--color-text)"}},rightSection:F&&(0,a.jsx)(p.E,{size:"xxs",bg:"var(--color-bg-neutral)",px:4,c:"white",children:"d"}),value:e,onChange:e=>t(e.currentTarget.value),onClick:K,placeholder:"Time Range",size:"sm",w:350,onKeyDown:e=>{"Enter"===e.key&&e.target instanceof HTMLInputElement&&(d?.(e.target.value),H()),"Escape"===e.key&&e.target instanceof HTMLInputElement&&(e.target.blur(),H())}})}),(0,a.jsxs)(h.A.Dropdown,{p:0,"data-testid":"time-picker-popover",ref:ea,children:[(0,a.jsxs)(x.Y,{justify:"space-between",gap:4,px:"xs",py:4,children:[(0,a.jsx)(x.Y,{gap:4,children:"function"==typeof r&&(0,a.jsx)(v.m,{label:"Set how far back Live Tail begins streaming logs.",refProp:"rootRef",children:(0,a.jsx)(f.d,{"data-testid":"time-picker-relative-switch",size:"xs",checked:et,onChange:e=>es(e.currentTarget.checked),label:"Relative Time",labelPosition:"right",styles:{label:{paddingLeft:"5px"}}})})}),(0,a.jsxs)(x.Y,{gap:4,children:[(0,a.jsx)(S.$,{"data-testid":"time-picker-1h-back",size:"compact-xs",variant:"secondary",onClick:ee.bind(null,{hours:-1}),disabled:B||et,children:"1h back"}),(0,a.jsx)(S.$,{"data-testid":"time-picker-1h-forward",size:"compact-xs",variant:"secondary",onClick:ee.bind(null,{hours:1}),disabled:B||et,children:"1h forward"}),(0,a.jsx)(y.J,{"data-testid":"time-picker-close",onClick:H})]})]}),(0,a.jsxs)(x.Y,{gap:1,align:"stretch",children:[(0,a.jsx)(b.Z,{w:180,p:0,children:(0,a.jsx)(j.F,{h:300,scrollbarSize:5,children:(0,a.jsx)(C.B,{gap:0,p:"xs",children:O.map((t,s)=>"divider"===t?(0,a.jsx)(_.c,{my:4},s):(0,a.jsx)(S.$,{disabled:et&&!t[2]&&t[0]!==M.pA,onClick:()=>{et||t[0]===M.pA?X?.(t[0],t[1]):Z(t[0])},w:"100%",size:"compact-xs",color:"gray",variant:e===t[0]?"filled":"subtle",fw:"normal",fz:"xs",fullWidth:!0,justify:"space-between",children:t[0]},t[0]))})})}),(0,a.jsxs)(b.Z,{w:280,p:"xs",children:[(0,a.jsxs)(C.B,{gap:8,mb:"sm",children:[(0,a.jsx)(N.I,{size:"xs",mb:"xs",data:[P.Range,P.Around],value:W,disabled:et,onChange:e=>{if(G(e),e===P.Around&&U.values.startDate&&U.values.endDate){let e=new Date((U.values.startDate.getTime()+U.values.endDate.getTime())/2),t=(U.values.endDate.getTime()-U.values.startDate.getTime())/2/6e4,s="15m";s=t<=.5?"30s":t<=1?"1m":t<=5?"5m":t<=15?"15m":t<=30?"30m":t<=60?"1h":t<=180?"3h":t<=360?"6h":"12h",U.setValues({startDate:e,duration:s})}}}),W===P.Range?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($,{children:"Start time"}),(0,a.jsx)(z,{disabled:et,popoverProps:en,maxDate:Y,mb:"xs",...U.getInputProps("startDate")}),(0,a.jsx)($,{children:"End time"}),(0,a.jsx)(z,{popoverProps:en,maxDate:Y,minDate:U.values.startDate??void 0,disabled:et,...U.getInputProps("endDate")})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($,{children:"Time"}),(0,a.jsx)(z,{disabled:et,popoverProps:en,maxDate:Y,mb:"xs",...U.getInputProps("startDate")}),(0,a.jsx)($,{children:"Duration \xb1"}),(0,a.jsx)(q.l,{placeholder:"Pick value",data:M.U$,comboboxProps:en,searchable:!0,size:"xs",disabled:et,variant:"filled",...U.getInputProps("duration")})]})]}),(0,a.jsx)(p.E,{size:"xxs",lh:1.2,children:"You can use natural language to select dates (e.g. yesterday, last monday at 5pm)"}),(0,a.jsx)(E.$,{flex:1}),(0,a.jsx)(x.Y,{justify:"flex-end",mt:8,pt:8,style:{borderTop:"1px solid var(--color-border)"},children:(0,a.jsx)(S.$,{"data-testid":"time-picker-apply",size:"compact-sm",variant:"primary",disabled:!U.isValid()||et,onClick:Q,children:"Apply"})})]})]})]})]})});function L(e){"Enter"===e.key&&e.target instanceof HTMLInputElement&&e.target.blur()}},89011:e=>{e.exports={sourceSchemaPreviewButton:"SourceSelectControlled_sourceSchemaPreviewButton__qKlsK"}},89962:e=>{e.exports={container:"ServiceMap_container__gQ6W_",toolbar:"ServiceMap_toolbar__ORSDP",serviceNode:"ServiceMap_serviceNode__ixi_4",body:"ServiceMap_body___HL8_",circle:"ServiceMap_circle__N0cV2"}},98287:(e,t,s)=>{"use strict";s.d(t,{A:()=>V});var r=s(6029),a=s(75155),n=s(55729),i=s(56992),o=s.n(i),l=s(35467),c=s(53061),u=s(94720),d=s(43517),m=s(24589),p=s(60481),h=s(60665),g=s(57703),x=s(22476),v=s(80519),f=s.n(v),S=s(67270),y=s(12482),b=s(49672),j=s(78550);async function C({source:e,dateRange:t,traceId:s,metadata:r,samplingFactor:a}){let n=s?1:a,i={from:e.from,connection:e.connection,dateRange:t,timestampValueExpression:e.timestampValueExpression,filters:[{type:"sql",condition:`cityHash64(${e.traceIdExpression}) % ${n} = 0`},...s?[{type:"sql",condition:f().format("?? = ?",[e.traceIdExpression,s])}]:[]],select:[{valueExpression:e.traceIdExpression??"TraceId",alias:"traceId"},{valueExpression:e.spanIdExpression??"SpanId",alias:"spanId"},{valueExpression:e.serviceNameExpression??"ServiceName",alias:"serviceName"},{valueExpression:e.parentSpanIdExpression??"ParentSpanId",alias:"parentSpanId"},{valueExpression:e.statusCodeExpression??"StatusCode",alias:"statusCode"}]},[o,c]=await Promise.all([(0,S.PV)({...i,filters:[...i.filters,{type:"sql",condition:`${e.spanKindExpression} IN ('Server', 'Consumer', 'SPAN_KIND_SERVER', 'SPAN_KIND_CONSUMER')`}],where:""},r,e.querySettings),(0,S.PV)({...i,filters:[...i.filters,{type:"sql",condition:`${e.spanKindExpression} IN ('Client', 'Producer', 'SPAN_KIND_CLIENT', 'SPAN_KIND_PRODUCER')`}],where:""},r,e.querySettings)]);return(0,l.kg)` + WITH + ServerSpans AS (${o}), + ClientSpans AS (${c}) + SELECT + ServerSpans.serviceName AS serverServiceName, + ServerSpans.statusCode AS serverStatusCode, + ClientSpans.serviceName AS clientServiceName, + count(*) * ${{Int64:n}} as requestCount + FROM ServerSpans + LEFT JOIN ClientSpans + ON ServerSpans.traceId = ClientSpans.traceId + AND ServerSpans.parentSpanId = ClientSpans.spanId + WHERE (ClientSpans.serviceName IS NULL OR ServerSpans.serviceName != ClientSpans.serviceName) + GROUP BY serverServiceName, serverStatusCode, clientServiceName + ORDER BY serverServiceName, serverStatusCode, clientServiceName + `}function _(e){return e.data.map(N)}function N(e){return{serverServiceName:e.serverServiceName,serverStatusCode:e.serverStatusCode,clientServiceName:e.clientServiceName,requestCount:Number.parseInt(e.requestCount)}}function q(e){return e.json()}var E=s(88339),R=s(25062),w=s(34834),D=s(41279),k=s(81278),A=s.n(k);function P({dateRange:e,source:t,where:s}){let r=e[0].getTime().toString(),a=e[1].getTime().toString(),n=new URLSearchParams({isLive:"false",source:t?.id,where:s,whereLanguage:"sql",from:r,to:a});A().push(`/search?${n.toString()}`)}var I=s(89962),M=s.n(I);function T(e){let t,s,n,i,o,l,c,u,d=(0,a.c)(24),{totalRequests:m,errorPercentage:p,source:h,dateRange:g,serviceName:x,isSingleTrace:v}=e;d[0]!==v||d[1]!==m?(t=v?m:function(e){if(e<1e3)return`~${e.toString()}`;if(e<1e6){let t=e/1e3;return`~${Math.round(t)}k`}if(e<1e9){let t=e/1e6;return`~${Math.round(t)}M`}let t=e/1e9;return`~${Math.round(t)}B`}(m),d[0]=v,d[1]=m,d[2]=t):t=d[2];let S=`${t} request${1!==m?"s":""}`;d[3]!==p?(s=p.toFixed(2),d[3]=p,d[4]=s):s=d[4];let y=`${s}% errors`;d[5]!==g||d[6]!==x||d[7]!==h?(n=()=>{P({dateRange:g,source:h,where:f().format("? = ? AND ? IN ('Server', 'Consumer')",[f().raw(h.serviceNameExpression??"ServiceName"),x,f().raw(h.spanKindExpression??"SpanKind")])})},d[5]=g,d[6]=x,d[7]=h,d[8]=n):n=d[8];let b=n;d[9]!==g||d[10]!==x||d[11]!==h?(i=()=>{P({dateRange:g,source:h,where:f().format("? = ? AND ? IN ('Server', 'Consumer') AND ? = 'Error'",[f().raw(h.serviceNameExpression??"ServiceName"),x,f().raw(h.spanKindExpression??"SpanKind"),f().raw(h.statusCodeExpression??"StatusCode")])})},d[9]=g,d[10]=x,d[11]=h,d[12]=i):i=d[12];let j=i;return d[13]===Symbol.for("react.memo_cache_sentinel")?(o=(0,r.jsx)(D.A,{size:16}),d[13]=o):o=d[13],d[14]!==b||d[15]!==S?(l=(0,r.jsx)(R.$,{onClick:b,variant:"subtle",size:"xs",color:"var(--color-text)",rightSection:o,children:S}),d[14]=b,d[15]=S,d[16]=l):l=d[16],d[17]!==p||d[18]!==y||d[19]!==j?(c=p>0?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(R.$,{onClick:j,variant:"subtle",size:"xs",color:"var(--color-text-danger)",rightSection:(0,r.jsx)(D.A,{size:16}),children:y})}):null,d[17]=p,d[18]=y,d[19]=j,d[20]=c):c=d[20],d[21]!==l||d[22]!==c?(u=(0,r.jsxs)(w.B,{className:M().toolbar,gap:0,children:[l,c]}),d[21]=l,d[22]=c,d[23]=u):u=d[23],u}let z={service:function(e){let t,s,n,i,o,l,c,u,m,p,h=(0,a.c)(27),{data:v}=e,{serviceName:f,incomingRequests:S,source:y,dateRange:b,maxErrorPercentage:j,isSingleTrace:C}=v,{totalRequests:_,errorPercentage:N}=S;if(h[0]!==N||h[1]!==j||h[2]!==e.selected){var q;let s;q=e.selected,s=j>0?Math.min(N,j)/j*100:0,t={backgroundColor:`hsl(0 ${s}% 80%)`,borderColor:q?"white":`hsl(0 ${s}% 40%)`},h[0]=N,h[1]=j,h[2]=e.selected,h[3]=t}else t=h[3];let{backgroundColor:E,borderColor:R}=t;return h[4]!==b||h[5]!==N||h[6]!==C||h[7]!==f||h[8]!==y||h[9]!==_?(s=(0,r.jsx)(x.ER,{position:g.yX.Top,align:"center",children:(0,r.jsx)(T,{errorPercentage:N,totalRequests:_,source:y,dateRange:b,serviceName:f,isSingleTrace:C})}),h[4]=b,h[5]=N,h[6]=C,h[7]=f,h[8]=y,h[9]=_,h[10]=s):s=h[10],h[11]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsx)("div",{className:"position-relative",children:(0,r.jsx)(x.h7,{type:"target",position:g.yX.Left,style:{visibility:"hidden",marginLeft:3}})}),h[11]=n):n=h[11],h[12]!==E||h[13]!==R?(i=(0,r.jsx)("div",{className:M().circle,style:{backgroundColor:E,borderColor:R}}),h[12]=E,h[13]=R,h[14]=i):i=h[14],h[15]===Symbol.for("react.memo_cache_sentinel")?(o={marginLeft:-3},h[15]=o):o=h[15],h[16]===Symbol.for("react.memo_cache_sentinel")?(l=(0,r.jsx)("div",{className:"position-relative",style:o,children:(0,r.jsx)(x.h7,{type:"source",position:g.yX.Right,style:{visibility:"hidden"}})}),h[16]=l):l=h[16],h[17]!==i?(c=(0,r.jsxs)("div",{className:M().body,children:[n,i,l]}),h[17]=i,h[18]=c):c=h[18],h[19]!==f?(u=(0,r.jsx)(d.E,{size:"xxs",children:f}),h[19]=f,h[20]=u):u=h[20],h[21]!==c||h[22]!==u?(m=(0,r.jsxs)("div",{className:`${M().serviceNode}`,children:[c,u]}),h[21]=c,h[22]=u,h[23]=m):m=h[23],h[24]!==s||h[25]!==m?(p=(0,r.jsxs)(r.Fragment,{children:[s,m]}),h[24]=s,h[25]=m,h[26]=p):p=h[26],p}},$={request:function(e){let t,s,n,i,o,l=(0,a.c)(21);l[0]!==e?(t=(0,g.Fp)(e),l[0]=e,l[1]=t):t=l[1];let[c,u,d]=t;if(!e.data)return null;let{totalRequests:m,errorPercentage:p,dateRange:h,serviceName:v,source:f,isSingleTrace:S}=e.data;return l[2]!==c||l[3]!==e.id?(s=(0,r.jsx)(x.tE,{id:e.id,path:c}),l[2]=c,l[3]=e.id,l[4]=s):s=l[4],l[5]!==h||l[6]!==p||l[7]!==S||l[8]!==v||l[9]!==f||l[10]!==m?(n=(0,r.jsx)(T,{totalRequests:m,errorPercentage:p,source:f,dateRange:h,serviceName:v,isSingleTrace:S}),l[5]=h,l[6]=p,l[7]=S,l[8]=v,l[9]=f,l[10]=m,l[11]=n):n=l[11],l[12]!==u||l[13]!==d||l[14]!==e.id||l[15]!==e.selected||l[16]!==n?(i=(0,r.jsx)(x.dN,{edgeId:e.id,x:u,y:d,isVisible:e.selected,children:n}),l[12]=u,l[13]=d,l[14]=e.id,l[15]=e.selected,l[16]=n,l[17]=i):i=l[17],l[18]!==s||l[19]!==i?(o=(0,r.jsxs)(r.Fragment,{children:[s,i]}),l[18]=s,l[19]=i,l[20]=o):o=l[20],o}};function B(e){let t,s,i,h,v,f,S,y,b,j,C,_,N=(0,a.c)(36),{services:q,isLoading:R,error:w,dateRange:D,source:k,isSingleTrace:A}=e;N[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],N[0]=t):t=N[0];let[P,I]=(0,n.useState)(t);N[1]===Symbol.for("react.memo_cache_sentinel")?(s=[],N[1]=s):s=N[1];let[T,B]=(0,n.useState)(s),{fitView:V}=(0,x.VH)();N[2]!==V?(i=()=>{V()},N[2]=V,N[3]=i):i=N[3],N[4]!==V||N[5]!==q?(h=[V,q],N[4]=V,N[5]=q,N[6]=h):h=N[6],(0,n.useEffect)(i,h),N[7]===Symbol.for("react.memo_cache_sentinel")?(v=e=>I(t=>(0,x._0)(e,t)),N[7]=v):v=N[7];let F=v;N[8]===Symbol.for("react.memo_cache_sentinel")?(f=e=>B(t=>(0,x.zW)(e,t)),N[8]=f):f=N[8];let H=f,K=0;if(N[9]!==K||N[10]!==q){for(let e of q?.values()??[])K=Math.max(e.incomingRequests.errorPercentage,K);N[9]=K,N[10]=q,N[11]=K}else K=N[11];let Y=K;if(N[12]!==D||N[13]!==A||N[14]!==Y||N[15]!==q||N[16]!==k?(S=()=>{let e=Array.from(q?.values()??[]).map((e,t)=>({id:e.serviceName,data:{...e,dateRange:D,source:k,maxErrorPercentage:Y,isSingleTrace:A},position:{x:150*t,y:100},type:"service"}))??[],t=Array.from(q?.values()??[]).filter(L).flatMap(e=>{let{serviceName:t,incomingRequestsByClient:s}=e;return Array.from(s.entries()).map(e=>{let[s,r]=e,{totalRequests:a,errorPercentage:n}=r;return{id:`${t}-${s}`,source:s,target:t,animated:!0,type:"request",data:{totalRequests:a,errorPercentage:n,source:k,dateRange:D,serviceName:t,isSingleTrace:A}}})});I(function(e,t){let s=new(o()).graphlib.Graph().setDefaultEdgeLabel(()=>({}));for(let t of(s.setGraph({rankdir:"LR"}),e))s.setNode(t.id,{width:80,height:40});for(let e of t)s.setEdge(e.source,e.target);return o().layout(s),e.map(e=>{let t=s.node(e.id);return{...e,targetPosition:g.yX.Left,sourcePosition:g.yX.Right,position:{x:t.x-40,y:t.y-40}}})}(e,t)),B(t)},y=[q,D,k,Y,A],N[12]=D,N[13]=A,N[14]=Y,N[15]=q,N[16]=k,N[17]=S,N[18]=y):(S=N[17],y=N[18]),(0,n.useEffect)(S,y),R){let e;return N[19]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(c.o,{className:`${M().graphContainer} h-100 w-100`,children:(0,r.jsx)(u.a,{size:"lg"})}),N[19]=e):e=N[19],e}if(q&&0===q.size){let e;return N[20]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(c.o,{className:"w-100 h-100",children:(0,r.jsx)(d.E,{size:"sm",c:"gray.5",children:"No services found. The Service Map shows links between services with related Client- and Server-kind spans."})}),N[20]=e):e=N[20],e}if(w){let e,t,s,a,n;N[21]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(d.E,{my:"sm",size:"sm",children:"Error message:"}),N[21]=e):e=N[21],N[22]===Symbol.for("react.memo_cache_sentinel")?(t={whiteSpace:"pre-wrap"},N[22]=t):t=N[22];let i=w?.message;return N[23]!==i?(s=(0,r.jsx)(m.C,{block:!0,style:t,children:i}),N[23]=i,N[24]=s):s=N[24],N[25]!==w?(a=w instanceof l.p1&&(0,r.jsxs)(p.a,{mt:"lg",children:[(0,r.jsx)(d.E,{my:"sm",size:"sm",children:"Original query:"}),(0,r.jsx)(m.C,{block:!0,style:{whiteSpace:"pre-wrap"},children:(0,r.jsx)(E.V,{data:w.query,formatData:!0})})]}),N[25]=w,N[26]=a):a=N[26],N[27]!==s||N[28]!==a?(n=(0,r.jsxs)(p.a,{children:[e,s,a]}),N[27]=s,N[28]=a,N[29]=n):n=N[29],n}return N[30]===Symbol.for("react.memo_cache_sentinel")?(b={backgroundColor:"inherit"},N[30]=b):b=N[30],N[31]===Symbol.for("react.memo_cache_sentinel")?(j={hideAttribution:!0},C=(0,r.jsx)(x.H2,{showInteractive:!1}),N[31]=j,N[32]=C):(j=N[31],C=N[32]),N[33]!==T||N[34]!==P?(_=(0,r.jsx)("div",{className:M().container,children:(0,r.jsx)(x.Gc,{style:b,nodes:P,edges:T,onNodesChange:F,onEdgesChange:H,nodeTypes:z,edgeTypes:$,fitView:!0,colorMode:"dark",proOptions:j,children:C})}),N[33]=T,N[34]=P,N[35]=_):_=N[35],_}function L(e){return e.incomingRequestsByClient.size>0}function V(e){let t,s,i,o,l=(0,a.c)(15),{traceId:c,traceTableSource:u,dateRange:d,samplingFactor:m,isSingleTrace:p}=e,g=void 0===m?1:m;l[0]!==d||l[1]!==g||l[2]!==c||l[3]!==u?(t={traceId:c,source:u,dateRange:d,samplingFactor:g},l[0]=d,l[1]=g,l[2]=c,l[3]=u,l[4]=t):t=l[4];let{isLoading:v,data:f,error:S}=function(e){let t,s,r,n=(0,a.c)(15),{source:i,dateRange:o,traceId:l,samplingFactor:c}=e,u=(0,b.fu)(),d=(0,j.Ge)();return n[0]!==o||n[1]!==c||n[2]!==i||n[3]!==l?(t=["serviceMapData",l,i,o,c],n[0]=o,n[1]=c,n[2]=i,n[3]=l,n[4]=t):t=n[4],n[5]!==u||n[6]!==o||n[7]!==d||n[8]!==c||n[9]!==i||n[10]!==l?(s=async e=>{let{signal:t}=e,s=await C({source:i,dateRange:o,traceId:l,metadata:d,samplingFactor:c});return function(e){let t=new Map;for(let s of e){let{serverServiceName:e,serverStatusCode:r,clientServiceName:a,requestCount:n}=s;t.has(e)||t.set(e,{serviceName:e,incomingRequests:{totalRequests:0,requestCountByStatus:new Map,errorPercentage:0},incomingRequestsByClient:new Map});let i=t.get(e);i.incomingRequests.totalRequests+=n;let o=i.incomingRequests.requestCountByStatus.get(r)||0;if(i.incomingRequests.requestCountByStatus.set(r,o+n),a){i.incomingRequestsByClient.has(a)||i.incomingRequestsByClient.set(a,{totalRequests:0,requestCountByStatus:new Map,errorPercentage:0});let e=i.incomingRequestsByClient.get(a);e.totalRequests+=n;let s=e.requestCountByStatus.get(r)||0;e.requestCountByStatus.set(r,s+n),t.has(a)||t.set(a,{serviceName:a,incomingRequests:{totalRequests:0,requestCountByStatus:new Map,errorPercentage:0},incomingRequestsByClient:new Map})}}for(let e of t.values()){let t=e.incomingRequests.requestCountByStatus.get("Error")||0;for(let s of(e.incomingRequests.errorPercentage=e.incomingRequests.totalRequests>0?t/e.incomingRequests.totalRequests*100:0,e.incomingRequestsByClient.values())){let e=s.requestCountByStatus.get("Error")||0;s.errorPercentage=s.totalRequests>0?e/s.totalRequests*100:0}}return t}(await u.query({query:s.sql,query_params:s.params,connectionId:i.connection,format:"JSON",abort_signal:t,clickhouse_settings:{max_execution_time:60,join_algorithm:"auto"}}).then(q).then(_))},n[5]=u,n[6]=o,n[7]=d,n[8]=c,n[9]=i,n[10]=l,n[11]=s):s=n[11],n[12]!==t||n[13]!==s?(r={queryKey:t,queryFn:s,staleTime:1/0,refetchOnWindowFocus:!1,retry:1},n[12]=t,n[13]=s,n[14]=r):r=n[14],(0,y.I)(r)}(t);return l[5]!==S?(s=()=>{S&&h.$e.show({title:"Error loading service map",message:S.message,color:"red"})},i=[S],l[5]=S,l[6]=s,l[7]=i):(s=l[6],i=l[7]),(0,n.useEffect)(s,i),l[8]!==d||l[9]!==S||l[10]!==v||l[11]!==p||l[12]!==f||l[13]!==u?(o=(0,r.jsx)(x.Ln,{children:(0,r.jsx)(B,{services:f,isLoading:v,error:S,dateRange:d,source:u,isSingleTrace:p})}),l[8]=d,l[9]=S,l[10]=v,l[11]=p,l[12]=f,l[13]=u,l[14]=o):o=l[14],o}}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/pages/_app-ff0750f811c67b45.js b/out/_next/static/chunks/pages/_app-ff0750f811c67b45.js deleted file mode 100644 index 86b08fe..0000000 --- a/out/_next/static/chunks/pages/_app-ff0750f811c67b45.js +++ /dev/null @@ -1,31 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[636],{17:e=>{"use strict";e.exports=Object},76:(e,t,r)=>{"use strict";r.d(t,{GY:()=>a,YC:()=>o,dh:()=>l,ks:()=>c,nJ:()=>s,ny:()=>u});var n=r(90324),i=r(26615);function o(e,t="size",r=!0){if(void 0!==e)return(0,n.t)(e)?r?(0,i.D)(e):e:`var(--${t}-${e})`}function a(e){return o(e,"mantine-spacing")}function s(e){return void 0===e?"var(--mantine-radius-default)":o(e,"mantine-radius")}function u(e){return o(e,"mantine-font-size")}function c(e){return o(e,"mantine-line-height",!1)}function l(e){if(e)return o(e,"mantine-shadow",!1)}},226:(e,t)=>{"use strict";function r(e){return function(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=o.width,s=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],u=t.match(s);if(!u)return null;var c=u[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(l)?i(l,function(e){return e.test(c)}):n(l,function(e){return e.test(c)});return r=e.valueCallback?e.valueCallback(f):f,{value:r=o.valueCallback?o.valueCallback(r):r,rest:t.slice(c.length)}}}function n(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function i(e,t){for(var r=0;r{"use strict";r.d(t,{Y:()=>o});var n=r(55729),i=r(9825);function o(e,t){let r="number"==typeof t?t:t.delay,o="number"!=typeof t&&t.flushOnUnmount,a=(0,i.c)(e),s=(0,n.useRef)(0),u=(0,n.useRef)(()=>{}),c=Object.assign((0,n.useCallback)((...e)=>{window.clearTimeout(s.current);let t=()=>{0!==s.current&&(s.current=0,a(...e))};u.current=t,c.flush=t,s.current=window.setTimeout(t,r)},[a,r]),{flush:u.current});return(0,n.useEffect)(()=>()=>{window.clearTimeout(s.current),o&&c.flush()},[c,o]),c}},299:(e,t,r)=>{"use strict";function n(e,t){if(null==e)throw TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}r.d(t,{A:()=>n})},387:(e,t,r)=>{"use strict";r.d(t,{R0:()=>M,jC:()=>E,lr:()=>w,vM:()=>x});var n=r(75155),i=r(55729),o=r(81278),a=r(29326),s=r(97895),u=r(43465),c=r(43407),l=r(28180),f=r(22497),d=r(41038),h=r(6065),p=r(76089),m=r(13759),y=r(57820),g=r(92917);let b="Live Tail",v=1e3,_=(e,t)=>`${(0,p.Yq)(e[0],{isUTC:t,format:"normal",clock:"24h"})} - ${(0,p.Yq)(e[1],{isUTC:t,format:"normal",clock:"24h"})}`;function S(e){return""===e||e.includes(b)}function E(e){let t=(0,a.A)(new Date);return[(0,s.A)(t,e),t]}function w(e,t){return(0,m.c0)(e,t)}function T(e,t){let[r,n]=w(e,t);if(null!=r&&null!=n)return[r,n]}function x({defaultValue:e=b,defaultTimeRange:t=[-1,-1],isLiveEnabled:r=!0}){let n=(0,o.useRouter)().isReady,s=(0,g.ZC)(n),{userPreferences:{isUTC:c}}=(0,y.HW)(),[l,f]=(0,i.useState)(void 0),[d,p]=(0,h.useQueryParams)({from:(0,h.withDefault)(h.NumberParam,void 0),to:(0,h.withDefault)(h.NumberParam,void 0)},{updateType:"pushIn",enableBatching:!0}),m=(0,i.useMemo)(()=>({from:d.from??t[0],to:d.to??t[1]}),[d,t]),[E,x]=(0,h.useQueryParam)("tq",(0,h.withDefault)(h.StringParam,""),{updateType:"pushIn",enableBatching:!0}),A=(0,g.ZC)(E);(0,i.useEffect)(()=>{if(n&&!s)if(""!=E)f(E);else if(null!=d.from&&null!=d.to){let e=_([new Date(d.from),new Date(d.to)],c);f(e),x(e)}else f(e)},[d,e,E,n,c,s,x,f]);let[O,M]=(0,i.useState)(void 0),[R,C]=(0,i.useState)(void 0),I=n&&-1!=m.from&&-1!=m.to?_([new Date(m.from),new Date(m.to)],c):void 0,N=(0,i.useRef)(void 0);(0,i.useEffect)(()=>{if(n&&!S(E)&&A!=E){let e=T(E,c);N.current=e,null!=e&&null==d.from&&null==d.to&&p({from:e[0].getTime(),to:e[1].getTime()})}},[n,E,c,d,p,A]);let P=(0,i.useMemo)(()=>{if(n&&-1!=m.from&&-1!=m.to)return[new Date(m.from),new Date(m.to)];if(n&&-1==m.from&&-1==m.to&&null!=O)return O;if(n&&-1==m.from&&-1==m.to&&null==O&&null!=R)return R;{if(n&&-1==m.from&&-1==m.to&&null==O&&null==R&&!S(E)&&null!=N.current)return N.current;if(!(n&&-1==m.from&&-1==m.to&&null==O&&null==R&&S(E)))return[new Date,new Date];let e=(0,a.A)(new Date);return[(0,u.A)(e,{minutes:15}),e]}},[n,m,O,R,E]),k=(0,i.useMemo)(()=>n&&r&&-1==m.from&&-1==m.to&&(""==E||E.includes(b)),[n,r,m,E]),D=()=>{let e=(0,a.A)(new Date);M([(0,u.A)(e,{minutes:15}),e])};(0,i.useEffect)(()=>{let e;return k&&(D(),e=setInterval(D,v)),()=>{null!=e&&(clearInterval(e),e=void 0)}},[k]);let L=(0,i.useCallback)(e=>{if(!1===k&&e)C(void 0),p({from:void 0,to:void 0}),f(b),x(b),D();else if(k&&!1===e&&null!=O){let[e,t]=O;C(O),p({from:e.getTime(),to:t.getTime()}),M(void 0);let r=_([e,t],c);f(r),x(r)}},[k,p,f,O,c,x]);return{isReady:n,isLive:k,displayedTimeInputValue:l??I??e,setDisplayedTimeInputValue:f,searchedTimeRange:P,onSearch:(0,i.useCallback)(e=>{let[t,r]=w(e,c);if(null!=t&&null!=r)if(p({from:t.getTime(),to:r.getTime()}),-1===e.toLowerCase().indexOf("past")){let e=_([t,r],c);f(e),x(e)}else x(e)},[c,p,f,x]),onTimeRangeSelect:(0,i.useCallback)((e,t)=>{p({from:e.getTime(),to:t.getTime()});let r=_([e,t],c);f(r),x(r)},[c,p,f,x]),setIsLive:L}}let A=(e,t)=>{let r=(0,c.A)({start:e,end:t}),n=(0,l.A)(r);return`Past ${n}`},O={from:d.YC,to:d.YC};function M(e){let t,r,a,s,u,c,l,h,p=(0,n.c)(35),{initialDisplayValue:m,initialTimeRange:g,showRelativeInterval:b,setDisplayedTimeInputValue:v,updateInput:S}=e,E=(0,o.useRouter)().isReady,{userPreferences:T}=(0,y.HW)(),{isUTC:x}=T;p[0]!==m||p[1]!==g||p[2]!==x?(t=()=>m??_(g,x),p[0]=m,p[1]=g,p[2]=x,p[3]=t):t=p[3];let[M,C]=(0,i.useState)(t),I=v??C;p[4]===Symbol.for("react.memo_cache_sentinel")?(r={history:"push"},p[4]=r):r=p[4];let[N,P]=(0,d.ab)(O,r),{from:k,to:D}=N;p[5]!==k||p[6]!==g||p[7]!==D?(a=null!=k&&null!=D?[new Date(k),new Date(D)]:g,p[5]=k,p[6]=g,p[7]=D,p[8]=a):a=p[8];let[L,j]=(0,i.useState)(a);p[9]!==x||p[10]!==P?(s=e=>{let[t,r]=w(e,x);null!=t&&null!=r&&P({from:t.getTime(),to:r.getTime()})},p[9]=x,p[10]=P,p[11]=s):s=p[11];let U=s;p[12]!==I||p[13]!==k||p[14]!==m||p[15]!==g||p[16]!==E||p[17]!==x||p[18]!==b||p[19]!==D||p[20]!==S?(u=()=>{if(null!=k&&null!=D&&E){let e=new Date(k),t=new Date(D);if((0,f.A)(e)&&(0,f.A)(t)){j([e,t]);let r=b&&A(e,t)||_([e,t],x);!1!==S&&I(r)}}else if(null==k&&null==D&&E){j(g);let e=_(g,x);!1!==S&&(b?I(m??e):I(e))}},c=[E,x,k,D,m,g,b,I,S],p[12]=I,p[13]=k,p[14]=m,p[15]=g,p[16]=E,p[17]=x,p[18]=b,p[19]=D,p[20]=S,p[21]=u,p[22]=c):(u=p[21],c=p[22]),(0,i.useEffect)(u,c),p[23]!==I||p[24]!==x||p[25]!==P?(l=(e,t,r)=>{P({from:e.getTime(),to:t.getTime()}),j([e,t]);let n=_([e,t],x);null!==r&&I(r??n)},p[23]=I,p[24]=x,p[25]=P,p[26]=l):l=p[26];let B=l;return p[27]!==M||p[28]!==k||p[29]!==E||p[30]!==U||p[31]!==L||p[32]!==B||p[33]!==D?(h={from:k,to:D,isReady:E,displayedTimeInputValue:M,setDisplayedTimeInputValue:R,searchedTimeRange:L,onSearch:U,onTimeRangeSelect:B},p[27]=M,p[28]=k,p[29]=E,p[30]=U,p[31]=L,p[32]=B,p[33]=D,p[34]=h):h=p[34],h}function R(){}},872:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var n=p(r(73858)),i=p(r(46531)),o=p(r(3514)),a=p(r(15179)),s=p(r(94229)),u=p(r(83605)),c=r(75520),l=p(r(78229)),f=p(r(42462)),d=r(31055),h=p(r(29771));function p(e){return e&&e.__esModule?e:{default:e}}var m=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,y=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,b=/''/g,v=/[a-zA-Z]/;function _(e,t,r){(0,f.default)(2,arguments);var p,g,b,_,E,w,T,x,A,O,M,R,C,I,N,P,k,D,L=String(t),j=(0,d.getDefaultOptions)(),U=null!=(p=null!=(g=null==r?void 0:r.locale)?g:j.locale)?p:h.default,B=(0,l.default)(null!=(b=null!=(_=null!=(E=null!=(w=null==r?void 0:r.firstWeekContainsDate)?w:null==r||null==(T=r.locale)||null==(x=T.options)?void 0:x.firstWeekContainsDate)?E:j.firstWeekContainsDate)?_:null==(A=j.locale)||null==(O=A.options)?void 0:O.firstWeekContainsDate)?b:1);if(!(B>=1&&B<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var F=(0,l.default)(null!=(M=null!=(R=null!=(C=null!=(I=null==r?void 0:r.weekStartsOn)?I:null==r||null==(N=r.locale)||null==(P=N.options)?void 0:P.weekStartsOn)?C:j.weekStartsOn)?R:null==(k=j.locale)||null==(D=k.options)?void 0:D.weekStartsOn)?M:0);if(!(F>=0&&F<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!U.localize)throw RangeError("locale must contain localize property");if(!U.formatLong)throw RangeError("locale must contain formatLong property");var z=(0,o.default)(e);if(!(0,n.default)(z))throw RangeError("Invalid time value");var $=(0,u.default)(z),V=(0,i.default)(z,$),Y={firstWeekContainsDate:B,weekStartsOn:F,locale:U,_originalDate:z};return L.match(y).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,s.default[t])(e,U.formatLong):e}).join("").match(m).map(function(n){if("''"===n)return"'";var i=n[0];if("'"===i)return S(n);var o=a.default[i];if(o)return!(null!=r&&r.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(n)&&(0,c.throwProtectedError)(n,t,String(e)),!(null!=r&&r.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(n)&&(0,c.throwProtectedError)(n,t,String(e)),o(V,n,U.localize,Y);if(i.match(v))throw RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n}).join("")}function S(e){var t=e.match(g);return t?t[1].replace(b,"'"):e}e.exports=t.default},1404:(e,t,r)=>{"use strict";var n=r(29143);Object.defineProperty(t,"__esModule",{value:!0}),t.allEnv=void 0;let i=r(18e3);t.allEnv=function(){return(0,i.isBrowser)()?window.__ENV:n.env}},1827:(e,t,r)=>{"use strict";r.d(t,{D:()=>n,e:()=>i}),r(55729),r(6029);let[n,i]=(0,r(48930).e)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0})},1983:(e,t,r)=>{"use strict";function n(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}r.d(t,{A:()=>n})},2068:(e,t,r)=>{"use strict";var n=r(16638);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},2091:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(66918));function i(e){return e&&e.__esModule?e:{default:e}}var o={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"};t.default={date:(0,n.default)({formats:o,defaultWidth:"full"}),time:(0,n.default)({formats:a,defaultWidth:"full"}),dateTime:(0,n.default)({formats:s,defaultWidth:"full"})},e.exports=t.default},2301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZodError=t.quotelessJson=t.ZodIssueCode=void 0;let n=r(27176);t.ZodIssueCode=n.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),t.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class i extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;ne.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let r=n.path[0];t[r]=t[r]||[],t[r].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}t.ZodError=i,i.create=e=>new i(e)},2663:(e,t,r)=>{"use strict";r.d(t,{t:()=>o});var n=r(24090),i=r(4308),o=new class extends n.Q{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!i.S$&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}}},3001:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(55729);function i({value:e,defaultValue:t,finalValue:r,onChange:i=()=>{}}){let[o,a]=(0,n.useState)(void 0!==t?t:r),s=(e,...t)=>{a(e),i?.(e,...t)};return void 0!==e?[e,i,!0]:[o,s,!1]}},3140:(e,t,r)=>{"use strict";var n,i=r(17),o=r(74002),a=r(61924),s=r(44451),u=r(43339),c=r(69497),l=r(72206),f=r(7016),d=r(33923),h=r(91925),p=r(37025),m=r(75739),y=r(41605),g=r(41167),b=r(2068),v=Function,_=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch(e){}},S=r(27654),E=r(3194),w=function(){throw new l},T=S?function(){try{return arguments.callee,w}catch(e){try{return S(arguments,"callee").get}catch(e){return w}}}():w,x=r(72562)(),A=r(50865),O=r(61429),M=r(92709),R=r(57379),C=r(95185),I={},N="u">typeof Uint8Array&&A?A(Uint8Array):n,P={__proto__:null,"%AggregateError%":"u"typeof Map&&x&&A?A(new Map()[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"typeof Set&&x&&A?A(new Set()[Symbol.iterator]()):n,"%SharedArrayBuffer%":"u"1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===V(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=H(e),n=r.length>0?r[0]:"",i=W("%"+n+"%",t),o=i.name,a=i.value,s=!1,u=i.alias;u&&(n=u[0],F(r,B([0,1],u)));for(var f=1,d=!0;f=r.length){var y=S(a,h);a=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[h]}else d=U(a,h),a=a[h];d&&!s&&(P[o]=a)}}return a}},3194:e=>{"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},3387:e=>{"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},3389:(e,t,r)=>{"use strict";r.d(t,{j:()=>i});var n=r(93778);function i(e){let{m:t,mx:r,my:i,mt:o,mb:a,ml:s,mr:u,me:c,ms:l,p:f,px:d,py:h,pt:p,pb:m,pl:y,pr:g,pe:b,ps:v,bd:_,bg:S,c:E,opacity:w,ff:T,fz:x,fw:A,lts:O,ta:M,lh:R,fs:C,tt:I,td:N,w:P,miw:k,maw:D,h:L,mih:j,mah:U,bgsz:B,bgp:F,bgr:z,bga:$,pos:V,top:Y,left:q,bottom:H,right:W,inset:G,display:Z,flex:K,hiddenFrom:X,visibleFrom:J,lightHidden:Q,darkHidden:ee,sx:et,...er}=e;return{styleProps:(0,n.J)({m:t,mx:r,my:i,mt:o,mb:a,ml:s,mr:u,me:c,ms:l,p:f,px:d,py:h,pt:p,pb:m,pl:y,pr:g,pe:b,ps:v,bd:_,bg:S,c:E,opacity:w,ff:T,fz:x,fw:A,lts:O,ta:M,lh:R,fs:C,tt:I,td:N,w:P,miw:k,maw:D,h:L,mih:j,mah:U,bgsz:B,bgp:F,bgr:z,bga:$,pos:V,top:Y,left:q,bottom:H,right:W,inset:G,display:Z,flex:K,hiddenFrom:X,visibleFrom:J,lightHidden:Q,darkHidden:ee,sx:et}),rest:er}}r(55729),r(6029)},3458:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3465:(e,t,r)=>{"use strict";r.d(t,{C:()=>i});var n=r(55729);function i(e,t){let r=(0,n.useRef)(!1);(0,n.useEffect)(()=>()=>{r.current=!1},[]),(0,n.useEffect)(()=>{if(r.current)return e();r.current=!0},t)}},3514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=i(r(42462));function i(e){return e&&e.__esModule?e:{default:e}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){(0,n.default)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===o(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&"u">typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}e.exports=t.default},3635:(e,t,r)=>{"use strict";r.d(t,{Y:()=>m});var n=r(6029),i=r(55729),o=r(76),a=r(5618),s=r(80616),u=r(37666),c=r(60481),l=r(43016);function f(e){return i.Children.toArray(e).filter(Boolean)}var d={root:"m_4081bf90"};let h={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},p=(0,a.V)((e,{grow:t,preventGrowOverflow:r,gap:n,align:i,justify:a,wrap:s},{childWidth:u})=>({root:{"--group-child-width":t&&r?u:void 0,"--group-gap":(0,o.GY)(n),"--group-align":i,"--group-justify":a,"--group-wrap":s}})),m=(0,l.P9)((e,t)=>{let r=(0,s.Y)("Group",h,e),{classNames:i,className:a,style:l,styles:m,unstyled:y,children:g,gap:b,align:v,justify:_,wrap:S,grow:E,preventGrowOverflow:w,vars:T,variant:x,__size:A,mod:O,...M}=r,R=f(g),C=R.length,I=(0,o.GY)(b??"md"),N={childWidth:`calc(${100/C}% - (${I} - ${I} / ${C}))`},P=(0,u.I)({name:"Group",props:r,stylesCtx:N,className:a,style:l,classes:d,classNames:i,styles:m,unstyled:y,vars:T,varsResolver:p});return(0,n.jsx)(c.a,{...P("root"),ref:t,variant:x,mod:[{grow:E},O],size:A,...M,children:R})});m.classes=d,m.displayName="@mantine/core/Group"},4308:(e,t,r)=>{"use strict";r.d(t,{BH:()=>m,Cp:()=>p,EN:()=>h,Eh:()=>c,F$:()=>d,MK:()=>l,S$:()=>n,ZM:()=>A,ZZ:()=>T,Zw:()=>o,d2:()=>u,f8:()=>y,gn:()=>a,hT:()=>x,j3:()=>s,lQ:()=>i,nJ:()=>f,pl:()=>S,rX:()=>E,y9:()=>w,yy:()=>_});var n="u"=0&&e!==1/0}function s(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function l(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==d(a,t.options))return!1}else if(!p(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&(!i||i===t.state.fetchStatus)&&(!o||!!o(t))}function f(e,t){let{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(h(t.options.mutationKey)!==h(o))return!1}else if(!p(t.options.mutationKey,o))return!1}return(!n||t.state.status===n)&&(!i||!!i(t))}function d(e,t){return(t?.queryKeyHashFn||h)(e)}function h(e){return JSON.stringify(e,(e,t)=>b(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function p(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!p(e[r],t[r]))}function m(e,t){if(e===t)return e;let r=g(e)&&g(t);if(r||b(e)&&b(t)){let n=r?e:Object.keys(e),i=n.length,o=r?t:Object.keys(t),a=o.length,s=r?[]:{},u=0;for(let i=0;i{setTimeout(t,e)})}function S(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?m(e,t):t}function E(e){return e}function w(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function T(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var x=Symbol();function A(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==x?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}},4404:(e,t,r)=>{"use strict";var n=Array.prototype.slice,i=r(33492),o=Object.keys,a=o?function(e){return o(e)}:r(40174),s=Object.keys;a.shim=function(){return Object.keys?!function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)&&(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)}):Object.keys=a,Object.keys||a},e.exports=a},5440:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=r(55729).createContext(null)},5618:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{V:()=>n})},6027:(e,t,r)=>{"use strict";r.d(t,{E:()=>o,q:()=>i});var n={};function i(){return n}function o(e){n=e}},6065:(e,t,r)=>{"use strict";let n,i,o;r.d(t,{NumberParam:()=>a.hc,QueryParamProvider:()=>O,StringParam:()=>a.fr,useQueryParam:()=>U,useQueryParams:()=>D,withDefault:()=>a.IQ});var a=r(28730),s=r(55729);class u{constructor(){this.paramsMap=new Map,this.registeredParams=new Map}set(e,t,r,n){this.paramsMap.set(e,{stringified:t,decoded:r,decode:n})}has(e,t,r){if(!this.paramsMap.has(e))return!1;let n=this.paramsMap.get(e);return!!n&&n.stringified===t&&(null==r||n.decode===r)}get(e){var t;if(this.paramsMap.has(e))return null==(t=this.paramsMap.get(e))?void 0:t.decoded}registerParams(e){for(let t of e){let e=this.registeredParams.get(t)||0;this.registeredParams.set(t,e+1)}}unregisterParams(e){for(let t of e){let e=(this.registeredParams.get(t)||0)-1;e<=0?(this.registeredParams.delete(t),this.paramsMap.has(t)&&this.paramsMap.delete(t)):this.registeredParams.set(t,e)}}clear(){this.paramsMap.clear(),this.registeredParams.clear()}}let c=new u;function l(e,t){var r,n,i;let o={},s=!1,u=Object.keys(e),c=u;if(t.includeKnownParams||!1!==t.includeKnownParams&&0===u.length){let e=Object.keys(null!=(r=t.params)?r:{});c.push(...e)}for(let r of c){let u=e[r];if(null!=u&&"object"==typeof u){o[r]=u;continue}s=!0,o[r]=null!=(i=null==(n=t.params)?void 0:n[r])?i:a.fr}return s?o:e}function f(e,t,r,n){var i;if(!r||!t.length)return e;let o={...e},a=!1;for(let e of t)Object.prototype.hasOwnProperty.call(o,e)||(o[e]=null!=(i=r[e])?i:n,a=!0);return a?o:e}let d=Object.prototype.hasOwnProperty;function h(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function p(e,t,r){var n,i;if(h(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(let a=0;ae.split("\0")))}function v(e,t){var r;let n={};for(let i in e)(null==(r=t[i])?void 0:r.urlName)!=null?n[t[i].urlName]=e[i]:n[i]=e[i];return n}let _={},S=(e,t,r)=>{if(n===t&&o===e&&i===r)return _;n=t,o=e;let a=e(null!=t?t:"");i=r;let s=b(r);for(let[e,t]of Object.entries(a)){(null==s?void 0:s[e])&&(delete a[e],a[e=s[e]]=t);let r=_[e];p(t,r)&&(a[e]=r)}return _=a,a};function E(e,t){null==t&&(t={});let r={...e,...t};return t.params&&e.params&&(r.params={...e.params,...t.params}),r}let w={adapter:{},options:{searchStringToObject:a.eR,objectToSearchString:a.oO,updateType:"pushIn",includeKnownParams:void 0,includeAllParams:!1,removeDefaultsFromUrl:!1,enableBatching:!1,skipUpdateWhenNoChange:!0}},T=s.createContext(w);function x(){let e=s.useContext(T);if(void 0===e||e===w)throw Error("useQueryParams must be used within a QueryParamProvider");return e}function A({children:e,adapter:t,options:r}){let{adapter:n,options:i}=s.useContext(T),o=s.useMemo(()=>({adapter:null!=t?t:n,options:E(i,r)}),[t,r,n,i]);return s.createElement(T.Provider,{value:o},e)}function O({children:e,adapter:t,options:r}){let n=t;return n?s.createElement(n,null,t=>s.createElement(A,{adapter:t,options:r},e)):s.createElement(A,{options:r},e)}function M(e,t){var r;for(let n in e)(null==(r=t[n])?void 0:r.default)!==void 0&&void 0!==e[n]&&t[n].encode(t[n].default)===e[n]&&(e[n]=void 0)}function R({changes:e,updateType:t,currentSearchString:r,paramConfigMap:n,options:i}){let o,s,u,{searchStringToObject:l,objectToSearchString:d}=i;null==t&&(t=i.updateType);let h=S(l,r),p=f(n,Object.keys(e),i.params);return s="function"==typeof e?e(m(h,p,c)):e,o=(0,a.Vl)(p,s),i.removeDefaultsFromUrl&&M(o,p),o=v(o,p),(null==(u=d("push"===t||"replace"===t?o:{...h,...o}))?void 0:u.length)&&"?"!==u[0]&&(u=`?${u}`),null!=u?u:""}function C({searchString:e,adapter:t,navigate:r,updateType:n}){let i={...t.location,search:e};r&&("string"==typeof n&&n.startsWith("replace")?t.replace(i):t.push(i))}let I=e=>e(),N=e=>setTimeout(()=>e(),0),P=[];function k(e,{immediate:t}={}){P.push(e);let r=t?I:N;1===P.length&&r(()=>{let t,r=P.slice();P.length=0;let n=r[0].currentSearchString;for(let e=0;eE(n,u),[n,u]),h=l(o,d),p=S(d.searchStringToObject,r.location.search,g(h));d.includeAllParams&&(h=f(h,Object.keys(p),d.params,a.fr));let m=i(p,h,c),b=Object.keys(h).join("\0");(0,s.useEffect)(()=>{let e=b.split("\0");return c.registerParams(e),()=>{c.unregisterParams(e)}},[b]);let v={adapter:r,paramConfigMap:h,options:d},_=(0,s.useRef)(v);null==_.current&&(_.current=v),(0,s.useEffect)(()=>{_.current.adapter=r,_.current.paramConfigMap=h,_.current.options=d},[r,h,d]);let[w]=(0,s.useState)(()=>(e,t)=>{let{adapter:r,paramConfigMap:n,options:i}=_.current;null==t&&(t=i.updateType),k({changes:e,updateType:t,currentSearchString:r.location.search,paramConfigMap:n,options:i,adapter:r},{immediate:!i.enableBatching})});return[m,w]}var L=D;function j(e,t){let r;return{paramConfigMap:r=void 0===e?{}:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,"inherit"])):e,options:t}}let U=(e,t,r)=>{let[n,i]=L((0,s.useMemo)(()=>({[e]:null!=t?t:"inherit"}),[e,t]),r);return[n[e],(0,s.useCallback)((t,r)=>"function"==typeof t?i(r=>{let n=t(r[e]);return{[e]:n}},r):i({[e]:t},r),[e,i])]}},6338:(e,t)=>{"use strict";function r(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:a=r.valueCallback?r.valueCallback(a):a,rest:t.slice(i.length)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},6385:module=>{var __dirname="/";!function(){var __webpack_modules__={950:function(__unused_webpack_module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;rtypeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var __nested_webpack_exports__={};__webpack_modules__[950](0,__nested_webpack_exports__),module.exports=__nested_webpack_exports__}()},6406:(e,t,r)=>{"use strict";function n(e,t){return r=>{if("string"!=typeof r||0===r.trim().length)throw Error(t);return`${e}-${r}`}}r.d(t,{r:()=>n})},6663:(e,t,r)=>{"use strict";let n;r.d(t,{qt:()=>eE,tm:()=>ti,Sj:()=>p,Ml:()=>W,n:()=>X,Lr:()=>z,WF:()=>$,eN:()=>ew,hw:()=>e_,aP:()=>V,Xi:()=>ev,jv:()=>er,k1:()=>ey,Vb:()=>eh,kY:()=>o,CZ:()=>ec,Jv:()=>ei,Ih:()=>el,DN:()=>ef,Ut:()=>es,Tq:()=>eS,WM:()=>ep,iS:()=>Z,PQ:()=>H,l1:()=>eb,rS:()=>F,bv:()=>Q,Ii:()=>eg,_c:()=>eT,$i:()=>em,EV:()=>ex,b8:()=>ea,lK:()=>p,Kz:()=>eu,ND:()=>U,K5:()=>Y,BG:()=>ey,y0:()=>eo,aR:()=>p,_Z:()=>q,fZ:()=>ee,_:()=>G,a0:()=>K,bz:()=>eB,YO:()=>eV,o:()=>eP,zM:()=>ek,au:()=>tn,Ie:()=>eO,p6:()=>eD,fm:()=>k,gM:()=>eW,QZ:()=>e4,k5:()=>e2,fH:()=>eQ,Nl:()=>eR,E$:()=>eG,fn:()=>eM,RZ:()=>e0,eu:()=>e1,Tj:()=>eX,oi:()=>eN,fc:()=>e6,Zm:()=>ez,ch:()=>eU,me:()=>e8,ai:()=>eI,Ik:()=>eY,yN:()=>tr,p7:()=>tt,lq:()=>e5,Di:()=>te,Tk:()=>e7,vk:()=>e9,iv:()=>e3,g1:()=>eK,hZ:()=>eJ,re:()=>eq,Yj:()=>eC,HR:()=>eL,Gu:()=>e4,PV:()=>eZ,Vx:()=>ej,KC:()=>eH,L5:()=>eF,rI:()=>e$});var i,o,a=r(64892),s=r(78974),u=r(19086);!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(i||(i={}));var c=r(8722),l=r(45859);class f{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let d=(e,t)=>{if((0,c.fn)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new a.G(e.common.issues);return this._error=t,this._error}}};function h(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:o}=e;return"invalid_enum_value"===t.code?{message:o??i.defaultError}:void 0===i.data?{message:o??n??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:o??r??i.defaultError}},description:i}}class p{get description(){return this._def.description}_getType(e){return(0,l.CR)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,l.CR)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new c.MY,ctx:{common:e.parent.common,data:e.data,parsedType:(0,l.CR)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if((0,c.xP)(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,l.CR)(e)},n=this._parseSync({data:e,path:r.path,parent:r});return d(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,l.CR)(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return(0,c.fn)(r)?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>(0,c.fn)(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,l.CR)(e)},n=this._parse({data:e,path:r.path,parent:r});return d(r,await ((0,c.xP)(n)?n:Promise.resolve(n)))}refine(e,t){let r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{let i=e(t),o=()=>n.addIssue({code:a.eq.custom,...r(t)});return"u">typeof Promise&&i instanceof Promise?i.then(e=>!!e||(o(),!1)):!!i||(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new ey({schema:this,typeName:o.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return eg.create(this,this._def)}nullable(){return eb.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return X.create(this)}promise(){return em.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return ei.create(this,e,this._def)}transform(e){return new ey({...h(this._def),schema:this,typeName:o.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t="function"==typeof e?e:()=>e;return new ev({...h(this._def),innerType:this,defaultValue:t,typeName:o.ZodDefault})}brand(){return new ew({typeName:o.ZodBranded,type:this,...h(this._def)})}catch(e){let t="function"==typeof e?e:()=>e;return new e_({...h(this._def),innerType:this,catchValue:t,typeName:o.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eT.create(this,e)}readonly(){return ex.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let m=/^c[^\s-]{8,}$/i,y=/^[0-9a-z]+$/,g=/^[0-9A-HJKMNP-TV-Z]{26}$/i,b=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,v=/^[a-z0-9_-]{21}$/i,_=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,S=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,E=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,w="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",T=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,x=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,A=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,O=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,M=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,R=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,C="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",I=RegExp(`^${C}$`);function N(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function P(e){return RegExp(`^${N(e)}$`)}function k(e){let t=`${C}T${N(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)}function D(e,t){return!!(("v4"===t||!t)&&T.test(e)||("v6"===t||!t)&&A.test(e))}function L(e,t){if(!_.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}function j(e,t){return!!(("v4"===t||!t)&&x.test(e)||("v6"===t||!t)&&O.test(e))}class U extends p{_parse(e){let t;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.Zp.string){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.string,received:t.parsedType}),c.uY}let r=new c.MY;for(let i of this._def.checks)if("min"===i.kind)e.data.lengthi.value&&(t=this._getOrReturnCtx(e,t),(0,c.zn)(t,{code:a.eq.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("length"===i.kind){let n=e.data.length>i.value,o=e.data.lengthe.test(t),{validation:t,code:a.eq.invalid_string,...i.errToObj(r)})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...i.errToObj(e)})}url(e){return this._addCheck({kind:"url",...i.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...i.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...i.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...i.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...i.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...i.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...i.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...i.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...i.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...i.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...i.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...i.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...i.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...i.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...i.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...i.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...i.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...i.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...i.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...i.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...i.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...i.errToObj(t)})}nonempty(e){return this.min(1,i.errToObj(e))}trim(){return new U({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new U({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new U({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuen?r:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}U.create=e=>new U({checks:[],typeName:o.ZodString,coerce:e?.coerce??!1,...h(e)});class F extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==l.Zp.number){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.number,received:t.parsedType}),c.uY}let r=new c.MY;for(let n of this._def.checks)"int"===n.kind?l.ZS.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),(0,c.zn)(t,{code:a.eq.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.datan.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),(0,c.zn)(t,{code:a.eq.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==B(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),(0,c.zn)(t,{code:a.eq.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),(0,c.zn)(t,{code:a.eq.not_finite,message:n.message}),r.dirty()):l.ZS.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,i.toString(t))}gt(e,t){return this.setLimit("min",e,!1,i.toString(t))}lte(e,t){return this.setLimit("max",e,!0,i.toString(t))}lt(e,t){return this.setLimit("max",e,!1,i.toString(t))}setLimit(e,t,r,n){return new F({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:i.toString(n)}]})}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:i.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:i.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:i.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:i.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:i.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:i.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:i.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:i.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:i.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value"int"===e.kind||"multipleOf"===e.kind&&l.ZS.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.valuenew F({checks:[],typeName:o.ZodNumber,coerce:e?.coerce||!1,...h(e)});class z extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==l.Zp.bigint)return this._getInvalidInput(e);let r=new c.MY;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.datan.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),(0,c.zn)(t,{code:a.eq.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),(0,c.zn)(t,{code:a.eq.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):l.ZS.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.bigint,received:t.parsedType}),c.uY}gte(e,t){return this.setLimit("min",e,!0,i.toString(t))}gt(e,t){return this.setLimit("min",e,!1,i.toString(t))}lte(e,t){return this.setLimit("max",e,!0,i.toString(t))}lt(e,t){return this.setLimit("max",e,!1,i.toString(t))}setLimit(e,t,r,n){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:i.toString(n)}]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:i.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:i.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:i.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:i.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:i.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew z({checks:[],typeName:o.ZodBigInt,coerce:e?.coerce??!1,...h(e)});class $ extends p{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.Zp.boolean){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.boolean,received:t.parsedType}),c.uY}return(0,c.OK)(e.data)}}$.create=e=>new $({typeName:o.ZodBoolean,coerce:e?.coerce||!1,...h(e)});class V extends p{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.Zp.date){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.date,received:t.parsedType}),c.uY}if(Number.isNaN(e.data.getTime())){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_date}),c.uY}let r=new c.MY;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()n.value&&(t=this._getOrReturnCtx(e,t),(0,c.zn)(t,{code:a.eq.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):l.ZS.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:i.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:i.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew V({checks:[],coerce:e?.coerce||!1,typeName:o.ZodDate,...h(e)});class Y extends p{_parse(e){if(this._getType(e)!==l.Zp.symbol){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.symbol,received:t.parsedType}),c.uY}return(0,c.OK)(e.data)}}Y.create=e=>new Y({typeName:o.ZodSymbol,...h(e)});class q extends p{_parse(e){if(this._getType(e)!==l.Zp.undefined){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.undefined,received:t.parsedType}),c.uY}return(0,c.OK)(e.data)}}q.create=e=>new q({typeName:o.ZodUndefined,...h(e)});class H extends p{_parse(e){if(this._getType(e)!==l.Zp.null){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.null,received:t.parsedType}),c.uY}return(0,c.OK)(e.data)}}H.create=e=>new H({typeName:o.ZodNull,...h(e)});class W extends p{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,c.OK)(e.data)}}W.create=e=>new W({typeName:o.ZodAny,...h(e)});class G extends p{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,c.OK)(e.data)}}G.create=e=>new G({typeName:o.ZodUnknown,...h(e)});class Z extends p{_parse(e){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.never,received:t.parsedType}),c.uY}}Z.create=e=>new Z({typeName:o.ZodNever,...h(e)});class K extends p{_parse(e){if(this._getType(e)!==l.Zp.undefined){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.void,received:t.parsedType}),c.uY}return(0,c.OK)(e.data)}}K.create=e=>new K({typeName:o.ZodVoid,...h(e)});class X extends p{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==l.Zp.array)return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.array,received:t.parsedType}),c.uY;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.lengthn.maxLength.value&&((0,c.zn)(t,{code:a.eq.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new f(t,e,t.path,r)))).then(e=>c.MY.mergeArray(r,e));let i=[...t.data].map((e,r)=>n.type._parseSync(new f(t,e,t.path,r)));return c.MY.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new X({...this._def,minLength:{value:e,message:i.toString(t)}})}max(e,t){return new X({...this._def,maxLength:{value:e,message:i.toString(t)}})}length(e,t){return new X({...this._def,exactLength:{value:e,message:i.toString(t)}})}nonempty(e){return this.min(1,e)}}function J(e){if(e instanceof Q){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=eg.create(J(n))}return new Q({...e._def,shape:()=>t})}if(e instanceof X)return new X({...e._def,type:J(e.element)});if(e instanceof eg)return eg.create(J(e.unwrap()));if(e instanceof eb)return eb.create(J(e.unwrap()));if(e instanceof eo)return eo.create(e.items.map(e=>J(e)));else return e}X.create=(e,t)=>new X({type:e,minLength:null,maxLength:null,exactLength:null,typeName:o.ZodArray,...h(t)});class Q extends p{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=l.ZS.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==l.Zp.object){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.object,received:t.parsedType}),c.uY}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof Z&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||o.push(e);let s=[];for(let e of i){let t=n[e],i=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new f(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof Z){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of o)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)o.length>0&&((0,c.zn)(r,{code:a.eq.unrecognized_keys,keys:o}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of o){let n=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new f(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>c.MY.mergeObjectSync(t,e)):c.MY.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return i.errToObj,new Q({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:i.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new Q({...this._def,unknownKeys:"strip"})}passthrough(){return new Q({...this._def,unknownKeys:"passthrough"})}extend(e){return new Q({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Q({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:o.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Q({...this._def,catchall:e})}pick(e){let t={};for(let r of l.ZS.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new Q({...this._def,shape:()=>t})}omit(e){let t={};for(let r of l.ZS.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new Q({...this._def,shape:()=>t})}deepPartial(){return J(this)}partial(e){let t={};for(let r of l.ZS.objectKeys(this.shape)){let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new Q({...this._def,shape:()=>t})}required(e){let t={};for(let r of l.ZS.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eg;)e=e._def.innerType;t[r]=e}return new Q({...this._def,shape:()=>t})}keyof(){return ed(l.ZS.objectKeys(this.shape))}}Q.create=(e,t)=>new Q({shape:()=>e,unknownKeys:"strip",catchall:Z.create(),typeName:o.ZodObject,...h(t)}),Q.strictCreate=(e,t)=>new Q({shape:()=>e,unknownKeys:"strict",catchall:Z.create(),typeName:o.ZodObject,...h(t)}),Q.lazycreate=(e,t)=>new Q({shape:e,unknownKeys:"strip",catchall:Z.create(),typeName:o.ZodObject,...h(t)});class ee extends p{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function n(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new a.G(e.ctx.common.issues));return(0,c.zn)(t,{code:a.eq.invalid_union,unionErrors:r}),c.uY}if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(n);{let e,n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new a.G(e));return(0,c.zn)(t,{code:a.eq.invalid_union,unionErrors:i}),c.uY}}get options(){return this._def.options}}ee.create=(e,t)=>new ee({options:e,typeName:o.ZodUnion,...h(t)});let et=e=>{if(e instanceof el)return et(e.schema);if(e instanceof ey)return et(e.innerType());if(e instanceof ef)return[e.value];if(e instanceof eh)return e.options;if(e instanceof ep)return l.ZS.objectValues(e.enum);else if(e instanceof ev)return et(e._def.innerType);else if(e instanceof q)return[void 0];else if(e instanceof H)return[null];else if(e instanceof eg)return[void 0,...et(e.unwrap())];else if(e instanceof eb)return[null,...et(e.unwrap())];else if(e instanceof ew)return et(e.unwrap());else if(e instanceof ex)return et(e.unwrap());else if(e instanceof e_)return et(e._def.innerType);else return[]};class er extends p{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.Zp.object)return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.object,received:t.parsedType}),c.uY;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):((0,c.zn)(t,{code:a.eq.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),c.uY)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let r of t){let t=et(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(n.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new er({typeName:o.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...h(r)})}}function en(e,t){let r=(0,l.CR)(e),n=(0,l.CR)(t);if(e===t)return{valid:!0,data:e};if(r===l.Zp.object&&n===l.Zp.object){let r=l.ZS.objectKeys(t),n=l.ZS.objectKeys(e).filter(e=>-1!==r.indexOf(e)),i={...e,...t};for(let r of n){let n=en(e[r],t[r]);if(!n.valid)return{valid:!1};i[r]=n.data}return{valid:!0,data:i}}if(r===l.Zp.array&&n===l.Zp.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let n=0;n{if((0,c.G4)(e)||(0,c.G4)(n))return c.uY;let i=en(e.value,n.value);return i.valid?(((0,c.DM)(e)||(0,c.DM)(n))&&t.dirty(),{status:t.value,value:i.data}):((0,c.zn)(r,{code:a.eq.invalid_intersection_types}),c.uY)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ei.create=(e,t,r)=>new ei({left:e,right:t,typeName:o.ZodIntersection,...h(r)});class eo extends p{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.Zp.array)return(0,c.zn)(r,{code:a.eq.invalid_type,expected:l.Zp.array,received:r.parsedType}),c.uY;if(r.data.lengththis._def.items.length&&((0,c.zn)(r,{code:a.eq.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new f(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>c.MY.mergeArray(t,e)):c.MY.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new eo({...this._def,rest:e})}}eo.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eo({items:e,typeName:o.ZodTuple,rest:null,...h(t)})};class ea extends p{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.Zp.object)return(0,c.zn)(r,{code:a.eq.invalid_type,expected:l.Zp.object,received:r.parsedType}),c.uY;let n=[],i=this._def.keyType,o=this._def.valueType;for(let e in r.data)n.push({key:i._parse(new f(r,e,r.path,e)),value:o._parse(new f(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?c.MY.mergeObjectAsync(t,n):c.MY.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new ea(t instanceof p?{keyType:e,valueType:t,typeName:o.ZodRecord,...h(r)}:{keyType:U.create(),valueType:e,typeName:o.ZodRecord,...h(t)})}}class es extends p{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.Zp.map)return(0,c.zn)(r,{code:a.eq.invalid_type,expected:l.Zp.map,received:r.parsedType}),c.uY;let n=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([e,t],o)=>({key:n._parse(new f(r,e,r.path,[o,"key"])),value:i._parse(new f(r,t,r.path,[o,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of o){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return c.uY;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of o){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return c.uY;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}es.create=(e,t,r)=>new es({valueType:t,keyType:e,typeName:o.ZodMap,...h(r)});class eu extends p{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.Zp.set)return(0,c.zn)(r,{code:a.eq.invalid_type,expected:l.Zp.set,received:r.parsedType}),c.uY;let n=this._def;null!==n.minSize&&r.data.sizen.maxSize.value&&((0,c.zn)(r,{code:a.eq.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let i=this._def.valueType;function o(e){let r=new Set;for(let n of e){if("aborted"===n.status)return c.uY;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let s=[...r.data.values()].map((e,t)=>i._parse(new f(r,e,r.path,t)));return r.common.async?Promise.all(s).then(e=>o(e)):o(s)}min(e,t){return new eu({...this._def,minSize:{value:e,message:i.toString(t)}})}max(e,t){return new eu({...this._def,maxSize:{value:e,message:i.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eu.create=(e,t)=>new eu({valueType:e,minSize:null,maxSize:null,typeName:o.ZodSet,...h(t)});class ec extends p{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.Zp.function)return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.function,received:t.parsedType}),c.uY;function r(e,r){return(0,c.y7)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,s.$W)(),u.A].filter(e=>!!e),issueData:{code:a.eq.invalid_arguments,argumentsError:r}})}function n(e,r){return(0,c.y7)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,s.$W)(),u.A].filter(e=>!!e),issueData:{code:a.eq.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof em){let e=this;return(0,c.OK)(async function(...t){let s=new a.G([]),u=await e._def.args.parseAsync(t,i).catch(e=>{throw s.addIssue(r(t,e)),s}),c=await Reflect.apply(o,this,u);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw s.addIssue(n(c,e)),s})})}{let e=this;return(0,c.OK)(function(...t){let s=e._def.args.safeParse(t,i);if(!s.success)throw new a.G([r(t,s.error)]);let u=Reflect.apply(o,this,s.data),c=e._def.returns.safeParse(u,i);if(!c.success)throw new a.G([n(u,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ec({...this._def,args:eo.create(e).rest(G.create())})}returns(e){return new ec({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new ec({args:e||eo.create([]).rest(G.create()),returns:t||G.create(),typeName:o.ZodFunction,...h(r)})}}class el extends p{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}el.create=(e,t)=>new el({getter:e,typeName:o.ZodLazy,...h(t)});class ef extends p{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{received:t.data,code:a.eq.invalid_literal,expected:this._def.value}),c.uY}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ed(e,t){return new eh({values:e,typeName:o.ZodEnum,...h(t)})}ef.create=(e,t)=>new ef({value:e,typeName:o.ZodLiteral,...h(t)});class eh extends p{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return(0,c.zn)(t,{expected:l.ZS.joinValues(r),received:t.parsedType,code:a.eq.invalid_type}),c.uY}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return(0,c.zn)(t,{received:t.data,code:a.eq.invalid_enum_value,options:r}),c.uY}return(0,c.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return eh.create(e,{...this._def,...t})}exclude(e,t=this._def){return eh.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}eh.create=ed;class ep extends p{_parse(e){let t=l.ZS.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==l.Zp.string&&r.parsedType!==l.Zp.number){let e=l.ZS.objectValues(t);return(0,c.zn)(r,{expected:l.ZS.joinValues(e),received:r.parsedType,code:a.eq.invalid_type}),c.uY}if(this._cache||(this._cache=new Set(l.ZS.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=l.ZS.objectValues(t);return(0,c.zn)(r,{received:r.data,code:a.eq.invalid_enum_value,options:e}),c.uY}return(0,c.OK)(e.data)}get enum(){return this._def.values}}ep.create=(e,t)=>new ep({values:e,typeName:o.ZodNativeEnum,...h(t)});class em extends p{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.Zp.promise&&!1===t.common.async)return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.promise,received:t.parsedType}),c.uY;let r=t.parsedType===l.Zp.promise?t.data:Promise.resolve(t.data);return(0,c.OK)(r.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}em.create=(e,t)=>new em({type:e,typeName:o.ZodPromise,...h(t)});class ey extends p{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===o.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{(0,c.zn)(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let e=n.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return c.uY;let n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?c.uY:"dirty"===n.status||"dirty"===t.value?(0,c.jm)(n.value):n});{if("aborted"===t.value)return c.uY;let n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?c.uY:"dirty"===n.status||"dirty"===t.value?(0,c.jm)(n.value):n}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?c.uY:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?c.uY:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>(0,c.fn)(e)?Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})):c.uY);else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!(0,c.fn)(e))return c.uY;let o=n.transform(e.value,i);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}l.ZS.assertNever(n)}}ey.create=(e,t,r)=>new ey({schema:e,typeName:o.ZodEffects,effect:t,...h(r)}),ey.createWithPreprocess=(e,t,r)=>new ey({schema:t,effect:{type:"preprocess",transform:e},typeName:o.ZodEffects,...h(r)});class eg extends p{_parse(e){return this._getType(e)===l.Zp.undefined?(0,c.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eg.create=(e,t)=>new eg({innerType:e,typeName:o.ZodOptional,...h(t)});class eb extends p{_parse(e){return this._getType(e)===l.Zp.null?(0,c.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eb.create=(e,t)=>new eb({innerType:e,typeName:o.ZodNullable,...h(t)});class ev extends p{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===l.Zp.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ev.create=(e,t)=>new ev({innerType:e,typeName:o.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...h(t)});class e_ extends p{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return(0,c.xP)(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new a.G(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new a.G(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}e_.create=(e,t)=>new e_({innerType:e,typeName:o.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...h(t)});class eS extends p{_parse(e){if(this._getType(e)!==l.Zp.nan){let t=this._getOrReturnCtx(e);return(0,c.zn)(t,{code:a.eq.invalid_type,expected:l.Zp.nan,received:t.parsedType}),c.uY}return{status:"valid",value:e.data}}}eS.create=e=>new eS({typeName:o.ZodNaN,...h(e)});let eE=Symbol("zod_brand");class ew extends p{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eT extends p{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?c.uY:"dirty"===e.status?(t.dirty(),(0,c.jm)(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?c.uY:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eT({in:e,out:t,typeName:o.ZodPipeline})}}class ex extends p{_parse(e){let t=this._def.innerType._parse(e),r=e=>((0,c.fn)(e)&&(e.value=Object.freeze(e.value)),e);return(0,c.xP)(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function eA(e,t){let r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function eO(e,t={},r){return e?W.create().superRefine((n,i)=>{let o=e(n);if(o instanceof Promise)return o.then(e=>{if(!e){let e=eA(t,n),o=e.fatal??r??!0;i.addIssue({code:"custom",...e,fatal:o})}});if(!o){let e=eA(t,n),o=e.fatal??r??!0;i.addIssue({code:"custom",...e,fatal:o})}}):W.create()}ex.create=(e,t)=>new ex({innerType:e,typeName:o.ZodReadonly,...h(t)});let eM={object:Q.lazycreate};!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(o||(o={}));let eR=(e,t={message:`Input not instance of ${e.name}`})=>eO(t=>t instanceof e,t),eC=U.create,eI=F.create,eN=eS.create,eP=z.create,ek=$.create,eD=V.create,eL=Y.create,ej=q.create,eU=H.create,eB=W.create,eF=G.create,ez=Z.create,e$=K.create,eV=X.create,eY=Q.create,eq=Q.strictCreate,eH=ee.create,eW=er.create,eG=ei.create,eZ=eo.create,eK=ea.create,eX=es.create,eJ=eu.create,eQ=ec.create,e0=el.create,e1=ef.create,e2=eh.create,e6=ep.create,e3=em.create,e4=ey.create,e5=eg.create,e8=eb.create,e9=ey.createWithPreprocess,e7=eT.create,te=()=>eC().optional(),tt=()=>eI().optional(),tr=()=>ek().optional(),tn={string:e=>U.create({...e,coerce:!0}),number:e=>F.create({...e,coerce:!0}),boolean:e=>$.create({...e,coerce:!0}),bigint:e=>z.create({...e,coerce:!0}),date:e=>V.create({...e,coerce:!0})},ti=c.uY},7016:e=>{"use strict";e.exports=URIError},7686:e=>{e.exports={style:{fontFamily:"'IBM Plex Mono', 'IBM Plex Mono Fallback'",fontStyle:"normal"},className:"__className_713f3f",variable:"__variable_713f3f"}},7978:e=>{"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},8722:(e,t,r)=>{"use strict";r.d(t,{DM:()=>h,G4:()=>d,I3:()=>a,MY:()=>u,OK:()=>f,fn:()=>p,jm:()=>l,uY:()=>c,xP:()=>m,y7:()=>o,zn:()=>s});var n=r(78974),i=r(19086);let o=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],a={...i,path:o};if(void 0!==i.message)return{...i,path:o,message:i.message};let s="";for(let e of n.filter(e=>!!e).slice().reverse())s=e(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},a=[];function s(e,t){let r=(0,n.$W)(),a=o({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===i.A?void 0:i.A].filter(e=>!!e)});e.common.issues.push(a)}class u{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return c;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return u.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return c;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let c=Object.freeze({status:"aborted"}),l=e=>({status:"dirty",value:e}),f=e=>({status:"valid",value:e}),d=e=>"aborted"===e.status,h=e=>"dirty"===e.status,p=e=>"valid"===e.status,m=e=>"u">typeof Promise&&e instanceof Promise},8737:(e,t,r)=>{"use strict";r.d(t,{N:()=>l});var n=r(6029);r(55729);var i=r(80616),o=r(37666),a=r(60481),s=r(63863),u={root:"m_87cf2631"};let c={__staticSelector:"UnstyledButton"},l=(0,s.v)((e,t)=>{let r=(0,i.Y)("UnstyledButton",c,e),{className:s,component:l="button",__staticSelector:f,unstyled:d,classNames:h,styles:p,style:m,...y}=r,g=(0,o.I)({name:f,props:r,classes:u,className:s,style:m,classNames:h,styles:p,unstyled:d});return(0,n.jsx)(a.a,{...g("root",{focusable:!0}),component:l,ref:t,type:"button"===l?"button":void 0,...y})});l.classes=u,l.displayName="@mantine/core/UnstyledButton"},8804:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(6027),i=r(96442),o=r(91715),a=r(77561),s=r(97895),u=r(41742),c=r(79849),l=r(89250),f=r(80577);function d(e,t,r){(0,l.A)(2,arguments);var d,h,p,m,y,g,b,v,_,S,E,w=(0,u.A)(e),T=(0,u.A)(t),x=(0,n.q)(),A=null!=(d=null!=(h=null==r?void 0:r.locale)?h:x.locale)?d:a.A,O=(0,f.A)(null!=(p=null!=(m=null!=(y=null!=(g=null==r?void 0:r.weekStartsOn)?g:null==r||null==(b=r.locale)||null==(v=b.options)?void 0:v.weekStartsOn)?y:x.weekStartsOn)?m:null==(_=x.locale)||null==(S=_.options)?void 0:S.weekStartsOn)?p:0);if(!A.localize)throw RangeError("locale must contain localize property");if(!A.formatLong)throw RangeError("locale must contain formatLong property");if(!A.formatRelative)throw RangeError("locale must contain formatRelative property");var M=(0,i.A)(w,T);if(isNaN(M))throw RangeError("Invalid time value");E=M<-6?"other":M<-1?"lastWeek":M<0?"yesterday":M<1?"today":M<2?"tomorrow":M<7?"nextWeek":"other";var R=(0,s.A)(w,(0,c.A)(w)),C=(0,s.A)(T,(0,c.A)(T)),I=A.formatRelative(E,R,C,{locale:A,weekStartsOn:O});return(0,o.A)(w,I,{locale:A,weekStartsOn:O})}},9069:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getRedirectError:function(){return a},getRedirectStatusCodeFromError:function(){return f},getRedirectTypeFromError:function(){return l},getURLFromRedirectError:function(){return c},permanentRedirect:function(){return u},redirect:function(){return s}});let n=r(84732),i=r(54918),o;function a(e,t,r=n.RedirectStatusCode.TemporaryRedirect){let o=Object.defineProperty(Error(i.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return o.digest=`${i.REDIRECT_ERROR_CODE};${t};${e};${r};`,o}function s(e,t){throw a(e,t??=o?.getStore()?.isAction?i.RedirectType.push:i.RedirectType.replace,n.RedirectStatusCode.TemporaryRedirect)}function u(e,t=i.RedirectType.replace){throw a(e,t,n.RedirectStatusCode.PermanentRedirect)}function c(e){return(0,i.isRedirectError)(e)?e.digest.split(";").slice(2,-2).join(";"):null}function l(e){if(!(0,i.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return e.digest.split(";",2)[1]}function f(e){if(!(0,i.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(e.digest.split(";").at(-2))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var n=a(r(872)),i=a(r(10275)),o=a(r(88015));function a(e){return e&&e.__esModule?e:{default:e}}var s=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function u(e,t,r){var a=String(t),u=r||{},c=a.match(s);if(c){var l=(0,o.default)(e,u);a=c.reduce(function(e,t){if("'"===t[0])return e;var r=e.indexOf(t),n="'"===e[r-1],o=e.replace(t,"'"+i.default[t[0]](l,t,null,u)+"'");return n?o.substring(0,r-1)+o.substring(r+1):o},a)}return(0,n.default)(e,a,u)}e.exports=t.default},9825:(e,t,r)=>{"use strict";r.d(t,{c:()=>i});var n=r(55729);function i(e){let t=(0,n.useRef)(e);return(0,n.useEffect)(()=>{t.current=e}),(0,n.useMemo)(()=>(...e)=>t.current?.(...e),[])}},9953:(e,t,r)=>{"use strict";r.d(t,{A:()=>U});var n=r(6029),i=r(55729),o=r(3001),a=r(74003);function s(e,t,r="ltr"){let n=(0,i.useRef)(null),o=(0,i.useRef)(!1),u=(0,i.useRef)(!1),c=(0,i.useRef)(0),[l,f]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{o.current=!0},[]),(0,i.useEffect)(()=>{let i=n.current,s=({x:t,y:n})=>{cancelAnimationFrame(c.current),c.current=requestAnimationFrame(()=>{if(o.current&&i){i.style.userSelect="none";let o=i.getBoundingClientRect();if(o.width&&o.height){let i=(0,a.q)((t-o.left)/o.width,0,1);e({x:"ltr"===r?i:1-i,y:(0,a.q)((n-o.top)/o.height,0,1)})}}})},l=()=>{document.addEventListener("mousemove",y),document.addEventListener("mouseup",p),document.addEventListener("touchmove",b),document.addEventListener("touchend",p)},d=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",p),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",p)},h=()=>{!u.current&&o.current&&(u.current=!0,"function"==typeof t?.onScrubStart&&t.onScrubStart(),f(!0),l())},p=()=>{u.current&&o.current&&(u.current=!1,f(!1),d(),setTimeout(()=>{"function"==typeof t?.onScrubEnd&&t.onScrubEnd()},0))},m=e=>{h(),e.preventDefault(),y(e)},y=e=>s({x:e.clientX,y:e.clientY}),g=e=>{e.cancelable&&e.preventDefault(),h(),b(e)},b=e=>{e.cancelable&&e.preventDefault(),s({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})};return i?.addEventListener("mousedown",m),i?.addEventListener("touchstart",g,{passive:!1}),()=>{i&&(i.removeEventListener("mousedown",m),i.removeEventListener("touchstart",g))}},[r,e]),{ref:n,active:l}}var u=r(56655),c=r(26615),l=r(76);function f(e,t){return 0===t.length?e:t.reduce((t,r)=>Math.abs(r-e){let{getStyles:c}=v();return(0,n.jsx)(_.a,{tabIndex:-1,variant:r,size:e,ref:u,...c("root"),...s})});S.displayName="@mantine/core/SliderRoot";var E=r(56738);let w=(0,i.forwardRef)(({max:e,min:t,value:r,position:o,label:a,dragging:s,onMouseDown:u,onKeyDownCapture:c,labelTransitionProps:l,labelAlwaysOn:f,thumbLabel:d,onFocus:h,onBlur:p,showLabelOnHover:m,isHovered:y,children:g=null,disabled:b},S)=>{let{getStyles:w}=v(),[T,x]=(0,i.useState)(!1),A=f||s||T||m&&y;return(0,n.jsxs)(_.a,{tabIndex:0,role:"slider","aria-label":d,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":r,ref:S,__vars:{"--slider-thumb-offset":`${o}%`},...w("thumb",{focusable:!0}),mod:{dragging:s,disabled:b},onFocus:e=>{x(!0),"function"==typeof h&&h(e)},onBlur:e=>{x(!1),"function"==typeof p&&p(e)},onTouchStart:u,onMouseDown:u,onKeyDownCapture:c,onClick:e=>e.stopPropagation(),children:[g,(0,n.jsx)(E.e,{mounted:null!=a&&!!A,transition:"fade",duration:0,...l,children:e=>(0,n.jsx)("div",{...w("label",{style:e}),children:a})})]})});function T({value:e,min:t,max:r}){return Math.min(Math.max((e-t)/(r-t)*100,0),100)}function x({mark:e,offset:t,value:r,inverted:n=!1}){return n?"number"==typeof t&&e.value<=t||e.value>=r:"number"==typeof t?e.value>=t&&e.value<=r:e.value<=r}function A({marks:e,min:t,max:r,disabled:o,value:a,offset:s,inverted:u}){let{getStyles:c}=v();if(!e)return null;let l=e.map((e,l)=>(0,i.createElement)(_.a,{...c("markWrapper"),__vars:{"--mark-offset":`${T({value:e.value,min:t,max:r})}%`},key:l},(0,n.jsx)(_.a,{...c("mark"),mod:{filled:x({mark:e,value:a,offset:s,inverted:u}),disabled:o}}),e.label&&(0,n.jsx)("div",{...c("markLabel"),children:e.label})));return(0,n.jsx)("div",{children:l})}function O({filled:e,children:t,offset:r,disabled:i,marksOffset:o,inverted:a,containerProps:s,...u}){let{getStyles:c}=v();return(0,n.jsx)(_.a,{...c("trackContainer"),mod:{disabled:i},...s,children:(0,n.jsxs)(_.a,{...c("track"),mod:{inverted:a,disabled:i},children:[(0,n.jsx)(_.a,{mod:{inverted:a,disabled:i},__vars:{"--slider-bar-width":`calc(${e}% + var(--slider-size))`,"--slider-bar-offset":`calc(${r}% - var(--slider-size))`},...c("bar")}),t,(0,n.jsx)(A,{...u,offset:o,disabled:i,inverted:a})]})})}function M({value:e,containerWidth:t,min:r,max:n,step:i,precision:o}){let a=(t?Math.min(Math.max(e,0),t)/t:e)*(n-r),s=Math.max((0!==a?Math.round(a/i)*i:0)+r,r);return void 0!==o?Number(s.toFixed(o)):s}function R(e,t){return parseFloat(e.toFixed(t))}function C(e){if(!e)return 0;let t=e.toString().split(".");return t.length>1?t[1].length:0}function I(e,t){let r=[...t].sort((e,t)=>e.value-t.value).find(t=>t.value>e);return r?r.value:e}function N(e,t){let r=[...t].sort((e,t)=>t.value-e.value).find(t=>t.valuee.value-t.value);return t.length>0?t[0].value:0}function k(e){let t=[...e].sort((e,t)=>e.value-t.value);return t.length>0?t[t.length-1].value:100}w.displayName="@mantine/core/SliderThumb",A.displayName="@mantine/core/SliderMarks",O.displayName="@mantine/core/SliderTrack";var D={root:"m_dd36362e",label:"m_c9357328",thumb:"m_c9a9a60a",trackContainer:"m_a8645c2",track:"m_c9ade57f",bar:"m_38aeed47",markWrapper:"m_b7b0423a",mark:"m_dd33bc19",markLabel:"m_68c77a5b"};let L={radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransitionProps:{transition:"fade",duration:0},labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:e=>e},j=(0,d.V)((e,{size:t,color:r,thumbSize:n,radius:i})=>({root:{"--slider-size":(0,l.YC)(t,"slider-size"),"--slider-color":r?(0,h.r)(r,e):void 0,"--slider-radius":void 0===i?void 0:(0,l.nJ)(i),"--slider-thumb-size":void 0!==n?(0,c.D)(n):"calc(var(--slider-size) * 2)"}})),U=(0,y.P9)((e,t)=>{let r=(0,p.Y)("Slider",L,e),{classNames:c,styles:l,value:d,onChange:h,onChangeEnd:y,size:v,min:_,max:E,step:x,precision:A,defaultValue:U,name:B,marks:F,label:z,labelTransitionProps:$,labelAlwaysOn:V,thumbLabel:Y,showLabelOnHover:q,thumbChildren:H,disabled:W,unstyled:G,scale:Z,inverted:K,className:X,style:J,vars:Q,hiddenInputProps:ee,restrictToMarks:et,thumbProps:er,...en}=r,ei=(0,m.I)({name:"Slider",props:r,classes:D,classNames:c,className:X,styles:l,style:J,vars:Q,varsResolver:j,unstyled:G}),{dir:eo}=(0,g.jH)(),[ea,es]=(0,i.useState)(!1),[eu,ec]=(0,o.Z)({value:"number"==typeof d?(0,a.q)(d,_,E):d,defaultValue:"number"==typeof U?(0,a.q)(U,_,E):U,finalValue:(0,a.q)(0,_,E),onChange:h}),el=(0,i.useRef)(eu),ef=(0,i.useRef)(y);(0,i.useEffect)(()=>{ef.current=y},[y]);let ed=(0,i.useRef)(null),eh=(0,i.useRef)(null),ep=T({value:eu,min:_,max:E}),em=Z(eu),ey="function"==typeof z?z(em):z,eg=A??C(x),{ref:eb,active:ev}=s((0,i.useCallback)(({x:e})=>{if(!W){let t=M({value:e,min:_,max:E,step:x,precision:eg});ec(et&&F?.length?f(t,F.map(e=>e.value)):t),el.current=t}},[W,_,E,x,eg,ec,F,et]),{onScrubEnd:(0,i.useCallback)(()=>{if(!W&&ef.current){let e=et&&F?.length?f(el.current,F.map(e=>e.value)):el.current;ef.current(e)}},[W,F,et])},eo),e_=(0,i.useCallback)(e=>{!W&&ef.current&&ef.current(e)},[W]),eS=e=>{if(!W)switch(e.key){case"ArrowUp":{if(e.preventDefault(),eh.current?.focus(),et&&F){let e=I(eu,F);ec(e),e_(e);break}let t=R(Math.min(Math.max(eu+x,_),E),eg);ec(t),e_(t);break}case"ArrowRight":{if(e.preventDefault(),eh.current?.focus(),et&&F){let e="rtl"===eo?N(eu,F):I(eu,F);ec(e),e_(e);break}let t=R(Math.min(Math.max("rtl"===eo?eu-x:eu+x,_),E),eg);ec(t),e_(t);break}case"ArrowDown":{if(e.preventDefault(),eh.current?.focus(),et&&F){let e=N(eu,F);ec(e),e_(e);break}let t=R(Math.min(Math.max(eu-x,_),E),eg);ec(t),e_(t);break}case"ArrowLeft":{if(e.preventDefault(),eh.current?.focus(),et&&F){let e="rtl"===eo?I(eu,F):N(eu,F);ec(e),e_(e);break}let t=R(Math.min(Math.max("rtl"===eo?eu+x:eu-x,_),E),eg);ec(t),e_(t);break}case"Home":if(e.preventDefault(),eh.current?.focus(),et&&F){ec(P(F)),e_(P(F));break}ec(_),e_(_);break;case"End":if(e.preventDefault(),eh.current?.focus(),et&&F){ec(k(F)),e_(k(F));break}ec(E),e_(E)}};return(0,n.jsx)(b,{value:{getStyles:ei},children:(0,n.jsxs)(S,{...en,ref:(0,u.pc)(t,ed),onKeyDownCapture:eS,onMouseDownCapture:()=>ed.current?.focus(),size:v,disabled:W,children:[(0,n.jsx)(O,{inverted:K,offset:0,filled:ep,marks:F,min:_,max:E,value:em,disabled:W,containerProps:{ref:eb,onMouseEnter:q?()=>es(!0):void 0,onMouseLeave:q?()=>es(!1):void 0},children:(0,n.jsx)(w,{max:E,min:_,value:em,position:ep,dragging:ev,label:ey,ref:eh,labelTransitionProps:$,labelAlwaysOn:V,thumbLabel:Y,showLabelOnHover:q,isHovered:ea,disabled:W,...er,children:H})}),(0,n.jsx)("input",{type:"hidden",name:B,value:em,...ee})]})})});U.classes=D,U.displayName="@mantine/core/Slider"},10060:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(41742),i=r(81839),o=r(33901),a=r(89250),s=r(80577),u=r(6027);function c(e,t){(0,a.A)(1,arguments);var r,n,c,l,f,d,h,p,m=(0,u.q)(),y=(0,s.A)(null!=(r=null!=(n=null!=(c=null!=(l=null==t?void 0:t.firstWeekContainsDate)?l:null==t||null==(f=t.locale)||null==(d=f.options)?void 0:d.firstWeekContainsDate)?c:m.firstWeekContainsDate)?n:null==(h=m.locale)||null==(p=h.options)?void 0:p.firstWeekContainsDate)?r:1),g=(0,o.A)(e,t),b=new Date(0);return b.setUTCFullYear(g,0,y),b.setUTCHours(0,0,0,0),(0,i.A)(b,t)}var l=6048e5;function f(e,t){(0,a.A)(1,arguments);var r=(0,n.A)(e);return Math.round(((0,i.A)(r,t).getTime()-c(r,t).getTime())/l)+1}},10275:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(80780)),i=o(r(11827));function o(e){return e&&e.__esModule?e:{default:e}}var a=6e4;function s(e,t){var r=e?(0,i.default)(e,t,!0)/a:t.getTimezoneOffset();if(Number.isNaN(r))throw RangeError("Invalid time zone specified: "+e);return r}function u(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?"-":"+",i=Math.abs(e);return n+u(Math.floor(i/60),2)+r+u(Math.floor(i%60),2)}function l(e,t){return e%60==0?(e>0?"-":"+")+u(Math.abs(e)/60,2):c(e,t)}function f(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;if(0===o)return r+String(i);var a=t||"";return r+String(i)+a+u(o,2)}t.default={X:function(e,t,r,n){var i=s(n.timeZone,n._originalDate||e);if(0===i)return"Z";switch(t){case"X":return l(i);case"XXXX":case"XX":return c(i);default:return c(i,":")}},x:function(e,t,r,n){var i=s(n.timeZone,n._originalDate||e);switch(t){case"x":return l(i);case"xxxx":case"xx":return c(i);default:return c(i,":")}},O:function(e,t,r,n){var i=s(n.timeZone,n._originalDate||e);switch(t){case"O":case"OO":case"OOO":return"GMT"+f(i,":");default:return"GMT"+c(i,":")}},z:function(e,t,r,i){var o=i._originalDate||e;switch(t){case"z":case"zz":case"zzz":return(0,n.default)("short",o,i);default:return(0,n.default)("long",o,i)}}},e.exports=t.default},10342:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(56343),i=r(89250),o=r(80577);function a(e,t){(0,i.A)(2,arguments);var r=(0,o.A)(t);return(0,n.A)(e,-r)}},10372:()=>{},11255:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(41742),i=r(89250);function o(e,t){(0,i.A)(2,arguments);var r=(0,n.A)(e),o=(0,n.A)(t),a=r.getTime()-o.getTime();return a<0?-1:a>0?1:a}},11370:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(34405),i=r(89250),o=r(23714);function a(e,t,r){(0,i.A)(2,arguments);var a=(0,n.A)(e,t)/1e3;return(0,o.u)(null==r?void 0:r.roundingMethod)(a)}},11460:(e,t,r)=>{"use strict";var n=r(93529),i=r(74818),o=r(97598),a=r(48203),s=r(84781),u=i(a(),Object);n(u,{getPolyfill:a,implementation:o,shim:s}),e.exports=u},11689:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(41742),i=r(89250);function o(e){(0,i.A)(1,arguments);var t=(0,n.A)(e);return t.setHours(23,59,59,999),t}},11827:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var n=o(r(47462)),i=o(r(26193));function o(e){return e&&e.__esModule?e:{default:e}}var a=36e5,s=6e4,u=/^(Z)$/,c=/^([+-]\d{2})$/,l=/^([+-]\d{2}):?(\d{2})$/;function f(e,t,r){if(!e||(n=u.exec(e)))return 0;if(n=c.exec(e))return m(o=parseInt(n[1],10))?-(o*a):NaN;if(n=l.exec(e)){var n,i,o=parseInt(n[1],10),f=parseInt(n[2],10);return m(o,f)?(i=Math.abs(o)*a+f*s,o>0?-i:i):NaN}if(g(e)){t=new Date(t||Date.now());var y=h(r?t:d(t),e);return-(r?y:p(t,y,e))}return NaN}function d(e){return(0,i.default)(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function h(e,t){var r=(0,n.default)(e,t),o=(0,i.default)(r[0],r[1]-1,r[2],r[3]%24,r[4],r[5],0).getTime(),a=e.getTime(),s=a%1e3;return o-(a-=s>=0?s:1e3+s)}function p(e,t,r){var n=e.getTime()-t,i=h(new Date(n),r);if(t===i)return t;var o=h(new Date(n-=i-t),r);return i===o?i:Math.max(i,o)}function m(e,t){return -23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var y={};function g(e){if(y[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),y[e]=!0,!0}catch(e){return!1}}e.exports=t.default},12436:e=>{e.exports={focusRing:"focus_focusRing__UFS1R"}},12896:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(66404);function i(e,t){let r={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},i=(0,n.r)(r.from,t),o=(0,n.r)(r.to,t);return`linear-gradient(${r.deg}deg, ${i} 0%, ${o} 100%)`}},13202:(e,t,r)=>{"use strict";let n=r(62701);e.exports="function"==typeof n.randomUUID?n.randomUUID:r(60769)},13448:(e,t,r)=>{"use strict";r.d(t,{$:()=>s,s:()=>a});var n=r(95913),i=r(77332),o=r(43064),a=class extends i.k{#n;#i;#o;constructor(e){super(),this.mutationId=e.mutationId,this.#i=e.mutationCache,this.#n=[],this.state=e.state||s(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#i.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||("pending"===this.state.status?this.scheduleGc():this.#i.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){this.#o=(0,o.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});let t="pending"===this.state.status,r=!this.#o.canStart();try{if(!t){this.#a({type:"pending",variables:e,isPaused:r}),await this.#i.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:r})}let n=await this.#o.start();return await this.#i.config.onSuccess?.(n,e,this.state.context,this),await this.options.onSuccess?.(n,e,this.state.context),await this.#i.config.onSettled?.(n,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(n,null,e,this.state.context),this.#a({type:"success",data:n}),n}catch(t){try{throw await this.#i.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#i.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#a({type:"error",error:t})}}finally{this.#i.runNext(this)}}#a(e){let t=t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),n.j.batch(()=>{this.#n.forEach(t=>{t.onMutationUpdate(e)}),this.#i.notify({mutation:this,type:"updated",action:e})})}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},13525:(e,t,r)=>{"use strict";r.d(t,{E:()=>o});var n=r(55729),i=r(3465);function o({opened:e,shouldReturnFocus:t=!0}){let r=(0,n.useRef)(null),o=()=>{r.current&&"focus"in r.current&&"function"==typeof r.current.focus&&r.current?.focus({preventScroll:!0})};return(0,i.C)(()=>{let n=-1,i=e=>{"Tab"===e.key&&window.clearTimeout(n)};return document.addEventListener("keydown",i),e?r.current=document.activeElement:t&&(n=window.setTimeout(o,10)),()=>{window.clearTimeout(n),document.removeEventListener("keydown",i)}},[e,t]),o}},13634:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(41742),i=r(89250);function o(e){(0,i.A)(1,arguments);var t=(0,n.A)(e);return t.setHours(0,0,0,0),t}},13759:(e,t,r)=>{"use strict";function n(e,t){e.assign("day",t.getDate()),e.assign("month",t.getMonth()+1),e.assign("year",t.getFullYear())}function i(e,t){e.assign("hour",t.getHours()),e.assign("minute",t.getMinutes()),e.assign("second",t.getSeconds()),e.assign("millisecond",t.getMilliseconds()),e.assign("meridiem",12>t.getHours()?t9.AM:t9.PM)}function o(e,t){e.imply("day",t.getDate()),e.imply("month",t.getMonth()+1),e.imply("year",t.getFullYear())}function a(e,t){e.imply("hour",t.getHours()),e.imply("minute",t.getMinutes()),e.imply("second",t.getSeconds()),e.imply("millisecond",t.getMilliseconds()),e.imply("meridiem",12>t.getHours()?t9.AM:t9.PM)}r.d(t,{eh:()=>rl,U$:()=>rc,e2:()=>ra,pA:()=>ro,gw:()=>rs,ad:()=>rf,zG:()=>ru,c0:()=>ri}),function(e){e[e.AM=0]="AM",e[e.PM=1]="PM"}(t9||(t9={})),function(e){e[e.SUNDAY=0]="SUNDAY",e[e.MONDAY=1]="MONDAY",e[e.TUESDAY=2]="TUESDAY",e[e.WEDNESDAY=3]="WEDNESDAY",e[e.THURSDAY=4]="THURSDAY",e[e.FRIDAY=5]="FRIDAY",e[e.SATURDAY=6]="SATURDAY"}(t7||(t7={})),function(e){e[e.JANUARY=1]="JANUARY",e[e.FEBRUARY=2]="FEBRUARY",e[e.MARCH=3]="MARCH",e[e.APRIL=4]="APRIL",e[e.MAY=5]="MAY",e[e.JUNE=6]="JUNE",e[e.JULY=7]="JULY",e[e.AUGUST=8]="AUGUST",e[e.SEPTEMBER=9]="SEPTEMBER",e[e.OCTOBER=10]="OCTOBER",e[e.NOVEMBER=11]="NOVEMBER",e[e.DECEMBER=12]="DECEMBER"}(re||(re={}));let s={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:{timezoneOffsetDuringDst:120,timezoneOffsetNonDst:60,dstStart:e=>c(e,re.MARCH,t7.SUNDAY,2),dstEnd:e=>c(e,re.OCTOBER,t7.SUNDAY,3)},CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CT:{timezoneOffsetDuringDst:-300,timezoneOffsetNonDst:-360,dstStart:e=>u(e,re.MARCH,t7.SUNDAY,2,2),dstEnd:e=>u(e,re.NOVEMBER,t7.SUNDAY,1,2)},CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:{timezoneOffsetDuringDst:-240,timezoneOffsetNonDst:-300,dstStart:e=>u(e,re.MARCH,t7.SUNDAY,2,2),dstEnd:e=>u(e,re.NOVEMBER,t7.SUNDAY,1,2)},FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MT:{timezoneOffsetDuringDst:-360,timezoneOffsetNonDst:-420,dstStart:e=>u(e,re.MARCH,t7.SUNDAY,2,2),dstEnd:e=>u(e,re.NOVEMBER,t7.SUNDAY,1,2)},MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:{timezoneOffsetDuringDst:-420,timezoneOffsetNonDst:-480,dstStart:e=>u(e,re.MARCH,t7.SUNDAY,2,2),dstEnd:e=>u(e,re.NOVEMBER,t7.SUNDAY,1,2)},PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function u(e,t,r,n,i=0){let o=0,a=0;for(;an.dstStart(t.getFullYear())&&!(t>n.dstEnd(t.getFullYear()))?n.timezoneOffsetDuringDst:n.timezoneOffsetNonDst}let f={day:0,second:0,millisecond:0};function d(e,t){let r=new Date(e);if(t.y&&(t.year=t.y,delete t.y),t.mo&&(t.month=t.mo,delete t.mo),t.M&&(t.month=t.M,delete t.M),t.w&&(t.week=t.w,delete t.w),t.d&&(t.day=t.d,delete t.d),t.h&&(t.hour=t.h,delete t.h),t.m&&(t.minute=t.m,delete t.m),t.s&&(t.second=t.s,delete t.s),t.ms&&(t.millisecond=t.ms,delete t.ms),"year"in t){let e=Math.floor(t.year);r.setFullYear(r.getFullYear()+e);let n=t.year-e;n>0&&(t.month=t?.month??0,t.month+=12*n)}if("quarter"in t){let e=Math.floor(t.quarter);r.setMonth(r.getMonth()+3*e)}if("month"in t){let e=Math.floor(t.month);r.setMonth(r.getMonth()+e);let n=t.month-e;n>0&&(t.week=t?.week??0,t.week+=4*n)}if("week"in t){let e=Math.floor(t.week);r.setDate(r.getDate()+7*e);let n=t.week-e;n>0&&(t.day=t?.day??0,t.day+=Math.round(7*n))}if("day"in t){let e=Math.floor(t.day);r.setDate(r.getDate()+e);let n=t.day-e;n>0&&(t.hour=t?.hour??0,t.hour+=Math.round(24*n))}if("hour"in t){let e=Math.floor(t.hour);r.setHours(r.getHours()+e);let n=t.hour-e;n>0&&(t.minute=t?.minute??0,t.minute+=Math.round(60*n))}if("minute"in t){let e=Math.floor(t.minute);r.setMinutes(r.getMinutes()+e);let n=t.minute-e;n>0&&(t.second=t?.second??0,t.second+=Math.round(60*n))}if("second"in t){let e=Math.floor(t.second);r.setSeconds(r.getSeconds()+e);let n=t.second-e;n>0&&(t.millisecond=t?.millisecond??0,t.millisecond+=Math.round(1e3*n))}if("millisecond"in t){let e=Math.floor(t.millisecond);r.setMilliseconds(r.getMilliseconds()+e)}return r}function h(e){let t={};for(let r in e)t[r]=-e[r];return t}class p{instant;timezoneOffset;constructor(e,t){this.instant=e??new Date,this.timezoneOffset=t??null}static fromDate(e){return new p(e)}static fromInput(e,t){if(e instanceof Date)return p.fromDate(e);let r=e?.instant??new Date,n=l(e?.timezone,r,t);return new p(r,n)}getDateWithAdjustedTimezone(){let e=new Date(this.instant);return null!==this.timezoneOffset&&e.setMinutes(e.getMinutes()-this.getSystemTimezoneAdjustmentMinute(this.instant)),e}getSystemTimezoneAdjustmentMinute(e,t){(!e||0>e.getTime())&&(e=new Date);let r=-e.getTimezoneOffset(),n=t??this.timezoneOffset??r;return r-n}getTimezoneOffset(){return this.timezoneOffset??-this.instant.getTimezoneOffset()}}class m{knownValues;impliedValues;reference;_tags=new Set;constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(const e in t)this.knownValues[e]=t[e];const r=e.getDateWithAdjustedTimezone();this.imply("day",r.getDate()),this.imply("month",r.getMonth()+1),this.imply("year",r.getFullYear()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}static createRelativeFromReference(e,t=f){let r=d(e.getDateWithAdjustedTimezone(),t),o=new m(e);return o.addTag("result/relativeDate"),"hour"in t||"minute"in t||"second"in t||"millisecond"in t?(o.addTag("result/relativeDateAndTime"),i(o,r),n(o,r),o.assign("timezoneOffset",e.getTimezoneOffset())):(a(o,r),o.imply("timezoneOffset",e.getTimezoneOffset()),"day"in t?(o.assign("day",r.getDate()),o.assign("month",r.getMonth()+1),o.assign("year",r.getFullYear()),o.assign("weekday",r.getDay())):"week"in t?(o.assign("day",r.getDate()),o.assign("month",r.getMonth()+1),o.assign("year",r.getFullYear()),o.imply("weekday",r.getDay())):(o.imply("day",r.getDate()),"month"in t?(o.assign("month",r.getMonth()+1),o.assign("year",r.getFullYear())):(o.imply("month",r.getMonth()+1),"year"in t?o.assign("year",r.getFullYear()):o.imply("year",r.getFullYear())))),o}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues||(this.impliedValues[e]=t),this}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}addDurationAsImplied(e){let t=d(this.dateWithoutTimezoneAdjustment(),e);return("day"in e||"week"in e||"month"in e||"year"in e)&&(this.delete(["day","weekday","month","year"]),this.imply("day",t.getDate()),this.imply("weekday",t.getDay()),this.imply("month",t.getMonth()+1),this.imply("year",t.getFullYear())),("second"in e||"minute"in e||"hour"in e)&&(this.delete(["second","minute","hour"]),this.imply("second",t.getSeconds()),this.imply("minute",t.getMinutes()),this.imply("hour",t.getHours())),this}delete(e){for(let t of("string"==typeof e&&(e=[e]),e))delete this.knownValues[t],delete this.impliedValues[t]}clone(){let e=new m(this.reference);for(let t in e.knownValues={},e.impliedValues={},this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")&&!this.isCertain("year")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isDateWithUnknownYear(){return this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return e.getFullYear()===this.get("year")&&e.getMonth()===this.get("month")-1&&e.getDate()===this.get("day")&&(null==this.get("hour")||e.getHours()==this.get("hour"))&&(null==this.get("minute")||e.getMinutes()==this.get("minute"))}toString(){return`[ParsingComponents { - tags: ${JSON.stringify(Array.from(this._tags).sort())}, - knownValues: ${JSON.stringify(this.knownValues)}, - impliedValues: ${JSON.stringify(this.impliedValues)}}, - reference: ${JSON.stringify(this.reference)}]`}date(){let e=this.dateWithoutTimezoneAdjustment(),t=this.reference.getSystemTimezoneAdjustmentMinute(e,this.get("timezoneOffset"));return new Date(e.getTime()+6e4*t)}addTag(e){return this._tags.add(e),this}addTags(e){for(let t of e)this._tags.add(t);return this}tags(){return new Set(this._tags)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}}class y{refDate;index;text;reference;start;end;constructor(e,t,r,n,i){this.reference=e,this.refDate=e.instant,this.index=t,this.text=r,this.start=n||new m(e),this.end=i}clone(){let e=new y(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}addTag(e){return this.start.addTag(e),this.end&&this.end.addTag(e),this}addTags(e){return this.start.addTags(e),this.end&&this.end.addTags(e),this}tags(){let e=new Set(this.start.tags());if(this.end)for(let t of this.end.tags())e.add(t);return e}toString(){let e=Array.from(this.tags()).sort();return`[ParsingResult {index: ${this.index}, text: '${this.text}', tags: ${JSON.stringify(e)} ...}]`}}function g(e,t,r="\\s{0,5},?\\s{0,5}"){let n=t.replace(/\((?!\?)/g,"(?:");return`${e}${n}(?:${r}${n}){0,10}`}function b(e){return e instanceof Array?[...e]:e instanceof Map?Array.from(e.keys()):Object.keys(e)}function v(e){let t=b(e).sort((e,t)=>t.length-e.length).join("|").replace(/\./g,"\\.");return`(?:${t})`}function _(e){return e<100&&(e>50?e+=1900:e+=2e3),e}function S(e,t,r){let n=new Date(e);n.setMonth(r-1),n.setDate(t);let i=d(n,{year:1}),o=d(n,{year:-1});return Math.abs(i.getTime()-e.getTime())31)return t.index=t.index+t[Z].length,null;if(r.start.assign("month",n),r.start.assign("day",i),t[J]){let e=k(t[J]);r.start.assign("year",e)}else{let t=S(e.refDate,i,n);r.start.imply("year",t)}if(t[K]){let e=N(t[K]);r.end=r.start.clone(),r.end.assign("day",e)}return r}}let ee=RegExp(`(${v(T)})(?:-|/|\\s*,?\\s*)(${I})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${I})\\s*)?(?:(?:-|/|\\s*,\\s*|\\s+)(${P}))?(?=\\W|$)(?!\\:\\d)`,"i"),et=1,er=2,en=3,ei=4;class eo extends V{shouldSkipYearLikeDate;constructor(e){super(),this.shouldSkipYearLikeDate=e}innerPattern(){return ee}innerExtract(e,t){let r=T[t[et].toLowerCase()],n=N(t[er]);if(n>31||this.shouldSkipYearLikeDate&&!t[en]&&!t[ei]&&t[er].match(/^2[0-5]$/))return null;let i=e.createParsingComponents({day:n,month:r}).addTag("parser/ENMonthNameMiddleEndianParser");if(t[ei]){let e=k(t[ei]);i.assign("year",e)}else{let t=S(e.refDate,n,r);i.imply("year",t)}if(!t[en])return i;let o=N(t[en]),a=e.createParsingResult(t.index,t[0]);return a.start=i,a.end=i.clone(),a.end.assign("day",o),a}}let ea=RegExp(`((?:in)\\s*)?(${v(T)})\\s*(?:(?:,|-|of)?\\s*(${P})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),es=1,eu=2,ec=3;class el extends V{innerPattern(){return ea}innerExtract(e,t){let r=t[eu].toLowerCase();if(t[0].length<=3&&!w[r])return null;let n=e.createParsingResult(t.index+(t[es]||"").length,t.index+t[0].length);n.start.imply("day",1),n.start.addTag("parser/ENMonthNameParser");let i=T[r];if(n.start.assign("month",i),t[ec]){let e=k(t[ec]);n.start.assign("year",e)}else{let t=S(e.refDate,1,i);n.start.imply("year",t)}return n}}let ef=RegExp(`([0-9]{4})[-\\.\\/\\s](?:(${v(T)})|([0-9]{1,2}))[-\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),ed=1,eh=2,ep=3,em=4;class ey extends V{strictMonthDateOrder;constructor(e){super(),this.strictMonthDateOrder=e}innerPattern(){return ef}innerExtract(e,t){let r=parseInt(t[ed]),n=parseInt(t[em]),i=t[ep]?parseInt(t[ep]):T[t[eh].toLowerCase()];if(i<1||i>12){if(this.strictMonthDateOrder)return null;n>=1&&n<=12&&([i,n]=[n,i])}return n<1||n>31?null:{day:n,month:i,year:r}}}let eg=RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),eb=1,ev=2;class e_ extends V{innerPattern(){return eg}innerExtract(e,t){let r=parseInt(t[ev]),n=parseInt(t[eb]);return e.createParsingComponents().imply("day",1).assign("month",n).assign("year",r)}}function eS(e,t,r,n){return RegExp(`${e}${t}(\\d{1,4})(?:(?:\\.|:|:)(\\d{1,2})(?:(?::|:)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${r}`,n)}function eE(e,t){return RegExp(`^(${e})(\\d{1,4})(?:(?:\\.|\\:|\\:)(\\d{1,2})(?:(?:\\.|\\:|\\:)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,"i")}let ew=2,eT=3,ex=4,eA=5,eO=6;class eM{strictMode;constructor(e=!1){this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?!/)(?=\\W|$)"}followingSuffix(){return"(?!/)(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let r=this.extractPrimaryTimeComponents(e,t);if(!r)return t[0].match(/^\d{4}/)?t.index+=4:t.index+=t[0].length,null;let n=t.index+t[1].length,i=t[0].substring(t[1].length),o=e.createParsingResult(n,i,r);t.index+=t[0].length;let a=e.text.substring(t.index),s=this.getFollowingTimePatternThroughCache().exec(a);return i.match(/^\d{3,4}/)&&s&&(s[0].match(/^\s*([+-])\s*\d{2,4}$/)||s[0].match(/^\s*([+-])\s*\d{2}\W\d{2}/))?null:!s||s[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(o):(o.end=this.extractFollowingTimeComponents(e,s,o),o.end&&(o.text+=s[0]),this.checkAndReturnWithFollowingPattern(o))}extractPrimaryTimeComponents(e,t,r=!1){let n=e.createParsingComponents(),i=0,o=null,a=parseInt(t[ew]);if(a>100){if(4==t[ew].length&&null==t[eT]&&!t[eO]||this.strictMode||null!=t[eT])return null;i=a%100,a=Math.floor(a/100)}if(a>24)return null;if(null!=t[eT]){if(1==t[eT].length&&!t[eO])return null;i=parseInt(t[eT])}if(i>=60)return null;if(a>12&&(o=t9.PM),null!=t[eO]){if(a>12)return null;let e=t[eO][0].toLowerCase();"a"==e&&(o=t9.AM,12==a&&(a=0)),"p"==e&&(o=t9.PM,12!=a&&(a+=12))}if(n.assign("hour",a),n.assign("minute",i),null!==o?n.assign("meridiem",o):a<12?n.imply("meridiem",t9.AM):n.imply("meridiem",t9.PM),null!=t[eA]){let e=parseInt(t[eA].substring(0,3));if(e>=1e3)return null;n.assign("millisecond",e)}if(null!=t[ex]){let e=parseInt(t[ex]);if(e>=60)return null;n.assign("second",e)}return n}extractFollowingTimeComponents(e,t,r){let n=e.createParsingComponents();if(null!=t[eA]){let e=parseInt(t[eA].substring(0,3));if(e>=1e3)return null;n.assign("millisecond",e)}if(null!=t[ex]){let e=parseInt(t[ex]);if(e>=60)return null;n.assign("second",e)}let i=parseInt(t[ew]),o=0,a=-1;if(null!=t[eT]?o=parseInt(t[eT]):i>100&&(o=i%100,i=Math.floor(i/100)),o>=60||i>24)return null;if(i>=12&&(a=t9.PM),null!=t[eO]){if(i>12)return null;let e=t[eO][0].toLowerCase();"a"==e&&(a=t9.AM,12==i&&(i=0,n.isCertain("day")||n.imply("day",n.get("day")+1))),"p"==e&&(a=t9.PM,12!=i&&(i+=12)),r.start.isCertain("meridiem")||(a==t9.AM?(r.start.imply("meridiem",t9.AM),12==r.start.get("hour")&&r.start.assign("hour",0)):(r.start.imply("meridiem",t9.PM),12!=r.start.get("hour")&&r.start.assign("hour",r.start.get("hour")+12)))}return n.assign("hour",i),n.assign("minute",o),a>=0?n.assign("meridiem",a):r.start.isCertain("meridiem")&&r.start.get("hour")>12?r.start.get("hour")-12>i?n.imply("meridiem",t9.AM):i<=12&&(n.assign("hour",i+12),n.assign("meridiem",t9.PM)):i>12?n.imply("meridiem",t9.PM):i<=12&&n.imply("meridiem",t9.AM),n.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let e=t[1],r=t[2];if(r.includes(".")&&!r.match(/\d(\.\d{2})+$/))return null;let n=parseInt(r),i=parseInt(e);if(n>24||i>24)return null}return e}cachedPrimaryPrefix=null;cachedPrimarySuffix=null;cachedPrimaryTimePattern=null;getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t||(this.cachedPrimaryTimePattern=eS(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t),this.cachedPrimaryTimePattern}cachedFollowingPhase=null;cachedFollowingSuffix=null;cachedFollowingTimePatten=null;getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t||(this.cachedFollowingTimePatten=eE(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t),this.cachedFollowingTimePatten}}class eR extends eM{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\–|\\~|\\〜|to|until|through|till|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let r=super.extractPrimaryTimeComponents(e,t);if(!r)return r;if(t[0].endsWith("night")){let e=r.get("hour");e>=6&&e<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",t9.PM)):e<6&&r.assign("meridiem",t9.AM)}if(t[0].endsWith("afternoon")){r.assign("meridiem",t9.PM);let e=r.get("hour");e>=0&&e<=6&&r.assign("hour",r.get("hour")+12)}return t[0].endsWith("morning")&&(r.assign("meridiem",t9.AM),12>r.get("hour")&&r.assign("hour",r.get("hour"))),r.addTag("parser/ENTimeExpressionParser")}extractFollowingTimeComponents(e,t,r){let n=super.extractFollowingTimeComponents(e,t,r);return n&&n.addTag("parser/ENTimeExpressionParser"),n}}let eC=RegExp(`(${B})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`,"i"),eI=RegExp(`(${F})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`,"i");class eN extends V{strictMode;constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?eI:eC}innerExtract(e,t){let r=z(t[1]);return r?m.createRelativeFromReference(e.reference,h(r)):null}}let eP=RegExp(`(${B})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),ek=RegExp(`(${F})\\s{0,5}(later|after|from now)(?=\\W|$)`,"i"),eD=1;class eL extends V{strictMode;constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?ek:eP}innerExtract(e,t){let r=z(t[eD]);return r?m.createRelativeFromReference(e.reference,r):null}}class ej{refine(e,t){return t.filter(t=>this.isValid(e,t))}}class eU{refine(e,t){if(t.length<2)return t;let r=[],n=t[0],i=null;for(let o=1;o{console.log(`${this.constructor.name} merged ${t} and ${r} into ${o}`)}),n=o}else r.push(n),n=i}return null!=n&&r.push(n),r}}class eB extends eU{shouldMergeResults(e,t,r){return!t.end&&!r.end&&null!=e.match(this.patternBetween())}mergeResults(e,t,r){if(t.start.isOnlyWeekdayComponent()||r.start.isOnlyWeekdayComponent()||(r.start.getCertainComponents().forEach(e=>{t.start.isCertain(e)||t.start.imply(e,r.start.get(e))}),t.start.getCertainComponents().forEach(e=>{r.start.isCertain(e)||r.start.imply(e,t.start.get(e))})),t.start.date()>r.start.date()){let e=t.start.date(),n=r.start.date();r.start.isOnlyWeekdayComponent()&&d(n,{day:7})>e?(n=d(n,{day:7}),r.start.imply("day",n.getDate()),r.start.imply("month",n.getMonth()+1),r.start.imply("year",n.getFullYear())):t.start.isOnlyWeekdayComponent()&&d(e,{day:-7})e?(n=d(n,{year:1}),r.start.imply("year",n.getFullYear())):t.start.isDateWithUnknownYear()&&d(e,{year:-1})r.get("hour")&&(t.isCertain("hour")?r.assign("hour",r.get("hour")+12):r.imply("hour",r.get("hour")+12)),r.addTags(e.tags()),r.addTags(t.tags()),r}class eV extends eU{shouldMergeResults(e,t,r){return(t.start.isOnlyDate()&&r.start.isOnlyTime()||r.start.isOnlyDate()&&t.start.isOnlyTime())&&null!=e.match(this.patternBetween())}mergeResults(e,t,r){let n=t.start.isOnlyDate()?ez(t,r):ez(r,t);return n.index=t.index,n.text=t.text+e+r.text,n}}class eY extends eV{patternBetween(){return RegExp("^\\s*(T|at|after|before|on|of|,|-|\\.|∙|:)?\\s*$")}}let eq=RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i");class eH{timezoneOverrides;constructor(e){this.timezoneOverrides=e}refine(e,t){let r=e.option.timezones??{};return t.forEach(t=>{let n=e.text.substring(t.index+t.text.length),i=eq.exec(n);if(!i)return;let o=i[1].toUpperCase(),a=l(o,t.start.date()??t.refDate??new Date,{...this.timezoneOverrides,...r});if(null==a)return;e.debug(()=>{console.log(`Extracting timezone: '${o}' into: ${a} for: ${t.start}`)});let s=t.start.get("timezoneOffset");!(null!==s&&a!=s&&(t.start.isCertain("timezoneOffset")||o!=i[1]))&&(!t.start.isOnlyDate()||o==i[1])&&(t.text+=i[0],t.start.isCertain("timezoneOffset")||t.start.assign("timezoneOffset",a),null==t.end||t.end.isCertain("timezoneOffset")||t.end.assign("timezoneOffset",a))}),t}}let eW=RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),eG=1,eZ=2,eK=3;class eX{refine(e,t){return t.forEach(function(t){if(t.start.isCertain("timezoneOffset"))return;let r=e.text.substring(t.index+t.text.length),n=eW.exec(r);if(!n)return;e.debug(()=>{console.log(`Extracting timezone: '${n[0]}' into : ${t}`)});let i=60*parseInt(n[eZ])+parseInt(n[eK]||"0");i>840||("-"===n[eG]&&(i=-i),null!=t.end&&t.end.assign("timezoneOffset",i),t.start.assign("timezoneOffset",i),t.text+=n[0])}),t}}class eJ{refine(e,t){if(t.length<2)return t;let r=[],n=t[0];for(let i=1;i=n.index+n.text.length){r.push(n),n=o;continue}let a=null,s=null;o.text.length>n.text.length?(a=o,s=n):(a=n,s=o),e.debug(()=>{console.log(`${this.constructor.name} remove ${s} by ${a}`)}),n=a}return null!=n&&r.push(n),r}}class eQ{refine(e,t){return e.option.forwardDate&&t.forEach(t=>{let r=e.reference.getDateWithAdjustedTimezone();if(t.start.isOnlyTime()&&e.reference.instant>t.start.date()){let r=e.reference.getDateWithAdjustedTimezone(),n=new Date(r);n.setDate(n.getDate()+1),o(t.start,n),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${t} time from the ref date (${r}) to the following day (${n})`)}),t.end&&t.end.isOnlyTime()&&(o(t.end,n),t.start.date()>t.end.date()&&(n.setDate(n.getDate()+1),o(t.end,n)))}if(t.start.isOnlyWeekdayComponent()&&r>t.start.date()){let n=t.start.get("weekday")-r.getDay();if(n<=0&&(n+=7),r=d(r,{day:n}),o(t.start,r),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${t} weekday (${t.start})`)}),t.end&&t.end.isOnlyWeekdayComponent()){let n=t.end.get("weekday")-r.getDay();n<=0&&(n+=7),r=d(r,{day:n}),o(t.end,r),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${t} weekday (${t.end})`)})}}if(t.start.isDateWithUnknownYear()&&r>t.start.date())for(let n=0;n<3&&r>t.start.date();n++)t.start.imply("year",t.start.get("year")+1),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${t} year (${t.start})`)}),t.end&&!t.end.isCertain("year")&&(t.end.imply("year",t.end.get("year")+1),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${t} month (${t.start})`)}))}),t}}class e0 extends ej{strictMode;constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):!this.strictMode||this.isStrictModeValid(e,t):(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return!t.start.isOnlyWeekdayComponent()||(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1)}}let e1=RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),e2=1,e6=2,e3=3,e4=4,e5=5,e8=6,e9=7,e7=8,te=9,tt=10;class tr extends V{innerPattern(){return e1}innerExtract(e,t){let r=e.createParsingComponents({year:parseInt(t[e2]),month:parseInt(t[e6]),day:parseInt(t[e3])});if(null!=t[e4]&&(r.assign("hour",parseInt(t[e4])),r.assign("minute",parseInt(t[e5])),null!=t[e8]&&r.assign("second",parseInt(t[e8])),null!=t[e9]&&r.assign("millisecond",parseInt(t[e9])),null!=t[e7])){let e=0;if(t[te]){let r=parseInt(t[te]),n=0;null!=t[tt]&&(n=parseInt(t[tt])),(e=60*r)<0?e-=n:e+=n}r.assign("timezoneOffset",e)}return r.addTag("parser/ISOFormatParser")}}class tn extends eU{mergeResults(e,t,r){let n=r.clone();return n.index=t.index,n.text=t.text+e+n.text,n.start.assign("weekday",t.start.get("weekday")),n.end&&n.end.assign("weekday",t.start.get("weekday")),n}shouldMergeResults(e,t,r){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&r.start.isCertain("day")&&null!=e.match(/^,?\s*$/)}}function ti(e,t=!1){return e.parsers.unshift(new tr),e.refiners.unshift(new tn),e.refiners.unshift(new eX),e.refiners.unshift(new eJ),e.refiners.push(new eH),e.refiners.push(new eJ),e.refiners.push(new eQ),e.refiners.push(new e0(t)),e}function to(e){let t=e.getDateWithAdjustedTimezone(),r=new m(e,{});return n(r,t),i(r,t),r.assign("timezoneOffset",e.getTimezoneOffset()),r.addTag("casualReference/now"),r}function ta(e){let t=e.getDateWithAdjustedTimezone(),r=new m(e,{});return n(r,t),a(r,t),r.delete("meridiem"),r.addTag("casualReference/today"),r}function ts(e){return tc(e,1).addTag("casualReference/yesterday")}function tu(e){return tl(e,1).addTag("casualReference/tomorrow")}function tc(e,t){return tl(e,-t)}function tl(e,t){let r=e.getDateWithAdjustedTimezone(),i=new m(e,{}),o=new Date(r.getTime());return o.setDate(o.getDate()+t),n(i,o),a(i,o),i.delete("meridiem"),i}function tf(e,t=22){let r=e.getDateWithAdjustedTimezone(),i=new m(e,{});return n(i,r),i.imply("hour",t),i.imply("meridiem",t9.PM),i.addTag("casualReference/tonight"),i}function td(e,t=20){let r=new m(e,{});return r.imply("meridiem",t9.PM),r.imply("hour",t),r.addTag("casualReference/evening"),r}function th(e){let t=new m(e,{});return e.getDateWithAdjustedTimezone().getHours()>2&&t.addDurationAsImplied({day:1}),t.assign("hour",0),t.imply("minute",0),t.imply("second",0),t.imply("millisecond",0),t.addTag("casualReference/midnight"),t}function tp(e,t=6){let r=new m(e,{});return r.imply("meridiem",t9.AM),r.imply("hour",t),r.imply("minute",0),r.imply("second",0),r.imply("millisecond",0),r.addTag("casualReference/morning"),r}function tm(e,t=15){let r=new m(e,{});return r.imply("meridiem",t9.PM),r.imply("hour",t),r.imply("minute",0),r.imply("second",0),r.imply("millisecond",0),r.addTag("casualReference/afternoon"),r}function ty(e){let t=new m(e,{});return t.imply("meridiem",t9.AM),t.assign("hour",12),t.imply("minute",0),t.imply("second",0),t.imply("millisecond",0),t.addTag("casualReference/noon"),t}let tg=/(now|today|tonight|tomorrow|overmorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i;class tb extends V{innerPattern(e){return tg}innerExtract(e,t){let r=e.refDate,i=t[0].toLowerCase(),o=e.createParsingComponents();switch(i){case"now":o=to(e.reference);break;case"today":o=ta(e.reference);break;case"yesterday":o=ts(e.reference);break;case"tomorrow":case"tmr":case"tmrw":o=tu(e.reference);break;case"tonight":o=tf(e.reference);break;case"overmorrow":o=tl(e.reference,2);break;default:if(i.match(/last\s*night/)){if(r.getHours()>6){let e=new Date(r.getTime());e.setDate(e.getDate()-1),r=e}n(o,r),o.imply("hour",0)}}return o.addTag("parser/ENCasualDateParser"),o}}let tv=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|midday|noon)(?=\W|$)/i;class t_ extends V{innerPattern(){return tv}innerExtract(e,t){let r=null;switch(t[1].toLowerCase()){case"afternoon":r=tm(e.reference);break;case"evening":case"night":r=td(e.reference);break;case"midnight":r=th(e.reference);break;case"morning":r=tp(e.reference);break;case"noon":case"midday":r=ty(e.reference)}return r&&r.addTag("parser/ENCasualTimeParser"),r}}function tS(e,t,r){let n=tE(e.getDateWithAdjustedTimezone(),t,r),i=new m(e);return(i=i.addDurationAsImplied({day:n})).assign("weekday",t),i}function tE(e,t,r){let n=e.getDay();switch(r){case"this":return tT(e,t);case"last":return tx(e,t);case"next":if(n==t7.SUNDAY)return t==t7.SUNDAY?7:t;if(n==t7.SATURDAY){if(t==t7.SATURDAY)return 7;if(t==t7.SUNDAY)return 8;return 1+t}if(t=0&&(r-=7),r}let tA=RegExp(`(?:(?:\\,|\\(|\\()\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${v(E)}|weekend|weekday)(?:\\s*(?:\\,|\\)|\\)))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),tO=1,tM=2,tR=3;class tC extends V{innerPattern(){return tA}innerExtract(e,t){let r,n=t[tO],i=t[tR],o=n||i;o=(o=o||"").toLowerCase();let a=null;"last"==o||"past"==o?a="last":"next"==o?a="next":"this"==o&&(a="this");let s=t[tM].toLowerCase();if(void 0!==E[s])r=E[s];else if("weekend"==s)r="last"==a?t7.SUNDAY:t7.SATURDAY;else{if("weekday"!=s)return null;let t=e.reference.getDateWithAdjustedTimezone().getDay();t==t7.SUNDAY||t==t7.SATURDAY?r="last"==a?t7.FRIDAY:t7.MONDAY:(r=t-1,r=(r="last"==a?r-1:r+1)%5+1)}return tS(e.reference,r,a)}}let tI=RegExp(`(this|last|past|next|after\\s*this)\\s*(${v(M)})(?=\\s*)(?=\\W|$)`,"i"),tN=1,tP=2;class tk extends V{innerPattern(){return tI}innerExtract(e,t){let r=t[tN].toLowerCase(),n=t[tP].toLowerCase(),i=M[n];if("next"==r||r.startsWith("after")){let t={};return t[i]=1,m.createRelativeFromReference(e.reference,t)}if("last"==r||"past"==r){let t={};return t[i]=-1,m.createRelativeFromReference(e.reference,t)}let o=e.createParsingComponents(),a=new Date(e.reference.instant.getTime());return n.match(/week/i)?(a.setDate(a.getDate()-a.getDay()),o.imply("day",a.getDate()),o.imply("month",a.getMonth()+1),o.imply("year",a.getFullYear())):n.match(/month/i)?(a.setDate(1),o.imply("day",a.getDate()),o.assign("year",a.getFullYear()),o.assign("month",a.getMonth()+1)):n.match(/year/i)&&(a.setDate(1),a.setMonth(0),o.imply("day",a.getDate()),o.imply("month",a.getMonth()+1),o.assign("year",a.getFullYear())),o}}let tD=RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),tL=1,tj=5,tU=2,tB=3,tF=4;class tz{groupNumberMonth;groupNumberDay;constructor(e){this.groupNumberMonth=e?tB:tU,this.groupNumberDay=e?tU:tB}pattern(){return tD}extract(e,t){let r=t.index+t[tL].length,n=t.index+t[0].length-t[tj].length;if(r>0&&e.text.substring(0,r).match("\\d/?$")||ni.indexOf("/"))return;let o=e.createParsingResult(r,i),a=parseInt(t[this.groupNumberMonth]),s=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(!(s>=1)||!(s<=12)||!(a<=31))return null;else[s,a]=[a,s];if(s<1||s>31)return null;if(o.start.assign("day",s),o.start.assign("month",a),t[tF]){let e=_(parseInt(t[tF]));o.start.assign("year",e)}else{let t=S(e.refDate,s,a);o.start.imply("year",t)}return o.addTag("parser/SlashDateFormatParser")}}let t$=RegExp(`(this|last|past|next|after|\\+|-)\\s*(${B})(?=\\W|$)`,"i"),tV=RegExp(`(this|last|past|next|after|\\+|-)\\s*(${F})(?=\\W|$)`,"i");class tY extends V{allowAbbreviations;constructor(e=!0){super(),this.allowAbbreviations=e}innerPattern(){return this.allowAbbreviations?t$:tV}innerExtract(e,t){let r=t[1].toLowerCase(),n=z(t[2]);if(!n)return null;switch(r){case"last":case"past":case"-":n=h(n)}return m.createRelativeFromReference(e.reference,n)}}function tq(e){return null!=e.text.match(/^[+-]/i)}function tH(e){return null!=e.text.match(/^-/i)}class tW extends eU{shouldMergeResults(e,t,r){return!!e.match(/^\s*$/i)&&(tq(r)||tH(r))}mergeResults(e,t,r,n){let i=z(r.text);tH(r)&&(i=h(i));let o=m.createRelativeFromReference(p.fromDate(t.start.date()),i);return new y(t.reference,t.index,`${t.text}${e}${r.text}`,o)}}function tG(e){return null!=e.text.match(/\s+(before|from)$/i)}function tZ(e){return null!=e.text.match(/\s+(after|since)$/i)}class tK extends eU{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,r){return!!e.match(this.patternBetween())&&(!!tG(t)||!!tZ(t))&&!!r.start.get("day")&&!!r.start.get("month")&&!!r.start.get("year")}mergeResults(e,t,r){let n=z(t.text);tG(t)&&(n=h(n));let i=m.createRelativeFromReference(p.fromDate(r.start.date()),n);return new y(r.reference,t.index,`${t.text}${e}${r.text}`,i)}}let tX=RegExp(`^\\s*(${P})`,"i"),tJ=1;class tQ{refine(e,t){return t.forEach(function(t){if(!t.start.isDateWithUnknownYear())return;let r=e.text.substring(t.index+t.text.length),n=tX.exec(r);if(!n||n[0].trim().length<=3)return;e.debug(()=>{console.log(`Extracting year: '${n[0]}' into : ${t}`)});let i=k(n[tJ]);null!=t.end&&t.end.assign("year",i),t.start.assign("year",i),t.text+=n[0]}),t}}class t0 extends ej{constructor(){super()}isValid(e,t){let r=t.text.trim();return r===e.text.trim()||("may"!==r.toLowerCase()||e.text.substring(0,t.index).trim().match(/\b(in)$/i)?!r.toLowerCase().endsWith("the second")||(e.text.substring(t.index+t.text.length).trim().length>0&&e.debug(()=>{console.log(`Removing unlikely result: ${t}`)}),!1):(e.debug(()=>{console.log(`Removing unlikely result: ${t}`)}),!1))}}class t1{createCasualConfiguration(e=!1){let t=this.createConfiguration(!1,e);return t.parsers.push(new tb),t.parsers.push(new t_),t.parsers.push(new el),t.parsers.push(new tk),t.parsers.push(new tY),t.refiners.push(new t0),t}createConfiguration(e=!0,t=!1){let r=ti({parsers:[new tz(t),new W(e),new Q,new eo(t),new tC,new e_,new eR(e),new eN(e),new eL(e)],refiners:[new eY]},e);return r.parsers.unshift(new ey(e)),r.refiners.unshift(new tK),r.refiners.unshift(new tW),r.refiners.unshift(new eJ),r.refiners.push(new eY),r.refiners.push(new tQ),r.refiners.push(new eF),r}}class t2{parsers;refiners;defaultConfig=new t1;constructor(e){e=e||this.defaultConfig.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new t2({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,r){let n=this.parse(e,t,r);return n.length>0?n[0].start.date():null}parse(e,t,r){let n=new t6(e,t,r),i=[];return this.parsers.forEach(e=>{let t=t2.executeParser(n,e);i=i.concat(t)}),i.sort((e,t)=>e.index-t.index),this.refiners.forEach(function(e){i=e.refine(n,i)}),i}static executeParser(e,t){let r=[],n=t.pattern(e),i=e.text,o=e.text,a=n.exec(o);for(;a;){let s=a.index+i.length-o.length;a.index=s;let u=t.extract(e,a);if(!u){o=i.substring(a.index+1),a=n.exec(o);continue}let c=null;u instanceof y?c=u:u instanceof m?(c=e.createParsingResult(a.index,a[0])).start=u:c=e.createParsingResult(a.index,a[0],u);let l=c.index,f=c.text;e.debug(()=>console.log(`${t.constructor.name} extracted (at index=${l}) '${f}'`)),r.push(c),o=i.substring(l+f.length),a=n.exec(o)}return r}}class t6{text;option;reference;refDate;constructor(e,t,r){this.text=e,this.option=r??{},this.reference=p.fromInput(t,this.option.timezones),this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof m?e:new m(this.reference,e)}createParsingResult(e,t,r,n){let i="string"==typeof t?t:this.text.substring(e,t),o=r?this.createParsingComponents(r):null,a=n?this.createParsingComponents(n):null;return new y(this.reference,e,i,o,a)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}}let t3=new t1,t4=new t2(t3.createCasualConfiguration(!1));new t2(t3.createConfiguration(!0,!1)),new t2(t3.createCasualConfiguration(!0));let t5=t4;function t8(e,t,r){return t5.parse(e,t,r)}var t9,t7,re,rt=r(67264),rr=r.n(rt);function rn(e){if(!e)return null;let t=new Date,r=e.date();if(e.isCertain("hour")||e.isCertain("minute")||e.isCertain("second")||e.isCertain("millisecond")||(t.setHours(e.get("hour")||0),t.setMinutes(e.get("minute")||0),t.setSeconds(e.get("second")||0),t.setMilliseconds(e.get("millisecond")||0)),r>t){let n=t.getTime()+rr()("1d");if(r.getTime()<=n)return t;e.isCertain("year")||r.setFullYear(r.getFullYear()-1)}return r}function ri(e,t=!1){let r=t8(e,t?{timezone:0}:{});if(0===r.length)return[null,null];let n=1===r.length?r[0]:r[1],i=rn(n.start),o=rn(n.end)||new Date;return o&&i&&o"divider"!==t&&t[1]===e);return t?t[0]:void 0}let rc=["30s","1m","5m","15m","30m","1h","3h","6h","12h"],rl={"30s":{seconds:30},"1m":{minutes:1},"5m":{minutes:5},"15m":{minutes:15},"30m":{minutes:30},"1h":{hours:1},"3h":{hours:3},"6h":{hours:6},"12h":{hours:12}},rf=e=>{if(!e)return null;let t=t5.parse(e)[0];return rn(t?.start)}},14274:(e,t,r)=>{"use strict";var n=r(80656);e.exports=Function.prototype.bind||n},14292:(e,t,r)=>{"use strict";var n=r(74818),i=r(93529),o=r(78030),a=r(56315),s=r(62397),u=n(a(),Number);i(u,{getPolyfill:a,implementation:o,shim:s}),e.exports=u},14333:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(53362);let i={y:function(e,t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return(0,n.A)("yy"===t?i%100:i,t.length)},M:function(e,t){var r=e.getUTCMonth();return"M"===t?String(r+1):(0,n.A)(r+1,2)},d:function(e,t){return(0,n.A)(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:function(e,t){return(0,n.A)(e.getUTCHours()%12||12,t.length)},H:function(e,t){return(0,n.A)(e.getUTCHours(),t.length)},m:function(e,t){return(0,n.A)(e.getUTCMinutes(),t.length)},s:function(e,t){return(0,n.A)(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,i=Math.floor(e.getUTCMilliseconds()*Math.pow(10,r-3));return(0,n.A)(i,t.length)}}},15179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(r(89680)),i=l(r(42503)),o=l(r(32358)),a=l(r(24708)),s=l(r(47961)),u=l(r(32454)),c=l(r(48577));function l(e){return e&&e.__esModule?e:{default:e}}var f="midnight",d="noon",h="morning",p="afternoon",m="evening",y="night";function g(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;if(0===o)return r+String(i);var a=t||"";return r+String(i)+a+(0,u.default)(o,2)}function b(e,t){return e%60==0?(e>0?"-":"+")+(0,u.default)(Math.abs(e)/60,2):v(e,t)}function v(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e);return n+(0,u.default)(Math.floor(i/60),2)+r+(0,u.default)(i%60,2)}t.default={G:function(e,t,r){var n=+(e.getUTCFullYear()>0);switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return c.default.y(e,t)},Y:function(e,t,r,n){var i=(0,s.default)(e,n),o=i>0?i:1-i;if("YY"===t){var a=o%100;return(0,u.default)(a,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):(0,u.default)(o,t.length)},R:function(e,t){var r=(0,o.default)(e);return(0,u.default)(r,t.length)},u:function(e,t){var r=e.getUTCFullYear();return(0,u.default)(r,t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return(0,u.default)(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return(0,u.default)(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return c.default.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return(0,u.default)(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var i=(0,a.default)(e,n);return"wo"===t?r.ordinalNumber(i,{unit:"week"}):(0,u.default)(i,t.length)},I:function(e,t,r){var n=(0,i.default)(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):(0,u.default)(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):c.default.d(e,t)},D:function(e,t,r){var i=(0,n.default)(e);return"Do"===t?r.ordinalNumber(i,{unit:"dayOfYear"}):(0,u.default)(i,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return(0,u.default)(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return(0,u.default)(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),i=0===n?7:n;switch(t){case"i":return String(i);case"ii":return(0,u.default)(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n,i=e.getUTCHours();switch(n=12===i?d:0===i?f:i/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n,i=e.getUTCHours();switch(n=i>=17?m:i>=12?p:i>=4?h:y,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return c.default.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):c.default.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):(0,u.default)(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):(0,u.default)(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):c.default.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):c.default.s(e,t)},S:function(e,t){return c.default.S(e,t)},X:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return b(i);case"XXXX":case"XX":return v(i);default:return v(i,":")}},x:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return b(i);case"xxxx":case"xx":return v(i);default:return v(i,":")}},O:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+g(i,":");default:return"GMT"+v(i,":")}},z:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+g(i,":");default:return"GMT"+v(i,":")}},t:function(e,t,r,n){var i=Math.floor((n._originalDate||e).getTime()/1e3);return(0,u.default)(i,t.length)},T:function(e,t,r,n){var i=(n._originalDate||e).getTime();return(0,u.default)(i,t.length)}},e.exports=t.default},15242:(e,t,r)=>{"use strict";r.d(t,{o:()=>i,x:()=>o}),r(55729);var n=r(36254);r(6029);let[i,o]=(0,n.F)("ModalBase component was not found in tree")},15811:(e,t,r)=>{"use strict";function n(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}r.d(t,{z:()=>n})},15862:(e,t,r)=>{"use strict";r.d(t,{nW:()=>m,xd:()=>p});var n=r(6029),i=r(55729),o=r(47766),a=r(27202);let s="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",u="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function c(e){return!(e<0)&&!(e>9)&&parseInt(e.toString(),10)===e}function l(e){if(!(e.primaryColor in e.colors))throw Error(s);if("object"==typeof e.primaryShade&&(!c(e.primaryShade.dark)||!c(e.primaryShade.light))||"number"==typeof e.primaryShade&&!c(e.primaryShade))throw Error(u)}function f(e,t){if(!t)return l(e),e;let r=(0,a.$)(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(r.headings.fontFamily=t.fontFamily),l(r),r}let d=(0,i.createContext)(null),h=()=>(0,i.useContext)(d)||o.S;function p(){let e=(0,i.useContext)(d);if(!e)throw Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function m({theme:e,children:t,inherit:r=!0}){let a=h(),s=(0,i.useMemo)(()=>f(r?a:o.S,e),[e,a,r]);return(0,n.jsx)(d.Provider,{value:s,children:t})}m.displayName="@mantine/core/MantineThemeProvider"},16162:function(e,t,r){var n=r(29143);!function(t,r){e.exports=r()}(0,function(){"use strict";let e;var t,i,o="u">typeof globalThis?globalThis:"u">typeof window?window:void 0!==r.g?r.g:"u">typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var u={},c={},l=function(e,t){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function f(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var d=function(){return(d=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function p(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function m(e,t){return function(r,n){t(r,n,e)}}function y(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function g(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})}function b(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function E(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function w(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{!function(e){e.value instanceof A?Promise.resolve(e.value.v).then(u,c):l(o[0][2],e)}(i[e](t))}catch(e){l(o[0][3],e)}}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function M(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:A(e[n](t)),done:!1}:i?i(t):t}:i}}function R(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=S(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,i,(t=e[r](t)).done,t.value)})}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function N(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return I(t,e),t}function P(e){return e&&e.__esModule?e:{default:e}}function k(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function D(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function L(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function j(e,t,r){if(null!=t){var n;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var U="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function B(e){function t(t){e.error=e.hasError?new U(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}var F={__extends:f,__assign:d,__rest:h,__decorate:p,__param:m,__metadata:y,__awaiter:g,__generator:b,__createBinding:v,__exportStar:_,__values:S,__read:E,__spread:w,__spreadArrays:T,__spreadArray:x,__await:A,__asyncGenerator:O,__asyncDelegator:M,__asyncValues:R,__makeTemplateObject:C,__importStar:N,__importDefault:P,__classPrivateFieldGet:k,__classPrivateFieldSet:D,__classPrivateFieldIn:L,__addDisposableResource:j,__disposeResources:B},z=s(Object.freeze({__proto__:null,__addDisposableResource:j,get __assign(){return d},__asyncDelegator:M,__asyncGenerator:O,__asyncValues:R,__await:A,__awaiter:g,__classPrivateFieldGet:k,__classPrivateFieldIn:L,__classPrivateFieldSet:D,__createBinding:v,__decorate:p,__disposeResources:B,__esDecorate:function(e,t,r,n,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,h=r.length-1;h>=0;h--){var p={};for(var m in n)p[m]="access"===m?{}:n[m];for(var m in n.access)p.access[m]=n.access[m];p.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var y=(0,r[h])("accessor"===u?{get:f.get,set:f.set}:f[c],p);if("accessor"===u){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw TypeError("Object expected");(s=a(y.get))&&(f.get=s),(s=a(y.set))&&(f.set=s),(s=a(y.init))&&i.unshift(s)}else(s=a(y))&&("field"===u?i.unshift(s):f[c]=s)}l&&Object.defineProperty(l,n.name,f),d=!0},__exportStar:_,__extends:f,__generator:b,__importDefault:P,__importStar:N,__makeTemplateObject:C,__metadata:y,__param:m,__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:E,__rest:h,__runInitializers:function(e,t,r){for(var n=arguments.length>2,i=0;i0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},ee=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},ei=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i=n?i.bind(t):function(){}}return eJ.ALL&&(e=J.ALL),t=t||{},{error:r("error",J.ERROR),warn:r("warn",J.WARN),info:r("info",J.INFO),debug:r("debug",J.DEBUG),verbose:r("verbose",J.VERBOSE)}}(null!=(i=r.logLevel)?i:J.INFO,e);if(s&&!r.suppressOverrideMessage){var c=null!=(o=Error().stack)?o:"";s.warn("Current logger will be overwritten from "+c),u.warn("Current logger will overwrite one already registered from "+c)}return Z("diag",u,t,!0)},t.disable=function(){X("diag",t)},t.createComponentLogger=function(e){return new et(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),ea=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},es=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},eu=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=ea(e,2);return[t[0],t[1]]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t,r,n=[],i=0;i0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},eB=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},e$=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i512||(this._internalState=e.split(",").reverse().reduce(function(e,t){var r=t.trim(),n=r.indexOf("=");if(-1!==n){var i=r.slice(0,n),o=r.slice(n+1,t.length);(function(e){return tc.test(e)})(i)&&function(e){return tl.test(e)&&!tf.test(e)}(o)&&e.set(i,o)}return e},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),th=eq.getInstance(),tp=eo.instance(),tm=new(function(){function e(){}return e.prototype.getMeter=function(e,t,r){return eM},e}()),ty="metrics",tg=(function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(e){return Z(ty,e,eo.instance())},e.prototype.getMeterProvider=function(){return K(ty)||tm},e.prototype.getMeter=function(e,t,r){return this.getMeterProvider().getMeter(e,t,r)},e.prototype.disable=function(){X(ty,eo.instance())},e})().getInstance(),tb=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}(),tv=eh("OpenTelemetry Baggage Key");function t_(e){return e.getValue(tv)||void 0}function tS(){return t_(eq.getInstance().active())}function tE(e,t){return e.setValue(tv,t)}function tw(e){return e.deleteValue(tv)}var tT,tx="propagation",tA=new tb,tO=(function(){function e(){this.createBaggage=ef,this.getBaggage=t_,this.getActiveBaggage=tS,this.setBaggage=tE,this.deleteBaggage=tw}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return Z(tx,e,eo.instance())},e.prototype.inject=function(e,t,r){return void 0===r&&(r=ej),this._getGlobalPropagator().inject(e,t,r)},e.prototype.extract=function(e,t,r){return void 0===r&&(r=eL),this._getGlobalPropagator().extract(e,t,r)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){X(tx,eo.instance())},e.prototype._getGlobalPropagator=function(){return K(tx)||tA},e})().getInstance(),tM="trace",tR=(function(){function e(){this._proxyTracerProvider=new ts,this.wrapSpanContext=e9,this.isSpanContextValid=e8,this.deleteSpan=e0,this.getSpan=eX,this.getActiveSpan=eJ,this.getSpanContext=e2,this.setSpan=eQ,this.setSpanContext=e1}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=Z(tM,this._proxyTracerProvider,eo.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return K(tM)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){X(tM,eo.instance()),this._proxyTracerProvider=new ts},e})().getInstance(),tC={context:th,diag:tp,metrics:tg,propagation:tO,trace:tR},tI=s(Object.freeze({__proto__:null,DiagConsoleLogger:eg,get DiagLogLevel(){return J},INVALID_SPANID:eH,INVALID_SPAN_CONTEXT:eG,INVALID_TRACEID:eW,ProxyTracer:to,ProxyTracerProvider:ts,ROOT_CONTEXT:em,get SamplingDecision(){return e7},get SpanKind(){return te},get SpanStatusCode(){return tt},get TraceFlags(){return eD},get ValueType(){return ep},baggageEntryMetadataFromString:ed,context:th,createContextKey:eh,createNoopMeter:function(){return eM},createTraceState:function(e){return new td(e)},default:tC,defaultTextMapGetter:eL,defaultTextMapSetter:ej,diag:tp,isSpanContextValid:e8,isValidSpanId:e5,isValidTraceId:e4,metrics:tg,propagation:tO,trace:tR})),tN={};function tP(e){for(var t={},r=e.length,n=0;n",license:"Apache-2.0",version:"0.1.0",homepage:"https://www.hyperdx.io",repository:{type:"git",url:"https://github.com/hyperdxio/hyperdx-js.git"},publishConfig:{access:"public"},files:["build/*"],main:"build/src/index.js",scripts:{clean:"rimraf coverage build tmp",prebuild:"npm run clean",build:"tsc -p tsconfig.release.json",postbuild:"npm run build:types","build:types":"tsc -d -p tsconfig.release.json --declarationMap --emitDeclarationOnly","build:watch":"tsc -w -p tsconfig.json",lint:"eslint . --ext .ts --ext .mts","ci:lint":"yarn lint && yarn tsc --noEmit",prettier:"prettier --config .prettierrc --write ."},dependencies:{"@opentelemetry/core":"^1.24.1","@opentelemetry/instrumentation":"^0.51.1","@opentelemetry/semantic-conventions":"^1.24.1","json-stringify-safe":"^5.0.1",shimmer:"^1.2.1",tslib:"^2.5.3"},devDependencies:{"@opentelemetry/api":"^1.8.0","@sentry/node":"7.x","@sentry/types-v7":"npm:@sentry/types@7.x","@sentry/types-v8":"npm:@sentry/types@8.x"},peerDependencies:{"@opentelemetry/api":"^1.3.0"},keywords:["sentry","exception","instrumentation","nodejs","opentelemetry","tracing"]},d2={},d6={exports:{}};!function(e,t){function r(e,t){var r=[],n=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]"}),function(i,o){if(r.length>0){var a=r.indexOf(this);~a?r.splice(a+1):r.push(this),~a?n.splice(a,1/0,i):n.push(i),~r.indexOf(o)&&(o=t.call(this,i,o))}else r.push(o);return null==e?o:e.call(this,i,o)}}(e.exports=function(e,t,n,i){return JSON.stringify(e,r(t,i),n)}).getSerialize=r}(d6);var d3,d4,d5=d6.exports,d8=a(d5);function d9(){return d4||(d4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getEventProcessor=e.getSpanNameFromEvent=e.isSentryEventAnException=e.extractSpanEventsFromException=e.extractSemAttrsFromEvent=e.SEMATTRS_SENTRY_VERSION=e.SEMATTRS_EXCEPTION_THREAD_ID=e.SEMATTRS_EXCEPTION_TAGS=e.SEMATTRS_EXCEPTION_PARSED_STACKTRACE=e.SEMATTRS_EXCEPTION_MODULES=e.SEMATTRS_EXCEPTION_MODULE=e.SEMATTRS_EXCEPTION_MECHANISM=void 0;let t=z.__importStar(tI),r=(tT||(tT=1,Object.defineProperty(tN,"__esModule",{value:!0}),tN.ExceptionEventName=void 0,tN.ExceptionEventName="exception"),tN),n=d0,i=d1,o=function(){if(d3)return d2;d3=1,Object.defineProperty(d2,"__esModule",{value:!0}),d2.jsonToString=void 0;let e=tI,t=z.__importDefault(d5);return d2.jsonToString=r=>{try{return JSON.stringify(r)}catch(n){return e.diag.error("Failed to stringify json",n),(0,t.default)(r)}},d2}(),a=t.default.trace.getTracer(i.name,i.version);e.SEMATTRS_EXCEPTION_MECHANISM="exception.mechanism",e.SEMATTRS_EXCEPTION_MODULE="exception.module",e.SEMATTRS_EXCEPTION_MODULES="exception.modules",e.SEMATTRS_EXCEPTION_PARSED_STACKTRACE="exception.parsed_stacktrace",e.SEMATTRS_EXCEPTION_TAGS="exception.tags",e.SEMATTRS_EXCEPTION_THREAD_ID="exception.thread_id",e.SEMATTRS_SENTRY_VERSION="sentry.version",e.extractSemAttrsFromEvent=(t,r,i)=>{var a,s,u,c,l,f;return{...i&&{[e.SEMATTRS_SENTRY_VERSION]:i},...t.modules&&{[e.SEMATTRS_EXCEPTION_MODULES]:(0,o.jsonToString)(t.modules)},[e.SEMATTRS_EXCEPTION_TAGS]:(0,o.jsonToString)({culture:null==(a=t.contexts)?void 0:a.culture,dist:t.dist,environment:t.environment,mechanism:r.mechanism,release:t.release}),...(null==(s=t.contexts)?void 0:s.app)&&{"app.build_type":t.contexts.app.build_type,"app.id":t.contexts.app.app_identifier,"app.memory":t.contexts.app.app_memory,"app.name":t.contexts.app.app_name,"app.start_time":t.contexts.app.app_start_time,"app.version":t.contexts.app.app_version},...(null==(u=t.contexts)?void 0:u.response)&&{[n.SEMATTRS_HTTP_STATUS_CODE]:t.contexts.response.status_code,[n.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH]:t.contexts.response.body_size,...(t.contexts.response.headers&&Object.entries(t.contexts.response.headers).reduce((e,[t,r])=>(e[`http.response.header.${t}`]=r,e)),{})},...(null==(c=t.contexts)?void 0:c.cloud_resource)&&{"cloud.provider":t.contexts.cloud_resource["cloud.provider"],"cloud.account.id":t.contexts.cloud_resource["cloud.account.id"],"cloud.region":t.contexts.cloud_resource["cloud.region"],"cloud.availability_zone":t.contexts.cloud_resource["cloud.availability_zone"],"cloud.platform":t.contexts.cloud_resource["cloud.platform"],"host.id":t.contexts.cloud_resource["host.id"],"host.type":t.contexts.cloud_resource["host.type"]},...(null==(l=t.contexts)?void 0:l.os)&&{"os.build_id":t.contexts.os.build,"os.kernel_version":t.contexts.os.kernel_version,"os.type":t.contexts.os.name,"os.version":t.contexts.os.version},...(null==(f=t.contexts)?void 0:f.device)&&{"device.id":t.contexts.device.device_unique_identifier,"device.manufacturer":t.contexts.device.manufacturer,"device.model.identifier":t.contexts.device.model_id,"device.model.name":t.contexts.device.model,"device.type":t.contexts.device.device_type,"device.battery_level":t.contexts.device.battery_level,"device.battery_status":t.contexts.device.battery_status,"device.orientation":t.contexts.device.orientation,"device.brand":t.contexts.device.brand,"device.sreen_resolution":t.contexts.device.screen_resolution,"device.screen_height_pixels":t.contexts.device.screen_height_pixels,"device.screen_width_pixels":t.contexts.device.screen_width_pixels,"device.screen_density":t.contexts.device.screen_density,"device.screen_dpi":t.contexts.device.screen_dpi,"device.online":t.contexts.device.online,"device.charging":t.contexts.device.charging,"device.supports_vibration":t.contexts.device.supports_vibration,"device.supports_accelerometer":t.contexts.device.supports_accelerometer,"device.supports_gyroscope":t.contexts.device.supports_gyroscope,"device.supports_audio":t.contexts.device.supports_audio,"device.supports_location_service":t.contexts.device.supports_location_service,"device.boot_time":t.contexts.device.boot_time,"device.low_memory":t.contexts.device.low_memory,"device.simulator":t.contexts.device.simulator,"device.memory_size":t.contexts.device.memory_size,"device.free_memory":t.contexts.device.free_memory,"device.usable_memory":t.contexts.device.usable_memory,"device.storage_size":t.contexts.device.storage_size,"device.free_storage":t.contexts.device.free_storage,"device.external_storage_size":t.contexts.device.external_storage_size,"device.external_free_storage":t.contexts.device.external_free_storage,"host.cpu.model.name":t.contexts.device.cpu_description,"host.cpu.count":t.contexts.device.processor_count,"host.cpu.frequency":t.contexts.device.processor_frequency},...t.server_name&&{"host.name":t.server_name}}},e.extractSpanEventsFromException=t=>({[n.SEMATTRS_EXCEPTION_MESSAGE]:t.value,[e.SEMATTRS_EXCEPTION_PARSED_STACKTRACE]:(0,o.jsonToString)(t.stacktrace),[n.SEMATTRS_EXCEPTION_TYPE]:t.type,...t.mechanism&&{[e.SEMATTRS_EXCEPTION_MECHANISM]:(0,o.jsonToString)(t.mechanism)},...t.module&&{[e.SEMATTRS_EXCEPTION_MODULE]:t.module},...t.thread_id&&{[e.SEMATTRS_EXCEPTION_THREAD_ID]:t.thread_id}}),e.isSentryEventAnException=e=>{var t,r;return(null==(r=null==(t=e.exception)?void 0:t.values)?void 0:r.length)>0},e.getSpanNameFromEvent=e=>{var t;return e.message?e.message:[null==(t=e.exception)?void 0:t.values[0].type,e.transaction].join(" ")},e.getEventProcessor=(n,i)=>(o,s,u,c)=>{try{if(t.diag.debug("Received Sentry event",o),(0,e.isSentryEventAnException)(o)){let l=n;null==l&&(l=a,t.diag.debug("Using default tracer")),(({customAttributes:n,event:i,hint:o,sentryVersion:a,span:s,spanStatus:u,tracer:c})=>{var l,f;let d=s,h=!1,p=1e3*i.timestamp,m=(0,e.extractSemAttrsFromEvent)(i,o,a);for(let o of(null==d&&(h=!0,d=c.startSpan((0,e.getSpanNameFromEvent)(i),{attributes:{...n,...m},startTime:p,kind:t.SpanKind.INTERNAL})),d.setStatus({code:u}),null!=(f=null==(l=i.exception)?void 0:l.values)?f:[]))d.addEvent(r.ExceptionEventName,(0,e.extractSpanEventsFromException)(o));h&&d.end(p)})({customAttributes:c,event:o,hint:s,sentryVersion:i,span:u,spanStatus:t.SpanStatusCode.ERROR,tracer:l})}}catch(e){t.diag.error("Error processing event",e)}return o}}($)),$}var d7={},he=function(){function e(){}return e.prototype.emit=function(e){},e}(),ht=new(function(){function e(){}return e.prototype.getLogger=function(e,t,r){return new he},e}()),hr="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof r.g?r.g:{},hn=Symbol.for("io.opentelemetry.js.api.logs"),hi=hr,ho=(function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(e){return hi[hn]?this.getLoggerProvider():(hi[hn]=function(e,t,r){return function(e){return 1===e?t:r}}(0,e,ht),e)},e.prototype.getLoggerProvider=function(){var e,t;return null!=(t=null==(e=hi[hn])?void 0:e.call(hi,1))?t:ht},e.prototype.getLogger=function(e,t,r){return this.getLoggerProvider().getLogger(e,t,r)},e.prototype.disable=function(){delete hi[hn]},e})().getInstance();function ha(e){void 0===e&&(e=[]);for(var t=[],r=0,n=e.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]({name:"HyperDX",setupOnce(){},setup(e){var r;if(!e.on)return;let n=e.getSdkMetadata(),i=(0,t.getEventProcessor)(void 0,null==(r=n.sdk)?void 0:r.version);e.on("beforeSendEvent",(e,t)=>{i(e,t)})}}),e.hyperdxIntegration=e._hyperdxIntegration}(hA)),hA);class i extends t.InstrumentationBase{constructor(e={}){super(r.name,r.version,e)}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}init(){return[new t.InstrumentationNodeModuleDefinition("@sentry/node",[">=7.30.0 <9"],t=>(e.diag.debug(`Detected Sentry installed with SDK version: ${t.SDK_VERSION}`),this._wrap(t,"init",r=>(...i)=>{let o=r.apply(this,i);try{t.addIntegration instanceof Function?(t.addIntegration((0,n.hyperdxIntegration)()),e.diag.debug("Added HyperDX Sentry integration")):e.diag.error("Sentry SDK does not support addIntegration method")}catch(t){e.diag.error("Error adding HyperDX Sentry integration",t)}return o}),t),e=>{})]}}return d7.SentryNodeInstrumentation=i,d7}var hM,hR={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});let t=z;t.__exportStar(d9(),e),t.__exportStar(hO(),e),t.__exportStar((hM||(hM=1,Object.defineProperty(hR,"__esModule",{value:!0})),hR),e)}(c);var hC={},hI={},hN={},hP={},hk={};Object.defineProperty(hk,"__esModule",{value:!0});let hD=Object.prototype.toString;function hL(e,t){return hD.call(e)===`[object ${t}]`}function hj(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function hU(e){return hL(e,"Object")}function hB(e,t){try{return e instanceof t}catch(e){return!1}}hk.isDOMError=function(e){return hL(e,"DOMError")},hk.isDOMException=function(e){return hL(e,"DOMException")},hk.isElement=function(e){return"u">typeof Element&&hB(e,Element)},hk.isError=function(e){switch(hD.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return hB(e,Error)}},hk.isErrorEvent=function(e){return hL(e,"ErrorEvent")},hk.isEvent=function(e){return"u">typeof Event&&hB(e,Event)},hk.isInstanceOf=hB,hk.isParameterizedString=hj,hk.isPlainObject=hU,hk.isPrimitive=function(e){return null===e||hj(e)||"object"!=typeof e&&"function"!=typeof e},hk.isRegExp=function(e){return hL(e,"RegExp")},hk.isString=function(e){return hL(e,"String")},hk.isSyntheticEvent=function(e){return hU(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e},hk.isThenable=function(e){return!!(e&&e.then&&"function"==typeof e.then)},hk.isVueViewModel=function(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)};var hF={};Object.defineProperty(hF,"__esModule",{value:!0});let hz=hk;function h$(e,t,r=!1){return!!hz.isString(e)&&(hz.isRegExp(t)?t.test(e):!!hz.isString(t)&&(r?e===t:e.includes(t)))}hF.isMatchingPattern=h$,hF.safeJoin=function(e,t){if(!Array.isArray(e))return"";let r=[];for(let t=0;tn&&(t=n);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,n);return o>n-5&&(o=n),o===n&&(i=Math.max(o-140,0)),r=r.slice(i,o),i>0&&(r=`'{snip} ${r}`),oh$(e,t,r))},hF.truncate=function(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`},Object.defineProperty(hP,"__esModule",{value:!0});let hV=hk,hY=hF;function hq(e,t,r,n,i,o,a,s){if(o.length>=r+1)return o;let u=[...o];if(hV.isInstanceOf(n[i],Error)){hH(a,s);let o=e(t,n[i]),c=u.length;hW(o,i,c,s),u=hq(e,t,r,n[i],i,[o,...u],o,c)}return Array.isArray(n.errors)&&n.errors.forEach((n,o)=>{if(hV.isInstanceOf(n,Error)){hH(a,s);let c=e(t,n),l=u.length;hW(c,`errors[${o}]`,l,s),u=hq(e,t,r,n,i,[c,...u],c,l)}}),u}function hH(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function hW(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}hP.applyAggregateErrorsToEvent=function(e,t,r=250,n,i,o,a){var s,u;if(!(o.exception&&o.exception.values&&a&&hV.isInstanceOf(a.originalException,Error)))return;let c=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;c&&(o.exception.values=(s=hq(e,t,i,a.originalException,n,o.exception.values,c,0),u=r,s.map(e=>(e.value&&(e.value=hY.truncate(e.value,u)),e))))};var hG={},hZ={},hK={};Object.defineProperty(hK,"__esModule",{value:!0}),hK.SDK_VERSION="8.7.0",Object.defineProperty(hZ,"__esModule",{value:!0});let hX=hK,hJ=globalThis;hZ.GLOBAL_OBJ=hJ,hZ.getGlobalSingleton=function(e,t,r){let n=r||hJ,i=n.__SENTRY__=n.__SENTRY__||{},o=i[hX.SDK_VERSION]=i[hX.SDK_VERSION]||{};return o[e]||(o[e]=t())},Object.defineProperty(hG,"__esModule",{value:!0});let hQ=hk,h0=hZ.GLOBAL_OBJ;function h1(e,t){let r,n,i,o,a,s=e,u=[];if(!s||!s.tagName)return"";if(h0.HTMLElement&&s instanceof HTMLElement&&s.dataset){if(s.dataset.sentryComponent)return s.dataset.sentryComponent;if(s.dataset.sentryElement)return s.dataset.sentryElement}u.push(s.tagName.toLowerCase());let c=t&&t.length?t.filter(e=>s.getAttribute(e)).map(e=>[e,s.getAttribute(e)]):null;if(c&&c.length)c.forEach(e=>{u.push(`[${e[0]}="${e[1]}"]`)});else if(s.id&&u.push(`#${s.id}`),(r=s.className)&&hQ.isString(r))for(n=r.split(/\s+/),a=0;a";try{let r,n=e,i=5,o=[],a=0,s=0,u=" > ",c=u.length,l=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++1&&s+o.length*c+r.length>=f));)o.push(r),s+=r.length,n=n.parentNode;return o.reverse().join(u)}catch(e){return""}};var h2={},h6={};Object.defineProperty(h6,"__esModule",{value:!0}),h6.DEBUG_BUILD="u"{let n=h9[e];r[e]=t[e],t[e]=n});try{return e()}finally{n.forEach(e=>{t[e]=r[e]})}}let pe=function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return h4.DEBUG_BUILD?h8.forEach(r=>{t[r]=(...t)=>{e&&h7(()=>{h5.GLOBAL_OBJ.console[r](`Sentry Logger [${r}]:`,...t)})}}):h8.forEach(e=>{t[e]=()=>{}}),t}();h3.CONSOLE_LEVELS=h8,h3.consoleSandbox=h7,h3.logger=pe,h3.originalConsoleMethods=h9,Object.defineProperty(h2,"__esModule",{value:!0});let pt=h6,pr=h3,pn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function pi(e){let t=pn.exec(e);if(!t)return void pr.consoleSandbox(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});let[r,n,i="",o,a="",s]=t.slice(1),u="",c=s,l=c.split("/");if(l.length>1&&(u=l.slice(0,-1).join("/"),c=l.pop()),c){let e=c.match(/^\d+/);e&&(c=e[0])}return po({host:o,pass:i,path:u,projectId:c,port:a,protocol:r,publicKey:n})}function po(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}h2.dsnFromString=pi,h2.dsnToString=function(e,t=!1){let{host:r,path:n,pass:i,port:o,projectId:a,protocol:s,publicKey:u}=e;return`${s}://${u}${t&&i?`:${i}`:""}@${r}${o?`:${o}`:""}/${n?`${n}/`:n}${a}`},h2.makeDsn=function(e){let t="string"==typeof e?pi(e):po(e);if(t&&function(e){if(!pt.DEBUG_BUILD)return!0;let{port:t,projectId:r,protocol:n}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(pr.logger.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(r.match(/^\d+$/)?!function(e){return"http"===e||"https"===e}(n)?(pr.logger.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),1):t&&isNaN(parseInt(t,10))&&(pr.logger.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(pr.logger.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),1)))}(t))return t};var pa={};Object.defineProperty(pa,"__esModule",{value:!0});class ps extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}pa.SentryError=ps;var pu={},pc={};Object.defineProperty(pc,"__esModule",{value:!0});let pl=hG,pf=h6,pd=hk,ph=h3,pp=hF;function pm(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch(r){pf.DEBUG_BUILD&&ph.logger.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function py(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,pm(e,"__sentry_original__",t)}catch(e){}}function pg(e){if(pd.isError(e))return{message:e.message,name:e.name,stack:e.stack,...pv(e)};if(pd.isEvent(e)){let t={type:e.type,target:pb(e.target),currentTarget:pb(e.currentTarget),...pv(e)};return"u">typeof CustomEvent&&pd.isInstanceOf(e,CustomEvent)&&(t.detail=e.detail),t}return e}function pb(e){try{return pd.isElement(e)?pl.htmlTreeAsString(e):Object.prototype.toString.call(e)}catch(e){return""}}function pv(e){if("object"==typeof e&&null!==e){let t={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}return{}}function p_(e,t){if(function(e){if(!pd.isPlainObject(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){let r=t.get(e);if(void 0!==r)return r;let n={};for(let r of(t.set(e,n),Object.keys(e)))void 0!==e[r]&&(n[r]=p_(e[r],t));return n}if(Array.isArray(e)){let r=t.get(e);if(void 0!==r)return r;let n=[];return t.set(e,n),e.forEach(e=>{n.push(p_(e,t))}),n}return e}pc.addNonEnumerableProperty=pm,pc.convertToPlainObject=pg,pc.dropUndefinedKeys=function(e){return p_(e,new Map)},pc.extractExceptionKeysForMessage=function(e,t=40){let r=Object.keys(pg(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return pp.truncate(r[0],t);for(let e=r.length;e>0;e--){let n=r.slice(0,e).join(", ");if(!(n.length>t))return e===r.length?n:pp.truncate(n,t)}return""},pc.fill=function(e,t,r){if(!(t in e))return;let n=e[t],i=r(n);"function"==typeof i&&py(i,n),e[t]=i},pc.getOriginalFunction=function(e){return e.__sentry_original__},pc.markFunctionWrapped=py,pc.objectify=function(e){let t;switch(!0){case null==e:t=new String(e);break;case"symbol"==typeof e||"bigint"==typeof e:t=Object(e);break;case pd.isPrimitive(e):t=new e.constructor(e);break;default:t=e}return t},pc.urlEncode=function(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")};var pS={},pE={};Object.defineProperty(pE,"__esModule",{value:!0});let pw=50,pT="?",px=/\(error: (.*)\)/,pA=/captureMessage|captureException/;function pO(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,r=0,n=0)=>{let i=[],o=e.split("\n");for(let e=r;e1024)continue;let a=px.test(r)?r.replace(px,"$1"):r;if(!a.match(/\S*Error: /)){for(let e of t){let t=e(a);if(t){i.push(t);break}}if(i.length>=pw+n)break}}return pM(i.slice(n))}}function pM(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),pA.test(t[t.length-1].function||"")&&(t.pop(),pA.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,pw).map(e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||pT}))}let pR="";pE.UNKNOWN_FUNCTION=pT,pE.createStackParser=pO,pE.getFunctionName=function(e){try{return e&&"function"==typeof e&&e.name||pR}catch(e){return pR}},pE.stackParserFromStackParserOptions=function(e){return Array.isArray(e)?pO(...e):e},pE.stripSentryFramesAndReverse=pM,Object.defineProperty(pS,"__esModule",{value:!0});let pC=h6,pI=h3,pN=pE,pP={},pk={};pS.addHandler=function(e,t){pP[e]=pP[e]||[],pP[e].push(t)},pS.maybeInstrument=function(e,t){pk[e]||(t(),pk[e]=!0)},pS.resetInstrumentationHandlers=function(){Object.keys(pP).forEach(e=>{pP[e]=void 0})},pS.triggerHandlers=function(e,t){let r=e&&pP[e];if(r)for(let n of r)try{n(t)}catch(t){pC.DEBUG_BUILD&&pI.logger.error(`Error while triggering instrumentation handler. -Type: ${e} -Name: ${pN.getFunctionName(n)} -Error:`,t)}},Object.defineProperty(pu,"__esModule",{value:!0});let pD=h3,pL=pc,pj=hZ,pU=pS;function pB(){"console"in pj.GLOBAL_OBJ&&pD.CONSOLE_LEVELS.forEach(function(e){e in pj.GLOBAL_OBJ.console&&pL.fill(pj.GLOBAL_OBJ.console,e,function(t){return pD.originalConsoleMethods[e]=t,function(...t){let r={args:t,level:e};pU.triggerHandlers("console",r);let n=pD.originalConsoleMethods[e];n&&n.apply(pj.GLOBAL_OBJ.console,t)}})})}pu.addConsoleInstrumentationHandler=function(e){let t="console";pU.addHandler(t,e),pU.maybeInstrument(t,pB)};var pF={},pz={};Object.defineProperty(pz,"__esModule",{value:!0});let p$=h6,pV=h3,pY=hZ.GLOBAL_OBJ;function pq(){if(!("fetch"in pY))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function pH(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}pz.isNativeFunction=pH,pz.supportsDOMError=function(){try{return new DOMError(""),!0}catch(e){return!1}},pz.supportsDOMException=function(){try{return new DOMException(""),!0}catch(e){return!1}},pz.supportsErrorEvent=function(){try{return new ErrorEvent(""),!0}catch(e){return!1}},pz.supportsFetch=pq,pz.supportsNativeFetch=function(){if("string"==typeof EdgeRuntime)return!0;if(!pq())return!1;if(pH(pY.fetch))return!0;let e=!1,t=pY.document;if(t&&"function"==typeof t.createElement)try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=pH(r.contentWindow.fetch)),t.head.removeChild(r)}catch(e){p$.DEBUG_BUILD&&pV.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e},pz.supportsReferrerPolicy=function(){if(!pq())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(e){return!1}},pz.supportsReportingObserver=function(){return"ReportingObserver"in pY};var pW={};Object.defineProperty(pW,"__esModule",{value:!0});let pG=hZ,pZ=1e3;function pK(){return Date.now()/pZ}let pX=function(){let{performance:e}=pG.GLOBAL_OBJ;if(!e||!e.now)return pK;let t=Date.now()-e.now(),r=null==e.timeOrigin?t:e.timeOrigin;return()=>(r+e.now())/pZ}();pW._browserPerformanceTimeOriginMode=void 0;let pJ=(()=>{let{performance:e}=pG.GLOBAL_OBJ;if(!e||!e.now)return void(pW._browserPerformanceTimeOriginMode="none");let t=36e5,r=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,o=i{let t={...i,endTimestamp:1e3*p1.timestampInSeconds(),response:e};return p6.triggerHandlers("fetch",t),e},e=>{let t={...i,endTimestamp:1e3*p1.timestampInSeconds(),error:e};throw p6.triggerHandlers("fetch",t),e})}})}function p4(e,t){return!!e&&"object"==typeof e&&!!e[t]}function p5(e){return"string"==typeof e?e:e?p4(e,"url")?e.url:e.toString?e.toString():"":""}function p8(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){let[t,r]=e;return{url:p5(t),method:p4(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:p5(t),method:p4(t,"method")?String(t.method).toUpperCase():"GET"}}pF.addFetchInstrumentationHandler=function(e){let t="fetch";p6.addHandler(t,e),p6.maybeInstrument(t,p3)},pF.parseFetchArgs=p8;var p9={};Object.defineProperty(p9,"__esModule",{value:!0});let p7=hZ,me=pS,mt=null;function mr(){mt=p7.GLOBAL_OBJ.onerror,p7.GLOBAL_OBJ.onerror=function(e,t,r,n,i){let o={column:n,error:i,line:r,msg:e,url:t};return me.triggerHandlers("error",o),!(!mt||mt.__SENTRY_LOADER__)&&mt.apply(this,arguments)},p7.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}p9.addGlobalErrorInstrumentationHandler=function(e){let t="error";me.addHandler(t,e),me.maybeInstrument(t,mr)};var mn={};Object.defineProperty(mn,"__esModule",{value:!0});let mi=hZ,mo=pS,ma=null;function ms(){ma=mi.GLOBAL_OBJ.onunhandledrejection,mi.GLOBAL_OBJ.onunhandledrejection=function(e){let t=e;return mo.triggerHandlers("unhandledrejection",t),!(ma&&!ma.__SENTRY_LOADER__)||ma.apply(this,arguments)},mi.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}mn.addGlobalUnhandledRejectionInstrumentationHandler=function(e){let t="unhandledrejection";mo.addHandler(t,e),mo.maybeInstrument(t,ms)};var mu={},mc={exports:{}},ml={};Object.defineProperty(ml,"__esModule",{value:!0}),ml.getSDKSource=function(){return"npm"},ml.isBrowserBundle=function(){return"u">typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});let r=ml;function i(e,t){return e.require(t)}t.dynamicRequire=i,t.isNodeEnv=function(){return!r.isBrowserBundle()&&"[object process]"===Object.prototype.toString.call(void 0!==n?n:0)},t.loadModule=function(t){let r;try{r=i(e,t)}catch(e){}try{let{cwd:n}=i(e,"process");r=i(e,`${n()}/node_modules/${t}`)}catch(e){}return r}}(mc,mc.exports);var mf=mc.exports;Object.defineProperty(mu,"__esModule",{value:!0});let md=mf,mh=hZ;mu.isBrowser=function(){return"u">typeof window&&(!md.isNodeEnv()||void 0!==mh.GLOBAL_OBJ.process&&"renderer"===mh.GLOBAL_OBJ.process.type)};var mp={};Object.defineProperty(mp,"__esModule",{value:!0}),mp.memoBuilder=function(){let e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(r){if(e)return!!t.has(r)||(t.add(r),!1);for(let e=0;emg.snipLine(e,0)),t.context_line=mg.snipLine(e[Math.min(n-1,i)],t.colno||0),t.post_context=e.slice(Math.min(i+1,n),i+1+r).map(e=>mg.snipLine(e,0))},mm.addExceptionMechanism=function(e,t){let r=mv(e);if(!r)return;let n=r.mechanism;if(r.mechanism={type:"generic",handled:!0,...n,...t},t&&"data"in t){let e={...n&&n.data,...t.data};r.mechanism.data=e}},mm.addExceptionTypeValue=function(e,t,r){let n=e.exception=e.exception||{},i=n.values=n.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=r||"Error")},mm.arrayify=function(e){return Array.isArray(e)?e:[e]},mm.checkOrSetAlreadyCaught=function(e){if(e&&e.__sentry_captured__)return!0;try{my.addNonEnumerableProperty(e,"__sentry_captured__",!0)}catch(e){}return!1},mm.getEventDescription=function(e){let{message:t,event_id:r}=e;if(t)return t;let n=mv(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"":r||""},mm.parseSemver=function(e){let t=e.match(m_)||[],r=parseInt(t[1],10),n=parseInt(t[2],10),i=parseInt(t[3],10);return{buildmetadata:t[5],major:isNaN(r)?void 0:r,minor:isNaN(n)?void 0:n,patch:isNaN(i)?void 0:i,prerelease:t[4]}},mm.uuid4=function(){let e=mb.GLOBAL_OBJ,t=e.crypto||e.msCrypto,r=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&r())>>e/4).toString(16))};var mS={};Object.defineProperty(mS,"__esModule",{value:!0});let mE=hk,mw=mp,mT=pc,mx=pE;function mA(e,t=100,r=1/0){try{return mO("",e,t,r)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function mO(e,t,r=1/0,n=1/0,i=mw.memoBuilder()){let[a,s]=i;if(null==t||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;let u=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(void 0!==o&&t===o)return"[Global]";if("u">typeof window&&t===window)return"[Window]";if("u">typeof document&&t===document)return"[Document]";if(mE.isVueViewModel(t))return"[VueViewModel]";if(mE.isSyntheticEvent(t))return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if("function"==typeof t)return`[Function: ${mx.getFunctionName(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;let r=function(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}}(e,t);if(!u.startsWith("[object "))return u;if(t.__sentry_skip_normalization__)return t;let c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:r;if(0===c)return u.replace("object ","");if(a(t))return"[Circular ~]";let l=t;if(l&&"function"==typeof l.toJSON)try{return mO("",l.toJSON(),c-1,n,i)}catch(e){}let f=Array.isArray(t)?[]:{},d=0,h=mT.convertToPlainObject(t);for(let e in h){if(!Object.prototype.hasOwnProperty.call(h,e))continue;if(d>=n){f[e]="[MaxProperties ~]";break}let t=h[e];f[e]=mO(e,t,c-1,n,i),d++}return s(t),f}mS.normalize=mA,mS.normalizeToSize=function e(t,r=3,n=102400){let i=mA(t,r);return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?e(t,r-1,n):i},mS.normalizeUrlToBase=function(e,t){let r=t.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"),n=e;try{n=decodeURI(e)}catch(e){}return n.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(RegExp(`(file://)?/*${r}/*`,"ig"),"app:///")};var mM={};function mR(e,t){let r=0;for(let t=e.length-1;t>=0;t--){let n=e[t];"."===n?e.splice(t,1):".."===n?(e.splice(t,1),r++):r&&(e.splice(t,1),r--)}if(t)for(;r--;)e.unshift("..");return e}Object.defineProperty(mM,"__esModule",{value:!0});let mC=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function mI(e){let t=e.length>1024?`${e.slice(-1024)}`:e,r=mC.exec(t);return r?r.slice(1):[]}function mN(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){let i=n>=0?e[n]:"/";i&&(t=`${i}/${t}`,r="/"===i.charAt(0))}return t=mR(t.split("/").filter(e=>!!e),!r).join("/"),(r?"/":"")+t||"."}function mP(e){let t=0;for(;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}function mk(e){let t=mD(e),r="/"===e.slice(-1),n=mR(e.split("/").filter(e=>!!e),!t).join("/");return n||t||(n="."),n&&r&&(n+="/"),(t?"/":"")+n}function mD(e){return"/"===e.charAt(0)}mM.basename=function(e,t){let r=mI(e)[2];return t&&r.slice(-1*t.length)===t&&(r=r.slice(0,r.length-t.length)),r},mM.dirname=function(e){let t=mI(e),r=t[0],n=t[1];return r||n?(n&&(n=n.slice(0,n.length-1)),r+n):"."},mM.isAbsolute=mD,mM.join=function(...e){return mk(e.join("/"))},mM.normalizePath=mk,mM.relative=function(e,t){e=mN(e).slice(1),t=mN(t).slice(1);let r=mP(e.split("/")),n=mP(t.split("/")),i=Math.min(r.length,n.length),o=i;for(let e=0;e{this._handlers.push([!1,t=>{if(e)try{r(e(t))}catch(e){n(e)}else r(t)},e=>{if(t)try{r(t(e))}catch(e){n(e)}else n(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new mB((t,r)=>{let n,i;return this.then(t=>{i=!1,n=t,e&&e()},t=>{i=!0,n=t,e&&e()}).then(()=>{i?r(n):t(n)})})}__init(){this._resolve=e=>{this._setResult(TN.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(TN.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===TN.PENDING&&(mU.isThenable(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===TN.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===TN.RESOLVED&&e[1](this._value),this._state===TN.REJECTED&&e[2](this._value),e[0]=!0)})}}}mj.SyncPromise=mB,mj.rejectedSyncPromise=function(e){return new mB((t,r)=>{r(e)})},mj.resolvedSyncPromise=function(e){return new mB(t=>{t(e)})},Object.defineProperty(mL,"__esModule",{value:!0});let mF=pa,mz=mj;mL.makePromiseBuffer=function(e){let t=[];function r(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(n){if(!(void 0===e||t.lengthr(i)).then(null,()=>r(i).then(null,()=>{})),i},drain:function(e){return new mz.SyncPromise((r,n)=>{let i=t.length;if(!i)return r(!0);let o=setTimeout(()=>{e&&e>0&&r(!1)},e);t.forEach(e=>{mz.resolvedSyncPromise(e).then(()=>{--i||(clearTimeout(o),r(!0))},n)})})}}};var m$={},mV={};Object.defineProperty(mV,"__esModule",{value:!0}),mV.parseCookie=function(e){let t={},r=0;for(;re.length>0&&","!==e).length},mY.getSanitizedUrlString=function(e){let{protocol:t,host:r,path:n}=e;return`${t?`${t}://`:""}${r&&r.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||""}${n}`},mY.parseUrl=function(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}},mY.stripUrlQueryAndFragment=function(e){return e.split(/[\?#]/,1)[0]},Object.defineProperty(m$,"__esModule",{value:!0});let mq=mV,mH=h6,mW=hk,mG=h3,mZ=mS,mK=mY,mX={ip:!1,request:!0,transaction:!0,user:!0},mJ=["cookies","data","headers","method","query_string","url"],mQ=["id","username","email"];function m0(e,t={}){let r=e.method&&e.method.toUpperCase(),n="",i="url";t.customRoute||e.route?(n=t.customRoute||`${e.baseUrl||""}${e.route&&e.route.path}`,i="route"):(e.originalUrl||e.url)&&(n=mK.stripUrlQueryAndFragment(e.originalUrl||e.url||""));let o="";return t.method&&r&&(o+=r),t.method&&t.path&&(o+=" "),t.path&&n&&(o+=n),[o,i]}function m1(e,t){let{include:r=mJ}=t||{},n={},i=e.headers||{},o=e.method,a=i.host||e.hostname||e.host||"",s="https"===e.protocol||e.socket&&e.socket.encrypted?"https":"http",u=e.originalUrl||e.url||"",c=u.startsWith(s)?u:`${s}://${a}${u}`;return r.forEach(t=>{switch(t){case"headers":n.headers=i,r.includes("cookies")||delete n.headers.cookie;break;case"method":n.method=o;break;case"url":n.url=c;break;case"cookies":n.cookies=e.cookies||i.cookie&&mq.parseCookie(i.cookie)||{};break;case"query_string":n.query_string=function(e){let t=e.originalUrl||e.url||"";if(t){t.startsWith("/")&&(t=`http://dogs.are.great${t}`);try{let r=e.query||new URL(t).search.slice(1);return r.length?r:void 0}catch(e){return}}}(e);break;case"data":if("GET"===o||"HEAD"===o)break;void 0!==e.body&&(n.data=mW.isString(e.body)?e.body:JSON.stringify(mZ.normalize(e.body)));break;default:({}).hasOwnProperty.call(e,t)&&(n[t]=e[t])}}),n}function m2(e){let t={};try{e.forEach((e,r)=>{"string"==typeof e&&(t[r]=e)})}catch(e){mH.DEBUG_BUILD&&mG.logger.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue.")}return t}m$.DEFAULT_USER_INCLUDES=mQ,m$.addRequestDataToEvent=function(e,t,r){let n={...mX,...r&&r.include};if(n.request){let r=Array.isArray(n.request)?m1(t,{include:n.request}):m1(t);e.request={...e.request,...r}}if(n.user){let r=t.user&&mW.isPlainObject(t.user)?function(e,t){let r={};return(Array.isArray(t)?t:mQ).forEach(t=>{e&&t in e&&(r[t]=e[t])}),r}(t.user,n.user):{};Object.keys(r).length&&(e.user={...e.user,...r})}if(n.ip){let r=t.ip||t.socket&&t.socket.remoteAddress;r&&(e.user={...e.user,ip_address:r})}return n.transaction&&!e.transaction&&"transaction"===e.type&&(e.transaction=function(e,t){switch(t){case"path":return m0(e,{path:!0})[0];case"handler":return e.route&&e.route.stack&&e.route.stack[0]&&e.route.stack[0].name||"";default:return m0(e,{path:!0,method:!0,customRoute:e._reconstructedRoute?e._reconstructedRoute:void 0})[0]}}(t,n.transaction)),e},m$.extractPathForTransaction=m0,m$.extractRequestData=m1,m$.winterCGHeadersToDict=m2,m$.winterCGRequestToRequestData=function(e){let t=m2(e.headers);return{method:e.method,url:e.url,headers:t}};var m6={};Object.defineProperty(m6,"__esModule",{value:!0});let m3=["fatal","error","warning","log","info","debug"];m6.severityLevelFromString=function(e){return"warn"===e?"warning":m3.includes(e)?e:"log"},m6.validSeverityLevels=m3;var m4={};Object.defineProperty(m4,"__esModule",{value:!0});let m5=pE;function m8(e,t=!1){return!(t||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==e&&!e.includes("node_modules/")}function m9(e){let t=/^\s*[-]{4,}$/,r=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return n=>{let i=n.match(r);if(i){let t,r,n,o,a;if(i[1]){let e=(n=i[1]).lastIndexOf(".");if("."===n[e-1]&&e--,e>0){t=n.slice(0,e),r=n.slice(e+1);let i=t.indexOf(".Module");i>0&&(n=n.slice(i+1),t=t.slice(0,i))}o=void 0}r&&(o=t,a=r),""===r&&(a=void 0,n=void 0),void 0===n&&(a=a||m5.UNKNOWN_FUNCTION,n=o?`${o}.${a}`:a);let s=i[2]&&i[2].startsWith("file://")?i[2].slice(7):i[2],u="native"===i[5];return s&&s.match(/\/[A-Z]:/)&&(s=s.slice(1)),s||!i[5]||u||(s=i[5]),{filename:s,module:e?e(s):void 0,function:n,lineno:parseInt(i[3],10)||void 0,colno:parseInt(i[4],10)||void 0,in_app:m8(s,u)}}if(n.match(t))return{filename:n}}}m4.filenameIsInApp=m8,m4.node=m9,m4.nodeStackLineParser=function(e){return[90,m9(e)]};var m7={},ye={};Object.defineProperty(ye,"__esModule",{value:!0});let yt=h6,yr=hk,yn=h3,yi="sentry-",yo=/^sentry-/,ya=8192;function ys(e){if(e&&(yr.isString(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let r=yu(t);for(let t of Object.keys(r))e[t]=r[t];return e},{}):yu(e)}function yu(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,r])=>(e[t]=r,e),{})}ye.BAGGAGE_HEADER_NAME="baggage",ye.MAX_BAGGAGE_STRING_LENGTH=ya,ye.SENTRY_BAGGAGE_KEY_PREFIX=yi,ye.SENTRY_BAGGAGE_KEY_PREFIX_REGEX=yo,ye.baggageHeaderToDynamicSamplingContext=function(e){let t=ys(e);if(!t)return;let r=Object.entries(t).reduce((e,[t,r])=>(t.match(yo)&&(e[t.slice(7)]=r),e),{});return Object.keys(r).length>0?r:void 0},ye.dynamicSamplingContextToSentryBaggageHeader=function(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,r],n)=>{let i=`${encodeURIComponent(t)}=${encodeURIComponent(r)}`,o=0===n?i:`${e},${i}`;return o.length>ya?(yt.DEBUG_BUILD&&yn.logger.warn(`Not adding key: ${t} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):o},"")}(Object.entries(e).reduce((e,[t,r])=>(r&&(e[`${yi}${t}`]=r),e),{}))},ye.parseBaggageHeader=ys,Object.defineProperty(m7,"__esModule",{value:!0});let yc=ye,yl=mm,yf=RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function yd(e){let t;if(!e)return;let r=e.match(yf);if(r)return"1"===r[3]?t=!0:"0"===r[3]&&(t=!1),{traceId:r[1],parentSampled:t,parentSpanId:r[2]}}m7.TRACEPARENT_REGEXP=yf,m7.extractTraceparentData=yd,m7.generateSentryTraceHeader=function(e=yl.uuid4(),t=yl.uuid4().substring(16),r){let n="";return void 0!==r&&(n=r?"-1":"-0"),`${e}-${t}${n}`},m7.propagationContextFromHeaders=function(e,t){let r=yd(e),n=yc.baggageHeaderToDynamicSamplingContext(t),{traceId:i,parentSpanId:o,parentSampled:a}=r||{};return r?{traceId:i||yl.uuid4(),parentSpanId:o||yl.uuid4().substring(16),spanId:yl.uuid4().substring(16),sampled:a,dsc:n||{}}:{traceId:i||yl.uuid4(),spanId:yl.uuid4().substring(16)}};var yh={};Object.defineProperty(yh,"__esModule",{value:!0});let yp=h2,ym=mS,yy=pc,yg=hZ;function yb(e,t){for(let r of e[1])if(t(r,r[0].type))return!0;return!1}function yv(e){return yg.GLOBAL_OBJ.__SENTRY__&&yg.GLOBAL_OBJ.__SENTRY__.encodePolyfill?yg.GLOBAL_OBJ.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}let y_={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};yh.addItemToEnvelope=function(e,t){let[r,n]=e;return[r,[...n,t]]},yh.createAttachmentEnvelopeItem=function(e){let t="string"==typeof e.data?yv(e.data):e.data;return[yy.dropUndefinedKeys({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]},yh.createEnvelope=function(e,t=[]){return[e,t]},yh.createEventEnvelopeHeaders=function(e,t,r,n){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:yp.dsnToString(n)},...i&&{trace:yy.dropUndefinedKeys({...i})}}},yh.createSpanEnvelopeItem=function(e){return[{type:"span"},e]},yh.envelopeContainsItemType=function(e,t){return yb(e,(e,r)=>t.includes(r))},yh.envelopeItemTypeToDataCategory=function(e){return y_[e]},yh.forEachEnvelopeItem=yb,yh.getSdkMetadataForEnvelopeHeader=function(e){if(!e||!e.sdk)return;let{name:t,version:r}=e.sdk;return{name:t,version:r}},yh.parseEnvelope=function(e){let t="string"==typeof e?yv(e):e;function r(e){let r=t.subarray(0,e);return t=t.subarray(e+1),r}function n(){var e;let n=t.indexOf(10);return n<0&&(n=t.length),JSON.parse((e=r(n),yg.GLOBAL_OBJ.__SENTRY__&&yg.GLOBAL_OBJ.__SENTRY__.decodePolyfill?yg.GLOBAL_OBJ.__SENTRY__.decodePolyfill(e):(new TextDecoder).decode(e)))}let i=n(),o=[];for(;t.length;){let e=n(),t="number"==typeof e.length?e.length:void 0;o.push([e,t?r(t):n()])}return[i,o]},yh.serializeEnvelope=function(e){let[t,r]=e,n=JSON.stringify(t);function i(e){"string"==typeof n?n="string"==typeof e?n+e:[yv(n),e]:n.push("string"==typeof e?yv(e):e)}for(let e of r){let[t,r]=e;if(i(` -${JSON.stringify(t)} -`),"string"==typeof r||r instanceof Uint8Array)i(r);else{let e;try{e=JSON.stringify(r)}catch(t){e=JSON.stringify(ym.normalize(r))}i(e)}}return"string"==typeof n?n:function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(n)};var yS={};Object.defineProperty(yS,"__esModule",{value:!0});let yE=yh,yw=pW;yS.createClientReportEnvelope=function(e,t,r){let n=[{type:"client_report"},{timestamp:r||yw.dateTimestampInSeconds(),discarded_events:e}];return yE.createEnvelope(t?{dsn:t}:{},[n])};var yT={};Object.defineProperty(yT,"__esModule",{value:!0});let yx=6e4;function yA(e,t=Date.now()){let r=parseInt(`${e}`,10);if(!isNaN(r))return 1e3*r;let n=Date.parse(`${e}`);return isNaN(n)?yx:n-t}function yO(e,t){return e[t]||e.all||0}yT.DEFAULT_RETRY_AFTER=6e4,yT.disabledUntil=yO,yT.isRateLimited=function(e,t,r=Date.now()){return yO(e,t)>r},yT.parseRetryAfterHeader=yA,yT.updateRateLimits=function(e,{statusCode:t,headers:r},n=Date.now()){let i={...e},o=r&&r["x-sentry-rate-limits"],a=r&&r["retry-after"];if(o)for(let e of o.trim().split(",")){let[t,r,,,o]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(r)for(let e of r.split(";"))"metric_bucket"===e&&o&&!o.split(";").includes("custom")||(i[e]=n+s);else i.all=n+s}else a?i.all=n+yA(a,n):429===t&&(i.all=n+6e4);return i};var yM={};Object.defineProperty(yM,"__esModule",{value:!0}),yM.makeFifoCache=function(e){let t=[],r={};return{add(n,i){for(;t.length>=e;){let e=t.shift();void 0!==e&&delete r[e]}r[n]&&this.delete(n),t.push(n),r[n]=i},clear(){r={},t=[]},get:e=>r[e],size:()=>t.length,delete(e){if(!r[e])return!1;delete r[e];for(let r=0;r{let e=i.getTimeMs();!1===o&&e>t+r&&(o=!0,a&&n()),e{i.reset()},enabled:e=>{a=e}}};var y$={};Object.defineProperty(y$,"__esModule",{value:!0}),y$.LRUMap=class{constructor(e){this._maxSize=e,this._cache=new Map}get size(){return this._cache.size}get(e){let t=this._cache.get(e);if(void 0!==t)return this._cache.delete(e),this._cache.set(e,t),t}set(e,t){this._cache.size>=this._maxSize&&this._cache.delete(this._cache.keys().next().value),this._cache.set(e,t)}remove(e){let t=this._cache.get(e);return t&&this._cache.delete(e),t}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){let e=[];return this._cache.forEach(t=>e.push(t)),e}};var yV={},yY={};Object.defineProperty(yY,"__esModule",{value:!0}),yY._nullishCoalesce=function(e,t){return null!=e?e:t()},Object.defineProperty(yV,"__esModule",{value:!0});let yq=yY;yV._asyncNullishCoalesce=async function(e,t){return yq._nullishCoalesce(e,t)};var yH={};Object.defineProperty(yH,"__esModule",{value:!0}),yH._asyncOptionalChain=async function(e){let t,r=e[0],n=1;for(;nr.call(t,...e)),t=void 0)}return r};var yW={};Object.defineProperty(yW,"__esModule",{value:!0});let yG=yH;yW._asyncOptionalChainDelete=async function(e){let t=await yG._asyncOptionalChain(e);return null==t||t};var yZ={};Object.defineProperty(yZ,"__esModule",{value:!0}),yZ._optionalChain=function(e){let t,r=e[0],n=1;for(;nr.call(t,...e)),t=void 0)}return r};var yK={};Object.defineProperty(yK,"__esModule",{value:!0});let yX=yZ;yK._optionalChainDelete=function(e){let t=yX._optionalChain(e);return null==t||t};var yJ={};Object.defineProperty(yJ,"__esModule",{value:!0});let yQ=mm;yJ.generatePropagationContext=function(){return{traceId:yQ.uuid4(),spanId:yQ.uuid4().substring(16)}};var y0={};Object.defineProperty(y0,"__esModule",{value:!0}),y0.escapeStringForRegex=function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};var y1={};Object.defineProperty(y1,"__esModule",{value:!0});let y2=hZ.GLOBAL_OBJ;y1.supportsHistory=function(){let e=y2.chrome,t=e&&e.app&&e.app.runtime,r="history"in y2&&!!y2.history.pushState&&!!y2.history.replaceState;return!t&&r},function(e){Object.defineProperty(e,"__esModule",{value:!0});let t=hG,r=h2,n=pa,i=hZ,o=pu,a=pF,s=p9,u=mn,c=pS,l=hk,f=mu,d=h3,h=mp,p=mm,m=mf,y=mS,g=pc,b=mM,v=mL,_=m$,S=m6,E=pE,w=m4,T=hF,x=pz,A=mj,O=pW,M=m7,R=ml,C=yh,I=yS,N=yT,P=ye,k=mY,D=yM,L=yR,j=yU,U=y$,B=yV,F=yH,z=yW,$=yY,V=yZ,Y=yK,q=yJ,H=hK,W=y0,G=y1;e.applyAggregateErrorsToEvent=hP.applyAggregateErrorsToEvent,e.getComponentName=t.getComponentName,e.getDomElement=t.getDomElement,e.getLocationHref=t.getLocationHref,e.htmlTreeAsString=t.htmlTreeAsString,e.dsnFromString=r.dsnFromString,e.dsnToString=r.dsnToString,e.makeDsn=r.makeDsn,e.SentryError=n.SentryError,e.GLOBAL_OBJ=i.GLOBAL_OBJ,e.getGlobalSingleton=i.getGlobalSingleton,e.addConsoleInstrumentationHandler=o.addConsoleInstrumentationHandler,e.addFetchInstrumentationHandler=a.addFetchInstrumentationHandler,e.addGlobalErrorInstrumentationHandler=s.addGlobalErrorInstrumentationHandler,e.addGlobalUnhandledRejectionInstrumentationHandler=u.addGlobalUnhandledRejectionInstrumentationHandler,e.addHandler=c.addHandler,e.maybeInstrument=c.maybeInstrument,e.resetInstrumentationHandlers=c.resetInstrumentationHandlers,e.triggerHandlers=c.triggerHandlers,e.isDOMError=l.isDOMError,e.isDOMException=l.isDOMException,e.isElement=l.isElement,e.isError=l.isError,e.isErrorEvent=l.isErrorEvent,e.isEvent=l.isEvent,e.isInstanceOf=l.isInstanceOf,e.isParameterizedString=l.isParameterizedString,e.isPlainObject=l.isPlainObject,e.isPrimitive=l.isPrimitive,e.isRegExp=l.isRegExp,e.isString=l.isString,e.isSyntheticEvent=l.isSyntheticEvent,e.isThenable=l.isThenable,e.isVueViewModel=l.isVueViewModel,e.isBrowser=f.isBrowser,e.CONSOLE_LEVELS=d.CONSOLE_LEVELS,e.consoleSandbox=d.consoleSandbox,e.logger=d.logger,e.originalConsoleMethods=d.originalConsoleMethods,e.memoBuilder=h.memoBuilder,e.addContextToFrame=p.addContextToFrame,e.addExceptionMechanism=p.addExceptionMechanism,e.addExceptionTypeValue=p.addExceptionTypeValue,e.arrayify=p.arrayify,e.checkOrSetAlreadyCaught=p.checkOrSetAlreadyCaught,e.getEventDescription=p.getEventDescription,e.parseSemver=p.parseSemver,e.uuid4=p.uuid4,e.dynamicRequire=m.dynamicRequire,e.isNodeEnv=m.isNodeEnv,e.loadModule=m.loadModule,e.normalize=y.normalize,e.normalizeToSize=y.normalizeToSize,e.normalizeUrlToBase=y.normalizeUrlToBase,e.addNonEnumerableProperty=g.addNonEnumerableProperty,e.convertToPlainObject=g.convertToPlainObject,e.dropUndefinedKeys=g.dropUndefinedKeys,e.extractExceptionKeysForMessage=g.extractExceptionKeysForMessage,e.fill=g.fill,e.getOriginalFunction=g.getOriginalFunction,e.markFunctionWrapped=g.markFunctionWrapped,e.objectify=g.objectify,e.urlEncode=g.urlEncode,e.basename=b.basename,e.dirname=b.dirname,e.isAbsolute=b.isAbsolute,e.join=b.join,e.normalizePath=b.normalizePath,e.relative=b.relative,e.resolve=b.resolve,e.makePromiseBuffer=v.makePromiseBuffer,e.DEFAULT_USER_INCLUDES=_.DEFAULT_USER_INCLUDES,e.addRequestDataToEvent=_.addRequestDataToEvent,e.extractPathForTransaction=_.extractPathForTransaction,e.extractRequestData=_.extractRequestData,e.winterCGHeadersToDict=_.winterCGHeadersToDict,e.winterCGRequestToRequestData=_.winterCGRequestToRequestData,e.severityLevelFromString=S.severityLevelFromString,e.validSeverityLevels=S.validSeverityLevels,e.UNKNOWN_FUNCTION=E.UNKNOWN_FUNCTION,e.createStackParser=E.createStackParser,e.getFunctionName=E.getFunctionName,e.stackParserFromStackParserOptions=E.stackParserFromStackParserOptions,e.stripSentryFramesAndReverse=E.stripSentryFramesAndReverse,e.filenameIsInApp=w.filenameIsInApp,e.node=w.node,e.nodeStackLineParser=w.nodeStackLineParser,e.isMatchingPattern=T.isMatchingPattern,e.safeJoin=T.safeJoin,e.snipLine=T.snipLine,e.stringMatchesSomePattern=T.stringMatchesSomePattern,e.truncate=T.truncate,e.isNativeFunction=x.isNativeFunction,e.supportsDOMError=x.supportsDOMError,e.supportsDOMException=x.supportsDOMException,e.supportsErrorEvent=x.supportsErrorEvent,e.supportsFetch=x.supportsFetch,e.supportsNativeFetch=x.supportsNativeFetch,e.supportsReferrerPolicy=x.supportsReferrerPolicy,e.supportsReportingObserver=x.supportsReportingObserver,e.SyncPromise=A.SyncPromise,e.rejectedSyncPromise=A.rejectedSyncPromise,e.resolvedSyncPromise=A.resolvedSyncPromise,Object.defineProperty(e,"_browserPerformanceTimeOriginMode",{enumerable:!0,get:()=>O._browserPerformanceTimeOriginMode}),e.browserPerformanceTimeOrigin=O.browserPerformanceTimeOrigin,e.dateTimestampInSeconds=O.dateTimestampInSeconds,e.timestampInSeconds=O.timestampInSeconds,e.TRACEPARENT_REGEXP=M.TRACEPARENT_REGEXP,e.extractTraceparentData=M.extractTraceparentData,e.generateSentryTraceHeader=M.generateSentryTraceHeader,e.propagationContextFromHeaders=M.propagationContextFromHeaders,e.getSDKSource=R.getSDKSource,e.isBrowserBundle=R.isBrowserBundle,e.addItemToEnvelope=C.addItemToEnvelope,e.createAttachmentEnvelopeItem=C.createAttachmentEnvelopeItem,e.createEnvelope=C.createEnvelope,e.createEventEnvelopeHeaders=C.createEventEnvelopeHeaders,e.createSpanEnvelopeItem=C.createSpanEnvelopeItem,e.envelopeContainsItemType=C.envelopeContainsItemType,e.envelopeItemTypeToDataCategory=C.envelopeItemTypeToDataCategory,e.forEachEnvelopeItem=C.forEachEnvelopeItem,e.getSdkMetadataForEnvelopeHeader=C.getSdkMetadataForEnvelopeHeader,e.parseEnvelope=C.parseEnvelope,e.serializeEnvelope=C.serializeEnvelope,e.createClientReportEnvelope=I.createClientReportEnvelope,e.DEFAULT_RETRY_AFTER=N.DEFAULT_RETRY_AFTER,e.disabledUntil=N.disabledUntil,e.isRateLimited=N.isRateLimited,e.parseRetryAfterHeader=N.parseRetryAfterHeader,e.updateRateLimits=N.updateRateLimits,e.BAGGAGE_HEADER_NAME=P.BAGGAGE_HEADER_NAME,e.MAX_BAGGAGE_STRING_LENGTH=P.MAX_BAGGAGE_STRING_LENGTH,e.SENTRY_BAGGAGE_KEY_PREFIX=P.SENTRY_BAGGAGE_KEY_PREFIX,e.SENTRY_BAGGAGE_KEY_PREFIX_REGEX=P.SENTRY_BAGGAGE_KEY_PREFIX_REGEX,e.baggageHeaderToDynamicSamplingContext=P.baggageHeaderToDynamicSamplingContext,e.dynamicSamplingContextToSentryBaggageHeader=P.dynamicSamplingContextToSentryBaggageHeader,e.parseBaggageHeader=P.parseBaggageHeader,e.getNumberOfUrlSegments=k.getNumberOfUrlSegments,e.getSanitizedUrlString=k.getSanitizedUrlString,e.parseUrl=k.parseUrl,e.stripUrlQueryAndFragment=k.stripUrlQueryAndFragment,e.makeFifoCache=D.makeFifoCache,e.eventFromMessage=L.eventFromMessage,e.eventFromUnknownInput=L.eventFromUnknownInput,e.exceptionFromError=L.exceptionFromError,e.parseStackFrames=L.parseStackFrames,e.callFrameToStackFrame=j.callFrameToStackFrame,e.watchdogTimer=j.watchdogTimer,e.LRUMap=U.LRUMap,e._asyncNullishCoalesce=B._asyncNullishCoalesce,e._asyncOptionalChain=F._asyncOptionalChain,e._asyncOptionalChainDelete=z._asyncOptionalChainDelete,e._nullishCoalesce=$._nullishCoalesce,e._optionalChain=V._optionalChain,e._optionalChainDelete=Y._optionalChainDelete,e.generatePropagationContext=q.generatePropagationContext,e.SDK_VERSION=H.SDK_VERSION,e.escapeStringForRegex=W.escapeStringForRegex,e.supportsHistory=G.supportsHistory}(hN);var y6={};Object.defineProperty(y6,"__esModule",{value:!0}),y6.DEBUG_BUILD="u"=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}gr.closeSession=function(e,t){let r={};t?r={status:t}:"ok"===e.status&&(r={status:"exited"}),gi(e,r)},gr.makeSession=function(e){let t=gn.timestampInSeconds(),r={sid:gn.uuid4(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(function(e){return gn.dropUndefinedKeys({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})})(r)};return e&&gi(r,e),r},gr.updateSession=gi;var go={};Object.defineProperty(go,"__esModule",{value:!0});let ga=hN,gs="_sentrySpan";go._getSpanForScope=function(e){return e[gs]},go._setSpanForScope=function(e,t){t?ga.addNonEnumerableProperty(e,gs,t):delete e[gs]},Object.defineProperty(gt,"__esModule",{value:!0});let gu=hN,gc=gr,gl=go;class gf{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=gu.generatePropagationContext()}clone(){let e=new gf;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,gl._setSpanForScope(e,gl._getSpanForScope(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&gc.updateSession(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t="function"==typeof e?e(this):e,[r,n]=t instanceof gd?[t.getScopeData(),t.getRequestSession()]:gu.isPlainObject(t)?[e,e.requestSession]:[],{tags:i,extra:o,user:a,contexts:s,level:u,fingerprint:c=[],propagationContext:l}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...s},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),c.length&&(this._fingerprint=c),l&&(this._propagationContext=l),n&&(this._requestSession=n),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,gl._setSpanForScope(this,void 0),this._attachments=[],this._propagationContext=gu.generatePropagationContext(),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let r="number"==typeof t?t:100;if(r<=0)return this;let n={timestamp:gu.dateTimestampInSeconds(),...e},i=this._breadcrumbs;return i.push(n),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:gl._getSpanForScope(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let r=t&&t.event_id?t.event_id:gu.uuid4();if(!this._client)return gu.logger.warn("No client configured on scope - will not capture exception!"),r;let n=Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:n,...t,event_id:r},this),r}captureMessage(e,t,r){let n=r&&r.event_id?r.event_id:gu.uuid4();if(!this._client)return gu.logger.warn("No client configured on scope - will not capture message!"),n;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...r,event_id:n},this),n}captureEvent(e,t){let r=t&&t.event_id?t.event_id:gu.uuid4();return this._client?this._client.captureEvent(e,{...t,event_id:r},this):gu.logger.warn("No client configured on scope - will not capture event!"),r}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}let gd=gf;gt.Scope=gd,Object.defineProperty(ge,"__esModule",{value:!0});let gh=hN,gp=gt;ge.getDefaultCurrentScope=function(){return gh.getGlobalSingleton("defaultCurrentScope",()=>new gp.Scope)},ge.getDefaultIsolationScope=function(){return gh.getGlobalSingleton("defaultIsolationScope",()=>new gp.Scope)},Object.defineProperty(y7,"__esModule",{value:!0});let gm=hN,gy=ge,gg=gt,gb=y5;class gv{constructor(e,t){let r,n;r=e||new gg.Scope,n=t||new gg.Scope,this._stack=[{scope:r}],this._isolationScope=n}withScope(e){let t,r=this._pushScope();try{t=e(r)}catch(e){throw this._popScope(),e}return gm.isThenable(t)?t.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),t)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}_popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}}function g_(){let e=gb.getMainCarrier(),t=gb.getSentryCarrier(e);return t.stack=t.stack||new gv(gy.getDefaultCurrentScope(),gy.getDefaultIsolationScope())}function gS(e){return g_().withScope(e)}function gE(e,t){let r=g_();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function gw(e){return g_().withScope(()=>e(g_().getIsolationScope()))}y7.AsyncContextStack=gv,y7.getStackAsyncContextStrategy=function(){return{withIsolationScope:gw,withScope:gS,withSetScope:gE,withSetIsolationScope:(e,t)=>gw(t),getCurrentScope:()=>g_().getScope(),getIsolationScope:()=>g_().getIsolationScope()}},Object.defineProperty(y4,"__esModule",{value:!0});let gT=y5,gx=y7;y4.getAsyncContextStrategy=function(e){let t=gT.getSentryCarrier(e);return t.acs?t.acs:gx.getStackAsyncContextStrategy()},y4.setAsyncContextStrategy=function(e){let t=gT.getMainCarrier();gT.getSentryCarrier(t).acs=e};var gA={};Object.defineProperty(gA,"__esModule",{value:!0});let gO=hN,gM=y4,gR=y5,gC=gt;function gI(){let e=gR.getMainCarrier();return gM.getAsyncContextStrategy(e).getCurrentScope()}gA.getClient=function(){return gI().getClient()},gA.getCurrentScope=gI,gA.getGlobalScope=function(){return gO.getGlobalSingleton("globalScope",()=>new gC.Scope)},gA.getIsolationScope=function(){let e=gR.getMainCarrier();return gM.getAsyncContextStrategy(e).getIsolationScope()},gA.withIsolationScope=function(...e){let t=gR.getMainCarrier(),r=gM.getAsyncContextStrategy(t);if(2===e.length){let[t,n]=e;return t?r.withSetIsolationScope(t,n):r.withIsolationScope(n)}return r.withIsolationScope(e[0])},gA.withScope=function(...e){let t=gR.getMainCarrier(),r=gM.getAsyncContextStrategy(t);if(2===e.length){let[t,n]=e;return t?r.withSetScope(t,n):r.withScope(n)}return r.withScope(e[0])};var gN={};Object.defineProperty(gN,"__esModule",{value:!0});let gP=hN,gk="_sentryMetrics";gN.getMetricSummaryJsonForSpan=function(e){let t=e[gk];if(!t)return;let r={};for(let[,[e,n]]of t)r[e]||(r[e]=[]),r[e].push(gP.dropUndefinedKeys(n));return r},gN.updateMetricSummaryOnSpan=function(e,t,r,n,i,o,a){let s=e[gk]||(e[gk]=new Map),u=`${t}:${r}@${i}`,c=s.get(a);if(c){let[,e]=c;s.set(a,[u,{min:Math.min(e.min,n),max:Math.max(e.max,n),count:e.count+=1,sum:e.sum+=n,tags:e.tags}])}else s.set(a,[u,{min:n,max:n,count:1,sum:n,tags:o}])};var gD={};Object.defineProperty(gD,"__esModule",{value:!0}),gD.SEMANTIC_ATTRIBUTE_CACHE_HIT="cache.hit",gD.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE="cache.item_size",gD.SEMANTIC_ATTRIBUTE_CACHE_KEY="cache.key",gD.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME="sentry.exclusive_time",gD.SEMANTIC_ATTRIBUTE_PROFILE_ID="sentry.profile_id",gD.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON="sentry.idle_span_finish_reason",gD.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT="sentry.measurement_unit",gD.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE="sentry.measurement_value",gD.SEMANTIC_ATTRIBUTE_SENTRY_OP="sentry.op",gD.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN="sentry.origin",gD.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE="sentry.sample_rate",gD.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE="sentry.source";var gL={};Object.defineProperty(gL,"__esModule",{value:!0});let gj=1,gU=2;function gB(e){if(e<400&&e>=100)return{code:gj};if(e>=400&&e<500)switch(e){case 401:return{code:gU,message:"unauthenticated"};case 403:return{code:gU,message:"permission_denied"};case 404:return{code:gU,message:"not_found"};case 409:return{code:gU,message:"already_exists"};case 413:return{code:gU,message:"failed_precondition"};case 429:return{code:gU,message:"resource_exhausted"};case 499:return{code:gU,message:"cancelled"};default:return{code:gU,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:gU,message:"unimplemented"};case 503:return{code:gU,message:"unavailable"};case 504:return{code:gU,message:"deadline_exceeded"};default:return{code:gU,message:"internal_error"}}return{code:gU,message:"unknown_error"}}gL.SPAN_STATUS_ERROR=2,gL.SPAN_STATUS_OK=gj,gL.SPAN_STATUS_UNSET=0,gL.getSpanStatusFromHttpCode=gB,gL.setHttpStatus=function(e,t){e.setAttribute("http.response.status_code",t);let r=gB(t);"unknown_error"!==r.message&&e.setStatus(r)},Object.defineProperty(y3,"__esModule",{value:!0});let gF=hN,gz=y4,g$=y5,gV=gA,gY=gN,gq=gD,gH=gL,gW=go,gG=1;function gZ(e){return"number"==typeof e?gK(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?gK(e.getTime()):gF.timestampInSeconds()}function gK(e){return e>0x2540be3ff?e/1e3:e}function gX(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();try{let{spanId:t,traceId:r}=e.spanContext();if(function(e){let t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){let{attributes:n,startTime:i,name:o,endTime:a,parentSpanId:s,status:u}=e;return gF.dropUndefinedKeys({span_id:t,trace_id:r,data:n,description:o,parent_span_id:s,start_timestamp:gZ(i),timestamp:gZ(a)||void 0,status:gQ(u),op:n[gq.SEMANTIC_ATTRIBUTE_SENTRY_OP],origin:n[gq.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],_metrics_summary:gY.getMetricSummaryJsonForSpan(e)})}return{span_id:t,trace_id:r}}catch(e){return{}}}function gJ(e){let{traceFlags:t}=e.spanContext();return t===gG}function gQ(e){if(e&&e.code!==gH.SPAN_STATUS_UNSET)return e.code===gH.SPAN_STATUS_OK?"ok":e.message||"unknown_error"}let g0="_sentryChildSpans",g1="_sentryRootSpan";function g2(){let e=g$.getMainCarrier(),t=gz.getAsyncContextStrategy(e);return t.getActiveSpan?t.getActiveSpan():gW._getSpanForScope(gV.getCurrentScope())}y3.TRACE_FLAG_NONE=0,y3.TRACE_FLAG_SAMPLED=gG,y3.addChildSpanToSpan=function(e,t){let r=e[g1]||e;gF.addNonEnumerableProperty(t,g1,r),e[g0]?e[g0].add(t):gF.addNonEnumerableProperty(e,g0,new Set([t]))},y3.getActiveSpan=g2,y3.getRootSpan=function(e){return e[g1]||e},y3.getSpanDescendants=function(e){let t=new Set;return function e(r){if(!t.has(r)&&gJ(r))for(let n of(t.add(r),r[g0]?Array.from(r[g0]):[]))e(n)}(e),Array.from(t)},y3.getStatusMessage=gQ,y3.removeChildSpanFromSpan=function(e,t){e[g0]&&e[g0].delete(t)},y3.spanIsSampled=gJ,y3.spanTimeInputToSeconds=gZ,y3.spanToJSON=gX,y3.spanToTraceContext=function(e){let{spanId:t,traceId:r}=e.spanContext(),{parent_span_id:n}=gX(e);return gF.dropUndefinedKeys({parent_span_id:n,span_id:t,trace_id:r})},y3.spanToTraceHeader=function(e){let{traceId:t,spanId:r}=e.spanContext(),n=gJ(e);return gF.generateSentryTraceHeader(t,r,n)},y3.spanToTransactionTraceContext=function(e){let{spanId:t,traceId:r}=e.spanContext(),{data:n,op:i,parent_span_id:o,status:a,origin:s}=gX(e);return gF.dropUndefinedKeys({parent_span_id:o,span_id:t,trace_id:r,data:n,op:i,status:a,origin:s})},y3.updateMetricSummaryOnActiveSpan=function(e,t,r,n,i,o){let a=g2();a&&gY.updateMetricSummaryOnSpan(a,e,t,r,n,i,o)},Object.defineProperty(hI,"__esModule",{value:!0});let g6=hN,g3=y6,g4=y3,g5=gL,g8=!1;function g9(){let e=g4.getActiveSpan(),t=e&&g4.getRootSpan(e);if(t){let e="internal_error";g3.DEBUG_BUILD&&g6.logger.log(`[Tracing] Root span: ${e} -> Global error occured`),t.setStatus({code:g5.SPAN_STATUS_ERROR,message:e})}}g9.tag="sentry_tracingErrorCallback",hI.registerSpanErrorInstrumentation=function(){g8||(g8=!0,g6.addGlobalErrorInstrumentationHandler(g9),g6.addGlobalUnhandledRejectionInstrumentationHandler(g9))};var g7={};Object.defineProperty(g7,"__esModule",{value:!0});let be=hN,bt="_sentryScope",br="_sentryIsolationScope";g7.stripUrlQueryAndFragment=be.stripUrlQueryAndFragment,g7.getCapturedScopesOnSpan=function(e){return{scope:e[bt],isolationScope:e[br]}},g7.setCapturedScopesOnSpan=function(e,t,r){e&&(be.addNonEnumerableProperty(e,br,r),be.addNonEnumerableProperty(e,bt,t))};var bn={};Object.defineProperty(bn,"__esModule",{value:!0});let bi=hI;bn.addTracingExtensions=function(){bi.registerSpanErrorInstrumentation()};var bo={},ba={};Object.defineProperty(ba,"__esModule",{value:!0});let bs=gA;ba.hasTracingEnabled=function(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;let t=e||function(){let e=bs.getClient();return e&&e.getOptions()}();return!!t&&(t.enableTracing||"tracesSampleRate"in t||"tracesSampler"in t)};var bu={};Object.defineProperty(bu,"__esModule",{value:!0});let bc=hN,bl=y3;bu.SentryNonRecordingSpan=class{constructor(e={}){this._traceId=e.traceId||bc.uuid4(),this._spanId=e.spanId||bc.uuid4().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:bl.TRACE_FLAG_NONE}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,r){return this}};var bf={},bd={};Object.defineProperty(bd,"__esModule",{value:!0});let bh=hN;bd.handleCallbackErrors=function(e,t,r=()=>{}){let n;try{n=e()}catch(e){throw t(e),r(),e}return function(e,t,r){return bh.isThenable(e)?e.then(e=>(r(),e),e=>{throw t(e),r(),e}):(r(),e)}(n,t,r)};var bp={},bm={};Object.defineProperty(bm,"__esModule",{value:!0}),bm.DEFAULT_ENVIRONMENT="production",Object.defineProperty(bp,"__esModule",{value:!0});let by=hN,bg=bm,bb=gA,bv=gD,b_=y3,bS="_frozenDsc";function bE(e,t){let r=t.getOptions(),{publicKey:n}=t.getDsn()||{},i=by.dropUndefinedKeys({environment:r.environment||bg.DEFAULT_ENVIRONMENT,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",i),i}function bw(e){let t=bb.getClient();if(!t)return{};let r=bE(b_.spanToJSON(e).trace_id||"",t),n=b_.getRootSpan(e);if(!n)return r;let i=n[bS];if(i)return i;let o=b_.spanToJSON(n),a=o.data||{},s=a[bv.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];null!=s&&(r.sample_rate=`${s}`);let u=a[bv.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];return u&&"url"!==u&&(r.transaction=o.description),r.sampled=String(b_.spanIsSampled(n)),t.emit("createDsc",r),r}bp.freezeDscOnSpan=function(e,t){let r=e;by.addNonEnumerableProperty(r,bS,t)},bp.getDynamicSamplingContextFromClient=bE,bp.getDynamicSamplingContextFromSpan=bw,bp.spanToBaggageHeader=function(e){let t=bw(e);return by.dynamicSamplingContextToSentryBaggageHeader(t)};var bT={};Object.defineProperty(bT,"__esModule",{value:!0});let bx=hN,bA=y6,bO=y3;bT.logSpanEnd=function(e){if(!bA.DEBUG_BUILD)return;let{description:t="< unknown name >",op:r="< unknown op >"}=bO.spanToJSON(e),{spanId:n}=e.spanContext(),i=`[Tracing] Finishing "${r}" ${bO.getRootSpan(e)===e?"root ":""}span "${t}" with ID ${n}`;bx.logger.log(i)},bT.logSpanStart=function(e){if(!bA.DEBUG_BUILD)return;let{description:t="< unknown name >",op:r="< unknown op >",parent_span_id:n}=bO.spanToJSON(e),{spanId:i}=e.spanContext(),o=bO.spanIsSampled(e),a=bO.getRootSpan(e),s=a===e,u=`[Tracing] Starting ${o?"sampled":"unsampled"} ${s?"root ":""}span`,c=[`op: ${r}`,`name: ${t}`,`ID: ${i}`];if(n&&c.push(`parent ID: ${n}`),!s){let{op:e,description:t}=bO.spanToJSON(a);c.push(`root ID: ${a.spanContext().spanId}`),e&&c.push(`root op: ${e}`),t&&c.push(`root description: ${t}`)}bx.logger.log(`${u} - ${c.join("\n ")}`)};var bM={},bR={};Object.defineProperty(bR,"__esModule",{value:!0});let bC=hN,bI=y6;bR.parseSampleRate=function(e){if("boolean"==typeof e)return Number(e);let t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;bI.DEBUG_BUILD&&bC.logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)},Object.defineProperty(bM,"__esModule",{value:!0});let bN=hN,bP=y6,bk=ba,bD=bR;bM.sampleSpan=function(e,t){let r;if(!bk.hasTracingEnabled(e))return[!1];r="function"==typeof e.tracesSampler?e.tracesSampler(t):void 0!==t.parentSampled?t.parentSampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1;let n=bD.parseSampleRate(r);return void 0===n?(bP.DEBUG_BUILD&&bN.logger.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):n?Math.random()a(bF.spanToJSON(e)):e=>bF.spanToJSON(e),u=[];for(let t of e){let e=s(t);e&&u.push(bU.createSpanEnvelopeItem(e))}return bU.createEnvelope(o,u)};var bz={};Object.defineProperty(bz,"__esModule",{value:!0});let b$=gD,bV=y3;bz.setMeasurement=function(e,t,r){let n=bV.getActiveSpan(),i=n&&bV.getRootSpan(n);i&&i.addEvent(e,{[b$.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]:t,[b$.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]:r})},bz.timedEventsToMeasurements=function(e){if(!e||0===e.length)return;let t={};return e.forEach(e=>{let r=e.attributes||{},n=r[b$.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT],i=r[b$.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE];"string"==typeof n&&"number"==typeof i&&(t[e.name]={value:i,unit:n})}),t},Object.defineProperty(bL,"__esModule",{value:!0});let bY=hN,bq=gA,bH=y6,bW=bj,bG=gN,bZ=gD,bK=y3,bX=bp,bJ=bT,bQ=bz,b0=g7;class b1{constructor(e={}){this._traceId=e.traceId||bY.uuid4(),this._spanId=e.spanId||bY.uuid4().substring(16),this._startTime=e.startTimestamp||bY.timestampInSeconds(),this._attributes={},this.setAttributes({[bZ.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]:"manual",[bZ.SEMANTIC_ATTRIBUTE_SENTRY_OP]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}spanContext(){let{_spanId:e,_traceId:t,_sampled:r}=this;return{spanId:e,traceId:t,traceFlags:r?bK.TRACE_FLAG_SAMPLED:bK.TRACE_FLAG_NONE}}setAttribute(e,t){void 0===t?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach(t=>this.setAttribute(t,e[t]))}updateStartTime(e){this._startTime=bK.spanTimeInputToSeconds(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this}end(e){this._endTime||(this._endTime=bK.spanTimeInputToSeconds(e),bJ.logSpanEnd(this),this._onSpanEnded())}getSpanJSON(){return bY.dropUndefinedKeys({data:this._attributes,description:this._name,op:this._attributes[bZ.SEMANTIC_ATTRIBUTE_SENTRY_OP],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:bK.getStatusMessage(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[bZ.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],_metrics_summary:bG.getMetricSummaryJsonForSpan(this),profile_id:this._attributes[bZ.SEMANTIC_ATTRIBUTE_PROFILE_ID],exclusive_time:this._attributes[bZ.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME],measurements:bQ.timedEventsToMeasurements(this._events),is_segment:this._isStandaloneSpan&&bK.getRootSpan(this)===this||void 0,segment_id:this._isStandaloneSpan?bK.getRootSpan(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,r){bH.DEBUG_BUILD&&bY.logger.log("[Tracing] Adding an event to span:",e);let n=b2(t)?t:r||bY.timestampInSeconds(),i=b2(t)?{}:t||{},o={name:e,time:bK.spanTimeInputToSeconds(n),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=bq.getClient();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===bK.getRootSpan(this)))return;if(this._isStandaloneSpan)return void function(e){let t=bq.getClient();if(!t)return;let r=e[1];if(!r||0===r.length)return t.recordDroppedEvent("before_send","span");let n=t.getTransport();n&&n.send(e).then(null,e=>{bH.DEBUG_BUILD&&bY.logger.error("Error while sending span:",e)})}(bW.createSpanEnvelope([this],e));let t=this._convertSpanToTransaction();t&&(b0.getCapturedScopesOnSpan(this).scope||bq.getCurrentScope()).captureEvent(t)}_convertSpanToTransaction(){if(!b6(bK.spanToJSON(this)))return;this._name||(bH.DEBUG_BUILD&&bY.logger.warn("Transaction has no name, falling back to ``."),this._name="");let{scope:e,isolationScope:t}=b0.getCapturedScopesOnSpan(this),r=(e||bq.getCurrentScope()).getClient()||bq.getClient();if(!0!==this._sampled)return bH.DEBUG_BUILD&&bY.logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(r&&r.recordDroppedEvent("sample_rate","transaction"));let n=bK.getSpanDescendants(this).filter(e=>e!==this&&!function(e){return e instanceof b1&&e.isStandaloneSpan()}(e)).map(e=>bK.spanToJSON(e)).filter(b6),i=this._attributes[bZ.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE],o={contexts:{trace:bK.spanToTransactionTraceContext(this)},spans:n.length>1e3?n.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):n,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,...bY.dropUndefinedKeys({dynamicSamplingContext:bX.getDynamicSamplingContextFromSpan(this)})},_metrics_summary:bG.getMetricSummaryJsonForSpan(this),...i&&{transaction_info:{source:i}}},a=bQ.timedEventsToMeasurements(this._events);return a&&Object.keys(a).length&&(bH.DEBUG_BUILD&&bY.logger.log("[Measurements] Adding measurements to transaction",JSON.stringify(a,void 0,2)),o.measurements=a),o}}function b2(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function b6(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}bL.SentrySpan=b1,Object.defineProperty(bf,"__esModule",{value:!0});let b3=hN,b4=y5,b5=gA,b8=y4,b9=y6,b7=gD,ve=bd,vt=ba,vr=go,vn=y3,vi=bp,vo=bT,va=bM,vs=bu,vu=bL,vc=gL,vl=g7,vf="__SENTRY_SUPPRESS_TRACING__";function vd(e,t){let r=vm();return r.withActiveSpan?r.withActiveSpan(e,t):b5.withScope(r=>(vr._setSpanForScope(r,e||void 0),t(r)))}function vh({parentSpan:e,spanContext:t,forceTransaction:r,scope:n}){let i;if(!vt.hasTracingEnabled())return new vs.SentryNonRecordingSpan;let o=b5.getIsolationScope();if(e&&!r)i=function(e,t,r){let{spanId:n,traceId:i}=e.spanContext(),o=!t.getScopeData().sdkProcessingMetadata[vf]&&vn.spanIsSampled(e),a=o?new vu.SentrySpan({...r,parentSpanId:n,traceId:i,sampled:o}):new vs.SentryNonRecordingSpan({traceId:i});vn.addChildSpanToSpan(e,a);let s=b5.getClient();return s&&(s.emit("spanStart",a),r.endTimestamp&&s.emit("spanEnd",a)),a}(e,n,t),vn.addChildSpanToSpan(e,i);else if(e){let r=vi.getDynamicSamplingContextFromSpan(e),{traceId:o,spanId:a}=e.spanContext(),s=vn.spanIsSampled(e);i=vy({traceId:o,parentSpanId:a,...t},n,s),vi.freezeDscOnSpan(i,r)}else{let{traceId:e,dsc:r,parentSpanId:a,sampled:s}={...o.getPropagationContext(),...n.getPropagationContext()};i=vy({traceId:e,parentSpanId:a,...t},n,s),r&&vi.freezeDscOnSpan(i,r)}return vo.logSpanStart(i),vl.setCapturedScopesOnSpan(i,n,o),i}function vp(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let r={...t};return r.startTimestamp=vn.spanTimeInputToSeconds(e.startTime),delete r.startTime,r}return t}function vm(){let e=b4.getMainCarrier();return b8.getAsyncContextStrategy(e)}function vy(e,t,r){let n=b5.getClient(),i=n&&n.getOptions()||{},{name:o="",attributes:a}=e,[s,u]=t.getScopeData().sdkProcessingMetadata[vf]?[!1]:va.sampleSpan(i,{name:o,parentSampled:r,attributes:a,transactionContext:{name:o,parentSampled:r}}),c=new vu.SentrySpan({...e,attributes:{[b7.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]:"custom",...e.attributes},sampled:s});return void 0!==u&&c.setAttribute(b7.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,u),n&&n.emit("spanStart",c),c}function vg(e){let t=vr._getSpanForScope(e);if(!t)return;let r=b5.getClient();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?vn.getRootSpan(t):t}bf.continueTrace=({sentryTrace:e,baggage:t},r)=>b5.withScope(n=>{let i=b3.propagationContextFromHeaders(e,t);return n.setPropagationContext(i),r()}),bf.startInactiveSpan=function(e){let t=vm();if(t.startInactiveSpan)return t.startInactiveSpan(e);let r=vp(e),n=e.scope||b5.getCurrentScope(),i=vg(n);return e.onlyIfParent&&!i?new vs.SentryNonRecordingSpan:vh({parentSpan:i,spanContext:r,forceTransaction:e.forceTransaction,scope:n})},bf.startNewTrace=function(e){return b5.withScope(t=>(t.setPropagationContext(b3.generatePropagationContext()),b9.DEBUG_BUILD&&b3.logger.info(`Starting a new trace with id ${t.getPropagationContext().traceId}`),vd(null,e)))},bf.startSpan=function(e,t){let r=vm();if(r.startSpan)return r.startSpan(e,t);let n=vp(e);return b5.withScope(e.scope,r=>{let i=vg(r),o=e.onlyIfParent&&!i?new vs.SentryNonRecordingSpan:vh({parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});return vr._setSpanForScope(r,o),ve.handleCallbackErrors(()=>t(o),()=>{let{status:e}=vn.spanToJSON(o);!o.isRecording()||e&&"ok"!==e||o.setStatus({code:vc.SPAN_STATUS_ERROR,message:"internal_error"})},()=>o.end())})},bf.startSpanManual=function(e,t){let r=vm();if(r.startSpanManual)return r.startSpanManual(e,t);let n=vp(e);return b5.withScope(e.scope,r=>{let i=vg(r),o=e.onlyIfParent&&!i?new vs.SentryNonRecordingSpan:vh({parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});function a(){o.end()}return vr._setSpanForScope(r,o),ve.handleCallbackErrors(()=>t(o,a),()=>{let{status:e}=vn.spanToJSON(o);!o.isRecording()||e&&"ok"!==e||o.setStatus({code:vc.SPAN_STATUS_ERROR,message:"internal_error"})})})},bf.suppressTracing=function(e){let t=vm();return t.suppressTracing?t.suppressTracing(e):b5.withScope(t=>(t.setSDKProcessingMetadata({[vf]:!0}),e()))},bf.withActiveSpan=vd,Object.defineProperty(bo,"__esModule",{value:!0});let vb=hN,vv=gA,v_=y6,vS=gD,vE=ba,vw=go,vT=y3,vx=bu,vA=gL,vO=bf,vM={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};bo.TRACING_DEFAULTS=vM,bo.startIdleSpan=function(e,t={}){let r=new Map,n,i=!1,o="externalFinish",a=!t.disableAutoFinish,{idleTimeout:s=vM.idleTimeout,finalTimeout:u=vM.finalTimeout,childSpanTimeout:c=vM.childSpanTimeout,beforeSpanEnd:l}=t,f=vv.getClient();if(!f||!vE.hasTracingEnabled())return new vx.SentryNonRecordingSpan;let d=vv.getCurrentScope(),h=vT.getActiveSpan(),p=function(e){let t=vO.startInactiveSpan(e);return vw._setSpanForScope(vv.getCurrentScope(),t),v_.DEBUG_BUILD&&vb.logger.log("[Tracing] Started span is an idle span"),t}(e);function m(e=vb.timestampInSeconds()){let t=vT.getSpanDescendants(p).filter(e=>e!==p);if(!t.length)return void p.end(e);let r=t.map(e=>vT.spanToJSON(e).timestamp).filter(e=>!!e),n=r.length?Math.max(...r):void 0,i=vT.spanTimeInputToSeconds(e),o=vT.spanToJSON(p).start_timestamp,a=Math.min(o?o+u/1e3:1/0,Math.max(o||-1/0,Math.min(i,n||1/0)));p.end(a)}function y(){n&&(clearTimeout(n),n=void 0)}function g(e){y(),n=setTimeout(()=>{!i&&0===r.size&&a&&(o="idleTimeout",m(e))},s)}function b(e){n=setTimeout(()=>{!i&&a&&(o="heartbeatFailed",m(e))},c)}return f.on("spanStart",e=>{var t;i||e===p||vT.spanToJSON(e).timestamp||vT.getSpanDescendants(p).includes(e)&&(t=e.spanContext().spanId,y(),r.set(t,!0),b(vb.timestampInSeconds()+c/1e3))}),f.on("spanEnd",e=>{var t;i||(t=e.spanContext().spanId,r.has(t)&&r.delete(t),0===r.size&&g(vb.timestampInSeconds()+s/1e3),e===p&&function(){i=!0,r.clear(),l&&l(p),vw._setSpanForScope(d,h);let e=vT.spanToJSON(p),{timestamp:t,start_timestamp:n}=e;if(!t||!n)return;(e.data||{})[vS.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]||p.setAttribute(vS.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON,o),vb.logger.log(`[Tracing] Idle span "${e.op}" finished`);let a=vT.getSpanDescendants(p).filter(e=>e!==p),c=0;a.forEach(e=>{e.isRecording()&&(e.setStatus({code:vA.SPAN_STATUS_ERROR,message:"cancelled"}),e.end(t),v_.DEBUG_BUILD&&vb.logger.log("[Tracing] Cancelling span since span ended early",JSON.stringify(e,void 0,2)));let{timestamp:r=0,start_timestamp:n=0}=vT.spanToJSON(e),i=n<=t,o=r-n<(u+s)/1e3;if(v_.DEBUG_BUILD){let t=JSON.stringify(e,void 0,2);i?o||vb.logger.log("[Tracing] Discarding span since it finished after idle span final timeout",t):vb.logger.log("[Tracing] Discarding span since it happened after idle span was finished",t)}o&&i||(vT.removeChildSpanFromSpan(p,e),c++)}),c>0&&p.setAttribute("sentry.idle_span_discarded_spans",c)}())}),f.on("idleSpanEnableAutoFinish",e=>{e===p&&(a=!0,g(),r.size&&b())}),t.disableAutoFinish||g(),setTimeout(()=>{i||(p.setStatus({code:vA.SPAN_STATUS_ERROR,message:"deadline_exceeded"}),o="finalTimeout",m())},u),p};var vR={},vC={},vI={};Object.defineProperty(vI,"__esModule",{value:!0});let vN=hN,vP=y6;vI.notifyEventProcessors=function e(t,r,n,i=0){return new vN.SyncPromise((o,a)=>{let s=t[i];if(null===r||"function"!=typeof s)o(r);else{let u=s({...r},n);vP.DEBUG_BUILD&&s.id&&null===u&&vN.logger.log(`Event processor "${s.id}" dropped event`),vN.isThenable(u)?u.then(r=>e(t,r,n,i+1).then(o)).then(null,a):e(t,u,n,i+1).then(o).then(null,a)}})};var vk={};Object.defineProperty(vk,"__esModule",{value:!0});let vD=hN,vL=bp,vj=y3;function vU(e,t,r){if(r&&Object.keys(r).length)for(let n in e[t]={...e[t]},r)Object.prototype.hasOwnProperty.call(r,n)&&(e[t][n]=r[n])}vk.applyScopeDataToEvent=function(e,t){let{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:o}=t;!function(e,t){let{extra:r,tags:n,user:i,contexts:o,level:a,transactionName:s}=t,u=vD.dropUndefinedKeys(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});let c=vD.dropUndefinedKeys(n);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});let l=vD.dropUndefinedKeys(i);l&&Object.keys(l).length&&(e.user={...l,...e.user});let f=vD.dropUndefinedKeys(o);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),a&&(e.level=a),s&&"transaction"!==e.type&&(e.transaction=s)}(e,t),n&&function(e,t){e.contexts={trace:vj.spanToTraceContext(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:vL.getDynamicSamplingContextFromSpan(t),...e.sdkProcessingMetadata};let r=vj.getRootSpan(t),n=vj.spanToJSON(r).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(e,n),function(e,t){e.fingerprint=e.fingerprint?vD.arrayify(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,r),function(e,t){let r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)},vk.mergeAndOverwriteScopeData=vU,vk.mergeScopeData=function(e,t){let{extra:r,tags:n,user:i,contexts:o,level:a,sdkProcessingMetadata:s,breadcrumbs:u,fingerprint:c,eventProcessors:l,attachments:f,propagationContext:d,transactionName:h,span:p}=t;vU(e,"extra",r),vU(e,"tags",n),vU(e,"user",i),vU(e,"contexts",o),vU(e,"sdkProcessingMetadata",s),a&&(e.level=a),h&&(e.transactionName=h),p&&(e.span=p),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...d}},Object.defineProperty(vC,"__esModule",{value:!0});let vB=hN,vF=bm,vz=gA,v$=vI,vV=gt,vY=vk,vq=new WeakMap;function vH(e,t){let r,n=vB.GLOBAL_OBJ._sentryDebugIds;if(!n)return;let i=vq.get(t);i?r=i:(r=new Map,vq.set(t,r));let o=Object.keys(n).reduce((e,i)=>{let o,a=r.get(i);a?o=a:(o=t(i),r.set(i,o));for(let t=o.length-1;t>=0;t--){let r=o[t];if(r.filename){e[r.filename]=n[i];break}}return e},{});try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.filename&&(e.debug_id=o[e.filename])})})}catch(e){}}function vW(e){let t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let r=e.debug_meta.images;Object.keys(t).forEach(e=>{r.push({type:"sourcemap",code_file:e,debug_id:t[e]})})}let vG=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];vC.applyDebugIds=vH,vC.applyDebugMeta=vW,vC.parseEventHintOrCaptureContext=function(e){if(e)return function(e){return e instanceof vV.Scope||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>vG.includes(e))}(e)?{captureContext:e}:e},vC.prepareEvent=function(e,t,r,n,i,o){let{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,u={...t,event_id:t.event_id||r.event_id||vB.uuid4(),timestamp:t.timestamp||vB.dateTimestampInSeconds()},c=r.integrations||e.integrations.map(e=>e.name);!function(e,t){let{environment:r,release:n,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?r:vF.DEFAULT_ENVIRONMENT),void 0===e.release&&void 0!==n&&(e.release=n),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=vB.truncate(e.message,o));let a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=vB.truncate(a.value,o));let s=e.request;s&&s.url&&(s.url=vB.truncate(s.url,o))}(u,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(u,c),void 0===t.type&&vH(u,e.stackParser);let l=function(e,t){if(!t)return e;let r=e?e.clone():new vV.Scope;return r.update(t),r}(n,r.captureContext);r.mechanism&&vB.addExceptionMechanism(u,r.mechanism);let f=i?i.getEventProcessors():[],d=vz.getGlobalScope().getScopeData();if(o){let e=o.getScopeData();vY.mergeScopeData(d,e)}if(l){let e=l.getScopeData();vY.mergeScopeData(d,e)}let h=[...r.attachments||[],...d.attachments];h.length&&(r.attachments=h),vY.applyScopeDataToEvent(u,d);let p=[...f,...d.eventProcessors];return v$.notifyEventProcessors(p,u,r).then(e=>(e&&vW(e),"number"==typeof a&&a>0?function(e,t,r){if(!e)return null;let n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:vB.normalize(e.data,t,r)}}))},...e.user&&{user:vB.normalize(e.user,t,r)},...e.contexts&&{contexts:vB.normalize(e.contexts,t,r)},...e.extra&&{extra:vB.normalize(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=vB.normalize(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(e=>({...e,...e.data&&{data:vB.normalize(e.data,t,r)}}))),n}(e,a,s):e))},Object.defineProperty(vR,"__esModule",{value:!0});let vZ=hN,vK=bm,vX=gA,vJ=y6,vQ=gr,v0=vC;function v1(e,t){let r=vX.getCurrentScope(),n=vX.getClient();if(n){if(n.captureCheckIn)return n.captureCheckIn(e,t,r);vJ.DEBUG_BUILD&&vZ.logger.warn("Cannot capture check-in. Client does not support sending check-ins.")}else vJ.DEBUG_BUILD&&vZ.logger.warn("Cannot capture check-in. No client defined.");return vZ.uuid4()}function v2(){let e=vX.getIsolationScope(),t=vX.getCurrentScope(),r=t.getSession()||e.getSession();r&&vQ.closeSession(r),v6(),e.setSession(),t.setSession()}function v6(){let e=vX.getIsolationScope(),t=vX.getCurrentScope(),r=vX.getClient(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}vR.addEventProcessor=function(e){vX.getIsolationScope().addEventProcessor(e)},vR.captureCheckIn=v1,vR.captureEvent=function(e,t){return vX.getCurrentScope().captureEvent(e,t)},vR.captureException=function(e,t){return vX.getCurrentScope().captureException(e,v0.parseEventHintOrCaptureContext(t))},vR.captureMessage=function(e,t){let r="string"==typeof t?t:void 0,n="string"!=typeof t?{captureContext:t}:void 0;return vX.getCurrentScope().captureMessage(e,r,n)},vR.captureSession=function(e=!1){e?v2():v6()},vR.close=async function(e){let t=vX.getClient();return t?t.close(e):(vJ.DEBUG_BUILD&&vZ.logger.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))},vR.endSession=v2,vR.flush=async function(e){let t=vX.getClient();return t?t.flush(e):(vJ.DEBUG_BUILD&&vZ.logger.warn("Cannot flush events. No client defined."),Promise.resolve(!1))},vR.isEnabled=function(){let e=vX.getClient();return!!e&&!1!==e.getOptions().enabled&&!!e.getTransport()},vR.isInitialized=function(){return!!vX.getClient()},vR.lastEventId=function(){return vX.getIsolationScope().lastEventId()},vR.setContext=function(e,t){vX.getIsolationScope().setContext(e,t)},vR.setExtra=function(e,t){vX.getIsolationScope().setExtra(e,t)},vR.setExtras=function(e){vX.getIsolationScope().setExtras(e)},vR.setTag=function(e,t){vX.getIsolationScope().setTag(e,t)},vR.setTags=function(e){vX.getIsolationScope().setTags(e)},vR.setUser=function(e){vX.getIsolationScope().setUser(e)},vR.startSession=function(e){let t=vX.getClient(),r=vX.getIsolationScope(),n=vX.getCurrentScope(),{release:i,environment:o=vK.DEFAULT_ENVIRONMENT}=t&&t.getOptions()||{},{userAgent:a}=vZ.GLOBAL_OBJ.navigator||{},s=vQ.makeSession({release:i,environment:o,user:n.getUser()||r.getUser(),...a&&{userAgent:a},...e}),u=r.getSession();return u&&"ok"===u.status&&vQ.updateSession(u,{status:"exited"}),v2(),r.setSession(s),n.setSession(s),s},vR.withMonitor=function(e,t,r){let n=v1({monitorSlug:e,status:"in_progress"},r),i=vZ.timestampInSeconds();function o(t){v1({monitorSlug:e,status:t,checkInId:n,duration:vZ.timestampInSeconds()-i})}return vX.withIsolationScope(()=>{let e;try{e=t()}catch(e){throw o("error"),e}return vZ.isThenable(e)?Promise.resolve(e).then(()=>{o("ok")},()=>{o("error")}):o("ok"),e})};var v3={};Object.defineProperty(v3,"__esModule",{value:!0});let v4=hN,v5=gA;v3.SessionFlusher=class{constructor(e,t){this._client=e,this.flushTimeout=60,this._pendingAggregates={},this._isEnabled=!0,this._intervalId=setInterval(()=>this.flush(),1e3*this.flushTimeout),this._intervalId.unref&&this._intervalId.unref(),this._sessionAttrs=t}flush(){let e=this.getSessionAggregates();0!==e.aggregates.length&&(this._pendingAggregates={},this._client.sendSession(e))}getSessionAggregates(){let e=Object.keys(this._pendingAggregates).map(e=>this._pendingAggregates[parseInt(e)]),t={attrs:this._sessionAttrs,aggregates:e};return v4.dropUndefinedKeys(t)}close(){clearInterval(this._intervalId),this._isEnabled=!1,this.flush()}incrementSessionStatusCount(){if(!this._isEnabled)return;let e=v5.getIsolationScope(),t=e.getRequestSession();t&&t.status&&(this._incrementSessionStatusCount(t.status,new Date),e.setRequestSession(void 0))}_incrementSessionStatusCount(e,t){let r=new Date(t).setSeconds(0,0);this._pendingAggregates[r]=this._pendingAggregates[r]||{};let n=this._pendingAggregates[r];switch(n.started||(n.started=new Date(r).toISOString()),e){case"errored":return n.errored=(n.errored||0)+1,n.errored;case"ok":return n.exited=(n.exited||0)+1,n.exited;default:return n.crashed=(n.crashed||0)+1,n.crashed}}};var v8={};Object.defineProperty(v8,"__esModule",{value:!0});let v9=hN,v7="7";function _e(e){let t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}v8.getEnvelopeEndpointWithUrlEncodedAuth=function(e,t,r){return t||`${function(e){return`${_e(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return v9.urlEncode({sentry_key:e.publicKey,sentry_version:v7,...t&&{sentry_client:`${t.name}/${t.version}`}})}(e,r)}`},v8.getReportDialogEndpoint=function(e,t){let r=v9.makeDsn(e);if(!r)return"";let n=`${_e(r)}embed/error-page/`,i=`dsn=${v9.dsnToString(r)}`;for(let e in t)if("dsn"!==e&&"onClose"!==e)if("user"===e){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${n}?${i}`};var _t={},_r={};Object.defineProperty(_r,"__esModule",{value:!0});let _n=hN,_i=gA,_o=y6,_a=[];function _s(e,t,r){if(r[t.name])_o.DEBUG_BUILD&&_n.logger.log(`Integration skipped because it was already installed: ${t.name}`);else{if(r[t.name]=t,-1===_a.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),_a.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,n)=>r(t,n,e))}if("function"==typeof t.processEvent){let r=t.processEvent.bind(t),n=Object.assign((t,n)=>r(t,n,e),{id:t.name});e.addEventProcessor(n)}_o.DEBUG_BUILD&&_n.logger.log(`Integration installed: ${t.name}`)}}_r.addIntegration=function(e){let t=_i.getClient();t?t.addIntegration(e):_o.DEBUG_BUILD&&_n.logger.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`)},_r.afterSetupIntegrations=function(e,t){for(let r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)},_r.defineIntegration=function(e){return e},_r.getIntegrationsToSetup=function(e){let t=e.defaultIntegrations||[],r=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let n=function(e){let t={};return e.forEach(e=>{let{name:r}=e,n=t[r];n&&!n.isDefaultInstance&&e.isDefaultInstance||(t[r]=e)}),Object.keys(t).map(e=>t[e])}(Array.isArray(r)?[...t,...r]:"function"==typeof r?_n.arrayify(r(t)):t),i=function(e,t){for(let r=0;r"Debug"===e.name);if(-1!==i){let[e]=n.splice(i,1);n.push(e)}return n},_r.installedIntegrations=_a,_r.setupIntegration=_s,_r.setupIntegrations=function(e,t){let r={};return t.forEach(t=>{t&&_s(e,t,r)}),r},Object.defineProperty(_t,"__esModule",{value:!0});let _u=hN,_c=v8,_l=gA,_f=y6,_d=bj,_h=_r,_p=gr,_m=bp,_y=bR,_g=vC,_b="Not capturing exception because it's already been captured.";function _v(e){return void 0===e.type}function __(e){return"transaction"===e.type}_t.BaseClient=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=_u.makeDsn(e.dsn):_f.DEBUG_BUILD&&_u.logger.warn("No DSN provided, client will not send events."),this._dsn){const t=_c.getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,r){let n=_u.uuid4();if(_u.checkOrSetAlreadyCaught(e))return _f.DEBUG_BUILD&&_u.logger.log(_b),n;let i={event_id:n,...t};return this._process(this.eventFromException(e,i).then(e=>this._captureEvent(e,i,r))),i.event_id}captureMessage(e,t,r,n){let i={event_id:_u.uuid4(),...r},o=_u.isParameterizedString(e)?e:String(e),a=_u.isPrimitive(e)?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(a.then(e=>this._captureEvent(e,i,n))),i.event_id}captureEvent(e,t,r){let n=_u.uuid4();if(t&&t.originalException&&_u.checkOrSetAlreadyCaught(t.originalException))return _f.DEBUG_BUILD&&_u.logger.log(_b),n;let i={event_id:n,...t},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,o||r)),i.event_id}captureSession(e){"string"!=typeof e.release?_f.DEBUG_BUILD&&_u.logger.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),_p.updateSession(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>t.flush(e).then(e=>r&&e))):_u.resolvedSyncPromise(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit("close"),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];_h.setupIntegration(this,e,this._integrations),t||_h.afterSetupIntegrations(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let r=_d.createEventEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=_u.addItemToEnvelope(r,_u.createAttachmentEnvelopeItem(e));let n=this.sendEnvelope(r);n&&n.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){let t=_d.createSessionEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,r){if(this._options.sendClientReports){let r=`${e}:${t}`;_f.DEBUG_BUILD&&_u.logger.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(e=>e(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,e=>(_f.DEBUG_BUILD&&_u.logger.error("Error while sending event:",e),e)):(_f.DEBUG_BUILD&&_u.logger.error("Transport disabled"),_u.resolvedSyncPromise({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=_h.setupIntegrations(this,e),_h.afterSetupIntegrations(this,e)}_updateSessionFromEvent(e,t){let r=!1,n=!1,i=t.exception&&t.exception.values;if(i)for(let e of(n=!0,i)){let t=e.mechanism;if(t&&!1===t.handled){r=!0;break}}let o="ok"===e.status;(o&&0===e.errors||o&&r)&&(_p.updateSession(e,{...r&&{status:"crashed"},errors:e.errors||Number(n||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new _u.SyncPromise(t=>{let r=0,n=setInterval(()=>{0==this._numProcessing?(clearInterval(n),t(!0)):(r+=1,e&&r>=e&&(clearInterval(n),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,r,n=_l.getIsolationScope()){let i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||n.setLastEventId(e.event_id||t.event_id),_g.prepareEvent(i,e,t,r,this,n).then(e=>{if(null===e)return e;let t={...n.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){let{traceId:r,spanId:n,parentSpanId:i,dsc:o}=t;e.contexts={trace:_u.dropUndefinedKeys({trace_id:r,span_id:n,parent_span_id:i}),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:o||_m.getDynamicSamplingContextFromClient(r,this),...e.sdkProcessingMetadata}}return e})}_captureEvent(e,t={},r){return this._processEvent(e,t,r).then(e=>e.event_id,e=>{if(_f.DEBUG_BUILD){let t=e;"log"===t.logLevel?_u.logger.log(t.message):_u.logger.warn(t)}})}_processEvent(e,t,r){let n=this.getOptions(),{sampleRate:i}=n,o=__(e),a=_v(e),s=e.type||"error",u=`before send for type \`${s}\``,c=void 0===i?void 0:_y.parseSampleRate(i);if(a&&"number"==typeof c&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),_u.rejectedSyncPromise(new _u.SentryError(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let l="replay_event"===s?"replay":s,f=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,r,f).then(r=>{if(null===r)throw this.recordDroppedEvent("event_processor",l,e),new _u.SentryError("An event processor returned `null`, will not send event.","log");return t.data&&!0===t.data.__sentry__?r:function(e,t){let r=`${t} must return \`null\` or a valid event.`;if(_u.isThenable(e))return e.then(e=>{if(!_u.isPlainObject(e)&&null!==e)throw new _u.SentryError(r);return e},e=>{throw new _u.SentryError(`${t} rejected with ${e}`)});if(!_u.isPlainObject(e)&&null!==e)throw new _u.SentryError(r);return e}(function(e,t,r){let{beforeSend:n,beforeSendTransaction:i,beforeSendSpan:o}=e;if(_v(t)&&n)return n(t,r);if(__(t)){if(t.spans&&o){let e=[];for(let r of t.spans){let t=o(r);t&&e.push(t)}t.spans=e}if(i)return i(t,r)}return t}(n,r,t),u)}).then(n=>{if(null===n)throw this.recordDroppedEvent("before_send",l,e),new _u.SentryError(`${u} returned \`null\`, will not send event.`,"log");let i=r&&r.getSession();!o&&i&&this._updateSessionFromEvent(i,n);let a=n.transaction_info;if(o&&a&&n.transaction!==e.transaction){let e="custom";n.transaction_info={...a,source:e}}return this.sendEvent(n,t),n}).then(null,e=>{if(e instanceof _u.SentryError)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new _u.SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. -Reason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[r,n]=t.split(":");return{reason:r,category:n,quantity:e[t]}})}};var _S={},_E={};Object.defineProperty(_E,"__esModule",{value:!0});let _w=hN;_E.createCheckInEnvelope=function(e,t,r,n,i){let o={sent_at:(new Date).toISOString()};r&&r.sdk&&(o.sdk={name:r.sdk.name,version:r.sdk.version}),n&&i&&(o.dsn=_w.dsnToString(i)),t&&(o.trace=_w.dropUndefinedKeys(t));let a=function(e){return[{type:"check_in"},e]}(e);return _w.createEnvelope(o,[a])},Object.defineProperty(_S,"__esModule",{value:!0});let _T=hN,_x=_t,_A=_E,_O=gA,_M=y6,_R=v3,_C=hI,_I=go,_N=y3,_P=bp;class _k extends _x.BaseClient{constructor(e){_C.registerSpanErrorInstrumentation(),super(e)}eventFromException(e,t){return _T.resolvedSyncPromise(_T.eventFromUnknownInput(this,this._options.stackParser,e,t))}eventFromMessage(e,t="info",r){return _T.resolvedSyncPromise(_T.eventFromMessage(this._options.stackParser,e,t,r,this._options.attachStacktrace))}captureException(e,t,r){if(this._options.autoSessionTracking&&this._sessionFlusher){let e=_O.getIsolationScope().getRequestSession();e&&"ok"===e.status&&(e.status="errored")}return super.captureException(e,t,r)}captureEvent(e,t,r){if(this._options.autoSessionTracking&&this._sessionFlusher&&"exception"===(e.type||"exception")&&e.exception&&e.exception.values&&e.exception.values.length>0){let e=_O.getIsolationScope().getRequestSession();e&&"ok"===e.status&&(e.status="errored")}return super.captureEvent(e,t,r)}close(e){return this._sessionFlusher&&this._sessionFlusher.close(),super.close(e)}initSessionFlusher(){let{release:e,environment:t}=this._options;e?this._sessionFlusher=new _R.SessionFlusher(this,{release:e,environment:t}):_M.DEBUG_BUILD&&_T.logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!")}captureCheckIn(e,t,r){let n="checkInId"in e&&e.checkInId?e.checkInId:_T.uuid4();if(!this._isEnabled())return _M.DEBUG_BUILD&&_T.logger.warn("SDK not enabled, will not capture checkin."),n;let{release:i,environment:o,tunnel:a}=this.getOptions(),s={check_in_id:n,monitor_slug:e.monitorSlug,status:e.status,release:i,environment:o};"duration"in e&&(s.duration=e.duration),t&&(s.monitor_config={schedule:t.schedule,checkin_margin:t.checkinMargin,max_runtime:t.maxRuntime,timezone:t.timezone,failure_issue_threshold:t.failureIssueThreshold,recovery_threshold:t.recoveryThreshold});let[u,c]=this._getTraceInfoFromScope(r);c&&(s.contexts={trace:c});let l=_A.createCheckInEnvelope(s,u,this.getSdkMetadata(),a,this.getDsn());return _M.DEBUG_BUILD&&_T.logger.info("Sending checkin:",e.monitorSlug,e.status),this.sendEnvelope(l),n}_captureRequestSession(){this._sessionFlusher?this._sessionFlusher.incrementSessionStatusCount():_M.DEBUG_BUILD&&_T.logger.warn("Discarded request mode session because autoSessionTracking option was disabled")}_prepareEvent(e,t,r,n){return this._options.platform&&(e.platform=e.platform||this._options.platform),this._options.runtime&&(e.contexts={...e.contexts,runtime:(e.contexts||{}).runtime||this._options.runtime}),this._options.serverName&&(e.server_name=e.server_name||this._options.serverName),super._prepareEvent(e,t,r,n)}_getTraceInfoFromScope(e){if(!e)return[void 0,void 0];let t=_I._getSpanForScope(e);if(t){let e=_N.getRootSpan(t);return[_P.getDynamicSamplingContextFromSpan(e),_N.spanToTraceContext(e)]}let{traceId:r,spanId:n,parentSpanId:i,dsc:o}=e.getPropagationContext(),a={trace_id:r,span_id:n,parent_span_id:i};return o?[o,a]:[_P.getDynamicSamplingContextFromClient(r,this),a]}}_S.ServerRuntimeClient=_k;var _D={};Object.defineProperty(_D,"__esModule",{value:!0});let _L=hN,_j=gA,_U=y6;function _B(e){_j.getCurrentScope().setClient(e)}_D.initAndBind=function(e,t){!0===t.debug&&(_U.DEBUG_BUILD?_L.logger.enable():_L.consoleSandbox(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),_j.getCurrentScope().update(t.initialScope);let r=new e(t);_B(r),r.init()},_D.setCurrentClient=_B;var _F={};Object.defineProperty(_F,"__esModule",{value:!0});let _z=hN,_$=y6;function _V(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}_F.DEFAULT_TRANSPORT_BUFFER_SIZE=64,_F.createTransport=function(e,t,r=_z.makePromiseBuffer(e.bufferSize||64)){let n={};return{send:function(i){let o=[];if(_z.forEachEnvelopeItem(i,(t,r)=>{let i=_z.envelopeItemTypeToDataCategory(r);if(_z.isRateLimited(n,i)){let n=_V(t,r);e.recordDroppedEvent("ratelimit_backoff",i,n)}else o.push(t)}),0===o.length)return _z.resolvedSyncPromise({});let a=_z.createEnvelope(i[0],o),s=t=>{_z.forEachEnvelopeItem(a,(r,n)=>{let i=_V(r,n);e.recordDroppedEvent(t,_z.envelopeItemTypeToDataCategory(n),i)})};return r.add(()=>t({body:_z.serializeEnvelope(a)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&_$.DEBUG_BUILD&&_z.logger.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),n=_z.updateRateLimits(n,e),e),e=>{throw s("network_error"),e})).then(e=>e,e=>{if(e instanceof _z.SentryError)return _$.DEBUG_BUILD&&_z.logger.error("Skipped sending event because buffer is full."),s("queue_overflow"),_z.resolvedSyncPromise({});throw e})},flush:e=>r.drain(e)}};var _Y={};Object.defineProperty(_Y,"__esModule",{value:!0});let _q=hN,_H=y6,_W=5e3;_Y.MIN_DELAY=100,_Y.START_DELAY=_W,_Y.makeOfflineTransport=function(e){function t(...e){_H.DEBUG_BUILD&&_q.logger.info("[Offline]:",...e)}return r=>{let n=e(r);if(!r.createStore)throw Error("No `createStore` function was provided");let i=r.createStore(r),o,a=_W;function s(e){o&&clearTimeout(o),"number"!=typeof(o=setTimeout(async()=>{o=void 0;let e=await i.shift();e&&(t("Attempting to send previously queued event"),e[0].sent_at=(new Date).toISOString(),c(e,!0).catch(e=>{t("Failed to retry sending",e)}))},e))&&o.unref&&o.unref()}function u(){o||(s(a),a=Math.min(2*a,36e5))}async function c(e,o=!1){if(!o&&_q.envelopeContainsItemType(e,["replay_event","replay_recording"]))return await i.push(e),s(100),{};try{let t=await n.send(e),r=100;if(t){if(t.headers&&t.headers["retry-after"])r=_q.parseRetryAfterHeader(t.headers["retry-after"]);else if(t.headers&&t.headers["x-sentry-rate-limits"])r=6e4;else if((t.statusCode||0)>=400)return t}return s(r),a=_W,t}catch(n){if(await function(e,t,n){return!_q.envelopeContainsItemType(e,["client_report"])&&(!r.shouldStore||r.shouldStore(e,t,n))}(e,n,a))return o?await i.unshift(e):await i.push(e),u(),t("Error sending. Event queued.",n),{};throw n}}return r.flushAtStartup&&u(),{send:c,flush:e=>n.flush(e)}}};var _G={};Object.defineProperty(_G,"__esModule",{value:!0});let _Z=hN,_K=v8;function _X(e,t){let r;return _Z.forEachEnvelopeItem(e,(e,n)=>(t.includes(n)&&(r=Array.isArray(e)?e[1]:void 0),!!r)),r}_G.eventFromEnvelope=_X,_G.makeMultiplexedTransport=function(e,t){return r=>{let n=e(r),i=new Map;function o(t,n){let o=n?`${t}:${n}`:t,a=i.get(o);if(!a){let s=_Z.dsnFromString(t);if(!s)return;let u=_K.getEnvelopeEndpointWithUrlEncodedAuth(s,r.tunnel);a=n?(function(e,t){return r=>{let n=e(r);return{...n,send:async e=>{let r=_X(e,["event","transaction","profile","replay_event"]);return r&&(r.release=t),n.send(e)}}}})(e,n)({...r,url:u}):e({...r,url:u}),i.set(o,a)}return[t,a]}return{send:async function(e){let r=t({envelope:e,getEvent:function(t){return _X(e,t&&t.length?t:["event"])}}).map(e=>"string"==typeof e?o(e,void 0):o(e.dsn,e.release)).filter(e=>!!e);return 0===r.length&&r.push(["",n]),(await Promise.all(r.map(([t,r])=>r.send(function(e,t){return _Z.createEnvelope(t?{...e[0],dsn:t}:e[0],e[1])}(e,t)))))[0]},flush:async function(e){let t=[...i.values(),n];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}}}};var _J={};function _Q(e){return"/"===e[e.length-1]?e.slice(0,-1):e}Object.defineProperty(_J,"__esModule",{value:!0}),_J.isSentryRequestUrl=function(e,t){let r=t&&t.getDsn(),n=t&&t.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,r)||function(e,t){return!!t&&_Q(e)===_Q(t)}(e,n)};var _0={};Object.defineProperty(_0,"__esModule",{value:!0}),_0.parameterize=function(e,...t){let r=new String(String.raw(e,...t));return r.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),r.__sentry_template_values__=t,r};var _1={};Object.defineProperty(_1,"__esModule",{value:!0});let _2=hN;_1.applySdkMetadata=function(e,t,r=[t],n="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:r.map(e=>({name:`${n}:@sentry/${e}`,version:_2.SDK_VERSION})),version:_2.SDK_VERSION}),e._metadata=i};var _6={};Object.defineProperty(_6,"__esModule",{value:!0});let _3=hN,_4=gA,_5=100;_6.addBreadcrumb=function(e,t){let r=_4.getClient(),n=_4.getIsolationScope();if(!r)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=_5}=r.getOptions();if(o<=0)return;let a={timestamp:_3.dateTimestampInSeconds(),...e},s=i?_3.consoleSandbox(()=>i(a,t)):a;null!==s&&(r.emit&&r.emit("beforeAddBreadcrumb",s,t),n.addBreadcrumb(s,o))};var _8={};Object.defineProperty(_8,"__esModule",{value:!0});let _9=hN,_7=gA,Se=_r,St=new WeakMap;_8.functionToStringIntegration=Se.defineIntegration(()=>({name:"FunctionToString",setupOnce(){e=Function.prototype.toString;try{Function.prototype.toString=function(...t){let r=_9.getOriginalFunction(this),n=St.has(_7.getClient())&&void 0!==r?r:this;return e.apply(n,t)}}catch(e){}},setup(e){St.set(e,!0)}}));var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});let Sn=hN,Si=y6,So=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/];function Sa(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&""!==r.filename&&"[native code]"!==r.filename)return r.filename||null}return null}(t):null}catch(t){return Si.DEBUG_BUILD&&Sn.logger.error(`Cannot extract url for event ${Sn.getEventDescription(e)}`),null}}Sr.inboundFiltersIntegration=_r.defineIntegration((e={})=>({name:"InboundFilters",processEvent:(t,r,n)=>!function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e)?(Si.DEBUG_BUILD&&Sn.logger.warn(`Event dropped due to being internal Sentry Error. -Event: ${Sn.getEventDescription(e)}`),!0):!function(e,t){return!e.type&&!!t&&!!t.length&&(function(e){let t,r=[];e.message&&r.push(e.message);try{t=e.exception.values[e.exception.values.length-1]}catch(e){}return t&&t.value&&(r.push(t.value),t.type&&r.push(`${t.type}: ${t.value}`)),r})(e).some(e=>Sn.stringMatchesSomePattern(e,t))}(e,t.ignoreErrors)?!function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;let r=e.transaction;return!!r&&Sn.stringMatchesSomePattern(r,t)}(e,t.ignoreTransactions)?!function(e,t){if(!t||!t.length)return!1;let r=Sa(e);return!!r&&Sn.stringMatchesSomePattern(r,t)}(e,t.denyUrls)?!function(e,t){if(!t||!t.length)return!0;let r=Sa(e);return!r||Sn.stringMatchesSomePattern(r,t)}(e,t.allowUrls)&&(Si.DEBUG_BUILD&&Sn.logger.warn(`Event dropped due to not being matched by \`allowUrls\` option. -Event: ${Sn.getEventDescription(e)}. -Url: ${Sa(e)}`),!0):(Si.DEBUG_BUILD&&Sn.logger.warn(`Event dropped due to being matched by \`denyUrls\` option. -Event: ${Sn.getEventDescription(e)}. -Url: ${Sa(e)}`),!0):(Si.DEBUG_BUILD&&Sn.logger.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. -Event: ${Sn.getEventDescription(e)}`),!0):(Si.DEBUG_BUILD&&Sn.logger.warn(`Event dropped due to being matched by \`ignoreErrors\` option. -Event: ${Sn.getEventDescription(e)}`),!0)}(t,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:So],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,n.getOptions()))?t:null}));var Ss={};Object.defineProperty(Ss,"__esModule",{value:!0});let Su=hN;Ss.linkedErrorsIntegration=_r.defineIntegration((e={})=>{let t=e.limit||5,r=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,n,i){let o=i.getOptions();Su.applyAggregateErrorsToEvent(Su.exceptionFromError,o.stackParser,o.maxValueLength,r,t,e,n)}}});var Sc={},Sl={};Object.defineProperty(Sl,"__esModule",{value:!0});let Sf=hN,Sd=new Map,Sh=new Set;function Sp(e,t){return function(e){if(Sf.GLOBAL_OBJ._sentryModuleMetadata)for(let t of Object.keys(Sf.GLOBAL_OBJ._sentryModuleMetadata)){let r=Sf.GLOBAL_OBJ._sentryModuleMetadata[t];if(!Sh.has(t)){for(let n of(Sh.add(t),e(t).reverse()))if(n.filename){Sd.set(n.filename,r);break}}}}(e),Sd.get(t)}Sl.addMetadataToStackFrames=function(e,t){try{t.exception.values.forEach(t=>{if(t.stacktrace)for(let r of t.stacktrace.frames||[]){if(!r.filename)continue;let t=Sp(e,r.filename);t&&(r.module_metadata=t)}})}catch(e){}},Sl.getMetadataForUrl=Sp,Sl.stripMetadataFromStackFrames=function(e){try{e.exception.values.forEach(e=>{if(e.stacktrace)for(let t of e.stacktrace.frames||[])delete t.module_metadata})}catch(e){}},Object.defineProperty(Sc,"__esModule",{value:!0});let Sm=hN,Sy=Sl;Sc.moduleMetadataIntegration=_r.defineIntegration(()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",e=>{Sm.forEachEnvelopeItem(e,(e,t)=>{if("event"===t){let t=Array.isArray(e)?e[1]:void 0;t&&(Sy.stripMetadataFromStackFrames(t),e[1]=t)}})})},processEvent(e,t,r){let n=r.getOptions().stackParser;return Sy.addMetadataToStackFrames(n,e),e}}));var Sg={};Object.defineProperty(Sg,"__esModule",{value:!0});let Sb=hN,Sv={include:{cookies:!0,data:!0,headers:!0,ip:!1,query_string:!0,url:!0,user:{id:!0,username:!0,email:!0}},transactionNamingScheme:"methodPath"};Sg.requestDataIntegration=_r.defineIntegration((e={})=>{let t={...Sv,...e,include:{...Sv.include,...e.include,user:e.include&&"boolean"==typeof e.include.user?e.include.user:{...Sv.include.user,...(e.include||{}).user}}};return{name:"RequestData",processEvent(e){let{sdkProcessingMetadata:r={}}=e,n=r.request;if(!n)return e;let i=function(e){let t,{transactionNamingScheme:r,include:{ip:n,user:i,...o}}=e,a=["method"];for(let[e,t]of Object.entries(o))t&&a.push(e);if(void 0===i)t=!0;else if("boolean"==typeof i)t=i;else{let e=[];for(let[t,r]of Object.entries(i))r&&e.push(t);t=e}return{include:{ip:n,user:t,request:0!==a.length?a:void 0,transaction:r}}}(t);return Sb.addRequestDataToEvent(e,n,i)}}});var S_={};Object.defineProperty(S_,"__esModule",{value:!0});let SS=hN,SE=gA,Sw=vR;S_.captureConsoleIntegration=_r.defineIntegration((e={})=>{let t=e.levels||SS.CONSOLE_LEVELS;return{name:"CaptureConsole",setup(e){"console"in SS.GLOBAL_OBJ&&SS.addConsoleInstrumentationHandler(({args:r,level:n})=>{SE.getClient()===e&&t.includes(n)&&function(e,t){let r={level:SS.severityLevelFromString(t),extra:{arguments:e}};SE.withScope(n=>{if(n.addEventProcessor(e=>(e.logger="console",SS.addExceptionMechanism(e,{handled:!1,type:"console"}),e)),"assert"===t){if(!e[0]){let t=`Assertion failed: ${SS.safeJoin(e.slice(1)," ")||"console.assert"}`;n.setExtra("arguments",e.slice(1)),Sw.captureMessage(t,r)}return}let i=e.find(e=>e instanceof Error);if(i)return void Sw.captureException(i,r);let o=SS.safeJoin(e," ");Sw.captureMessage(o,r)})}(r,n)})}}});var ST={};Object.defineProperty(ST,"__esModule",{value:!0});let Sx=hN;ST.debugIntegration=_r.defineIntegration((e={})=>{let t={debugger:!1,stringify:!1,...e};return{name:"Debug",setup(e){e.on("beforeSendEvent",(e,r)=>{t.debugger,Sx.consoleSandbox(()=>{t.stringify?(console.log(JSON.stringify(e,null,2)),r&&Object.keys(r).length&&console.log(JSON.stringify(r,null,2))):(console.log(e),r&&Object.keys(r).length&&console.log(r))})})}}});var SA={};Object.defineProperty(SA,"__esModule",{value:!0});let SO=hN,SM=y6,SR=_r.defineIntegration(()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(SC(t,e))return SM.DEBUG_BUILD&&SO.logger.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}});function SC(e,t){return!!t&&(!!function(e,t){let r=e.message,n=t.message;return(!!r||!!n)&&(!r||!!n)&&(!!r||!n)&&r===n&&!!SN(e,t)&&!!SI(e,t)&&!0}(e,t)||!!function(e,t){let r=SP(t),n=SP(e);return!!r&&!!n&&r.type===n.type&&r.value===n.value&&!!SN(e,t)&&!!SI(e,t)}(e,t))}function SI(e,t){let r=Sk(e),n=Sk(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||n.length!==r.length)return!1;for(let e=0;e{let{depth:t=3,captureErrorCause:r=!0}=e;return{name:"ExtraErrorData",processEvent:(e,n)=>(function(e,t={},r,n){if(!t.originalException||!SL.isError(t.originalException))return e;let i=t.originalException.name||t.originalException.constructor.name,o=function(e,t){try{let r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],n={};for(let t of Object.keys(e)){if(-1!==r.indexOf(t))continue;let i=e[t];n[t]=SL.isError(i)?i.toString():i}if(t&&void 0!==e.cause&&(n.cause=SL.isError(e.cause)?e.cause.toString():e.cause),"function"==typeof e.toJSON){let t=e.toJSON();for(let e of Object.keys(t)){let r=t[e];n[e]=SL.isError(r)?r.toString():r}}return n}catch(e){Sj.DEBUG_BUILD&&SL.logger.error("Unable to extract extra data from the Error object:",e)}return null}(t.originalException,n);if(o){let t={...e.contexts},n=SL.normalize(o,r);return SL.isPlainObject(n)&&(SL.addNonEnumerableProperty(n,"__sentry_skip_normalization__",!0),t[i]=n),{...e,contexts:t}}return e})(e,n,t,r)}});var SU={};Object.defineProperty(SU,"__esModule",{value:!0});let SB=hN,SF=_r.defineIntegration((e={})=>{let t=e.root,r=e.prefix||"app:///",n="window"in SB.GLOBAL_OBJ&&void 0!==SB.GLOBAL_OBJ.window,i=e.iteratee||Sz({isBrowser:n,root:t,prefix:r});function o(e){return{...e,frames:e&&e.frames&&e.frames.map(e=>i(e))}}return{name:"RewriteFrames",processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=function(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>({...e,...e.stacktrace&&{stacktrace:o(e.stacktrace)}}))}}}catch(t){return e}}(t)),t}}});function Sz({isBrowser:e,root:t,prefix:r}){return n=>{if(!n.filename)return n;let i=/^[a-zA-Z]:\\/.test(n.filename)||n.filename.includes("\\")&&!n.filename.includes("/"),o=/^\//.test(n.filename);if(e){if(t){let e=n.filename;0===e.indexOf(t)&&(n.filename=e.replace(t,r))}}else if(i||o){let e=i?n.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):n.filename,o=t?SB.relative(t,e):SB.basename(e);n.filename=`${r}${o}`}return n}}SU.generateIteratee=Sz,SU.rewriteFramesIntegration=SF;var S$={};Object.defineProperty(S$,"__esModule",{value:!0});let SV=hN;S$.sessionTimingIntegration=_r.defineIntegration(()=>{let e=1e3*SV.timestampInSeconds();return{name:"SessionTiming",processEvent(t){let r=1e3*SV.timestampInSeconds();return{...t,extra:{...t.extra,"session:start":e,"session:duration":r-e,"session:end":r}}}}});var SY={};Object.defineProperty(SY,"__esModule",{value:!0});let Sq=hN;function SH(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function SW(e){let t=new Set;for(let r of e.issues)r.path&&t.add(r.path[0]);let r=Array.from(t);return`Failed to validate keys: ${Sq.truncate(r.join(", "),100)}`}function SG(e,t,r){var n;return t.exception&&t.exception.values&&r&&r.originalException&&(n=r.originalException,Sq.isError(n)&&"ZodError"===n.name&&Array.isArray(n.errors))&&0!==r.originalException.issues.length?{...t,exception:{...t.exception,values:[{...t.exception.values[0],value:SW(r.originalException)},...t.exception.values.slice(1)]},extra:{...t.extra,"zoderror.issues":r.originalException.errors.slice(0,e).map(SH)}}:t}let SZ=_r.defineIntegration((e={})=>{let t=e.limit||10;return{name:"ZodErrors",processEvent:(e,r)=>SG(t,e,r)}});SY.applyZodErrorsToEvent=SG,SY.zodErrorsIntegration=SZ;var SK={},SX={};Object.defineProperty(SX,"__esModule",{value:!0}),SX.COUNTER_METRIC_TYPE="c",SX.DEFAULT_BROWSER_FLUSH_INTERVAL=5e3,SX.DEFAULT_FLUSH_INTERVAL=1e4,SX.DISTRIBUTION_METRIC_TYPE="d",SX.GAUGE_METRIC_TYPE="g",SX.MAX_WEIGHT=1e4,SX.SET_METRIC_TYPE="s",Object.defineProperty(SK,"__esModule",{value:!0});let SJ=hN,SQ=gA,S0=y6,S1=y3,S2=bf,S6=bd,S3=SX;function S4(e,t){let r=SJ.getGlobalSingleton("globalMetricsAggregators",()=>new WeakMap),n=r.get(e);if(n)return n;let i=new t(e);return e.on("flush",()=>i.flush()),e.on("close",()=>i.close()),r.set(e,i),i}function S5(e,t,r,n,i={}){let o=i.client||SQ.getClient();if(!o)return;let a=S1.getActiveSpan(),s=a?S1.getRootSpan(a):void 0,u=s&&S1.spanToJSON(s).description,{unit:c,tags:l,timestamp:f}=i,{release:d,environment:h}=o.getOptions(),p={};d&&(p.release=d),h&&(p.environment=h),u&&(p.transaction=u),S0.DEBUG_BUILD&&SJ.logger.log(`Adding value of ${n} to ${t} metric ${r}`),S4(o,e).add(t,r,n,c,{...p,...l},f)}function S8(e,t,r,n){S5(e,S3.DISTRIBUTION_METRIC_TYPE,t,S9(r),n)}function S9(e){return"string"==typeof e?parseInt(e):e}SK.metrics={increment:function(e,t,r=1,n){S5(e,S3.COUNTER_METRIC_TYPE,t,S9(r),n)},distribution:S8,set:function(e,t,r,n){S5(e,S3.SET_METRIC_TYPE,t,r,n)},gauge:function(e,t,r,n){S5(e,S3.GAUGE_METRIC_TYPE,t,S9(r),n)},timing:function(e,t,r,n="second",i){if("function"==typeof r){let n=SJ.timestampInSeconds();return S2.startSpanManual({op:"metrics.timing",name:t,startTime:n,onlyIfParent:!0},o=>S6.handleCallbackErrors(()=>r(),()=>{},()=>{let r=SJ.timestampInSeconds();S8(e,t,r-n,{...i,unit:"second"}),o.end(r)}))}S8(e,t,r,{...i,unit:n})},getMetricsAggregatorForClient:S4};var S7={},Ee={},Et={},Er={};Object.defineProperty(Er,"__esModule",{value:!0});let En=hN;function Ei(e){return e.replace(/[^\w\-./]+/gi,"")}let Eo=[["\n","\\n"],["\r","\\r"],[" ","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function Ea(e){return[...e].reduce((e,t)=>e+function(e){for(let[t,r]of Eo)if(e===t)return r;return e}(t),"")}Er.getBucketKey=function(e,t,r,n){let i=Object.entries(En.dropUndefinedKeys(n)).sort((e,t)=>e[0].localeCompare(t[0]));return`${e}${t}${r}${i}`},Er.sanitizeMetricKey=function(e){return e.replace(/[^\w\-.]+/gi,"_")},Er.sanitizeTags=function(e){let t={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[Ei(r)]=Ea(String(e[r])));return t},Er.sanitizeUnit=function(e){return e.replace(/[^\w]+/gi,"_")},Er.serializeMetricBuckets=function(e){let t="";for(let r of e){let e=Object.entries(r.tags),n=e.length>0?`|#${e.map(([e,t])=>`${e}:${t}`).join(",")}`:"";t+=`${r.name}@${r.unit}:${r.metric}|${r.metricType}${n}|T${r.timestamp} -`}return t},Er.simpleHash=function(e){let t=0;for(let r=0;r>>0},Object.defineProperty(Et,"__esModule",{value:!0});let Es=hN,Eu=Er;function Ec(e,t,r,n){let i={sent_at:(new Date).toISOString()};r&&r.sdk&&(i.sdk={name:r.sdk.name,version:r.sdk.version}),n&&t&&(i.dsn=Es.dsnToString(t));let o=function(e){let t=Eu.serializeMetricBuckets(e);return[{type:"statsd",length:t.length},t]}(e);return Es.createEnvelope(i,[o])}Et.captureAggregateMetrics=function(e,t){Es.logger.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);let r=Ec(t,e.getDsn(),e.getSdkMetadata(),e.getOptions().tunnel);e.sendEnvelope(r)},Et.createMetricEnvelope=Ec;var El={};Object.defineProperty(El,"__esModule",{value:!0});let Ef=SX,Ed=Er;class Eh{constructor(e){this._value=e}get weight(){return 1}add(e){this._value+=e}toString(){return`${this._value}`}}class Ep{constructor(e){this._last=e,this._min=e,this._max=e,this._sum=e,this._count=1}get weight(){return 5}add(e){this._last=e,ethis._max&&(this._max=e),this._sum+=e,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}}class Em{constructor(e){this._value=[e]}get weight(){return this._value.length}add(e){this._value.push(e)}toString(){return this._value.join(":")}}class Ey{constructor(e){this.first=e,this._value=new Set([e])}get weight(){return this._value.size}add(e){this._value.add(e)}toString(){return Array.from(this._value).map(e=>"string"==typeof e?Ed.simpleHash(e):e).join(":")}}let Eg={[Ef.COUNTER_METRIC_TYPE]:Eh,[Ef.GAUGE_METRIC_TYPE]:Ep,[Ef.DISTRIBUTION_METRIC_TYPE]:Em,[Ef.SET_METRIC_TYPE]:Ey};El.CounterMetric=Eh,El.DistributionMetric=Em,El.GaugeMetric=Ep,El.METRIC_MAP=Eg,El.SetMetric=Ey,Object.defineProperty(Ee,"__esModule",{value:!0});let Eb=hN,Ev=y3,E_=SX,ES=Et,EE=El,Ew=Er;Ee.MetricsAggregator=class{constructor(e){this._client=e,this._buckets=new Map,this._bucketsTotalWeight=0,this._interval=setInterval(()=>this._flush(),E_.DEFAULT_FLUSH_INTERVAL),this._interval.unref&&this._interval.unref(),this._flushShift=Math.floor(Math.random()*E_.DEFAULT_FLUSH_INTERVAL/1e3),this._forceFlush=!1}add(e,t,r,n="none",i={},o=Eb.timestampInSeconds()){let a=Math.floor(o),s=Ew.sanitizeMetricKey(t),u=Ew.sanitizeTags(i),c=Ew.sanitizeUnit(n),l=Ew.getBucketKey(e,s,c,u),f=this._buckets.get(l),d=f&&e===E_.SET_METRIC_TYPE?f.metric.weight:0;f?(f.metric.add(r),f.timestamp=E_.MAX_WEIGHT&&this.flush()}flush(){this._forceFlush=!0,this._flush()}close(){this._forceFlush=!0,clearInterval(this._interval),this._flush()}_flush(){if(this._forceFlush)return this._forceFlush=!1,this._bucketsTotalWeight=0,this._captureMetrics(this._buckets),void this._buckets.clear();let e=Math.floor(Eb.timestampInSeconds())-E_.DEFAULT_FLUSH_INTERVAL/1e3-this._flushShift,t=new Map;for(let[r,n]of this._buckets)n.timestamp<=e&&(t.set(r,n),this._bucketsTotalWeight-=n.metric.weight);for(let[e]of t)this._buckets.delete(e);this._captureMetrics(t)}_captureMetrics(e){if(e.size>0){let t=Array.from(e).map(([,e])=>e);ES.captureAggregateMetrics(this._client,t)}}},Object.defineProperty(S7,"__esModule",{value:!0});let ET=Ee,Ex=SK;S7.metricsDefault={increment:function(e,t=1,r){Ex.metrics.increment(ET.MetricsAggregator,e,t,r)},distribution:function(e,t,r){Ex.metrics.distribution(ET.MetricsAggregator,e,t,r)},set:function(e,t,r){Ex.metrics.set(ET.MetricsAggregator,e,t,r)},gauge:function(e,t,r){Ex.metrics.gauge(ET.MetricsAggregator,e,t,r)},timing:function(e,t,r="second",n){return Ex.metrics.timing(ET.MetricsAggregator,e,t,r,n)},getMetricsAggregatorForClient:function(e){return Ex.metrics.getMetricsAggregatorForClient(e,ET.MetricsAggregator)}};var EA={};Object.defineProperty(EA,"__esModule",{value:!0});let EO=hN,EM=y3,ER=SX,EC=Et,EI=El,EN=Er;EA.BrowserMetricsAggregator=class{constructor(e){this._client=e,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),ER.DEFAULT_BROWSER_FLUSH_INTERVAL)}add(e,t,r,n="none",i={},o=EO.timestampInSeconds()){let a=Math.floor(o),s=EN.sanitizeMetricKey(t),u=EN.sanitizeTags(i),c=EN.sanitizeUnit(n),l=EN.getBucketKey(e,s,c,u),f=this._buckets.get(l),d=f&&e===ER.SET_METRIC_TYPE?f.metric.weight:0;f?(f.metric.add(r),f.timestamptypeof Request&&Ek.isInstanceOf(e,Request)?e.headers:void 0);if(f){if("u">typeof Headers&&Ek.isInstanceOf(f,Headers)){let e=new Headers(f);return e.append("sentry-trace",c),l&&e.append(Ek.BAGGAGE_HEADER_NAME,l),e}if(Array.isArray(f)){let e=[...f,["sentry-trace",c]];return l&&e.push([Ek.BAGGAGE_HEADER_NAME,l]),e}{let e="baggage"in f?f.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),l&&t.push(l),{...f,"sentry-trace":c,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":c,baggage:l}}EP.addTracingHeadersToFetchRequest=EV,EP.instrumentFetchRequest=function(e,t,r,n,i="auto.http.browser"){if(!e.fetchData)return;let o=Ej.hasTracingEnabled()&&t(e.fetchData.url);if(e.endTimestamp&&o){let t=e.fetchData.__span;if(!t)return;let r=n[t];return void(r&&(!function(e,t){if(t.response){EF.setHttpStatus(e,t.response.status);let r=t.response&&t.response.headers&&t.response.headers.get("content-length");if(r){let t=parseInt(r);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:EF.SPAN_STATUS_ERROR,message:"internal_error"});e.end()}(r,e),delete n[t]))}let a=ED.getCurrentScope(),s=ED.getClient(),{method:u,url:c}=e.fetchData,l=function(e){try{return new URL(e).href}catch(e){return}}(c),f=l?Ek.parseUrl(l).host:void 0,d=!!EU.getActiveSpan(),h=o&&d?Ez.startInactiveSpan({name:`${u} ${c}`,attributes:{url:c,type:"fetch","http.method":u,"http.url":l,"server.address":f,[EL.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]:i,[EL.SEMANTIC_ATTRIBUTE_SENTRY_OP]:"http.client"}}):new EB.SentryNonRecordingSpan;if(e.fetchData.__span=h.spanContext().spanId,n[h.spanContext().spanId]=h,r(e.fetchData.url)&&s){let t=e.args[0];e.args[1]=e.args[1]||{};let r=e.args[1];r.headers=EV(t,s,a,r,Ej.hasTracingEnabled()&&d?h:void 0)}return h};var EY={};Object.defineProperty(EY,"__esModule",{value:!0});let Eq=hN,EH=gA,EW=vR,EG=gD,EZ=bf,EK={mechanism:{handled:!1,data:{function:"trpcMiddleware"}}};EY.trpcMiddleware=function(e={}){return function(t){let{path:r,type:n,next:i,rawInput:o}=t,a=EH.getClient(),s=a&&a.getOptions(),u={procedure_type:n};function c(e){"object"==typeof e&&null!==e&&"ok"in e&&!e.ok&&"error"in e&&EW.captureException(e.error,EK)}return(void 0!==e.attachRpcInput?e.attachRpcInput:s&&s.sendDefaultPii)&&(u.input=Eq.normalize(o)),EW.setContext("trpc",u),EZ.startSpanManual({name:`trpc/${r}`,op:"rpc.server",attributes:{[EG.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]:"route",[EG.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]:"auto.rpc.trpc"}},e=>{let t;try{t=i()}catch(t){throw EW.captureException(t,EK),e.end(),t}return Eq.isThenable(t)?t.then(t=>(c(t),e.end(),t),t=>{throw EW.captureException(t,EK),e.end(),t}):(c(t),e.end(),t)})}};var EX={};Object.defineProperty(EX,"__esModule",{value:!0});let EJ=hN,EQ=gA;EX.captureFeedback=function(e,t={},r=EQ.getCurrentScope()){let{message:n,name:i,email:o,url:a,source:s,associatedEventId:u}=e,c={contexts:{feedback:EJ.dropUndefinedKeys({contact_email:o,name:i,message:n,url:a,source:s,associated_event_id:u})},type:"feedback",level:"info"},l=r&&r.getClient()||EQ.getClient();return l&&l.emit("beforeSendFeedback",c,t),r.captureEvent(c,t)};var E0={};Object.defineProperty(E0,"__esModule",{value:!0});let E1=_6,E2=gA,E6=vR;function E3(){return{bindClient(e){E2.getCurrentScope().setClient(e)},withScope:E2.withScope,getClient:()=>E2.getClient(),getScope:E2.getCurrentScope,getIsolationScope:E2.getIsolationScope,captureException:(e,t)=>E2.getCurrentScope().captureException(e,t),captureMessage:(e,t,r)=>E2.getCurrentScope().captureMessage(e,t,r),captureEvent:E6.captureEvent,addBreadcrumb:E1.addBreadcrumb,setUser:E6.setUser,setTags:E6.setTags,setTag:E6.setTag,setExtra:E6.setExtra,setExtras:E6.setExtras,setContext:E6.setContext,getIntegration(e){let t=E2.getClient();return t&&t.getIntegrationByName(e.id)||null},startSession:E6.startSession,endSession:E6.endSession,captureSession(e){if(e)return E6.endSession();!function(){let e=E2.getCurrentScope(),t=E2.getClient(),r=e.getSession();t&&r&&t.captureSession(r)}()}}}E0.getCurrentHub=E3,E0.getCurrentHubShim=E3,Object.defineProperty(hC,"__esModule",{value:!0});let E4=g7,E5=bn,E8=bo,E9=bL,E7=bu,we=gL,wt=bf,wr=bp,wn=bz,wi=bM,wo=bT,wa=gD,ws=bj,wu=vR,wc=gA,wl=ge,wf=y4,wd=y5,wh=gr,wp=v3,wm=gt,wy=vI,wg=v8,wb=_t,wv=_S,w_=_D,wS=_F,wE=_Y,ww=_G,wT=_r,wx=vk,wA=vC,wO=_E,wM=ba,wR=_J,wC=bd,wI=_0,wN=y3,wP=bR,wk=_1,wD=bm,wL=_6,wj=_8,wU=Sr,wB=Ss,wF=Sc,wz=Sg,w$=S_,wV=ST,wY=SA,wq=SD,wH=SU,wW=S$,wG=SY,wZ=SK,wK=S7,wX=EA,wJ=gN,wQ=EP,w0=EY,w1=EX,w2=E0,w6=hN;hC.registerSpanErrorInstrumentation=hI.registerSpanErrorInstrumentation,hC.getCapturedScopesOnSpan=E4.getCapturedScopesOnSpan,hC.setCapturedScopesOnSpan=E4.setCapturedScopesOnSpan,hC.addTracingExtensions=E5.addTracingExtensions,hC.TRACING_DEFAULTS=E8.TRACING_DEFAULTS,hC.startIdleSpan=E8.startIdleSpan,hC.SentrySpan=E9.SentrySpan,hC.SentryNonRecordingSpan=E7.SentryNonRecordingSpan,hC.SPAN_STATUS_ERROR=we.SPAN_STATUS_ERROR,hC.SPAN_STATUS_OK=we.SPAN_STATUS_OK,hC.SPAN_STATUS_UNSET=we.SPAN_STATUS_UNSET,hC.getSpanStatusFromHttpCode=we.getSpanStatusFromHttpCode,hC.setHttpStatus=we.setHttpStatus,hC.continueTrace=wt.continueTrace,hC.startInactiveSpan=wt.startInactiveSpan,hC.startNewTrace=wt.startNewTrace,hC.startSpan=wt.startSpan,hC.startSpanManual=wt.startSpanManual,hC.suppressTracing=wt.suppressTracing,hC.withActiveSpan=wt.withActiveSpan,hC.getDynamicSamplingContextFromClient=wr.getDynamicSamplingContextFromClient,hC.getDynamicSamplingContextFromSpan=wr.getDynamicSamplingContextFromSpan,hC.spanToBaggageHeader=wr.spanToBaggageHeader,hC.setMeasurement=wn.setMeasurement,hC.timedEventsToMeasurements=wn.timedEventsToMeasurements,hC.sampleSpan=wi.sampleSpan,hC.logSpanEnd=wo.logSpanEnd,hC.logSpanStart=wo.logSpanStart,hC.SEMANTIC_ATTRIBUTE_CACHE_HIT=wa.SEMANTIC_ATTRIBUTE_CACHE_HIT,hC.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE=wa.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE,hC.SEMANTIC_ATTRIBUTE_CACHE_KEY=wa.SEMANTIC_ATTRIBUTE_CACHE_KEY,hC.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME=wa.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,hC.SEMANTIC_ATTRIBUTE_PROFILE_ID=wa.SEMANTIC_ATTRIBUTE_PROFILE_ID,hC.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON=wa.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON,hC.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT=wa.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,hC.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE=wa.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,hC.SEMANTIC_ATTRIBUTE_SENTRY_OP=wa.SEMANTIC_ATTRIBUTE_SENTRY_OP,hC.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=wa.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,hC.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=wa.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,hC.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=wa.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,hC.createEventEnvelope=ws.createEventEnvelope,hC.createSessionEnvelope=ws.createSessionEnvelope,hC.createSpanEnvelope=ws.createSpanEnvelope,hC.addEventProcessor=wu.addEventProcessor,hC.captureCheckIn=wu.captureCheckIn,hC.captureEvent=wu.captureEvent,hC.captureException=wu.captureException,hC.captureMessage=wu.captureMessage,hC.captureSession=wu.captureSession,hC.close=wu.close,hC.endSession=wu.endSession,hC.flush=wu.flush,hC.isEnabled=wu.isEnabled,hC.isInitialized=wu.isInitialized,hC.lastEventId=wu.lastEventId,hC.setContext=wu.setContext,hC.setExtra=wu.setExtra,hC.setExtras=wu.setExtras,hC.setTag=wu.setTag,hC.setTags=wu.setTags,hC.setUser=wu.setUser,hC.startSession=wu.startSession,hC.withMonitor=wu.withMonitor,hC.getClient=wc.getClient,hC.getCurrentScope=wc.getCurrentScope,hC.getGlobalScope=wc.getGlobalScope,hC.getIsolationScope=wc.getIsolationScope,hC.withIsolationScope=wc.withIsolationScope,hC.withScope=wc.withScope,hC.getDefaultCurrentScope=wl.getDefaultCurrentScope,hC.getDefaultIsolationScope=wl.getDefaultIsolationScope,hC.setAsyncContextStrategy=wf.setAsyncContextStrategy,hC.getMainCarrier=wd.getMainCarrier,hC.closeSession=wh.closeSession,hC.makeSession=wh.makeSession,hC.updateSession=wh.updateSession,hC.SessionFlusher=wp.SessionFlusher,hC.Scope=wm.Scope,hC.notifyEventProcessors=wy.notifyEventProcessors,hC.getEnvelopeEndpointWithUrlEncodedAuth=wg.getEnvelopeEndpointWithUrlEncodedAuth,hC.getReportDialogEndpoint=wg.getReportDialogEndpoint,hC.BaseClient=wb.BaseClient,hC.ServerRuntimeClient=wv.ServerRuntimeClient,hC.initAndBind=w_.initAndBind,hC.setCurrentClient=w_.setCurrentClient,hC.createTransport=wS.createTransport,hC.makeOfflineTransport=wE.makeOfflineTransport,hC.makeMultiplexedTransport=ww.makeMultiplexedTransport,hC.addIntegration=wT.addIntegration,hC.defineIntegration=wT.defineIntegration,hC.getIntegrationsToSetup=wT.getIntegrationsToSetup,hC.applyScopeDataToEvent=wx.applyScopeDataToEvent,hC.mergeScopeData=wx.mergeScopeData,hC.prepareEvent=wA.prepareEvent,hC.createCheckInEnvelope=wO.createCheckInEnvelope,hC.hasTracingEnabled=wM.hasTracingEnabled,hC.isSentryRequestUrl=wR.isSentryRequestUrl,hC.handleCallbackErrors=wC.handleCallbackErrors,hC.parameterize=wI.parameterize,hC.addChildSpanToSpan=wN.addChildSpanToSpan,hC.getActiveSpan=wN.getActiveSpan,hC.getRootSpan=wN.getRootSpan,hC.getSpanDescendants=wN.getSpanDescendants,hC.getStatusMessage=wN.getStatusMessage,hC.spanIsSampled=wN.spanIsSampled,hC.spanToJSON=wN.spanToJSON,hC.spanToTraceContext=wN.spanToTraceContext,hC.spanToTraceHeader=wN.spanToTraceHeader,hC.parseSampleRate=wP.parseSampleRate,hC.applySdkMetadata=wk.applySdkMetadata,hC.DEFAULT_ENVIRONMENT=wD.DEFAULT_ENVIRONMENT,hC.addBreadcrumb=wL.addBreadcrumb,hC.functionToStringIntegration=wj.functionToStringIntegration,hC.inboundFiltersIntegration=wU.inboundFiltersIntegration,hC.linkedErrorsIntegration=wB.linkedErrorsIntegration,hC.moduleMetadataIntegration=wF.moduleMetadataIntegration,hC.requestDataIntegration=wz.requestDataIntegration,hC.captureConsoleIntegration=w$.captureConsoleIntegration,hC.debugIntegration=wV.debugIntegration,hC.dedupeIntegration=wY.dedupeIntegration,hC.extraErrorDataIntegration=wq.extraErrorDataIntegration,hC.rewriteFramesIntegration=wH.rewriteFramesIntegration,hC.sessionTimingIntegration=wW.sessionTimingIntegration,hC.zodErrorsIntegration=wG.zodErrorsIntegration,hC.metrics=wZ.metrics,hC.metricsDefault=wK.metricsDefault,hC.BrowserMetricsAggregator=wX.BrowserMetricsAggregator,hC.getMetricSummaryJsonForSpan=wJ.getMetricSummaryJsonForSpan,hC.addTracingHeadersToFetchRequest=wQ.addTracingHeadersToFetchRequest,hC.instrumentFetchRequest=wQ.instrumentFetchRequest,hC.trpcMiddleware=w0.trpcMiddleware,hC.captureFeedback=w1.captureFeedback,hC.getCurrentHub=w2.getCurrentHub,hC.getCurrentHubShim=w2.getCurrentHubShim,hC.SDK_VERSION=w6.SDK_VERSION;var w3={name:"@hyperdx/instrumentation-exception",author:"Warren ",license:"Apache-2.0",version:"0.1.0",homepage:"https://www.hyperdx.io",repository:{type:"git",url:"https://github.com/hyperdxio/hyperdx-js.git"},publishConfig:{access:"public"},files:["build/*"],main:"build/src/index.js",scripts:{clean:"rimraf coverage build tmp",prebuild:"npm run clean",build:"tsc -p tsconfig.release.json",postbuild:"npm run build:types","build:types":"tsc -d -p tsconfig.release.json --declarationMap --emitDeclarationOnly","build:watch":"tsc -w -p tsconfig.json",lint:"eslint . --ext .ts --ext .mts","ci:lint":"yarn lint && yarn tsc --noEmit",prettier:"prettier --config .prettierrc --write .",test:"jest","test:watch":"jest --watch"},dependencies:{"@hyperdx/instrumentation-sentry-node":"^0.1.0","@opentelemetry/core":"^1.24.1","@opentelemetry/instrumentation":"^0.51.1","@opentelemetry/semantic-conventions":"^1.24.1","@sentry/core":"^8.7.0","@sentry/types":"^8.7.0","@sentry/utils":"^8.7.0","json-stringify-safe":"^5.0.1",shimmer:"^1.2.1",tslib:"^2.5.3"},devDependencies:{"@opentelemetry/api":"^1.8.0","@types/jest":"^29.5.12",jest:"^29.7.0","ts-jest":"^29.1.4"},peerDependencies:{"@opentelemetry/api":"^1.3.0"},keywords:["exception","instrumentation","nodejs","opentelemetry","tracing"]},w4={};Object.defineProperty(w4,"__esModule",{value:!0}),w4.eventFromUnknownInput=w4.eventFromMessage=w4.eventFromException=w4.exceptionFromError=void 0;let w5=hC,w8=hN;function w9(e,t){let r=Tt(e,t),n={type:t&&t.name,value:Tn(t)};return r.length&&(n.stacktrace={frames:r}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function w7(e,t,r,n){let i=(0,w5.getClient)(),o=i&&i.getOptions().normalizeDepth,a=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];if(r instanceof Error)return r}}(t),s={__serialized__:(0,w8.normalizeToSize)(t,o)};if(a)return{exception:{values:[w9(e,a)]},extra:s};let u={exception:{values:[{type:(0,w8.isEvent)(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:Ta(t,{isUnhandledRejection:n})}]},extra:s};if(r){let t=Tt(e,r);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function Te(e,t){return{exception:{values:[w9(e,t)]}}}function Tt(e,t){let r=t.stacktrace||t.stack||"",n=function(e){return e&&Tr.test(e.message)?1:0}(t),i=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(r,n,i)}catch(e){}return[]}w4.exceptionFromError=w9;let Tr=/Minified React error #\d+;/i;function Tn(e){let t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Ti(e,t,r,n,i){let o;if((0,w8.isErrorEvent)(t)&&t.error)return Te(e,t.error);if((0,w8.isDOMError)(t)||(0,w8.isDOMException)(t)){let i=t;if("stack"in t)o=Te(e,t);else{let t=i.name||((0,w8.isDOMError)(i)?"DOMError":"DOMException"),a=i.message?`${t}: ${i.message}`:t;o=To(e,a,r,n),(0,w8.addExceptionTypeValue)(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return(0,w8.isError)(t)?Te(e,t):((0,w8.isPlainObject)(t)||(0,w8.isEvent)(t)?o=w7(e,t,r,i):(o=To(e,t,r,n),(0,w8.addExceptionTypeValue)(o,`${t}`,void 0)),(0,w8.addExceptionMechanism)(o,{synthetic:!0}),o)}function To(e,t,r,n){let i={};if(n&&r){let n=Tt(e,r);n.length&&(i.exception={values:[{value:t,stacktrace:{frames:n}}]})}if((0,w8.isParameterizedString)(t)){let{__sentry_template_string__:e,__sentry_template_values__:r}=t;return i.logentry={message:e,params:r},i}return i.message=t,i}function Ta(e,{isUnhandledRejection:t}){let r=(0,w8.extractExceptionKeysForMessage)(e),n=t?"promise rejection":"exception";return(0,w8.isErrorEvent)(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:(0,w8.isEvent)(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}w4.eventFromException=function(e,t,r,n){let i=Ti(e,t,r&&r.syntheticException||void 0,n);return(0,w8.addExceptionMechanism)(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),(0,w8.resolvedSyncPromise)(i)},w4.eventFromMessage=function(e,t,r="info",n,i){let o=To(e,t,n&&n.syntheticException||void 0,i);return o.level=r,n&&n.event_id&&(o.event_id=n.event_id),(0,w8.resolvedSyncPromise)(o)},w4.eventFromUnknownInput=Ti;var Ts={},Tu={};Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.wrap=Tu.ignoreNextOnError=Tu.shouldIgnoreOnError=Tu.WINDOW=void 0;let Tc=hC,Tl=hN;Tu.WINDOW=Tl.GLOBAL_OBJ;let Tf=0;function Td(){Tf++,setTimeout(()=>{Tf--})}Tu.shouldIgnoreOnError=function(){return Tf>0},Tu.ignoreNextOnError=Td,Tu.wrap=function e(t,r={},n){if("function"!=typeof t)return t;try{let e=t.__sentry_wrapped__;if(e)return e;if((0,Tl.getOriginalFunction)(t))return t}catch(e){return t}let i=function(){let i=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);let o=i.map(t=>e(t,r));return t.apply(this,o)}catch(e){throw Td(),(0,Tc.withScope)(t=>{t.addEventProcessor(e=>(r.mechanism&&((0,Tl.addExceptionTypeValue)(e,void 0,void 0),(0,Tl.addExceptionMechanism)(e,r.mechanism)),e.extra={...e.extra,arguments:i},e)),(0,Tc.captureException)(e)}),e}};try{for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(i[e]=t[e])}catch(e){}(0,Tl.markFunctionWrapped)(i,t),(0,Tl.addNonEnumerableProperty)(t,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>t.name})}catch(e){}return i},Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.browserApiErrorsIntegration=void 0;let Th=hN,Tp=Tu,Tm=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];function Ty(e){return function(...t){let r=t[0];return t[0]=(0,Tp.wrap)(r,{mechanism:{data:{function:(0,Th.getFunctionName)(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Tg(e){return function(t){return e.apply(this,[(0,Tp.wrap)(t,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,Th.getFunctionName)(e)},handled:!1,type:"instrument"}})])}}function Tb(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in r&&"function"==typeof r[e]&&(0,Th.fill)(r,e,function(t){let r={mechanism:{data:{function:e,handler:(0,Th.getFunctionName)(t)},handled:!1,type:"instrument"}},n=(0,Th.getOriginalFunction)(t);return n&&(r.mechanism.data.handler=(0,Th.getFunctionName)(n)),(0,Tp.wrap)(t,r)})}),e.apply(this,t)}}function Tv(e){let t=Tp.WINDOW,r=t[e]&&t[e].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&((0,Th.fill)(r,"addEventListener",function(t){return function(r,n,i){try{"function"==typeof n.handleEvent&&(n.handleEvent=(0,Tp.wrap)(n.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,Th.getFunctionName)(n),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[r,(0,Tp.wrap)(n,{mechanism:{data:{function:"addEventListener",handler:(0,Th.getFunctionName)(n),target:e},handled:!1,type:"instrument"}}),i])}}),(0,Th.fill)(r,"removeEventListener",function(e){return function(t,r,n){let i=r;try{let r=i&&i.__sentry_wrapped__;r&&e.call(this,t,r,n)}catch(e){}return e.call(this,t,i,n)}}))}Ts.browserApiErrorsIntegration=(0,hC.defineIntegration)((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&(0,Th.fill)(Tp.WINDOW,"setTimeout",Ty),t.setInterval&&(0,Th.fill)(Tp.WINDOW,"setInterval",Ty),t.requestAnimationFrame&&(0,Th.fill)(Tp.WINDOW,"requestAnimationFrame",Tg),t.XMLHttpRequest&&"XMLHttpRequest"in Tp.WINDOW&&(0,Th.fill)(XMLHttpRequest.prototype,"send",Tb);let e=t.eventTarget;e&&(Array.isArray(e)?e:Tm).forEach(Tv)}}});var T_={};Object.defineProperty(T_,"__esModule",{value:!0}),T_.applySourceContextToFrame=T_.contextLinesIntegration=void 0;let TS=hC,TE=hN,Tw=TE.GLOBAL_OBJ;function TT(e,t,r,n){return e.filename===r&&e.lineno&&t.length&&(0,TE.addContextToFrame)(t,e,n),e}T_.contextLinesIntegration=(0,TS.defineIntegration)((e={})=>{let t=null!=e.frameContextLines?e.frameContextLines:7;return{name:"ContextLines",processEvent:e=>(function(e,t){let r=Tw.document,n=Tw.location&&(0,TE.stripUrlQueryAndFragment)(Tw.location.href);if(!r||!n)return e;let i=e.exception&&e.exception.values;if(!i||!i.length)return e;let o=r.documentElement.innerHTML;if(!o)return e;let a=["","",...o.split("\n"),""];return i.forEach(e=>{let r=e.stacktrace;r&&r.frames&&(r.frames=r.frames.map(e=>TT(e,a,n,t)))}),e})(e,t)}}),T_.applySourceContextToFrame=TT;var Tx={};Object.defineProperty(Tx,"__esModule",{value:!0}),Tx.httpContextIntegration=void 0;let TA=Tu;Tx.httpContextIntegration=(0,hC.defineIntegration)(()=>({name:"HttpContext",preprocessEvent(e){if(!TA.WINDOW.navigator&&!TA.WINDOW.location&&!TA.WINDOW.document)return;let t=e.request&&e.request.url||TA.WINDOW.location&&TA.WINDOW.location.href,{referrer:r}=TA.WINDOW.document||{},{userAgent:n}=TA.WINDOW.navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},o={...e.request,...t&&{url:t},headers:i};e.request=o}}));var TO={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hyperdxIntegration=e._hyperdxIntegration=void 0;let t=hC;e._hyperdxIntegration=(e={})=>({name:"HyperDX",processEvent(e){var t,r,n,i,o,a,s,u;let c=function(e){let t,r=[];e.message&&r.push(e.message);try{t=e.exception.values[e.exception.values.length-1]}catch(e){}return t&&t.value&&(r.push(t.value),t.type&&r.push(`${t.type}: ${t.value}`)),r}(e);c.length>0&&(e.message=c[c.length-1]);let l=null==(t=e.exception)?void 0:t.values;if(l&&l.length>0){for(let e of l)if(null==(r=e.stacktrace)?void 0:r.frames){let t=[],r=null;for(let c=e.stacktrace.frames.length-1;c>=0;c--){let l=e.stacktrace.frames[c];(null==(n=l.filename)?void 0:n.includes("framework-"))||(null==(i=l.function)?void 0:i.endsWith("hdxReportString"))||(null==(o=l.function)?void 0:o.endsWith("hdxReportError"))||(null==(a=l.function)?void 0:a.endsWith("hdxReportErrorEvent"))||(null==(s=l.function)?void 0:s.endsWith("hdxReportEvent"))||((null==(u=l.function)?void 0:u.endsWith("hdxReport"))?r=l.filename:r&&l.filename===r?r=null:t.unshift(l))}e.stacktrace.frames=t}}return e}}),e.hyperdxIntegration=(0,t.defineIntegration)(e._hyperdxIntegration)}(TO);var TM={};Object.defineProperty(TM,"__esModule",{value:!0}),TM.linkedErrorsIntegration=void 0;let TR=hN,TC=w4;TM.linkedErrorsIntegration=(0,hC.defineIntegration)((e={})=>{let t=e.limit||5,r=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,n,i){let o=i.getOptions();(0,TR.applyAggregateErrorsToEvent)(TC.exceptionFromError,o.stackParser,o.maxValueLength,r,t,e,n)}}});var TI={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultStackParser=e.defaultStackLineParsers=e.opera11StackLineParser=e.opera10StackLineParser=e.winjsStackLineParser=e.geckoStackLineParser=e.chromeStackLineParser=void 0;let t=hN;function r(e,r,n,i){let o={filename:e,function:""===r?t.UNKNOWN_FUNCTION:r,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==i&&(o.colno=i),o}let n=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,i=/\((\S*)(?::(\d+))(?::(\d+))\)/;e.chromeStackLineParser=[30,e=>{let o=n.exec(e);if(o){if(o[2]&&0===o[2].indexOf("eval")){let e=i.exec(o[2]);e&&(o[2]=e[1],o[3]=e[2],o[4]=e[3])}let[e,n]=l(o[1]||t.UNKNOWN_FUNCTION,o[2]);return r(n,e,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}}];let o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,a=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;e.geckoStackLineParser=[50,e=>{let n=o.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){let e=a.exec(n[3]);e&&(n[1]=n[1]||"eval",n[3]=e[1],n[4]=e[2],n[5]="")}let e=n[3],i=n[1]||t.UNKNOWN_FUNCTION;return[i,e]=l(i,e),r(e,i,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}}];let s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;e.winjsStackLineParser=[40,e=>{let n=s.exec(e);return n?r(n[2],n[1]||t.UNKNOWN_FUNCTION,+n[3],n[4]?+n[4]:void 0):void 0}];let u=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;e.opera10StackLineParser=[10,e=>{let n=u.exec(e);return n?r(n[2],n[3]||t.UNKNOWN_FUNCTION,+n[1]):void 0}];let c=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;e.opera11StackLineParser=[20,e=>{let n=c.exec(e);return n?r(n[5],n[3]||n[4]||t.UNKNOWN_FUNCTION,+n[1],+n[2]):void 0}],e.defaultStackLineParsers=[e.chromeStackLineParser,e.geckoStackLineParser],e.defaultStackParser=(0,t.createStackParser)(...e.defaultStackLineParsers);let l=(e,r)=>{let n=-1!==e.indexOf("safari-extension"),i=-1!==e.indexOf("safari-web-extension");return n||i?[-1!==e.indexOf("@")?e.split("@")[0]:t.UNKNOWN_FUNCTION,n?`safari-extension:${r}`:`safari-web-extension:${r}`]:[e,r]}}(TI),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.recordException=e.buildEventFromException=e.applyIntegrations=e.setupIntegrations=void 0;let t=c,r=tI,n=hC,i=w3,o=w4,a=Ts,s=T_,u=Tx,l=TO,f=TM,d=TI,h=r.trace.getTracer(i.name,i.version),p=[(0,n.inboundFiltersIntegration)(),(0,s.contextLinesIntegration)(),(0,a.browserApiErrorsIntegration)(),(0,f.linkedErrorsIntegration)(),(0,u.httpContextIntegration)(),(0,l.hyperdxIntegration)()],m={integrations:p,stackParser:d.defaultStackParser,maxValueLength:250,transport:{}},y={getOptions:()=>m};e.setupIntegrations=()=>{var e,t;for(let r of p)null==(e=r.setupOnce)||e.call(r),null==(t=r.setup)||t.call(r,y)},e.applyIntegrations=async(e,t)=>{var r;for(let n of p)await (null==(r=n.preprocessEvent)?void 0:r.call(n,e,t,y));for(let r of p)"function"==typeof r.processEvent&&(e=await r.processEvent(e,t,y));return e},e.buildEventFromException=async(t,i)=>{let a=(0,o.eventFromUnknownInput)(d.defaultStackParser,t);try{a=await (0,n.prepareEvent)(m,a,i)}catch(e){r.diag.error("Failed to prepare event",e)}return(0,e.applyIntegrations)(a,i)},e.recordException=async(n,i)=>{try{let{tracer:r,span:o,attributes:a,...s}=null!=i?i:{},u=Object.keys(s).length>0?s:{mechanism:{type:"generic",handled:!0}};(0,t.getEventProcessor)(null!=r?r:h)(await (0,e.buildEventFromException)(n,{data:u}),u,o,a)}catch(e){r.diag.error("Failed to capture exception",e)}}}(u);var TN,TP,Tk={},TD={};function TL(){return TP||(TP=1,Object.defineProperty(TD,"__esModule",{value:!0}),TD.getElementXPath=TD.limitLen=void 0,TD.limitLen=function(e,t){return e.length>t?e.substring(0,t):e},TD.getElementXPath=function e(t,r){if(t.nodeType===Node.DOCUMENT_NODE)return"/";let n=function(e,t){let r=e.nodeType,n=function(e){if(!e.parentNode)return 0;let t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);let r=Array.from(e.parentNode.childNodes);return(r=r.filter(r=>{let n=r.localName;return t.indexOf(r.nodeType)>=0&&n===e.localName})).length>=1?r.indexOf(e)+1:0}(e),i="";if(r===Node.ELEMENT_NODE){let r=e.getAttribute("id");if(t&&r)return`//*[@id="${r}"]`;i=e.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else{if(r!==Node.COMMENT_NODE)return"";i="comment()"}return i&&n>1?`/${i}[${n}]`:`/${i}`}(t,r);if(r&&n.indexOf("@id")>0)return n;let i="";return t.parentNode&&(i+=e(t.parentNode,!1)),i+=n}),TD}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HyperDXErrorInstrumentation=e.ERROR_INSTRUMENTATION_VERSION=e.ERROR_INSTRUMENTATION_NAME=void 0;let t=hx,r=z.__importStar(hp),n=u,i=TL();function o(e){return e&&""!==e.trim()&&!e.startsWith("[object")&&"error"!==e}function a(e){return void 0===e?"(undefined)":e.toString()}function s(e,t){t&&t.stack&&o(t.stack)&&e.setAttribute("error.stack",(0,i.limitLen)(t.stack.toString(),4096))}e.ERROR_INSTRUMENTATION_NAME="errors",e.ERROR_INSTRUMENTATION_VERSION="1";class c extends t.InstrumentationBase{constructor(t){super(e.ERROR_INSTRUMENTATION_NAME,e.ERROR_INSTRUMENTATION_VERSION,t),this._consoleErrorHandler=e=>(...t)=>(this.hdxReport("console.error",t),e.apply(this,t)),this._unhandledRejectionListener=e=>{this.hdxReport("unhandledrejection",e.reason)},this._errorListener=e=>{this.hdxReport("onerror",e)},this._documentErrorListener=e=>{this.hdxReport("eventListener.error",e)}}init(){}enable(){r.wrap(console,"error",this._consoleErrorHandler),window.addEventListener("unhandledrejection",this._unhandledRejectionListener),window.addEventListener("error",this._errorListener),document.documentElement.addEventListener("error",this._documentErrorListener,{capture:!0})}disable(){r.unwrap(console,"error"),window.removeEventListener("unhandledrejection",this._unhandledRejectionListener),window.removeEventListener("error",this._errorListener),document.documentElement.removeEventListener("error",this._documentErrorListener,{capture:!0})}hdxReportError(e,t){let r=t.message||t.toString();if(!o(r)&&!t.stack)return;let a=Date.now(),u=this.tracer.startSpan(e,{startTime:a});u.setAttribute("component","error"),u.setAttribute("error",!0),u.setAttribute("error.object",o(t.name)?t.name:t.constructor&&t.constructor.name?t.constructor.name:"Error"),u.setAttribute("error.message",(0,i.limitLen)(r,1024)),s(u,t),(0,n.recordException)(t,{tracer:this.tracer,span:u}).finally(()=>{u.end(a)})}hdxReportString(e,t,r){if(!o(t))return;let a=Date.now(),u=this.tracer.startSpan(e,{startTime:a});u.setAttribute("component","error"),u.setAttribute("error",!0),u.setAttribute("error.object","String"),u.setAttribute("error.message",(0,i.limitLen)(t,1024)),r?(s(u,r),(0,n.recordException)(r,{tracer:this.tracer,span:u}).finally(()=>{u.end(a)})):u.end(a)}hdxReportErrorEvent(e,t){t.error?this.hdxReport(e,t.error):t.message&&this.hdxReport(e,t.message)}hdxReportEvent(e,t){if(!t.target&&!o(t.type))return;let r=Date.now(),a=this.tracer.startSpan(e,{startTime:r});a.setAttribute("component","error"),a.setAttribute("error.type",t.type),t.target&&(a.setAttribute("target_element",t.target.tagName),a.setAttribute("target_xpath",(0,i.getElementXPath)(t.target,!0)),a.setAttribute("target_src",t.target.src)),(0,n.recordException)(t,{tracer:this.tracer,span:a}).finally(()=>{a.end(r)})}hdxReport(e,t){if(!Array.isArray(t)||0!==t.length)if(t instanceof Array&&1===t.length&&(t=t[0]),t instanceof Error)this.hdxReportError(e,t);else if(t instanceof ErrorEvent)this.hdxReportErrorEvent(e,t);else if(t instanceof Event)this.hdxReportEvent(e,t);else if("string"==typeof t)this.hdxReportString(e,t);else if(t instanceof Array){let r=t.find(e=>e instanceof Error);this.hdxReportString(e,t.map(e=>a(e)).join(" "),r)}else this.hdxReportString(e,a(t))}}e.HyperDXErrorInstrumentation=c}(Tk);var Tj=eh("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function TU(e){return e.setValue(Tj,!0)}function TB(e){return!0===e.getValue(Tj)}var TF="=",Tz=";",T$=",",TV="baggage",TY=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function Tq(e){var t=e.split(Tz);if(!(t.length<=0)){var r=t.shift();if(r){var n=r.indexOf(TF);if(!(n<=0)){var i,o=decodeURIComponent(r.substring(0,n).trim()),a=decodeURIComponent(r.substring(n+1).trim());return t.length>0&&(i=ed(t.join(Tz))),{key:o,value:a,metadata:i}}}}}function TH(e){return"string"!=typeof e||0===e.length?{}:e.split(T$).map(function(e){return Tq(e)}).filter(function(e){return void 0!==e&&e.value.length>0}).reduce(function(e,t){return e[t.key]=t.value,e},{})}var TW=function(){function e(){}return e.prototype.inject=function(e,t,r){var n=tO.getBaggage(e);if(n&&!TB(e)){var i=function(e){return e.reduce(function(e,t){var r=""+e+(""!==e?T$:"")+t;return r.length>8192?e:r},"")}((function(e){return e.getAllEntries().map(function(e){var t=TY(e,2),r=t[0],n=t[1],i=encodeURIComponent(r)+"="+encodeURIComponent(n.value);return void 0!==n.metadata&&(i+=Tz+n.metadata.toString()),i})})(n).filter(function(e){return e.length<=4096}).slice(0,180));i.length>0&&r.set(t,TV,i)}},e.prototype.extract=function(e,t,r){var n=r.get(t,TV),i=Array.isArray(n)?n.join(T$):n;if(!i)return e;var o={};return 0===i.length?e:(i.split(T$).forEach(function(e){var t=Tq(e);if(t){var r={value:t.value};t.metadata&&(r.metadata=t.metadata),o[t.key]=r}}),0===Object.entries(o).length?e:tO.setBaggage(e,tO.createBaggage(o)))},e.prototype.fields=function(){return[TV]},e}(),TG=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},TZ=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function TK(e){var t,r,n={};if("object"!=typeof e||null==e)return n;try{for(var i=TG(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=TZ(o.value,2),s=a[0],u=a[1];TX(s)?TJ(u)?Array.isArray(u)?n[s]=u.slice():n[s]=u:tp.warn("Invalid attribute value set for key: "+s):tp.warn("Invalid attribute key: "+s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function TX(e){return"string"==typeof e&&e.length>0}function TJ(e){return null==e||(Array.isArray(e)?function(e){var t,r,n;try{for(var i=TG(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(null!=a){if(!n){if(TQ(a)){n=typeof a;continue}return!1}if(typeof a!==n)return!1}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0}(e):TQ(e))}function TQ(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}var T0,T1=function(e){tp.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){for(var t={},r=e;null!==r;)Object.getOwnPropertyNames(r).forEach(function(e){if(!t[e]){var n=r[e];n&&(t[e]=String(n))}}),r=Object.getPrototypeOf(r);return t}(e))}(e))};function T2(e){try{T1(e)}catch(e){}}!function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"}(T0||(T0={}));var T6=",",T3=["OTEL_SDK_DISABLED"];function T4(e){return T3.indexOf(e)>-1}var T5=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function T8(e){return T5.indexOf(e)>-1}var T9=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function T7(e){return T9.indexOf(e)>-1}var xe=1/0,xt=128,xr={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:J.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:xe,OTEL_ATTRIBUTE_COUNT_LIMIT:xt,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:xe,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:xt,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:xe,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:xt,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:T0.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function xn(e,t,r){if(void 0!==r[e]){var n=String(r[e]);t[e]="true"===n.toLowerCase()}}function xi(e,t,r,n,i){if(void 0===n&&(n=-1/0),void 0===i&&(i=1/0),void 0!==r[e]){var o=Number(r[e]);isNaN(o)||(t[e]=oi?i:o)}}function xo(e,t,r,n){void 0===n&&(n=T6);var i=r[e];"string"==typeof i&&(t[e]=i.split(n).map(function(e){return e.trim()}))}var xa={ALL:J.ALL,VERBOSE:J.VERBOSE,DEBUG:J.DEBUG,INFO:J.INFO,WARN:J.WARN,ERROR:J.ERROR,NONE:J.NONE};function xs(e,t,r){var n=r[e];if("string"==typeof n){var i=xa[n.toUpperCase()];null!=i&&(t[e]=i)}}function xu(e){var t={};for(var r in xr){var n=r;if("OTEL_LOG_LEVEL"===n)xs(n,t,e);else if(T4(n))xn(n,t,e);else if(T8(n))xi(n,t,e);else if(T7(n))xo(n,t,e);else{var i=e[n];null!=i&&(t[n]=String(i))}}return t}var xc="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof r.g?r.g:{};function xl(){return Object.assign({},xr,xu(xc))}function xf(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function xd(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;n=xb&&(r[1]-=xb,r[0]+=1),r}!function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"}(xp||(xp={}));var xM,xR,xC=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xI=function(){function e(e){var t;void 0===e&&(e={}),this._propagators=null!=(t=e.propagators)?t:[],this._fields=Array.from(new Set(this._propagators.map(function(e){return"function"==typeof e.fields?e.fields():[]}).reduce(function(e,t){return e.concat(t)},[])))}return e.prototype.inject=function(e,t,r){var n,i;try{for(var o=xC(this._propagators),a=o.next();!a.done;a=o.next()){var s=a.value;try{s.inject(e,t,r)}catch(e){tp.warn("Failed to inject with "+s.constructor.name+". Err: "+e.message)}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},e.prototype.extract=function(e,t,r){return this._propagators.reduce(function(e,n){try{return n.extract(e,t,r)}catch(e){tp.warn("Failed to inject with "+n.constructor.name+". Err: "+e.message)}return e},e)},e.prototype.fields=function(){return this._fields.slice()},e}(),xN="[_0-9a-z-*/]",xP=RegExp("^(?:[a-z]"+xN+"{0,255}|"+("[a-z0-9]"+xN+"{0,240}@[a-z]")+xN+"{0,13})$"),xk=/^[ -~]{0,255}[!-~]$/,xD=/,|=/,xL=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,t),r},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce(function(t,r){return t.push(r+"="+e.get(r)),t},[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce(function(e,t){var r=t.trim(),n=r.indexOf("=");if(-1!==n){var i=r.slice(0,n),o=r.slice(n+1,t.length);(function(e){return xP.test(e)})(i)&&function(e){return xk.test(e)&&!xD.test(e)}(o)&&e.set(i,o)}return e},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),xj="traceparent",xU="tracestate",xB=RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$"),xF=function(){function e(){}return e.prototype.inject=function(e,t,r){var n=tR.getSpanContext(e);if(n&&!TB(e)&&e8(n)){var i="00-"+n.traceId+"-"+n.spanId+"-0"+Number(n.traceFlags||eD.NONE).toString(16);r.set(t,xj,i),n.traceState&&r.set(t,xU,n.traceState.serialize())}},e.prototype.extract=function(e,t,r){var n=r.get(t,xj);if(!n)return e;var i=Array.isArray(n)?n[0]:n;if("string"!=typeof i)return e;var o=function(e){var t=xB.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}(i);if(!o)return e;o.isRemote=!0;var a=r.get(t,xU);if(a){var s=Array.isArray(a)?a.join(","):a;o.traceState=new xL("string"==typeof s?s:void 0)}return tR.setSpanContext(e,o)},e.prototype.fields=function(){return[xj,xU]},e}(),xz=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:e7.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),x$=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:e7.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),xV="[object Object]",xY="[object Null]",xq="[object Undefined]",xH=Function.prototype.toString,xW=xH.call(Object),xG=(xM=Object.getPrototypeOf,xR=Object,function(e){return xM(xR(e))}),xZ=Object.prototype,xK=xZ.hasOwnProperty,xX=Symbol?Symbol.toStringTag:void 0,xJ=xZ.toString;function xQ(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||function(e){return null==e?void 0===e?xq:xY:xX&&xX in Object(e)?function(e){var t=xK.call(e,xX),r=e[xX],n=!1;try{e[xX]=void 0,n=!0}catch(e){}var i=xJ.call(e);return n&&(t?e[xX]=r:delete e[xX]),i}(e):function(e){return xJ.call(e)}(e)}(e)!==xV)return!1;var t=xG(e);if(null===t)return!0;var r=xK.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&xH.call(r)===xW}var x0=20;function x1(e){return x3(e)?e.slice():e}function x2(e,t,r,n){var i;if(void 0===r&&(r=0),!(r>x0)){if(r++,x8(e)||x8(t)||x4(t))i=x1(t);else if(x3(e)){if(i=e.slice(),x3(t))for(var o=0,a=t.length;o=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function x7(e,t){return"string"==typeof t?e===t:!!e.match(t)}function Ae(e,t){var r,n;if(!t)return!1;try{for(var i=x9(t),o=i.next();!o.done;o=i.next())if(x7(e,o.value))return!0}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var At,Ar=function(){function e(){var e=this;this._promise=new Promise(function(t,r){e._resolve=t,e._reject=r})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolve(e)},e.prototype.reject=function(e){this._reject(e)},e}(),An=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Ai=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Au=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Ac=function(){function e(e,t,r,n,i,o,a,s,u,c){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:tt.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=r,this._spanContext=n,this.parentSpanId=o,this.kind=i,this.links=a;var l=Date.now();this._performanceStartTime=xm.now(),this._performanceOffset=l-(this._performanceStartTime+x_()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:l),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=c&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return null==t||this._isSpanEnded()||(0===e.length?tp.warn("Invalid attribute key: "+e):TJ(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?this._droppedAttributesCount++:this.attributes[e]=this._truncateToSize(t):tp.warn("Invalid attribute value set for key: "+e)),this},e.prototype.setAttributes=function(e){var t,r;try{for(var n=As(Object.entries(e)),i=n.next();!i.done;i=n.next()){var o=Au(i.value,2),a=o[0],s=o[1];this.setAttribute(a,s)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},e.prototype.addEvent=function(e,t,r){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return tp.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&tp.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),xA(t)&&(xA(r)||(r=t),t=void 0);var n=TK(t);return this.events.push({name:e,attributes:n,time:this._getTime(r),droppedAttributesCount:0}),this},e.prototype.setStatus=function(e){return this._isSpanEnded()||(this.status=e),this},e.prototype.updateName=function(e){return this._isSpanEnded()||(this.name=e),this},e.prototype.end=function(e){this._isSpanEnded()?tp.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(e),this._duration=function(e,t){var r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=xb),[r,n]}(this.startTime,this.endTime),this._duration[0]<0&&(tp.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&tp.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this))},e.prototype._getTime=function(e){if("number"==typeof e&&e=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,r=0;r>>0}return t},e}(),Ap=xl(),Am=T0.AlwaysOn,Ay=1;function Ag(){return{sampler:Ab(Ap),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:xl().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:xl().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:xl().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:xl().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:xl().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:xl().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:xl().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:xl().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Ab(e){switch(void 0===e&&(e=xl()),e.OTEL_TRACES_SAMPLER){case T0.AlwaysOn:return new Af;case T0.AlwaysOff:return new Al;case T0.ParentBasedAlwaysOn:return new Ad({root:new Af});case T0.ParentBasedAlwaysOff:return new Ad({root:new Al});case T0.TraceIdRatio:return new Ah(Av(e));case T0.ParentBasedTraceIdRatio:return new Ad({root:new Ah(Av(e))});default:return tp.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Am+'".'),new Af}}function Av(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return tp.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Ay+"."),Ay;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(tp.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Ay+"."),Ay):t<0||t>1?(tp.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Ay+"."),Ay):t}function A_(e){var t,r,n,i,o,a,s,u,c,l,f,d,h=Object.assign({},e.spanLimits),p=xu(xc);return h.attributeCountLimit=null!=(a=null!=(o=null!=(i=null!=(r=null==(t=e.spanLimits)?void 0:t.attributeCountLimit)?r:null==(n=e.generalLimits)?void 0:n.attributeCountLimit)?i:p.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)?o:p.OTEL_ATTRIBUTE_COUNT_LIMIT)?a:xt,h.attributeValueLengthLimit=null!=(d=null!=(f=null!=(l=null!=(u=null==(s=e.spanLimits)?void 0:s.attributeValueLengthLimit)?u:null==(c=e.generalLimits)?void 0:c.attributeValueLengthLimit)?l:p.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)?f:p.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)?d:xe,Object.assign({},e,{spanLimits:h})}var AS=function(){function e(e,t){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var r=xl();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Ao(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(tp.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&eD.SAMPLED&&this._addToBuffer(e)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},e.prototype._addToBuffer=function(e){this._finishedSpans.length>=this._maxQueueSize?(0===this._droppedSpansCount&&tp.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++):(this._droppedSpansCount>0&&(tp.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer())},e.prototype._flushAll=function(){var e=this;return new Promise(function(t,r){for(var n=[],i=0,o=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize);i0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(t){e._isExporting=!1,T2(t)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return t();void 0===this._timer&&(this._timer=setTimeout(function(){return t()},this._scheduledDelayMillis),this._timer)}},e.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},e}(),AE=function(){var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Aw=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.onInit(r),n}return AE(t,e),t.prototype.onInit=function(e){var t=this;!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"u">typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&t.forceFlush()},this._pageHideListener=function(){t.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){"u">typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(AS),AT=function(){this.generateTraceId=AA(16),this.generateSpanId=AA(8)},Ax=Array(32);function AA(e){return function(){for(var t=0;t<2*e;t++)Ax[t]=Math.floor(16*Math.random())+48,Ax[t]>=58&&(Ax[t]+=39);return String.fromCharCode.apply(null,Ax.slice(0,2*e))}}var AO,AM=function(){function e(e,t,r){this._tracerProvider=r;var n,i,o,a,s=(n=t,i={sampler:Ab()},(a=Object.assign({},o=Ag(),i,n)).generalLimits=Object.assign({},o.generalLimits,n.generalLimits||{}),a.spanLimits=Object.assign({},o.spanLimits,n.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=t.idGenerator||new AT,this.resource=r.resource,this.instrumentationLibrary=e}return e.prototype.startSpan=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r=th.active()),t.root&&(r=tR.deleteSpan(r));var n=tR.getSpan(r);if(TB(r))return tp.debug("Instrumentation suppressed, returning Noop Span"),tR.wrapSpanContext(eG);var i,o,a,s,u,c,l=null==n?void 0:n.spanContext(),f=this._idGenerator.generateSpanId();l&&tR.isSpanContextValid(l)?(s=l.traceId,u=l.traceState,c=l.spanId):s=this._idGenerator.generateTraceId();var d=null!=(i=t.kind)?i:te.INTERNAL,h=(null!=(o=t.links)?o:[]).map(function(e){return{context:e.context,attributes:TK(e.attributes)}}),p=TK(t.attributes),m=this._sampler.shouldSample(r,s,e,d,p,h);u=null!=(a=m.traceState)?a:u;var y={traceId:s,spanId:f,traceFlags:m.decision===e7.RECORD_AND_SAMPLED?eD.SAMPLED:eD.NONE,traceState:u};if(m.decision===e7.NOT_RECORD)return tp.debug("Recording is off, propagating context in a non-recording span"),tR.wrapSpanContext(y);var g=TK(Object.assign(p,m.attributes));return new Ac(this,r,e,y,d,c,h,t.startTime,void 0,g)},e.prototype.startActiveSpan=function(e,t,r,n){var i,o,a;if(!(arguments.length<2)){2==arguments.length?a=t:3==arguments.length?(i=t,a=r):(i=t,o=r,a=n);var s=null!=o?o:th.active(),u=this.startSpan(e,i,s),c=tR.setSpan(s,u);return th.with(c,a,void 0,u)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),AR=function(){return(AR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},AP=function(){function e(e,t){var r,n=this;this._attributes=e,this.asyncAttributesPending=null!=t,this._syncAttributes=null!=(r=this._attributes)?r:{},this._asyncAttributesPromise=null==t?void 0:t.then(function(e){return n._attributes=Object.assign({},n._attributes,e),n.asyncAttributesPending=!1,e},function(e){return tp.debug("a resource's async attributes promise rejected: %s",e),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e(((t={})[fh]="unknown_service",t[fb]=xy[fb],t[fg]=xy[fg],t[fv]=xy[fv],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&tp.error("Accessing resource attributes before async attributes settled"),null!=(e=this._attributes)?e:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return AC(this,void 0,void 0,function(){return AI(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},e.prototype.merge=function(t){var r,n=this;if(!t)return this;var i=AR(AR({},this._syncAttributes),null!=(r=t._syncAttributes)?r:t.attributes);return this._asyncAttributesPromise||t._asyncAttributesPromise?new e(i,Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(e){var r,i=AN(e,2),o=i[0],a=i[1];return AR(AR(AR(AR({},n._syncAttributes),o),null!=(r=t._syncAttributes)?r:t.attributes),a)})):new e(i)},e.EMPTY=new e({}),e}(),Ak=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},AD=function(){function e(e){this._spanProcessors=e}return e.prototype.forceFlush=function(){var e,t,r=[];try{for(var n=Ak(this._spanProcessors),i=n.next();!i.done;i=n.next()){var o=i.value;r.push(o.forceFlush())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return new Promise(function(e){Promise.all(r).then(function(){e()}).catch(function(t){T2(t||Error("MultiSpanProcessor: forceFlush failed")),e()})})},e.prototype.onStart=function(e,t){var r,n;try{for(var i=Ak(this._spanProcessors),o=i.next();!o.done;o=i.next())o.value.onStart(e,t)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.onEnd=function(e){var t,r;try{for(var n=Ak(this._spanProcessors),i=n.next();!i.done;i=n.next())i.value.onEnd(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.shutdown=function(){var e,t,r=[];try{for(var n=Ak(this._spanProcessors),i=n.next();!i.done;i=n.next()){var o=i.value;r.push(o.shutdown())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return new Promise(function(e,t){Promise.all(r).then(function(){e()},t)})},e}(),AL=function(){function e(){}return e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}();!function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"}(AO||(AO={}));var Aj,AU,AB,AF=function(){function e(e){void 0===e&&(e={}),this._registeredSpanProcessors=[],this._tracers=new Map;var t,r=function(){for(var e=[],t=0;t0;)r=x2(r,e.shift(),0,n);return r}({},Ag(),A_(e));this.resource=null!=(t=r.resource)?t:AP.empty(),this.resource=AP.default().merge(this.resource),this._config=Object.assign({},r,{resource:this.resource});var n=this._buildExporterFromEnv();if(void 0!==n){var i=new Aw(n);this.activeSpanProcessor=i}else this.activeSpanProcessor=new AL}return e.prototype.getTracer=function(e,t,r){var n=e+"@"+(t||"")+":"+((null==r?void 0:r.schemaUrl)||"");return this._tracers.has(n)||this._tracers.set(n,new AM({name:e,version:t,schemaUrl:null==r?void 0:r.schemaUrl},this._config,this)),this._tracers.get(n)},e.prototype.addSpanProcessor=function(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch(function(e){return tp.error("Error while trying to shutdown current span processor",e)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new AD(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(e){void 0===e&&(e={}),tR.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&th.setGlobalContextManager(e.contextManager),e.propagator&&tO.setGlobalPropagator(e.propagator)},e.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map(function(t){return new Promise(function(r){var n,i=setTimeout(function(){r(Error("Span processor did not completed within timeout period of "+e+" ms")),n=AO.timeout},e);t.forceFlush().then(function(){clearTimeout(i),n!==AO.timeout&&r(n=AO.resolved)}).catch(function(e){clearTimeout(i),n=AO.error,r(e)})})});return new Promise(function(e,r){Promise.all(t).then(function(t){var n=t.filter(function(e){return e!==AO.resolved});n.length>0?r(n):e()}).catch(function(e){return r([e])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(e){var t;return null==(t=this.constructor._registeredPropagators.get(e))?void 0:t()},e.prototype._getSpanExporter=function(e){var t;return null==(t=this.constructor._registeredExporters.get(e))?void 0:t()},e.prototype._buildPropagatorFromEnv=function(){var e=this,t=Array.from(new Set(xl().OTEL_PROPAGATORS)),r=t.map(function(t){var r=e._getPropagator(t);return r||tp.warn('Propagator "'+t+'" requested through environment variable is unavailable.'),r}).reduce(function(e,t){return t&&e.push(t),e},[]);return 0===r.length?void 0:1===t.length?r[0]:new xI({propagators:r})},e.prototype._buildExporterFromEnv=function(){var e=xl().OTEL_TRACES_EXPORTER;if("none"!==e&&""!==e){var t=this._getSpanExporter(e);return t||tp.error('Exporter "'+e+'" requested through environment variable is unavailable.'),t}},e._registeredPropagators=new Map([["tracecontext",function(){return new xF}],["baggage",function(){return new TW}]]),e._registeredExporters=new Map,e}(),Az=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},A$=function(){function e(){}return e.prototype.export=function(e,t){return this._sendSpans(e,t)},e.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype._exportInfo=function(e){var t;return{resource:{attributes:e.resource.attributes},traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:null==(t=e.spanContext().traceState)?void 0:t.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:xT(e.startTime),duration:xT(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},e.prototype._sendSpans=function(e,t){var r,n;try{for(var i=Az(e),o=i.next();!o.done;o=i.next()){var a=o.value;console.dir(this._exportInfo(a),{depth:3})}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}if(t)return t({code:xp.SUCCESS})},e}(),AV=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})},AY=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},AW=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i=o)return e.addEvent(t,i),e}function AQ(e,t){AJ(e,Aj.FETCH_START,t),AJ(e,Aj.DOMAIN_LOOKUP_START,t),AJ(e,Aj.DOMAIN_LOOKUP_END,t),AJ(e,Aj.CONNECT_START,t),AX(t,"name")&&t.name.startsWith("https:")&&AJ(e,Aj.SECURE_CONNECTION_START,t),AJ(e,Aj.CONNECT_END,t),AJ(e,Aj.REQUEST_START,t),AJ(e,Aj.RESPONSE_START,t),AJ(e,Aj.RESPONSE_END,t);var r=t[Aj.ENCODED_BODY_SIZE];void 0!==r&&e.setAttribute(oL.HTTP_RESPONSE_CONTENT_LENGTH,r);var n=t[Aj.DECODED_BODY_SIZE];void 0!==n&&r!==n&&e.setAttribute(oL.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,n)}function A0(){return"u">typeof location?location.origin:void 0}function A1(e,t,r,n,i,o){void 0===i&&(i=new WeakSet);var a=A2(e),s=function(e,t,r,n,i,o){var a=xw(t),s=xw(r),u=n.filter(function(t){var r=xw(xE(t[Aj.FETCH_START])),n=xw(xE(t[Aj.RESPONSE_END]));return t.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&t.name===e&&r>=a&&n<=s});return u.length>0&&(u=u.filter(function(e){return!i.has(e)})),u}(e=a.toString(),t,r,n,i,o);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var u=function(e){return e.slice().sort(function(e,t){var r=e[Aj.FETCH_START],n=t[Aj.FETCH_START];return r>n?1:r1){var c=u[0],l=function(e,t,r){for(var n,i=xw(r),o=xw(xE(t)),a=e[1],s=e.length,u=1;u=o&&(!n||ftypeof document?document.baseURI:"u">typeof location?location.href:void 0);var t=(AU||(AU=document.createElement("a")),AU);return t.href=e,t}function A6(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var r=function(e,t){var r=e.nodeType,n=function(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var r=Array.from(e.parentNode.childNodes);return(r=r.filter(function(r){var n=r.localName;return t.indexOf(r.nodeType)>=0&&n===e.localName})).length>=1?r.indexOf(e)+1:0}(e),i="";if(r===Node.ELEMENT_NODE){var o=e.getAttribute("id");if(t&&o)return'//*[@id="'+o+'"]';i=e.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else{if(r!==Node.COMMENT_NODE)return"";i="comment()"}return i&&n>1?"/"+i+"["+n+"]":"/"+i}(e,t);if(t&&r.indexOf("@id")>0)return r;var n="";return e.parentNode&&(n+=A6(e.parentNode,!1)),n+=r}function A3(e,t){var r=t||[];return("string"==typeof r||r instanceof RegExp)&&(r=[r]),A2(e).origin===A0()||r.some(function(t){return x7(e,t)})}!function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"}(Aj||(Aj={})),function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"}(AB||(AB={})),function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"}(Mt||(Mt={}));var A4={"first-paint":Mt.FIRST_PAINT,"first-contentful-paint":Mt.FIRST_CONTENTFUL_PAINT},A5=function(){var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),A8=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,"@opentelemetry/instrumentation-document-load","0.38.0",t)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return A5(t,e),t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var e=this;window.setTimeout(function(){e._collectPerformance()})},t.prototype._addResourcesSpans=function(e){var t,r,n=this,i=null==(r=(t=xm).getEntriesByType)?void 0:r.call(t,"resource");i&&i.forEach(function(t){n._initResourceSpan(t,e)})},t.prototype._collectPerformance=function(){var e=this,t=Array.from(document.getElementsByTagName("meta")).find(function(e){return e.getAttribute("name")===xj}),r=function(){var e,t,r={},n=null==(t=(e=xm).getEntriesByType)?void 0:t.call(e,"navigation")[0];if(n)Object.values(Aj).forEach(function(e){if(AX(n,e)){var t=n[e];"number"==typeof t&&(r[e]=t)}});else{var i=xm.timing;i&&Object.values(Aj).forEach(function(e){if(AX(i,e)){var t=i[e];"number"==typeof t&&(r[e]=t)}})}return r}(),n=t&&t.content||"";th.with(tO.extract(em,{traceparent:n}),function(){var t,n=e._startSpan(AB.DOCUMENT_LOAD,Aj.FETCH_START,r);n&&(th.with(tR.setSpan(th.active(),n),function(){var t=e._startSpan(AB.DOCUMENT_FETCH,Aj.FETCH_START,r);t&&(t.setAttribute(iP,location.href),th.with(tR.setSpan(th.active(),t),function(){var n;AQ(t,r),e._addCustomAttributesOnSpan(t,null==(n=e._getConfig().applyCustomAttributesOnSpan)?void 0:n.documentFetch),e._endSpan(t,Aj.RESPONSE_END,r)}))}),n.setAttribute(iP,location.href),n.setAttribute(iB,navigator.userAgent),e._addResourcesSpans(n),AJ(n,Aj.FETCH_START,r),AJ(n,Aj.UNLOAD_EVENT_START,r),AJ(n,Aj.UNLOAD_EVENT_END,r),AJ(n,Aj.DOM_INTERACTIVE,r),AJ(n,Aj.DOM_CONTENT_LOADED_EVENT_START,r),AJ(n,Aj.DOM_CONTENT_LOADED_EVENT_END,r),AJ(n,Aj.DOM_COMPLETE,r),AJ(n,Aj.LOAD_EVENT_START,r),AJ(n,Aj.LOAD_EVENT_END,r),function(e){var t,r,n=null==(r=(t=xm).getEntriesByType)?void 0:r.call(t,"paint");n&&n.forEach(function(t){var r=t.name,n=t.startTime;AX(A4,r)&&e.addEvent(A4[r],n)})}(n),e._addCustomAttributesOnSpan(n,null==(t=e._getConfig().applyCustomAttributesOnSpan)?void 0:t.documentLoad),e._endSpan(n,Aj.LOAD_EVENT_END,r))})},t.prototype._endSpan=function(e,t,r){e&&(AX(r,t)?e.end(r[t]):e.end())},t.prototype._initResourceSpan=function(e,t){var r,n=this._startSpan(AB.RESOURCE_FETCH,Aj.FETCH_START,e,t);n&&(n.setAttribute(iP,e.name),AQ(n,e),this._addCustomAttributesOnResourceSpan(n,e,null==(r=this._getConfig().applyCustomAttributesOnSpan)?void 0:r.resourceFetch),this._endSpan(n,Aj.RESPONSE_END,e))},t.prototype._startSpan=function(e,t,r,n){if(AX(r,t)&&"number"==typeof r[t])return this.tracer.startSpan(e,{startTime:r[t]},n?tR.setSpan(th.active(),n):void 0)},t.prototype._waitForPageLoad=function(){"complete"===window.document.readyState?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._getConfig=function(){return this._config},t.prototype._addCustomAttributesOnSpan=function(e,t){var r=this;t&&hS(function(){return t(e)},function(e){e&&r._diag.error("addCustomAttributesOnSpan",e)},!0)},t.prototype._addCustomAttributesOnResourceSpan=function(e,t,r){var n=this;r&&hS(function(){return r(e,t)},function(e){e&&n._diag.error("addCustomAttributesOnResourceSpan",e)},!0)},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(hb);function A9(e,t){if(e&&e[1]&&e[2]){let r=e[1],n=e[2];t.setAttribute("link.traceId",r),t.setAttribute("link.spanId",n)}}let A7=RegExp("traceparent;desc=['\"]00-([0-9a-f]{32})-([0-9a-f]{16})-01['\"]");function Oe(e,t){for(let r of e.split(","))A9((r=r.trim()).match(A7),t)}let Ot=/00-([0-9a-f]{32})-([0-9a-f]{16})-01/,Or=["beacon","fetch","xmlhttprequest"];!function(e){e.EVENT_TYPE="event_type",e.TARGET_ELEMENT="target_element",e.TARGET_XPATH="target_xpath",e.HTTP_URL="http.url"}(Mr||(Mr={}));var On="0.38.0",Oi=function(){var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Oo=["click"];function Oa(){return!1}var Os=function(e){function t(t){var r,n=e.call(this,"@opentelemetry/instrumentation-user-interaction",On,t)||this;return n.version=On,n.moduleName="user-interaction",n._spansData=new WeakMap,n._wrappedListeners=new WeakMap,n._eventsSpanMap=new WeakMap,n._eventNames=new Set(null!=(r=null==t?void 0:t.eventNames)?r:Oo),n._shouldPreventSpanCreation="function"==typeof(null==t?void 0:t.shouldPreventSpanCreation)?t.shouldPreventSpanCreation:Oa,n}return Oi(t,e),t.prototype.init=function(){},t.prototype._checkForTimeout=function(e,t){var r=this._spansData.get(t);r&&("setTimeout"===e.source?r.hrTimeLastTimeout=xS():"Promise.then"!==e.source&&"setTimeout"!==e.source&&(r.hrTimeLastTimeout=void 0))},t.prototype._allowEventName=function(e){return this._eventNames.has(e)},t.prototype._createSpan=function(e,t,r){var n;if(e instanceof HTMLElement&&e.getAttribute&&!e.hasAttribute("disabled")&&this._allowEventName(t)){var i=A6(e,!0);try{var o=this.tracer.startSpan(t,{attributes:((n={})[Mr.EVENT_TYPE]=t,n[Mr.TARGET_ELEMENT]=e.tagName,n[Mr.TARGET_XPATH]=i,n[Mr.HTTP_URL]=window.location.href,n)},r?tR.setSpan(th.active(),r):void 0);if(!0===this._shouldPreventSpanCreation(t,e,o))return;return this._spansData.set(o,{taskCount:0}),o}catch(e){this._diag.error("failed to start create new user interaction span",e)}}},t.prototype._decrementTask=function(e){var t=this._spansData.get(e);t&&(t.taskCount--,0===t.taskCount&&this._tryToEndSpan(e,t.hrTimeLastTimeout))},t.prototype._getCurrentSpan=function(e){var t=e.get("OT_ZONE_CONTEXT");return t?tR.getSpan(t):t},t.prototype._incrementTask=function(e){var t=this._spansData.get(e);t&&t.taskCount++},t.prototype.addPatchedListener=function(e,t,r,n){var i=this._wrappedListeners.get(r);i||(i=new Map,this._wrappedListeners.set(r,i));var o=i.get(t);return o||(o=new Map,i.set(t,o)),!o.has(e)&&(o.set(e,n),!0)},t.prototype.removePatchedListener=function(e,t,r){var n=this._wrappedListeners.get(r);if(n){var i=n.get(t);if(i){var o=i.get(e);return o&&(i.delete(e),0===i.size&&(n.delete(t),0===n.size&&this._wrappedListeners.delete(r))),o}}},t.prototype._invokeListener=function(e,t,r){return"function"==typeof e?e.apply(t,r):e.handleEvent(r[0])},t.prototype._patchAddEventListener=function(){var e=this;return function(t){return function(r,n,i){if(!n)return t.call(this,r,n,i);var o=i&&"object"==typeof i&&i.once,a=function(){for(var t,i=this,a=[],s=0;s0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Od=1e4;function Oh(e){return"number"==typeof e?e<=0?Op(e,Od):e:function(){var e,t=Number(null!=(e=xl().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)?e:xl().OTEL_EXPORTER_OTLP_TIMEOUT);return t<=0?Op(t,Od):t}()}function Op(e,t){return tp.warn("Timeout must be greater than 0",e),t}var Om=function(){function e(e){void 0===e&&(e={}),this._sendingPromises=[],this.url=this.getDefaultUrl(e),"string"==typeof e.hostname&&(this.hostname=e.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new Ao(this._shutdown,this),this._concurrencyLimit="number"==typeof e.concurrencyLimit?e.concurrencyLimit:30,this.timeoutMillis=Oh(e.timeoutMillis),this.onInit(e)}return e.prototype.export=function(e,t){this._shutdownOnce.isCalled?t({code:xp.FAILED,error:Error("Exporter has been shutdown")}):this._sendingPromises.length>=this._concurrencyLimit?t({code:xp.FAILED,error:Error("Concurrent export limit reached")}):this._export(e).then(function(){t({code:xp.SUCCESS})}).catch(function(e){t({code:xp.FAILED,error:e})})},e.prototype._export=function(e){var t=this;return new Promise(function(r,n){try{tp.debug("items to be sent",e),t.send(e,r,n)}catch(e){n(e)}})},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype.forceFlush=function(){return Promise.all(this._sendingPromises).then(function(){})},e.prototype._shutdown=function(){return tp.debug("shutdown started"),this.onShutdown(),this.forceFlush()},e}(),Oy=function(){var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Og=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.name="OTLPExporterError",i.data=n,i.code=r,i}return Oy(t,e),t}(Error),Ob=function(){return(Ob=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function O_(e,t,r,n,i,o){var a,s,u=!1,c=setTimeout(function(){(clearTimeout(a),u=!0,s.readyState===XMLHttpRequest.DONE)?o(new Og("Request Timeout")):s.abort()},n),l=function(n,f){void 0===n&&(n=5),void 0===f&&(f=1e3),(s=new XMLHttpRequest).open("POST",t),Object.entries(Ob(Ob({},{Accept:"application/json","Content-Type":"application/json"}),r)).forEach(function(e){var t=Ov(e,2),r=t[0],n=t[1];s.setRequestHeader(r,n)}),s.send(e),s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&!1===u)if(s.status>=200&&s.status<=299)tp.debug("xhr success",e),i(),clearTimeout(c),clearTimeout(a);else if(s.status&&[429,502,503,504].includes(s.status)&&n>0){var t=void 0;f*=1.5,a=setTimeout(function(){l(n-1,f)},t=s.getResponseHeader("Retry-After")?function(e){if(null==e)return -1;var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}(s.getResponseHeader("Retry-After")):Math.round(Math.random()*(5e3-f)+f))}else o(new Og("Failed to export with XHR (status: "+s.status+")",s.status)),clearTimeout(c),clearTimeout(a)},s.onabort=function(){u&&o(new Og("Request Timeout")),clearTimeout(c),clearTimeout(a)},s.onerror=function(){u&&o(new Og("Request Timeout")),clearTimeout(c),clearTimeout(a)}};l()}var OS=function(){var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),OE=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,t)||this;return r._useXHR=!1,r._useXHR=!!t.headers||"function"!=typeof navigator.sendBeacon,r._useXHR?r._headers=Object.assign({},function(e){void 0===e&&(e={});var t={};return Object.entries(e).forEach(function(e){var r=Of(e,2),n=r[0],i=r[1];void 0!==i?t[n]=String(i):tp.warn('Header "'+n+'" has invalid value ('+i+") and will be ignored")}),t}(t.headers),TH(xl().OTEL_EXPORTER_OTLP_HEADERS)):r._headers={},r}return OS(t,e),t.prototype.onInit=function(){},t.prototype.onShutdown=function(){},t.prototype.send=function(e,t,r){var n=this;if(this._shutdownOnce.isCalled)tp.debug("Shutdown already started. Cannot send objects");else{var i=JSON.stringify(this.convert(e)),o=new Promise(function(e,t){n._useXHR?O_(i,n.url,n._headers,n.timeoutMillis,e,t):function(e,t,r,n,i){navigator.sendBeacon(t,new Blob([e],r))?(tp.debug("sendBeacon - can send",e),n()):i(new Og("sendBeacon - cannot send "+e))}(i,n.url,{type:"application/json"},e,t)}).then(t,r);this._sendingPromises.push(o);var a=function(){var e=n._sendingPromises.indexOf(o);n._sendingPromises.splice(e,1)};o.then(a,a)}},t}(Om);function Ow(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function OT(e){var t;return{low:Number(BigInt.asUintN(32,t=Ow(e))),high:Number(BigInt.asUintN(32,t>>BigInt(32)))}}var Ox="u">typeof BigInt?function(e){return Ow(e).toString()}:xw;function OA(e){return e}function OO(e){if(void 0!==e)return xd(e)}var OM={encodeHrTime:OT,encodeSpanContext:xd,encodeOptionalSpanContext:OO},OR=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function OC(e){return{name:e.name,version:e.version}}function OI(e){return Object.keys(e).map(function(t){return ON(t,e[t])})}function ON(e,t){return{key:e,value:OP(t)}}function OP(e){var t=typeof e;return"string"===t?{stringValue:e}:"number"===t?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:"boolean"===t?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(OP)}}:"object"===t&&null!=e?{kvlistValue:{values:Object.entries(e).map(function(e){var t=OR(e,2);return ON(t[0],t[1])})}}:{}}function Ok(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:null==(r=n.traceState)?void 0:r.serialize(),name:e.name,kind:null==e.kind?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:OI(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(e){return function(e,t){return{attributes:e.attributes?OI(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(e){return function(e,t){var r;return{attributes:e.attributes?OI(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:null==(r=e.context.traceState)?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)}),droppedLinksCount:e.droppedLinksCount}}function OD(e){return{attributes:OI(e.attributes),droppedAttributesCount:0}}var OL=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Oj=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function OU(e,t){return{resourceSpans:OB(e,function(e){if(void 0===e)return OM;var t,r,n=null==(t=e.useLongBits)||t,i=null!=(r=e.useHex)&&r;return{encodeHrTime:n?OT:Ox,encodeSpanContext:i?OA:xd,encodeOptionalSpanContext:i?OA:OO}}(t))}}function OB(e,t){for(var r=function(e){var t,r,n=new Map;try{for(var i=OL(e),o=i.next();!o.done;o=i.next()){var a=o.value,s=n.get(a.resource);s||(s=new Map,n.set(a.resource,s));var u=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),c=s.get(u);c||(c=[],s.set(u,c)),c.push(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}(e),n=[],i=r.entries(),o=i.next();!o.done;){for(var a=Oj(o.value,2),s=a[0],u=[],c=a[1].values(),l=c.next();!l.done;){var f=l.value;if(f.length>0){var d=f.map(function(e){return Ok(e,t)});u.push({scope:OC(f[0].instrumentationLibrary),spans:d,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}l=c.next()}var h={resource:OD(s),scopeSpans:u,schemaUrl:void 0};n.push(h),o=i.next()}return n}var OF=function(){var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Oz="v1/traces",O$="http://localhost:4318/"+Oz,OV=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,t)||this;return r._headers=Object.assign(r._headers,TH(xl().OTEL_EXPORTER_OTLP_TRACES_HEADERS)),r}return OF(t,e),t.prototype.convert=function(e){return OU(e,{useHex:!0,useLongBits:!1})},t.prototype.getDefaultUrl=function(e){return"string"==typeof e.url?e.url:xl().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length>0?function(e){try{var t=new URL(e);return""===t.pathname&&(t.pathname=t.pathname+"/"),t.toString()}catch(t){return tp.warn("Could not parse export URL: '"+e+"'"),e}}(xl().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT):xl().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?function(e,t){return e.endsWith("/")||(e+="/"),e+t}(xl().OTEL_EXPORTER_OTLP_ENDPOINT,Oz):O$},t}(OE);function OY(e){return"x".repeat(e/4).replace(/x/g,function(){return(16*Math.random()|0).toString(16)})}function Oq(e,t,r){return!1===e?e:(void 0!==e||!r)&&Object.assign({},t,e)}function OH(e){return"function"==typeof e}function OW(e,t,r){let n=e[t];hp.wrap(e,t,r),e[t].toString=n.toString.bind(n)}function OG(e){for(;e.__original&&e.__original!==e;)e=e.__original;return e}function OZ(e,t){let r=new Map(t.map(e=>[e,e.toLowerCase().replace(/-/g,"_")]));return(t,n)=>{for(let[i,o]of r){let r=n(i);if(void 0===r)continue;let a=`http.${e}.header.${o}`;"string"==typeof r?t.setAttribute(a,[r]):Array.isArray(r)?t.setAttribute(a,r):t.setAttribute(a,[r])}}}let OK=144e5,OX=900,OJ="__rum_sid",OQ,O0,O1,O2=!1;function O6(){O2=!0}function O3(e){let t=Date.now();return e>t||t>e+OK}function O4(){let e,t=function(e){let t=decodeURIComponent(document.cookie).split(";");for(let r=0;r=0?n="back-forward-cache":r&&(document.prerendering||Mf()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(0x82f79cd8fff*Math.random())+1e12),navigationType:n}},Mh=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(e){}},Mp=function(e,t,r,n){var i,o;return function(a){t.value>=0&&(a||n)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,r),e(t))}},Mm=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},My=function(e){var t=function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},Mg=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},Mb=-1,Mv=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},M_=function(e){"hidden"===document.visibilityState&&Mb>-1&&(Mb="visibilitychange"===e.type?e.timeStamp:0,ME())},MS=function(){addEventListener("visibilitychange",M_,!0),addEventListener("prerenderingchange",M_,!0)},ME=function(){removeEventListener("visibilitychange",M_,!0),removeEventListener("prerenderingchange",M_,!0)},Mw=function(){return Mb<0&&(Mb=Mv(),MS(),Mc(function(){setTimeout(function(){Mb=Mv(),MS()},0)})),{get firstHiddenTime(){return Mb}}},MT=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},Mx=[1800,3e3],MA=[.1,.25],MO=function(e,t){t=t||{},function(e,t){t=t||{},MT(function(){var r,n=Mw(),i=Md("FCP"),o=Mh("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTimen.value&&(n.value=i,n.entries=o,r())},s=Mh("layout-shift",a);s&&(r=Mp(e,n,MA,t.reportAllChanges),My(function(){a(s.takeRecords()),r(!0)}),Mc(function(){i=0,r=Mp(e,n=Md("CLS",0),MA,t.reportAllChanges),Mm(function(){return r()})}),setTimeout(r,0))}))},MM={passive:!0,capture:!0},MR=new Date,MC=function(e,t){Mn||(Mn=t,Mi=e,Mo=new Date,MP(removeEventListener),MI())},MI=function(){if(Mi>=0&&Mi1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var r=function(){MC(e,t),i()},n=function(){i()},i=function(){removeEventListener("pointerup",r,MM),removeEventListener("pointercancel",n,MM)};addEventListener("pointerup",r,MM),addEventListener("pointercancel",n,MM)}(t,e):MC(t,e)}},MP=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,MN,MM)})},Mk=[100,300],MD=0,ML=1/0,Mj=0,MU=function(e){e.forEach(function(e){e.interactionId&&(ML=Math.min(ML,e.interactionId),MD=(Mj=Math.max(Mj,e.interactionId))?(Mj-ML)/7+1:0)})},MB=function(){return Ms?MD:performance.interactionCount||0},MF=function(){"interactionCount"in performance||Ms||(Ms=Mh("event",MU,{type:"event",buffered:!0,durationThreshold:0}))},Mz=[200,500],M$=0,MV=function(){return MB()-M$},MY=[],Mq={},MH=function(e){var t=MY[MY.length-1],r=Mq[e.interactionId];if(r||MY.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};Mq[n.id]=n,MY.push(n)}MY.sort(function(e,t){return t.latency-e.latency}),MY.splice(10).forEach(function(e){delete Mq[e.id]})}},MW=[2500,4e3],MG={};let MZ={};function MK(e,t,r){if(MZ[t])return;MZ[t]=!0;let n=r.value,i=Date.now(),o=e.startSpan("webvitals",{startTime:i});o.setAttribute(t,n),o.end(i)}function MX(e){let t=e.getTracer("webvitals");!function(e,t){t=t||{},MT(function(){var r,n=Mw(),i=Md("FID"),o=function(e){e.startTime{MK(t,"fid",e)}),MO(e=>{MK(t,"cls",e)}),function(e,t){t=t||{},MT(function(){var r,n=Mw(),i=Md("LCP"),o=function(e){var t=e[e.length-1];t&&t.startTime{MK(t,"lcp",e)}),function(e,t){t=t||{},MT(function(){MF();var r,n,i=Md("INP"),o=function(e){e.forEach(function(e){e.interactionId&&MH(e),"first-input"!==e.entryType||MY.some(function(t){return t.entries.some(function(t){return e.duration===t.duration&&e.startTime===t.startTime})})||MH(e)});var t,r=(t=Math.min(MY.length-1,Math.floor(MV()/50)),MY[t]);r&&r.latency!==i.value&&(i.value=r.latency,i.entries=r.entries,n())},a=Mh("event",o,{durationThreshold:null!=(r=t.durationThreshold)?r:40});n=Mp(e,i,Mz,t.reportAllChanges),a&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),My(function(){o(a.takeRecords()),i.value<0&&MV()>0&&(i.value=0,i.entries=[]),n(!0)}),Mc(function(){MY=[],M$=MB(),n=Mp(e,i=Md("INP"),Mz,t.reportAllChanges)}))})}(e=>{MK(t,"inp",e)})}let MJ="longtask",MQ="browser-longtask",M0="post-doc-load-resource",M1=["img","script"],M2=e=>e instanceof HTMLScriptElement||e instanceof HTMLImageElement;class M6 extends hb{constructor(e={}){const t=Object.assign({},{allowedInitiatorTypes:M1},e);super(M0,O7,t),this.config=t,this.urlToContextMap={}}init(){}enable(){window.PerformanceObserver&&window.addEventListener("load",()=>{this._startPerformanceObserver()}),window.MutationObserver&&this._startHeadMutationObserver()}disable(){this.performanceObserver&&this.performanceObserver.disconnect(),this.headMutationObserver&&this.headMutationObserver.disconnect()}onBeforeContextChange(){this._processHeadMutationObserverRecords(this.headMutationObserver.takeRecords())}_startPerformanceObserver(){this.performanceObserver=new PerformanceObserver(e=>{"complete"===window.document.readyState&&e.getEntries().forEach(e=>{this.config.allowedInitiatorTypes.includes(e.initiatorType)&&this._createSpan(e)})}),this.performanceObserver.observe({entryTypes:["resource"]})}_startHeadMutationObserver(){this.headMutationObserver=new MutationObserver(this._processHeadMutationObserverRecords.bind(this)),this.headMutationObserver.observe(document.head,{childList:!0})}_processHeadMutationObserverRecords(e){th.active()!==em&&e.flatMap(e=>Array.from(e.addedNodes||[])).filter(M2).forEach(e=>{try{let t=e.getAttribute("src");if(!t)return;let r=new URL(t,location.origin);this.urlToContextMap[r.toString()]=th.active()}catch(e){}})}_createSpan(e){if(Ae(e.name,this.config.ignoreUrls))return;let t=new URL(e.name,location.origin),r=this.tracer.startSpan("resourceFetch",{startTime:e.fetchStart},this.urlToContextMap[t.toString()]);r.setAttribute("component",M0),r.setAttribute(oL.HTTP_URL,e.name),r.setAttribute(oL.HTTP_METHOD,"GET"),AQ(r,e);let n=e.responseEnd;n&&n>0?r.end(n):r.end()}}class M3 extends AK{shutdown(){return new Promise(e=>{tO.disable(),th.disable(),tR.disable(),e()}).then(()=>super.shutdown())}}class M4{constructor(){this.events={}}addEventListener(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}removeEventListener(e,t){if(!this.events[e])return;let r=this.events[e].indexOf(t);r>=0&&this.events[e].splice(r,1)}emit(e,t){let r=this.events[e];r&&r.forEach(e=>{Promise.resolve({payload:t}).then(e)})}}let M5="__splunk_context";class M8{constructor(e={}){this._config=e,this._enabled=!1,this._currentContext=em,this._hashChangeContext=null,this._contextResumingListeners=new WeakMap,this._messagePorts=new WeakMap}_bindFunction(e,t=em){let r=this,n=function(...n){return r.with(t,()=>e.apply(this,n))};return Object.defineProperty(n,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),n}active(){return this._currentContext}bind(e,t){return OH(t)?this._bindFunction(t,e):t}disable(){return this._enabled&&(this._config.async&&(this._unpatchTimeouts(),this._unpatchPromise(),this._unpatchMutationObserver(),this._unpatchEvents(),this._unpatchMessageChannel()),this._currentContext=em,this._enabled=!1),this}enable(){return this._enabled||(this._config.async&&(this._patchTimeouts(),this._patchPromise(),this._patchMutationObserver(),this._patchEvents(),this._patchMessageChannel()),this._enabled=!0,this._currentContext=em),this}bindActiveToArgument(e,t){OH(e[t])&&(e[t]=this.bind(this.active(),e[t]))}_patchTimeouts(){let e=this;OW(window,"setTimeout",t=>function(...r){return(!r[1]||r[1]<=34)&&e.bindActiveToArgument(r,0),t.apply(this,r)}),window.setImmediate&&OW(window,"setImmediate",t=>function(...r){return e.bindActiveToArgument(r,0),t.apply(this,r)}),window.requestAnimationFrame&&OW(window,"requestAnimationFrame",t=>function(...r){return e.bindActiveToArgument(r,0),t.apply(this,r)})}_unpatchTimeouts(){hp.unwrap(window,"setTimeout"),window.setImmediate&&hp.unwrap(window,"setImmediate")}_patchPromise(){if(!window.Promise)return;let e=this;OW(Promise.prototype,"then",t=>function(...r){return e.bindActiveToArgument(r,0),e.bindActiveToArgument(r,1),t.apply(this,r)}),OW(Promise.prototype,"catch",t=>function(...r){return e.bindActiveToArgument(r,0),t.apply(this,r)}),OW(Promise.prototype,"finally",t=>function(...r){return e.bindActiveToArgument(r,0),t.apply(this,r)})}_unpatchPromise(){window.Promise&&(hp.unwrap(Promise.prototype,"then"),hp.unwrap(Promise.prototype,"catch"),hp.unwrap(Promise.prototype,"finally"))}_patchMutationObserver(){let e=this;OW(window,"MutationObserver",t=>class extends t{constructor(...t){if(OH(t[0])){const r=t[0];t[0]=function(...t){return this[M5]&&e._enabled?e.with(this[M5],r,this,...t):r.apply(this,t)}}super(...t),Object.defineProperty(this,M5,{value:null,writable:!0,enumerable:!1})}observe(...t){if(t[0]&&t[0]instanceof Text&&!t[0].parentNode&&t[1]&&t[1].characterData){let r=this,n=t[0],i=Object.getOwnPropertyDescriptor(CharacterData.prototype,"data");Object.defineProperty(n,"data",Object.assign(Object.assign({},i),{enumerable:!1,set:function(...t){let n=e.active();return n&&(r[M5]=n),i.set.apply(this,t)}}))}return super.observe(...t)}})}_unpatchMutationObserver(){hp.unwrap(window,"MutationObserver")}_getListenersMap(e,t){this._contextResumingListeners.has(e)||this._contextResumingListeners.set(e,new Map);let r=this._contextResumingListeners.get(e);return r.has(t)||r.set(t,new WeakMap),r.get(t)}_patchEvents(){let e=this;OW(XMLHttpRequest.prototype,"addEventListener",t=>function(...r){if(OH(r[1])){let t=e._getListenersMap(this,r[0]),n=t.get(r[1]);n||(n=e.bind(e.active(),r[1]),t.set(r[1],n)),r[1]=n}return t.apply(this,r)}),OW(XMLHttpRequest.prototype,"removeEventListener",t=>function(...r){if(OH(r[1])){let t=e._getListenersMap(this,r[0]).get(r[1]);t&&(r[1]=t)}return t.apply(this,r)}),["onabort","onerror","onload","onloadend","onloadstart","onprogress","ontimeout"].forEach(t=>{let r=Object.getOwnPropertyDescriptor(XMLHttpRequestEventTarget.prototype,t);r&&(OW(r,"get",e=>function(){let t=e.call(this);return OH(t)&&t._orig?t._orig:t}),OW(r,"set",t=>function(r){if(OH(r)){let t=r,n=e.bind(e.active(),r);n._orig=t,r=n}return t.call(this,r)}),Object.defineProperty(XMLHttpRequestEventTarget.prototype,t,r))}),OW(Window.prototype,"addEventListener",t=>function(...r){if("hashchange"===r[0]&&OH(r[1])){let t=e._getListenersMap(this,r[0]),n=t.get(r[1]);n||(n=e._getWrappedEventListener(r[1],()=>e._hashChangeContext),t.set(r[1],n)),r[1]=n}return t.apply(this,r)});let t=Object.getOwnPropertyDescriptor(window,"onhashchange");OW(t,"get",e=>function(){let t=e.call(this);return OH(t)&&t._orig?t._orig:t}),OW(t,"set",t=>function(r){if(OH(r)){let t=e._getWrappedEventListener(r,()=>e._hashChangeContext);t._orig=r,r=t}return t.call(this,r)}),Object.defineProperty(window,"onhashchange",t)}_unpatchEvents(){hp.unwrap(XMLHttpRequest.prototype,"addEventListener"),hp.unwrap(XMLHttpRequest.prototype,"removeEventListener")}_patchMessageChannel(){let e=this;OW(window,"MessageChannel",t=>class extends t{constructor(...t){super(...t),e._messagePorts.set(this.port1,this.port2),e._messagePorts.set(this.port2,this.port1),Object.defineProperty(this.port1,M5,{value:null,writable:!0,enumerable:!1}),Object.defineProperty(this.port2,M5,{value:null,writable:!0,enumerable:!1})}}),OW(MessagePort.prototype,"postMessage",t=>function(...r){let n=e.active();if(!e._messagePorts.has(this)||!n)return t.apply(this,r);let i=e._messagePorts.get(this);i[M5]=n;let o=t.apply(this,r);return OG(setTimeout)(()=>{i[M5]===n&&(i[M5]=null)},100),o}),OW(MessagePort.prototype,"addEventListener",t=>function(...r){if("message"===r[0]&&OH(r[1])){let t=e._getListenersMap(this,r[0]),n=t.get(r[1]);n||(n=e._getWrappedEventListener(r[1],()=>this[M5]),t.set(r[1],n)),r[1]=n}return t.apply(this,r)}),OW(MessagePort.prototype,"removeEventListener",t=>function(...r){if("message"===r[0]&&OH(r[1])){let t=e._getListenersMap(this,r[0]).get(r[1]);t&&(r[1]=t)}return t.apply(this,r)});let t=Object.getOwnPropertyDescriptor(MessagePort.prototype,"onmessage");OW(t,"get",e=>function(){let t=e.call(this);return OH(t)&&t._orig?t._orig:t}),OW(t,"set",t=>function(r){if(OH(r)){let t=e._getWrappedEventListener(r,()=>this[M5]);t._orig=r,r=t}return t.call(this,r)}),Object.defineProperty(MessagePort.prototype,"onmessage",t)}_getWrappedEventListener(e,t){let r=this;return function(...n){let i=t();return i&&r._enabled?r.with(i,e,this,...n):e.apply(this,n)}}_unpatchMessageChannel(){hp.unwrap(window,"MessageChannel"),hp.unwrap(MessagePort.prototype,"postMessage"),hp.unwrap(MessagePort.prototype,"addEventListener"),hp.unwrap(MessagePort.prototype,"removeEventListener");let e=Object.getOwnPropertyDescriptor(MessagePort.prototype,"onmessage");hp.unwrap(e,"get"),hp.unwrap(e,"set"),Object.defineProperty(MessagePort.prototype,"onmessage",e)}with(e,t,r,...n){var i,o,a,s;try{null==(o=(i=this._config).onBeforeContextStart)||o.call(i)}catch(e){}let u=this._currentContext;this._currentContext=e||em;let c=location.hash;try{let e=t.call(r,...n);return null==(s=(a=this._config).onBeforeContextEnd)||s.call(a),e}finally{this._currentContext=u,c!==location.hash&&(this._hashChangeContext=e,OG(setTimeout)(()=>{this._hashChangeContext===e&&(this._hashChangeContext=null)},33))}}}class M9{constructor(e){this._globalAttributes=null!=e?e:{}}setGlobalAttributes(e){if(e)Object.assign(this._globalAttributes,e);else for(let e of Object.keys(this._globalAttributes))delete this._globalAttributes[e]}getGlobalAttributes(){return this._globalAttributes}forceFlush(){return Promise.resolve()}onStart(e){e.setAttribute("location.href",location.href),e.setAttributes(this._globalAttributes)}onEnd(){}shutdown(){return Promise.resolve()}}let M7="messaging.socket.io.namespace",Re="messaging.socket.io.event_name",Rt=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];class Rr extends Aw{constructor(e,t){super(e,t)}onInit(e){!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"u">typeof document&&(this._visibilityChangeListener=()=>{"hidden"===document.visibilityState&&this.forceFlush().catch(e=>T2(e))},this._pageHideListener=()=>{this.forceFlush().catch(e=>T2(e))},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))}}var Rn=a(function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}),Ri="object"==typeof o&&o&&o.Object===Object&&o,Ro="object"==typeof self&&self&&self.Object===Object&&self,Ra=(Ri||Ro||Function("return this")()).Symbol,Rs=Ra,Ru=Object.prototype,Rc=Ru.hasOwnProperty,Rl=Ru.toString,Rf=Rs?Rs.toStringTag:void 0,Rd=function(e){var t=Rc.call(e,Rf),r=e[Rf];try{e[Rf]=void 0;var n=!0}catch(e){}var i=Rl.call(e);return n&&(t?e[Rf]=r:delete e[Rf]),i},Rh=Object.prototype.toString,Rp=Rd,Rm=function(e){return Rh.call(e)},Ry=Ra?Ra.toStringTag:void 0,Rg=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ry&&Ry in Object(e)?Rp(e):Rm(e)},Rb=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object),Rv=function(e){return null!=e&&"object"==typeof e},R_=Rg,RS=Rb,RE=Rv,Rw=Object.prototype,RT=Function.prototype.toString,Rx=Rw.hasOwnProperty,RA=RT.call(Object),RO=a(function(e){if(!RE(e)||"[object Object]"!=R_(e))return!1;var t=RS(e);if(null===t)return!0;var r=Rx.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&RT.call(r)==RA}),RM=Rg,RR=Array.isArray,RC=Rv,RI=a(function(e){return"string"==typeof e||!RR(e)&&RC(e)&&"[object String]"==RM(e)});let RN="console";!function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"}(RP||(RP={}));var RP,Rk,RD,RL="0.51.1",Rj=function(){var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),RU="object"==typeof n&&"node"===(null==(Rk=n.release)?void 0:Rk.name),RB=function(e){function t(t){var r=e.call(this,"@opentelemetry/instrumentation-fetch",RL,t)||this;return r.component="fetch",r.version=RL,r.moduleName=r.component,r._usedResources=new WeakSet,r._tasksCount=0,r}return Rj(t,e),t.prototype.init=function(){},t.prototype._getConfig=function(){return this._config},t.prototype._addChildSpan=function(e,t){var r=this.tracer.startSpan("CORS Preflight",{startTime:t[Aj.FETCH_START]},tR.setSpan(th.active(),e));this._getConfig().ignoreNetworkEvents||AQ(r,t),r.end(t[Aj.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(e,t){var r=A2(t.url);e.setAttribute(oL.HTTP_STATUS_CODE,t.status),null!=t.statusText&&e.setAttribute(RP.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(oL.HTTP_HOST,r.host),e.setAttribute(oL.HTTP_SCHEME,r.protocol.replace(":","")),"u">typeof navigator&&e.setAttribute(oL.HTTP_USER_AGENT,navigator.userAgent)},t.prototype._addHeaders=function(e,t){if(!A3(t,this._getConfig().propagateTraceHeaderCorsUrls)){var r={};return tO.inject(th.active(),r),void(Object.keys(r).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}e instanceof Request?tO.inject(th.active(),e.headers,{set:function(e,t,r){return e.set(t,"string"==typeof r?r:String(r))}}):e.headers instanceof Headers?tO.inject(th.active(),e.headers,{set:function(e,t,r){return e.set(t,"string"==typeof r?r:String(r))}}):e.headers instanceof Map?tO.inject(th.active(),e.headers,{set:function(e,t,r){return e.set(t,"string"==typeof r?r:String(r))}}):(r={},tO.inject(th.active(),r),e.headers=Object.assign({},r,e.headers||{}))},t.prototype._clearResources=function(){0===this._tasksCount&&this._getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(e,t){var r;if(void 0===t&&(t={}),!Ae(e,this._getConfig().ignoreUrls)){var n=(t.method||"GET").toUpperCase(),i="HTTP "+n;return this.tracer.startSpan(i,{kind:te.CLIENT,attributes:((r={})[RP.COMPONENT]=this.moduleName,r[oL.HTTP_METHOD]=n,r[oL.HTTP_URL]=e,r)})}this._diag.debug("ignoring span as url matches ignored url")},t.prototype._findResourceAndAddNetworkEvents=function(e,t,r){var n=t.entries;if(!n.length){if(!performance.getEntriesByType)return;n=performance.getEntriesByType("resource")}var i=A1(t.spanUrl,t.startTime,r,n,this._usedResources,"fetch");if(i.mainRequest){var o=i.mainRequest;this._markResourceAsUsed(o);var a=i.corsPreFlightRequest;a&&(this._addChildSpan(e,a),this._markResourceAsUsed(a)),this._getConfig().ignoreNetworkEvents||AQ(e,o)}},t.prototype._markResourceAsUsed=function(e){this._usedResources.add(e)},t.prototype._endSpan=function(e,t,r){var n=this,i=xv(Date.now()),o=xS();this._addFinalSpanAttributes(e,r),setTimeout(function(){var r;null==(r=t.observer)||r.disconnect(),n._findResourceAndAddNetworkEvents(e,t,o),n._tasksCount--,n._clearResources(),e.end(i)},300)},t.prototype._patchConstructor=function(){var e=this;return function(t){var r=e;return function(){for(var e=[],n=0;n=200&&t.status<400?r._endSpan(e,u,t):r._endSpan(e,u,{status:t.status,statusText:t.statusText,url:o})}function f(e,t,r){try{var n=r.clone(),i=r.clone(),o=n.body;if(o){var a=o.getReader(),s=function(){a.read().then(function(t){t.done?l(e,i):s()},function(t){c(e,t)})};s()}else l(e,r)}finally{t(r)}}function d(e,t,r){try{c(e,r)}finally{t(r)}}return new Promise(function(e,n){return th.with(tR.setSpan(th.active(),s),function(){return r._addHeaders(a,o),r._tasksCount++,t.apply(i,a instanceof Request?[a]:[o,a]).then(f.bind(i,s,e),d.bind(i,s,n))})})}}},t.prototype._applyAttributesAfterFetch=function(e,t,r){var n=this,i=this._getConfig().applyCustomAttributesOnSpan;i&&hS(function(){return i(e,t,r)},function(e){e&&n._diag.error("applyCustomAttributesOnSpan",e)},!0)},t.prototype._prepareSpanData=function(e){var t=xS(),r=[];if("function"!=typeof PerformanceObserver)return{entries:r,startTime:t,spanUrl:e};var n=new PerformanceObserver(function(t){t.getEntries().forEach(function(t){"fetch"===t.initiatorType&&t.name===e&&r.push(t)})});return n.observe({entryTypes:["resource"]}),{entries:r,observer:n,startTime:t,spanUrl:e}},t.prototype.enable=function(){RU?this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()"):(hE(fetch)&&(this._unwrap(xc,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(xc,"fetch",this._patchConstructor()))},t.prototype.disable=function(){RU||(this._unwrap(xc,"fetch"),this._usedResources=new WeakSet)},t}(hb);!function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"}(RD||(RD={}));var RF,Rz="0.51.1";!function(e){e.HTTP_STATUS_TEXT="http.status_text"}(RF||(RF={}));var R$=function(){var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),RV=function(e){function t(t){var r=e.call(this,"@opentelemetry/instrumentation-xml-http-request",Rz,t)||this;return r.component="xml-http-request",r.version=Rz,r.moduleName=r.component,r._tasksCount=0,r._xhrMem=new WeakMap,r._usedResources=new WeakSet,r}return R$(t,e),t.prototype.init=function(){},t.prototype._getConfig=function(){return this._config},t.prototype._addHeaders=function(e,t){if(!A3(A2(t).href,this._getConfig().propagateTraceHeaderCorsUrls)){var r={};return tO.inject(th.active(),r),void(Object.keys(r).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}var n={};tO.inject(th.active(),n),Object.keys(n).forEach(function(t){e.setRequestHeader(t,String(n[t]))})},t.prototype._addChildSpan=function(e,t){var r=this;th.with(tR.setSpan(th.active(),e),function(){var e=r.tracer.startSpan("CORS Preflight",{startTime:t[Aj.FETCH_START]});r._getConfig().ignoreNetworkEvents||AQ(e,t),e.end(t[Aj.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(e,t,r){if("string"==typeof r){var n=A2(r);void 0!==t.status&&e.setAttribute(oL.HTTP_STATUS_CODE,t.status),void 0!==t.statusText&&e.setAttribute(RF.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(oL.HTTP_HOST,n.host),e.setAttribute(oL.HTTP_SCHEME,n.protocol.replace(":","")),e.setAttribute(oL.HTTP_USER_AGENT,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(e,t){var r=this,n=this._getConfig().applyCustomAttributesOnSpan;"function"==typeof n&&hS(function(){return n(e,t)},function(e){e&&r._diag.error("applyCustomAttributesOnSpan",e)},!0)},t.prototype._addResourceObserver=function(e,t){var r=this._xhrMem.get(e);r&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(r.createdResources={observer:new PerformanceObserver(function(e){var n=e.getEntries(),i=A2(t);n.forEach(function(e){"xmlhttprequest"===e.initiatorType&&e.name===i.href&&r.createdResources&&r.createdResources.entries.push(e)})}),entries:[]},r.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){0===this._tasksCount&&this._getConfig().clearTimingResources&&(xm.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(e,t,r,n,i){if(r&&n&&i&&e.createdResources){var o=e.createdResources.entries;o&&o.length||(o=xm.getEntriesByType("resource"));var a=A1(A2(r).href,n,i,o,this._usedResources);if(a.mainRequest){var s=a.mainRequest;this._markResourceAsUsed(s);var u=a.corsPreFlightRequest;u&&(this._addChildSpan(t,u),this._markResourceAsUsed(u)),this._getConfig().ignoreNetworkEvents||AQ(t,s)}}},t.prototype._cleanPreviousSpanInformation=function(e){var t=this._xhrMem.get(e);if(t){var r=t.callbackToRemoveEvents;r&&r(),this._xhrMem.delete(e)}},t.prototype._createSpan=function(e,t,r){var n;if(!Ae(t,this._getConfig().ignoreUrls)){var i=r.toUpperCase(),o=this.tracer.startSpan(i,{kind:te.CLIENT,attributes:((n={})[oL.HTTP_METHOD]=r,n[oL.HTTP_URL]=A2(t).toString(),n)});return o.addEvent(RD.METHOD_OPEN),this._cleanPreviousSpanInformation(e),this._xhrMem.set(e,{span:o,spanUrl:t}),o}this._diag.debug("ignoring span as url matches ignored url")},t.prototype._markResourceAsUsed=function(e){this._usedResources.add(e)},t.prototype._patchOpen=function(){var e=this;return function(t){var r=e;return function(){for(var e=[],n=0;nnew OV({url:e.url,headers:{authorization:e.authHeader}})},spanProcessor:{factory:(e,t)=>new Rr(e,t)},apiKey:void 0};function Rq(e,t,r){!(t in e)||r in e&&e[r]!==RY[r]||(e[r]=e[t])}let RH=[{Instrument:class extends A8{constructor(e={}){super(e);const t=this,r=t._endSpan.bind(this);t._endSpan=(e,t,n)=>{var i;let o=e;if(e&&e.setAttribute("component",this.component),e&&"documentLoad"!==o.name){if("documentFetch"===o.name&&!n.serverTiming&&performance.getEntriesByType){let e=performance.getEntriesByType("navigation");(null==(i=e[0])?void 0:i.serverTiming)&&(n.serverTiming=e[0].serverTiming)}!function(e,t){if(e.serverTiming)for(let r of e.serverTiming)"traceparent"===r.name&&r.description&&A9(r.description.match(Ot),t)}(n,e),e.setAttribute(oL.HTTP_METHOD,"GET")}return e&&"documentLoad"===o.name&&function(e){document.referrer&&""!==document.referrer&&e.setAttribute("document.referrer",document.referrer),window.screen&&e.setAttribute("screen.xy",window.screen.width+"x"+window.screen.height)}(e),r(e,t,n)};const n=t._initResourceSpan.bind(this);t._initResourceSpan=(t,r)=>{-1!==Or.indexOf(t.initiatorType)||Ae(t.name,e.ignoreUrls)||n(t,r)}}},confKey:"document",disable:!1},{Instrument:class extends RV{constructor(e={}){super(e);const t=this._createSpan.bind(this);this._createSpan=(r,n,i)=>{var o;let a=t(r,n,i);return a&&((null==(o=e.advancedNetworkCapture)?void 0:o.call(e))&&r.addEventListener("readystatechange",function(){if(r.readyState===r.OPENED)hp.wrap(r,"setRequestHeader",e=>function(t,r){return OZ("request",[t])(a,()=>r),e.apply(this,arguments)}),hp.wrap(r,"send",e=>function(t){return t&&a.setAttribute("http.request.body",t.toString()),e.apply(this,arguments)});else if(r.readyState===r.DONE){let e=r.getAllResponseHeaders().split("\r\n").reduce((e,t)=>{let[r,n]=t.split(": ");return r&&n&&(e[r]=n),e},{});OZ("response",Object.keys(e))(a,t=>e[t]),a.setAttribute("http.response.body",r.responseText),hp.unwrap(r,"setRequestHeader"),hp.unwrap(r,"send")}}),r.addEventListener("readystatechange",function(){if(r.readyState===r.HEADERS_RECEIVED&&-1!==r.getAllResponseHeaders().toLowerCase().indexOf("server-timing")){let e=r.getResponseHeader("server-timing");null!==e&&Oe(e,a)}}),a.setAttribute("component",this.moduleName),a.updateName(`HTTP ${i.toUpperCase()}`)),a};const r=this._addResourceObserver.bind(this);this._addResourceObserver=(e,t)=>{"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&r(e,t)}}},confKey:"xhr",disable:!1},{Instrument:class extends Os{constructor(e={}){if(!e.eventNames){const t=Object.entries(Object.assign({},Ou,e.events)).filter(([e,t])=>t).map(([e])=>e);e.eventNames=t}super(e),this._routingTracer=tR.getTracer(Ol,"1");const t=this._createSpan.bind(this);this._createSpan=(e,r,n)=>{e===document&&(e=document.documentElement);let i=t(e,r,n);return i&&i.setAttribute("component",this.moduleName),i};const r=this._patchAddEventListener.bind(this);this._patchAddEventListener=()=>{let e=r();return t=>{let r=e(t);return function(e,n,i){return!function(e){return e&&("function"==typeof e||"object"==typeof e&&"function"==typeof e.handleEvent)}(n)?t.call(this,e,n,i):(null===i&&(i=void 0),r.call(this,e,n,i))}}}}setTracerProvider(e){super.setTracerProvider(e),this._routingTracer=e.getTracer(Ol,"1")}getZoneWithPrototype(){}enable(){this.__hashChangeHandler=e=>{this._emitRouteChangeSpan(e.oldURL)},window.addEventListener("hashchange",this.__hashChangeHandler),super.enable()}disable(){super.disable(),window.removeEventListener("hashchange",this.__hashChangeHandler)}_patchHistoryMethod(){let e=this;return t=>function(...r){let n=location.href,i=t.apply(this,r);return n!==location.href&&e._emitRouteChangeSpan(n),i}}_emitRouteChangeSpan(e){let t=Date.now(),r=this._routingTracer.startSpan("routeChange",{startTime:t});r.setAttribute("component",this.moduleName),r.setAttribute("prev.href",e),r.end(t)}},confKey:"interactions",disable:!1},{Instrument:M6,confKey:"postload",disable:!1},{Instrument:class extends RB{constructor(e={}){const t=e.applyCustomAttributesOnSpan;e.applyCustomAttributesOnSpan=function(r,n,i){var o;if(r.updateName(`HTTP ${(n.method||"GET").toUpperCase()}`),r.setAttribute("component","fetch"),(null==(o=e.advancedNetworkCapture)?void 0:o.call(e))&&r&&(n.headers&&OZ("request",Object.keys(n.headers))(r,e=>{var t;return null==(t=n.headers)?void 0:t[e]}),n.body&&(n.body instanceof ReadableStream?r.setAttribute("http.request.body","[ReadableStream]"):r.setAttribute("http.request.body",n.body.toString())),i instanceof Response)){if(i.headers){let e=[];i.headers.forEach((t,r)=>{e.push(r)}),OZ("response",e)(r,e=>{var t;return null!=(t=i.headers.get(e))?t:""})}i.clone().text().then(e=>{r.setAttribute("http.response.body",e)}).catch(()=>{})}if(r&&i instanceof Response&&i.headers){let e=i.headers.get("Server-Timing");e&&Oe(e,r)}t&&t(r,n,i)},super(e)}enable(){window.fetch&&super.enable()}},confKey:"fetch",disable:!1},{Instrument:class extends hb{constructor(e){super("splunk-websocket",O7,e),this.listener2ws2patched=new WeakMap,this._config=e}init(){}enable(){let e=this;hp.wrap(window,"WebSocket",function(){class t extends WebSocket{constructor(t,r){if(Ae(t,e._config.ignoreUrls))return void super(t,r);const n=e.tracer.startSpan("connect",{kind:te.CLIENT,attributes:{component:"websocket"}});t&&n.setAttribute("http.url",t),r&&("string"==typeof r?n.setAttribute("protocols",r):n.setAttribute("protocols",JSON.stringify(r)));try{super(t,r)}catch(t){throw e.endSpanExceptionally(n,t),t}this.addEventListener("open",function(){n.end()}),this.addEventListener("error",function(t){n.isRecording()?e.endSpanExceptionally(n,Error(t.error||t.message||"Could not connect.")):e.startSpan(this,"error",te.CLIENT).end()}),e.patchSend(this),e.patchEventListener(this)}}return t})}disable(){hp.unwrap(window,"WebSocket")}startSpan(e,t,r){let n=this.tracer.startSpan(t,{kind:r});return n.setAttribute("component","websocket"),n.setAttribute("protocol",e.protocol),n.setAttribute("http.url",e.url),n}patchSend(e){let t=this,r=e.send;e.send=function(...n){let i,o=t.startSpan(e,"send",te.PRODUCER),a=n.length>0?Me(n[0]):void 0;o.setAttribute("http.request_content_length",a);try{i=r.apply(e,n)}catch(e){throw t.endSpanExceptionally(o,e),e}return!1===i&&t.endSpanExceptionally(o,Error("Failed to send frame.")),o.end(),i}}addPatchedListener(e,t,r){let n=this.listener2ws2patched.get(t);return n||(n=new Map,this.listener2ws2patched.set(t,n)),!n.has(e)&&(n.set(e,r),!0)}removePatchedListener(e,t){let r=this.listener2ws2patched.get(t);if(!r)return;let n=r.get(e);return n&&(r.delete(e),0===r.size&&this.listener2ws2patched.delete(e)),n}patchEventListener(e){let t=this,r=e.addEventListener.bind(e);e.addEventListener=function(n,i,o){if("message"!==n)return void r(n,i,o);let a="boolean"==typeof o||null==o?void 0:o.once,s=function(...r){let n=this,o=r;a&&t.removePatchedListener(e,i);let s=t.startSpan(e,"onmessage",te.CONSUMER);o&&o[0]&&o[0].data&&s.setAttribute("http.response_content_length",Me(o[0].data)),th.with(tR.setSpan(th.active(),s),()=>{let e;return e="function"==typeof i?i.apply(n,o):i.handleEvent(r[0]),s.end(),e})};t.addPatchedListener(e,i,s)&&r.apply(e,[n,s,o])};let n=e.removeEventListener;e.removeEventListener=function(r,i,o){if("message"!==r)return n.call(e,r,i,o);let a=t.removePatchedListener(e,i);return a?n.call(e,r,a,o):n.call(e,r,i,o)}}endSpanExceptionally(e,t){e.setAttribute("error",!0),e.setAttribute("error.message",t.message),e.setAttribute("error.object",t.name?t.name:t.constructor&&t.constructor.name?t.constructor.name:"Error"),e.end()}},confKey:"websocket",disable:!0},{Instrument:class extends hb{constructor(e={}){super(MQ,O7,Object.assign({},e))}init(){}enable(){this.isSupported()&&(this._longtaskObserver=new PerformanceObserver(e=>{e.getEntries().forEach(e=>this._createSpanFromEntry(e))}),this._longtaskObserver.observe({type:MJ,buffered:!0}))}disable(){this.isSupported()&&this._longtaskObserver.disconnect()}_createSpanFromEntry(e){let t=this.tracer.startSpan(MJ,{startTime:e.startTime});t.setAttribute("component",MQ),t.setAttribute("longtask.name",e.name),t.setAttribute("longtask.entry_type",e.entryType),t.setAttribute("longtask.duration",e.duration);let r=e.attribution;Array.isArray(r)&&r.forEach((e,r)=>{let n=e>1?`longtask.attribution[${r}]`:"longtask.attribution";t.setAttribute(`${n}.name`,e.name),t.setAttribute(`${n}.entry_type`,e.entryType),t.setAttribute(`${n}.start_time`,e.startTime),t.setAttribute(`${n}.duration`,e.duration),t.setAttribute(`${n}.container_type`,e.containerType),t.setAttribute(`${n}.container_src`,e.containerSrc),t.setAttribute(`${n}.container_id`,e.containerId),t.setAttribute(`${n}.container_name`,e.containerName)}),t.end(e.startTime+e.duration)}isSupported(){return(window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes||[]).includes(MJ)}},confKey:"longtask",disable:!1},{Instrument:Tk.HyperDXErrorInstrumentation,confKey:Tk.ERROR_INSTRUMENTATION_NAME,disable:!1},{Instrument:class extends hb{constructor(e={}){super("page-visibility",O7,Object.assign({},e)),this.unloading=!1}init(){}enable(){document.hidden&&this._createSpan(document.hidden),this.unloadListener=()=>{this.unloading=!0},this.visibilityListener=()=>{this.unloading||this._createSpan(document.hidden)},window.addEventListener("beforeunload",this.unloadListener),window.addEventListener("visibilitychange",this.visibilityListener)}disable(){window.removeEventListener("beforeunload",this.unloadListener),window.removeEventListener("visibilitychange",this.visibilityListener)}_createSpan(e){let t=Date.now(),r=this.tracer.startSpan("visibility",{startTime:t});r.setAttribute("hidden",e),r.end(t)}},confKey:"visibility",disable:!0},{Instrument:class extends hb{constructor(e={}){super("splunk-connectivity",O7,Object.assign({},e)),this.offlineStart=navigator.onLine?null:Date.now()}init(){}enable(){this.offlineListener=()=>{this.offlineStart=Date.now()},this.onlineListener=()=>{this.offlineStart&&(this._createSpan(!1,this.offlineStart),this._createSpan(!0,Date.now()))},window.addEventListener("offline",this.offlineListener),window.addEventListener("online",this.onlineListener)}disable(){window.removeEventListener("offline",this.offlineListener),window.removeEventListener("online",this.onlineListener)}_createSpan(e,t){let r=this.tracer.startSpan("connectivity",{startTime:t});r.setAttribute("online",e),r.end(t)}},confKey:"connectivity",disable:!0},{Instrument:class extends hb{constructor(e={}){super("splunk-socket.io-client",O7,Object.assign({target:"io"},e)),this.listeners=new WeakMap}init(){}getConfig(){return this._config}patchSocketIo(e){if(!function(e){return"function"==typeof e&&"function"==typeof e.Socket}(e))return void this._diag.debug("Doesn't seem like socket.io-client",e);let t=this;this._wrap(e.Socket.prototype,"emit",e=>function(r,...n){let i=t.tracer.startSpan(`${r} send`,{kind:te.PRODUCER,attributes:{[oL.MESSAGING_SYSTEM]:"socket.io",[oL.MESSAGING_DESTINATION]:this.nsp,[oL.MESSAGING_DESTINATION_KIND]:u$.TOPIC,[M7]:this.nsp,[Re]:r}});try{return th.with(tR.setSpan(th.active(),i),()=>e.apply(this,[r,...n]))}catch(t){let e;throw t instanceof Error&&(i.recordException(t),e=t.message),i.setStatus({code:tt.ERROR,message:e}),t}finally{i.end()}}),this._wrap(e.Socket.prototype,"on",e=>function(r,n){let i;return Rt.includes(r)||"function"!=typeof n?e.call(this,r,n):(t.listeners.has(n)?i=t.listeners.get(n):(i=function(...e){let i=t.tracer.startSpan(`${r} ${uW.RECEIVE}`,{kind:te.CONSUMER,attributes:{[oL.MESSAGING_SYSTEM]:"socket.io",[oL.MESSAGING_DESTINATION]:this.nsp,[oL.MESSAGING_DESTINATION_KIND]:u$.TOPIC,[oL.MESSAGING_OPERATION]:uW.RECEIVE,[M7]:this.nsp,[Re]:r}});try{n.call(this,e)}catch(e){throw e instanceof Error&&i.recordException(e),e}finally{i.end()}},t.listeners.set(n,i)),e.call(this,r,i))}),e.Socket.prototype.addEventListener=e.Socket.prototype.on,this._wrap(e.Socket.prototype,"off",e=>function(r,n){return!r||Rt.includes(r)||"function"!=typeof n?e.call(this,r,n):t.listeners.has(n)?e.call(this,r,t.listeners.get(n)):e.call(this,r,n)}),e.Socket.prototype.removeListener=e.Socket.prototype.off,e.Socket.prototype.removeEventListener=e.Socket.prototype.off,e.Socket.prototype.removeAllListeners=e.Socket.prototype.off,this._onDisable=()=>{this._unwrap(e.Socket.prototype,"emit"),this._unwrap(e.Socket.prototype,"on"),e.Socket.prototype.addEventListener=e.Socket.prototype.on,this._unwrap(e.Socket.prototype,"off"),e.Socket.prototype.removeListener=e.Socket.prototype.off,e.Socket.prototype.removeEventListener=e.Socket.prototype.off,e.Socket.prototype.removeAllListeners=e.Socket.prototype.off}}enable(){let e=this.getConfig();e.target&&("string"==typeof e.target?this._onDisable=function(e,t){if(window[e])return t(window[e]),()=>{};let r=window[e],n=!1;return Object.defineProperty(window,e,{get:()=>r,set(r){delete window[e],n=!0,window[e]=r,t(r)},configurable:!0,enumerable:!1}),()=>{n||window[e]!==r||(delete window[e],void 0!==r&&(window[e]=r))}}(e.target,e=>this.patchSocketIo(e)):this.patchSocketIo(e.target))}disable(){this._onDisable&&(this._onDisable(),this._onDisable=void 0)}},confKey:"socketio",disable:!0},{Instrument:class extends hb{_createSpan(e,...t){let r=Date.now(),n=(e=>{let t,r=[];for(let n of e)if(Rn(n)){null==t&&RO(n)&&(t=n);try{let e=JSON.stringify(n);null!=e&&r.push(e)}catch(e){}}else r.push(n);return t?Object.assign(Object.assign({},t),e.length>1&&{message:r.join(" ")}):r.join(" ")})(t),i=RI(n)?n:(e=>{let t="[HyperDX] Failed to stringify",r=!1;try{t=JSON.stringify(e)}catch(e){r=!0}if(r)try{t=d8(e)}catch(e){}return t})(n),o=this.tracer.startSpan(`console.${e}`,{kind:te.INTERNAL,startTime:r}),a=e;"log"===e&&(a="info"),o.setAttribute("component",RN),o.setAttribute("level",a),o.setAttribute("message",i),RO(n)&&o.setAttributes(n),o.end(r)}constructor(e={}){super(RN,O7,Object.assign({},e)),this._consoleLogHandler=e=>(...t)=>(this._createSpan("log",...t),e.apply(this,t)),this._consoleInfoHandler=e=>(...t)=>(this._createSpan("info",...t),e.apply(this,t)),this._consoleWarnHandler=e=>(...t)=>(this._createSpan("warn",...t),e.apply(this,t)),this._consoleDebugHandler=e=>(...t)=>(this._createSpan("debug",...t),e.apply(this,t))}init(){}enable(){hp.wrap(console,"debug",this._consoleDebugHandler),hp.wrap(console,"info",this._consoleInfoHandler),hp.wrap(console,"log",this._consoleLogHandler),hp.wrap(console,"warn",this._consoleWarnHandler)}disable(){hp.unwrap(console,"debug"),hp.unwrap(console,"info"),hp.unwrap(console,"log"),hp.unwrap(console,"warn")}},confKey:"console",disable:!0}];RH.map(e=>e.confKey).reduce((e,t)=>(e[t]=!1,e),{webvitals:!1});let RW,RG,RZ,RK,RX,RJ=!1,RQ={DEFAULT_AUTO_INSTRUMENTED_EVENTS:Ou,DEFAULT_AUTO_INSTRUMENTED_EVENT_NAMES:Oc,AlwaysOnSampler:Af,AlwaysOffSampler:Al,ParentBasedSampler:Ad,SessionBasedSampler:class{constructor({ratio:e=1,sampled:t=new x$,notSampled:r=new xz}={}){this._ratio=this._normalize(e),this._upperBound=Math.floor(0xffffffff*this._ratio),this._sampled=t,this._notSampled=r}shouldSample(e,t,r,n,i,o){let a=O9();return this._currentSession!==a&&(this._currentSessionSampled=this._accumulate(a)=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let r=0;r>>0}return t}},get inited(){return RJ},_internalInit:function(e){RQ.init(Object.assign(Object.assign({},RY),e))},init:function(e){var t;"OTEL_TRACES_EXPORTER"in xc||(xc.OTEL_TRACES_EXPORTER="none");let r=(e,t)=>"function"==typeof e&&!0!==e.__wrapped&&e.name===t,n=r(null==console?void 0:console.log,"log")?console.log:()=>{},i=r(null==console?void 0:console.warn,"warn")?console.warn:n,o=r(null==console?void 0:console.error,"error")?console.error:n,a=r(null==console?void 0:console.debug,"debug")?console.debug:n,s=r(null==console?void 0:console.trace,"trace")?console.trace:n;if(tp.setLogger({error:(...e)=>{r(o,"error")&&o(...e)},warn:(...e)=>{r(i,"warn")&&i(...e)},info:(...e)=>{r(n,"log")&&n(...e)},debug:(...e)=>{r(a,"debug")&&a(...e)},verbose:(...e)=>{r(s,"trace")&&s(...e)}},{suppressOverrideMessage:!0,logLevel:(null==e?void 0:e.debug)?J.DEBUG:J.NONE}),"object"!=typeof window)return void tp.error("Rum: Non-browser environment detected, aborting");if("function"!=typeof Symbol)return void tp.error("Rum: browser not supported, disabling instrumentation.");RX=new M4;let u=Object.assign({},RY,(Rq(t=e,"app","applicationName"),Rq(t,"environment","deploymentEnvironment"),t),{exporter:Object.assign({},RY.exporter,e.exporter)});if(RJ)return void tp.warn("Rum already init()ed.");if(!u.debug){if(!u.url)throw Error("Rum.init( {url: 'https://something'} ) is required.");if(!u.url.startsWith("https")&&!u.allowInsecureUrl)throw Error("Not using https is unsafe, if you want to force it use allowInsecureUrl option.")}let c=OY(64);RG=function(e,t,r){r&&(O0=r),OQ=e,O2=!0,O1=t,O8();let n=setInterval(()=>O8(),6e4);return["click","scroll","mousedown","keydown","touchend","visibilitychange"].forEach(e=>document.addEventListener(e,O6,{capture:!0,passive:!0})),{deinit:()=>{clearInterval(n),OQ=void 0,O1=void 0}}}(c,RX,u.cookieDomain).deinit;let{ignoreUrls:l,applicationName:f,deploymentEnvironment:d,version:h}=u,p={ignoreUrls:l,enabled:!1},m=Object.assign(Object.assign({},xy),{[fT.TELEMETRY_SDK_NAME]:"@hyperdx/otel-web",[fT.TELEMETRY_SDK_VERSION]:O7,[fT.SERVICE_NAME]:f,"rum.version":O7,"rum.scriptInstance":c}),y=window.syntheticsRunId;y&&(m["Synthetics-RunId"]=y);let g=new M3(Object.assign(Object.assign({},u.tracer),{resource:new AP(m)}));Object.defineProperty(g.resource.attributes,"rum.sessionId",{get:()=>O9(),configurable:!0,enumerable:!0});let b=RH.map(({Instrument:e,confKey:t,disable:r})=>{let n=Oq(u.instrumentations[t],p,r);if(n){let r=new e(n);return t===Tk.ERROR_INSTRUMENTATION_NAME&&r instanceof Tk.HyperDXErrorInstrumentation&&(RZ=r),"postload"===t&&r instanceof M6&&(RK=r),r}return null}).filter(e=>!!e);if(this.attributesProcessor=new M9(Object.assign(Object.assign(Object.assign({},d?{environment:d,"deployment.environment":d}:{}),h?{"app.version":h}:{}),u.globalAttributes||{})),g.addSpanProcessor(this.attributesProcessor),u.url){let e=function(e){return e.exporter.factory({url:e.url,onAttributesSerializing:e.exporter.onAttributesSerializing,authHeader:e.apiKey})}(u),t=u.spanProcessor.factory(e,{scheduledDelayMillis:u.bufferTimeout,maxExportBatchSize:u.bufferSize});g.addSpanProcessor(t),this._processor=t}u.debug&&g.addSpanProcessor(new Aq(new A$)),window.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this._processor.forceFlush()}),g.register({contextManager:new M8(Object.assign(Object.assign({},u.context),{onBeforeContextStart:()=>null==RK?void 0:RK.onBeforeContextChange(),onBeforeContextEnd:()=>null==RK?void 0:RK.onBeforeContextChange()}))}),RW=hs({tracerProvider:g,instrumentations:b}),this.provider=g,!1!==Oq(u.instrumentations.webvitals)&&MX(g),RJ=!0,tp.info("Rum.init() complete")},deinit(){RJ&&(null==RW||RW(),RW=void 0,null==RG||RG(),RG=void 0,this.provider.shutdown(),delete this.provider,RX=void 0,tp.disable(),RJ=!1)},setGlobalAttributes(e){var t,r;null==(t=this.attributesProcessor)||t.setGlobalAttributes(e),null==RX||RX.emit("global-attributes-changed",{attributes:(null==(r=this.attributesProcessor)?void 0:r.getGlobalAttributes())||{}})},getGlobalAttributes(){var e;return(null==(e=this.attributesProcessor)?void 0:e.getGlobalAttributes())||{}},addAction(e,t){if(!RJ)return void tp.debug("Rum not inited");let r=Date.now(),n=this.provider.getTracer("custom-action").startSpan(e,{startTime:r});n.setAttributes(t),n.end(r)},_experimental_getGlobalAttributes(){return this.getGlobalAttributes()},recordException(e,t){if(!RJ)return void tp.debug("Rum not inited");let r=this.provider.getTracer("record-exception");return u.recordException(e,{tracer:r,attributes:t})},error(...e){RJ?RZ?RZ.hdxReport("Rum.error",e):tp.error("Error was reported, but error instrumentation is disabled."):tp.debug("Rum not inited")},addEventListener(e,t){null==RX||RX.addEventListener(e,t)},removeEventListener(e,t){null==RX||RX.removeEventListener(e,t)},_experimental_addEventListener(e,t){return this.addEventListener(e,t)},_experimental_removeEventListener(e,t){return this.removeEventListener(e,t)},getSessionId:()=>O9(),_experimental_getSessionId(){return this.getSessionId()}};var R0,R1=function(){return(R1=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function R6(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function R3(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(t)+s)+u+")";var c=t.split("/"),l=s.split("/");c.pop();for(var f=0,d=l;f=t.length);){var o=n(Cm);if(","===o.slice(-1))o=Cg(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=Cg(e,o);for(var s=!1;;){var u=t.charAt(r);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){r+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,r+=1}}}return i.join(", ")}(e,n):"style"===r&&n?Cu(n,Cb()):"object"===t&&"data"===r&&n?Cg(e,n):n}function C_(e,t,r){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=0;nt?(n&&(clearTimeout(n),n=null),i=a,e.apply(u,c)):n||!1===r.trailing||(n=setTimeout(function(){i=!1===r.leading?0:Date.now(),n=null,e.apply(u,c)},s))}}function CM(e,t,r,n,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return CM(e,t,o||{},!0)}}function CR(e,t,r){try{if(!(t in e))return function(){};var n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,function(){e[t]=n}}catch(e){return function(){}}}function CC(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function CI(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function CN(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var r=!1;if("string"==typeof t){if(void 0!==e.closest)return null!==e.closest("."+t);r=e.classList.contains(t)}else e.classList.forEach(function(e){t.test(e)&&(r=!0)});return r||CN(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,CN(e.parentNode,t)}function CP(e){return"__sn"in e&&e.__sn.id===Cr}function Ck(e,t){if(R4(e))return!1;var r=t.getId(e);return!t.has(r)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Ck(e.parentNode,t))}function CD(e){return!!e.changedTouches}function CL(e){return"__sn"in e&&e.__sn.type===R0.Element&&"iframe"===e.__sn.tagName}function Cj(e){return!!(null==e?void 0:e.shadowRoot)}function CU(e){return"__ln"in e}"u">typeof window&&window.Proxy&&window.Reflect&&(CA=new Proxy(CA,{get:function(e,t,r){return"map"===t&&console.error(Cx),Reflect.get(e,t,r)}}));var CB=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw Error("Position outside of list range");for(var t=this.head,r=0;r=0;b--){var v=a.get(b);if(v&&(y=e.mirror.getId(v.value.parentNode),g=s(v.value),-1!==y&&-1!==g)){m=v;break}}if(!m){for(;a.head;)a.removeNode(a.head.value);break}p=m.previous,a.removeNode(m.value),u(m.value)}var _={texts:e.texts.map(function(t){return{id:e.mirror.getId(t.node),value:t.value}}).filter(function(t){return e.mirror.has(t.id)}),attributes:e.attributes.map(function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}}).filter(function(t){return e.mirror.has(t.id)}),removes:e.removes,adds:o};(_.texts.length||_.attributes.length||_.removes.length||_.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.mutationCb(_))}},this.processMutation=function(t){var r,n,i,o;if(!CP(t.target))switch(t.type){case"characterData":var a=t.target.textContent;CN(t.target,e.blockClass)||a===t.oldValue||e.texts.push({value:C_(t.target,e.maskTextClass,e.maskTextSelector)&&a?e.maskTextFn?e.maskTextFn(a):a.replace(/[\S]/g,"*"):a,node:t.target});break;case"attributes":var s=t.target;if(a=t.target.getAttribute(t.attributeName),"value"===t.attributeName&&(a=R5({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:a,maskInputFn:e.maskInputFn})),CN(t.target,e.blockClass)||a===t.oldValue)return;var u=e.attributes.find(function(e){return e.node===t.target});if(u||(u={node:t.target,attributes:{}},e.attributes.push(u)),"style"===t.attributeName){var c=e.doc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue),void 0!==u.attributes.style&&null!==u.attributes.style||(u.attributes.style={});var l=u.attributes.style;try{for(var f=R2(Array.from(s.style)),d=f.next();!d.done;d=f.next()){var h=d.value,p=s.style.getPropertyValue(h),m=s.style.getPropertyPriority(h);p===c.style.getPropertyValue(h)&&m===c.style.getPropertyPriority(h)||(l[h]=""===m?p:[p,m])}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}try{for(var y=R2(Array.from(c.style)),g=y.next();!g.done;g=y.next())h=g.value,""===s.style.getPropertyValue(h)&&(l[h]=!1)}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=y.return)&&o.call(y)}finally{if(i)throw i.error}}}else u.attributes[t.attributeName]=Cv(e.doc,t.target.tagName,t.attributeName,a);break;case"childList":t.addedNodes.forEach(function(r){return e.genAdds(r,t.target)}),t.removedNodes.forEach(function(r){var n=e.mirror.getId(r),i=R4(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);CN(t.target,e.blockClass)||CP(r)||(e.addedSet.has(r)?(C$(e.addedSet,r),e.droppedSet.add(r)):e.addedSet.has(t.target)&&-1===n||Ck(t.target,e.mirror)||(e.movedSet.has(r)&&e.movedMap[CF(n,i)]?C$(e.movedSet,r):e.removes.push({parentId:i,id:n,isShadow:!!R4(t.target)||void 0})),e.mapRemoves.push(r))})}},this.genAdds=function(t,r){if(!r||!CN(r,e.blockClass)){if(Cz(t)){if(CP(t))return;e.movedSet.add(t);var n=null;r&&Cz(r)&&(n=r.__sn.id),n&&(e.movedMap[CF(t.__sn.id,n)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);CN(t,e.blockClass)||t.childNodes.forEach(function(t){return e.genAdds(t)})}}}return e.prototype.init=function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach(function(r){t[r]=e[r]})},e.prototype.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},e.prototype.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0,this.canvasManager.lock()},e.prototype.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},e.prototype.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},e}(),CH=[],CW="u">typeof CSSGroupingRule,CG="u">typeof CSSMediaRule,CZ="u">typeof CSSSupportsRule,CK="u">typeof CSSConditionRule;function CX(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function CJ(e,t){var r,n,i=new Cq;CH.push(i),i.init(e);var o=window.MutationObserver||window.__rrMutationObserver,a=null==(n=null==(r=null==window?void 0:window.Zone)?void 0:r.__symbol__)?void 0:n.call(r,"MutationObserver");a&&window[a]&&(o=window[a]);var s=new o(i.processMutations.bind(i));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function CQ(e){var t=e.mouseInteractionCb,r=e.doc,n=e.mirror,i=e.blockClass,o=e.sampling;if(!1===o.mouseInteraction)return function(){};var a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,s=[];return Object.keys(Cf).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]}).forEach(function(e){var o=e.toLowerCase(),a=function(e){return function(r){var o=CX(r);if(!CN(o,i)){var a=CD(r)?r.changedTouches[0]:r;if(a){var s=n.getId(o),u=a.clientX,c=a.clientY;t({type:Cf[e],id:s,x:u,y:c})}}}}(e);s.push(CT(o,a,r))}),function(){s.forEach(function(e){return e()})}}function C0(e){var t=e.scrollCb,r=e.doc,n=e.mirror,i=e.blockClass;return CT("scroll",CO(function(e){var o=CX(e);if(o&&!CN(o,i)){var a=n.getId(o);if(o===r){var s=r.scrollingElement||r.documentElement;t({id:a,x:s.scrollLeft,y:s.scrollTop})}else t({id:a,x:o.scrollLeft,y:o.scrollTop})}},e.sampling.scroll||100),r)}function C1(e,t){var r=R1({},e);return t||delete r.userTriggered,r}var C2=["INPUT","TEXTAREA","SELECT"],C6=new WeakMap;function C3(e){return function(e,t){if(CW&&e.parentRule instanceof CSSGroupingRule||CG&&e.parentRule instanceof CSSMediaRule||CZ&&e.parentRule instanceof CSSSupportsRule||CK&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else t.unshift(r=Array.from(e.parentStyleSheet.cssRules).indexOf(e));return t}(e,[])}function C4(e,t){void 0===t&&(t={});var r,n,i=e.doc.defaultView;if(!i)return function(){};!function(e,t){var r=e.mutationCb,n=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,l=e.styleDeclarationCb,f=e.canvasMutationCb,d=e.fontCb;e.mutationCb=function(){for(var e=[],n=0;ntypeof DragEvent&&e instanceof DragEvent?Cl.Drag:e instanceof MouseEvent?Cl.MouseMove:Cl.TouchMove)},a,{trailing:!1}),f=[CT("mousemove",l,n),CT("touchmove",l,n),CT("drag",l,n)];return function(){f.forEach(function(e){return e()})}}(e),s=CQ(e),u=C0(e),c=function(e){var t=e.viewportResizeCb,r=-1,n=-1;return CT("resize",CO(function(){var e=CC(),i=CI();r===e&&n===i||(t({width:Number(i),height:Number(e)}),r=e,n=i)},200),window)}(e),l=function(e){var t=e.inputCb,r=e.doc,n=e.mirror,i=e.blockClass,o=e.ignoreClass,a=e.maskInputOptions,s=e.maskInputFn,u=e.sampling,c=e.userTriggeredOnInput;function l(e){var t=CX(e),n=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(0>C2.indexOf(t.tagName))&&!CN(t,i)){var u=t.type;if(!t.classList.contains(o)){var l=t.value,d=!1;"radio"===u||"checkbox"===u?d=t.checked:(a[t.tagName.toLowerCase()]||a[u])&&(l=R5({maskInputOptions:a,tagName:t.tagName,type:u,value:l,maskInputFn:s})),f(t,C1({text:l,isChecked:d,userTriggered:n},c));var h=t.name;"radio"===u&&h&&d&&r.querySelectorAll('input[type="radio"][name="'.concat(h,'"]')).forEach(function(e){e!==t&&f(e,C1({text:e.value,isChecked:!d,userTriggered:!1},c))})}}}function f(e,r){var i=C6.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){C6.set(e,r);var o=n.getId(e);t(R1(R1({},r),{id:o}))}}var d=("last"===u.input?["change"]:["input","change"]).map(function(e){return CT(e,l,r)}),h=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),p=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return h&&h.set&&d.push.apply(d,R3([],R6(p.map(function(e){return CM(e[0],e[1],{set:function(){l({target:this})}})})),!1)),function(){d.forEach(function(e){return e()})}}(e),f=function(e){var t=e.mediaInteractionCb,r=e.blockClass,n=e.mirror,i=e.sampling,o=function(e){return CO(function(i){var o=CX(i);if(o&&!CN(o,r)){var a=o,s=a.currentTime,u=a.volume,c=a.muted;t({type:e,id:n.getId(o),currentTime:s,volume:u,muted:c})}},i.media||500)},a=[CT("play",o(0)),CT("pause",o(1)),CT("seeked",o(2)),CT("volumechange",o(3))];return function(){a.forEach(function(e){return e()})}}(e),d=function(e,t){var r=e.styleSheetRuleCb,n=e.mirror,i=t.win,o=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=function(e,t){var i=n.getId(this.ownerNode);return -1!==i&&r({id:i,adds:[{rule:e,index:t}]}),o.apply(this,arguments)};var a=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=function(e){var t=n.getId(this.ownerNode);return -1!==t&&r({id:t,removes:[{index:e}]}),a.apply(this,arguments)};var s={};CW?s.CSSGroupingRule=i.CSSGroupingRule:(CG&&(s.CSSMediaRule=i.CSSMediaRule),CK&&(s.CSSConditionRule=i.CSSConditionRule),CZ&&(s.CSSSupportsRule=i.CSSSupportsRule));var u={};return Object.entries(s).forEach(function(e){var t=R6(e,2),i=t[0],o=t[1];u[i]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=function(e,t){var o=n.getId(this.parentStyleSheet.ownerNode);return -1!==o&&r({id:o,adds:[{rule:e,index:R3(R3([],R6(C3(this)),!1),[t||0],!1)}]}),u[i].insertRule.apply(this,arguments)},o.prototype.deleteRule=function(e){var t=n.getId(this.parentStyleSheet.ownerNode);return -1!==t&&r({id:t,removes:[{index:R3(R3([],R6(C3(this)),!1),[e],!1)}]}),u[i].deleteRule.apply(this,arguments)}}),function(){i.CSSStyleSheet.prototype.insertRule=o,i.CSSStyleSheet.prototype.deleteRule=a,Object.entries(s).forEach(function(e){var t=R6(e,2),r=t[0],n=t[1];n.prototype.insertRule=u[r].insertRule,n.prototype.deleteRule=u[r].deleteRule})}}(e,{win:i}),h=function(e,t){var r=e.styleDeclarationCb,n=e.mirror,i=t.win,o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=function(e,t,i){var a,s,u=n.getId(null==(s=null==(a=this.parentRule)?void 0:a.parentStyleSheet)?void 0:s.ownerNode);return -1!==u&&r({id:u,set:{property:e,value:t,priority:i},index:C3(this.parentRule)}),o.apply(this,arguments)};var a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=function(e){var t,i,o=n.getId(null==(i=null==(t=this.parentRule)?void 0:t.parentStyleSheet)?void 0:i.ownerNode);return -1!==o&&r({id:o,remove:{property:e},index:C3(this.parentRule)}),a.apply(this,arguments)},function(){i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=a}}(e,{win:i}),p=e.collectFonts?function(e){var t=e.fontCb,r=e.doc,n=r.defaultView;if(!n)return function(){};var i=[],o=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,r){var n=new a(e,t,r);return o.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var s=CR(r.fonts,"add",function(e){return function(r){return setTimeout(function(){var e=o.get(r);e&&(t(e),o.delete(r))},0),e.apply(this,[r])}});return i.push(function(){n.FontFace=a}),i.push(s),function(){i.forEach(function(e){return e()})}}(e):function(){},m=[];try{for(var y=R2(e.plugins),g=y.next();!g.done;g=y.next()){var b=g.value;m.push(b.observer(b.callback,i,b.options))}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=y.return)&&n.call(y)}finally{if(r)throw r.error}}return function(){CH.forEach(function(e){return e.reset()}),o.disconnect(),a(),s(),u(),c(),l(),f(),d(),h(),p(),m.forEach(function(e){return e()})}}for(var C5=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var r;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null==(r=this.loadListener)||r.call(this,e)},e}(),C8=function(){function e(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;var t=this;this.restorePatches.push(CR(HTMLElement.prototype,"attachShadow",function(e){return function(){var r=e.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),r}}))}return e.prototype.addShadowRoot=function(e,t){CJ(R1(R1({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),C0(R1(R1({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))},e.prototype.observeAttachShadow=function(e){if(e.contentWindow){var t=this;this.restorePatches.push(CR(e.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(){var n=r.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),n}}))}},e.prototype.reset=function(){this.restorePatches.forEach(function(e){return e()})},e}(),C9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C7="u">2],i+=C9[(3&r[t])<<4|r[t+1]>>4],i+=C9[(15&r[t+1])<<2|r[t+2]>>6],i+=C9[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e)}:e instanceof DataView?{rr_type:e.constructor.name,args:[In(e.buffer,t,r),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?{rr_type:e.constructor.name,src:e.src}:e instanceof ImageData?{rr_type:e.constructor.name,args:[In(e.data,t,r),e.width,e.height]}:Io(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:Ir(e,t,r)}:e}var Ii=function(e,t,r){return R3([],R6(e),!1).map(function(e){return In(e,t,r)})},Io=function(e,t){return!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof t[e]}).find(function(r){return e instanceof t[r]})};function Ia(e,t,r,n,i,o){var a,s,u=[],c=Object.getOwnPropertyNames(e),l=function(a){try{if("function"!=typeof e[a])return"continue";var s=CR(e,a,function(s){return function(){for(var u=[],c=0;ct.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["type"])}),i=r[0].type;this.mutationCb({id:t,type:i,commands:n}),this.pendingCanvasMutations.delete(e)}}},e}();function Il(e){return R1(R1({},e),{timestamp:Date.now()})}var If={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function Id(e){void 0===e&&(e={});var t=e.emit,r=e.checkoutEveryNms,n=e.checkoutEveryNth,i=e.blockClass,o=void 0===i?"rr-block":i,a=e.blockSelector,s=void 0===a?null:a,u=e.ignoreClass,c=void 0===u?"rr-ignore":u,l=e.maskTextClass,f=void 0===l?"rr-mask":l,d=e.maskTextSelector,h=void 0===d?null:d,p=e.inlineStylesheet,m=void 0===p||p,y=e.maskAllInputs,g=e.maskInputOptions,b=e.slimDOMOptions,v=e.maskInputFn,_=e.maskTextFn,S=e.hooks,E=e.packFn,w=e.sampling,T=void 0===w?{}:w,x=e.mousemoveWait,A=e.recordCanvas,O=void 0!==A&&A,M=e.userTriggeredOnInput,R=void 0!==M&&M,C=e.collectFonts,I=void 0!==C&&C,N=e.inlineImages,P=void 0!==N&&N,k=e.plugins,D=e.keepIframeSrcFn,L=void 0===D?function(){return!1}:D;if(!t)throw Error("emit function is required");void 0!==x&&void 0===T.mousemove&&(T.mousemove=x);var j,U,B=!0===y?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==g?g:{password:!0},F=!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===b,headMetaDescKeywords:"all"===b}:b||{};void 0===j&&(j=window),"NodeList"in j&&!j.NodeList.prototype.forEach&&(j.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in j&&!j.DOMTokenList.prototype.forEach&&(j.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw TypeError("1 argument is required");do if(this===e)return!0;while(e=e&&e.parentNode);return!1});var z=0;Is=function(e,i){var o;if((null==(o=CH[0])?void 0:o.isFrozen())&&e.type!==Cc.FullSnapshot&&(e.type!==Cc.IncrementalSnapshot||e.data.source!==Cl.Mutation)&&CH.forEach(function(e){return e.unfreeze()}),t(function(e){var t,r;try{for(var n=R2(k||[]),i=n.next();!i.done;i=n.next()){var o=i.value;o.eventProcessor&&(e=o.eventProcessor(e))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return E&&(e=E(e)),e}(e),i),e.type===Cc.FullSnapshot)U=e,z=0;else if(e.type===Cc.IncrementalSnapshot){if(e.data.source===Cl.Mutation&&e.data.isAttachIframe)return;z++;var a=n&&z>=n,s=r&&e.timestamp-U.timestamp>r;(a||s)&&Iu(!0)}};var $=function(e){Is(Il({type:Cc.IncrementalSnapshot,data:R1({source:Cl.Mutation},e)}))},V=function(e){return Is(Il({type:Cc.IncrementalSnapshot,data:R1({source:Cl.Scroll},e)}))},Y=function(e){return Is(Il({type:Cc.IncrementalSnapshot,data:R1({source:Cl.CanvasMutation},e)}))},q=new C5({mutationCb:$}),H=new Ic({recordCanvas:O,mutationCb:Y,win:window,blockClass:o,mirror:If}),W=new C8({mutationCb:$,scrollCb:V,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:f,maskTextSelector:h,inlineStylesheet:m,maskInputOptions:B,maskTextFn:_,maskInputFn:v,recordCanvas:O,inlineImages:P,sampling:T,slimDOMOptions:F,iframeManager:q,canvasManager:H},mirror:If});Iu=function(e){void 0===e&&(e=!1),Is(Il({type:Cc.Meta,data:{href:window.location.href,width:CI(),height:CC()}}),e),CH.forEach(function(e){return e.lock()});var t,r,n,i,a=R6(function(e,t){var r=t||{},n=r.blockClass,i=void 0===n?"rr-block":n,o=r.blockSelector,a=void 0===o?null:o,s=r.maskTextClass,u=void 0===s?"rr-mask":s,c=r.maskTextSelector,l=void 0===c?null:c,f=r.inlineStylesheet,d=void 0===f||f,h=r.inlineImages,p=void 0!==h&&h,m=r.recordCanvas,y=void 0!==m&&m,g=r.maskAllInputs,b=void 0!==g&&g,v=r.maskTextFn,_=r.maskInputFn,S=r.slimDOM,E=void 0!==S&&S,w=r.dataURLOptions,T=r.preserveWhiteSpace,x=r.onSerialize,A=r.onIframeLoad,O=r.iframeLoadTimeout,M=r.keepIframeSrcFn,R={};return[Cw(e,{doc:e,map:R,blockClass:i,blockSelector:a,maskTextClass:u,maskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===b?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===b?{password:!0}:b,maskTextFn:v,maskInputFn:_,slimDOMOptions:!0===E||"all"===E?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===E,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===E?{}:E,dataURLOptions:w,inlineImages:p,recordCanvas:y,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:A,iframeLoadTimeout:O,keepIframeSrcFn:void 0===M?function(){return!1}:M}),R]}(document,{blockClass:o,blockSelector:s,maskTextClass:f,maskTextSelector:h,inlineStylesheet:m,maskAllInputs:B,maskTextFn:_,slimDOM:F,recordCanvas:O,inlineImages:P,onSerialize:function(e){CL(e)&&q.addIframe(e),Cj(e)&&W.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){q.attachIframe(e,t),W.observeAttachShadow(e)},keepIframeSrcFn:L}),2),u=a[0],c=a[1];if(!u)return console.warn("Failed to snapshot the document");If.map=c,Is(Il({type:Cc.FullSnapshot,data:{node:u,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null==document?void 0:document.documentElement.scrollLeft)||(null==(r=null==(t=null==document?void 0:document.body)?void 0:t.parentElement)?void 0:r.scrollLeft)||(null==document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null==document?void 0:document.documentElement.scrollTop)||(null==(i=null==(n=null==document?void 0:document.body)?void 0:n.parentElement)?void 0:i.scrollTop)||(null==document?void 0:document.body.scrollTop)||0}}})),CH.forEach(function(e){return e.unlock()})};try{var G=[];G.push(CT("DOMContentLoaded",function(){Is(Il({type:Cc.DomContentLoaded,data:{}}))}));var Z=function(e){var t;return C4({mutationCb:$,mousemoveCb:function(e,t){return Is(Il({type:Cc.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return Is(Il({type:Cc.IncrementalSnapshot,data:R1({source:Cl.MouseInteraction},e)}))},scrollCb:V,viewportResizeCb:function(e){return Is(Il({type:Cc.IncrementalSnapshot,data:R1({source:Cl.ViewportResize},e)}))},inputCb:function(e){return Is(Il({type:Cc.IncrementalSnapshot,data:R1({source:Cl.Input},e)}))},mediaInteractionCb:function(e){return Is(Il({type:Cc.IncrementalSnapshot,data:R1({source:Cl.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return Is(Il({type:Cc.IncrementalSnapshot,data:R1({source:Cl.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return Is(Il({type:Cc.IncrementalSnapshot,data:R1({source:Cl.StyleDeclaration},e)}))},canvasMutationCb:Y,fontCb:function(e){return Is(Il({type:Cc.IncrementalSnapshot,data:R1({source:Cl.Font},e)}))},blockClass:o,ignoreClass:c,maskTextClass:f,maskTextSelector:h,maskInputOptions:B,inlineStylesheet:m,sampling:T,recordCanvas:O,inlineImages:P,userTriggeredOnInput:R,collectFonts:I,doc:e,maskInputFn:v,maskTextFn:_,blockSelector:s,slimDOMOptions:F,mirror:If,iframeManager:q,shadowDomManager:W,canvasManager:H,plugins:(null==(t=null==k?void 0:k.filter(function(e){return e.observer}))?void 0:t.map(function(e){return{observer:e.observer,options:e.options,callback:function(t){return Is(Il({type:Cc.Plugin,data:{plugin:e.name,payload:t}}))}}}))||[]},S)};q.addLoadListener(function(e){G.push(Z(e.contentDocument))});var K=function(){Iu(),G.push(Z(document))};return"interactive"===document.readyState||"complete"===document.readyState?K():G.push(CT("load",function(){Is(Il({type:Cc.Load,data:{}})),K()},window)),function(){G.forEach(function(e){return e()})}}catch(e){console.warn(e)}}Id.addCustomEvent=function(e,t){if(!Is)throw Error("please add custom event after start recording");Is(Il({type:Cc.Custom,data:{tag:e,payload:t}}))},Id.freezePage=function(){CH.forEach(function(e){return e.freeze()})},Id.takeFullSnapshot=function(e){if(!Iu)throw Error("please take full snapshot after start recording");Iu(e)},Id.mirror=If;var Ih=Uint8Array,Ip=Uint16Array,Im=Uint32Array,Iy=new Ih([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ig=new Ih([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ib=new Ih([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Iv=function(e,t){for(var r=new Ip(31),n=0;n<31;++n)r[n]=t+=1<>>1|(21845&Ix)<<1;IA=(61680&(IA=(52428&IA)>>>2|(13107&IA)<<2))>>>4|(3855&IA)<<4,IT[Ix]=((65280&IA)>>>8|(255&IA)<<8)>>>1}var IO=function(e,t,r){for(var n=e.length,i=0,o=new Ip(t);i>>u]=c}else for(a=new Ip(n),i=0;i>>15-e[i]);return a},IM=new Ih(288);for(Ix=0;Ix<144;++Ix)IM[Ix]=8;for(Ix=144;Ix<256;++Ix)IM[Ix]=9;for(Ix=256;Ix<280;++Ix)IM[Ix]=7;for(Ix=280;Ix<288;++Ix)IM[Ix]=8;var IR=new Ih(32);for(Ix=0;Ix<32;++Ix)IR[Ix]=5;var IC=IO(IM,9,0),II=IO(IR,5,0),IN=function(e){return(e+7)/8|0},IP=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>>8},Ik=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},ID=function(e,t){for(var r=[],n=0;nd&&(d=o[n].s);var h=new Ip(d+1),p=IL(r[l-1],h,0);if(p>t){n=0;var m=0,y=p-t,g=1<t))break;m+=g-(1<>>=y;m>0;){var v=o[n].s;h[v]=0&&m;--n){var _=o[n].s;h[_]==t&&(--h[_],++m)}p=t}return[new Ih(h),p]},IL=function(e,t,r){return -1==e.s?Math.max(IL(e.l,t,r+1),IL(e.r,t,r+1)):t[e.s]=r},Ij=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Ip(++t),n=0,i=e[0],o=1,a=function(e){r[n++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[s]}return[r.subarray(0,n),t]},IU=function(e,t){for(var r=0,n=0;n>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o4&&!A[Ib[M-1]];--M);var R,C,I,N,P=c+5<<3,k=IU(i,IM)+IU(o,IR)+a,D=IU(i,d)+IU(o,m)+a+14+3*M+IU(w,A)+(2*w[16]+3*w[17]+7*w[18]);if(P<=k&&P<=D)return IB(t,l,e.subarray(u,u+c));if(IP(t,l,1+(D15&&(IP(t,l,B[T]>>>5&127),l+=B[T]>>>12)}}}else R=IC,C=IM,I=II,N=IR;for(T=0;T255){Ik(t,l,R[(F=n[T]>>>18&31)+257]),l+=C[F+257],F>7&&(IP(t,l,n[T]>>>23&31),l+=Iy[F]);var z=31&n[T];Ik(t,l,I[z]),l+=N[z],z>3&&(Ik(t,l,n[T]>>>5&8191),l+=Ig[z])}else Ik(t,l,R[n[T]]),l+=C[n[T]];return Ik(t,l,R[256]),l+C[256]},Iz=new Im([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),I$=new Ih(0),IV=function(e,t,r,n,i,o){var a=e.length,s=new Ih(n+a+5*(1+Math.ceil(a/7e3))+i),u=s.subarray(n,s.length-i),c=0;if(!t||a<8)for(var l=0;l<=a;l+=65535){var f=l+65535;f>=a&&(u[c>>3]=o),c=IB(u,c+1,e.subarray(l,f))}else{for(var d=Iz[t-1],h=d>>>13,p=8191&d,m=(1<7e3||A>24576)&&N>423){c=IF(e,u,0,S,E,w,x,A,M,l-M,c),A=T=x=0,M=l;for(var P=0;P<286;++P)E[P]=0;for(P=0;P<30;++P)w[P]=0}var k=2,D=0,L=p,j=C-I&32767;if(N>2&&R==_(l-j))for(var U=Math.min(h,N)-1,B=Math.min(32767,l),F=Math.min(258,N);j<=B&&--L&&C!=I;){if(e[l+k]==e[l+k-j]){for(var z=0;zk){if(k=z,D=j,z>U)break;var $=Math.min(j,z-2),V=0;for(P=0;P<$;++P){var Y=l-j+P+32768&32767,q=Y-y[Y]+32768&32767;q>V&&(V=q,I=Y)}}}j+=(C=I)-(I=y[C])+32768&32767}if(D){S[A++]=0x10000000|IE[k]<<18|Iw[D];var H=31&IE[k],W=31&Iw[D];x+=Iy[H]+Ig[W],++E[257+H],++w[W],O=l+k,++T}else S[A++]=e[l],++E[e[l]]}}c=IF(e,u,o,S,E,w,x,A,M,l-M,c),!o&&7&c&&(c=IB(u,c+1,I$))}return function(e,t,r){(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length);var n=new(2==e.BYTES_PER_ELEMENT?Ip:4==e.BYTES_PER_ELEMENT?Im:Ih)(r-t);return n.set(e.subarray(t,r)),n}(s,0,n+IN(c)+i)},IY=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(1&r&&-0x12477ce0)^r>>>1;e[t]=r}return e}(),Iq=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function IH(e,t){t||(t={});var r=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n>>8;e=r},d:function(){return~e}}}(),n=e.length;r.p(e);var i,o,a,s,u,c=(i=e,o=t,a=function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),s=8,IV(i,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+o.mem,a,s,!u)),l=c.length;return function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:2*(9==t.level),e[9]=3,0!=t.mtime&&Iq(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;n<=r.length;++n)e[n+10]=r.charCodeAt(n)}}(c,t),Iq(c,l-8,r.d()),Iq(c,l-4,n),c}var IW="u">typeof TextDecoder&&new TextDecoder;try{IW.decode(I$,{stream:!0})}catch(e){}var IG=null;try{IG=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function IZ(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function IK(e){return!0===(e&&e.__isLong__)}function IX(e){var t=Math.clz32(e&-e);return e?31-t:t}IZ.prototype.__isLong__,Object.defineProperty(IZ.prototype,"__isLong__",{value:!0}),IZ.isLong=IK;var IJ={},IQ={};function I0(e,t){var r,n,i;return t?(i=0<=(e>>>=0)&&e<256)&&(n=IQ[e])?n:(r=I2(e,0,!0),i&&(IQ[e]=r),r):(i=-128<=(e|=0)&&e<128)&&(n=IJ[e])?n:(r=I2(e,e<0?-1:0,!1),i&&(IJ[e]=r),r)}function I1(e,t){if(isNaN(e))return t?Nt:Ne;if(t){if(e<0)return Nt;if(e>=I8)return Na}else{if(e<=-I9)return Ns;if(e+1>=I9)return No}return e<0?I1(-e,t).neg():I2(e%I5|0,e/I5|0,t)}function I2(e,t,r){return new IZ(e,t,r)}IZ.fromInt=I0,IZ.fromNumber=I1,IZ.fromBits=I2;var I6=Math.pow;function I3(e,t,r){if(0===e.length)throw Error("empty string");if("number"==typeof t?(r=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?Nt:Ne;if((r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return I3(e.substring(1),t,r).neg();for(var n,i=I1(I6(r,8)),o=Ne,a=0;a>>0:this.low},Nu.toNumber=function(){return this.unsigned?(this.high>>>0)*I5+(this.low>>>0):this.high*I5+(this.low>>>0)},Nu.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=s).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},Nu.getHighBits=function(){return this.high},Nu.getHighBitsUnsigned=function(){return this.high>>>0},Nu.getLowBits=function(){return this.low},Nu.getLowBitsUnsigned=function(){return this.low>>>0},Nu.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Ns)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<=0},Nu.isOdd=function(){return!(1&~this.low)},Nu.isEven=function(){return!(1&this.low)},Nu.equals=function(e){return IK(e)||(e=I4(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},Nu.eq=Nu.equals,Nu.notEquals=function(e){return!this.eq(e)},Nu.neq=Nu.notEquals,Nu.ne=Nu.notEquals,Nu.lessThan=function(e){return 0>this.comp(e)},Nu.lt=Nu.lessThan,Nu.lessThanOrEqual=function(e){return 0>=this.comp(e)},Nu.lte=Nu.lessThanOrEqual,Nu.le=Nu.lessThanOrEqual,Nu.greaterThan=function(e){return this.comp(e)>0},Nu.gt=Nu.greaterThan,Nu.greaterThanOrEqual=function(e){return this.comp(e)>=0},Nu.gte=Nu.greaterThanOrEqual,Nu.ge=Nu.greaterThanOrEqual,Nu.compare=function(e){if(IK(e)||(e=I4(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},Nu.comp=Nu.compare,Nu.negate=function(){return!this.unsigned&&this.eq(Ns)?Ns:this.not().add(Nr)},Nu.neg=Nu.negate,Nu.add=function(e){IK(e)||(e=I4(e));var t,r,n,i=this.high>>>16,o=65535&this.high,a=this.low>>>16,s=65535&this.low,u=e.high>>>16,c=65535&e.high,l=e.low>>>16,f=0;return n=0+((t=0+((r=0+(s+(65535&e.low)))>>>16)+(a+l))>>>16),f+=(n+=o+c)>>>16,f+=i+u,I2((t&=65535)<<16|(r&=65535),(f&=65535)<<16|(n&=65535),this.unsigned)},Nu.subtract=function(e){return IK(e)||(e=I4(e)),this.add(e.neg())},Nu.sub=Nu.subtract,Nu.multiply=function(e){if(this.isZero())return this;if(IK(e)||(e=I4(e)),IG)return I2(IG.mul(this.low,this.high,e.low,e.high),IG.get_high(),this.unsigned);if(e.isZero())return this.unsigned?Nt:Ne;if(this.eq(Ns))return e.isOdd()?Ns:Ne;if(e.eq(Ns))return this.isOdd()?Ns:Ne;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(I7)&&e.lt(I7))return I1(this.toNumber()*e.toNumber(),this.unsigned);var t,r,n,i=this.high>>>16,o=65535&this.high,a=this.low>>>16,s=65535&this.low,u=e.high>>>16,c=65535&e.high,l=e.low>>>16,f=65535&e.low,d=0;return n=0+((t=0+((r=0+s*f)>>>16)+a*f)>>>16),t&=65535,n+=(t+=s*l)>>>16,d+=(n+=o*f)>>>16,n&=65535,d+=(n+=a*l)>>>16,n&=65535,d+=(n+=s*c)>>>16,d+=i*f+o*l+a*c+s*u,I2((t&=65535)<<16|(r&=65535),(d&=65535)<<16|(n&=65535),this.unsigned)},Nu.mul=Nu.multiply,Nu.divide=function(e){if(IK(e)||(e=I4(e)),e.isZero())throw Error("division by zero");if(IG)return this.unsigned||-0x80000000!==this.high||-1!==e.low||-1!==e.high?I2((this.unsigned?IG.div_u:IG.div_s)(this.low,this.high,e.low,e.high),IG.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Nt:Ne;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return Nt;if(e.gt(this.shru(1)))return Nn;n=Nt}else{if(this.eq(Ns))return e.eq(Nr)||e.eq(Ni)?Ns:e.eq(Ns)?Nr:(t=this.shr(1).div(e).shl(1)).eq(Ne)?e.isNegative()?Nr:Ni:(r=this.sub(e.mul(t)),n=t.add(r.div(e)));if(e.eq(Ns))return this.unsigned?Nt:Ne;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=Ne}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var t,r,n,i=Math.ceil(Math.log(t)/Math.LN2),o=i<=48?1:I6(2,i-48),a=I1(t),s=a.mul(e);s.isNegative()||s.gt(r);)s=(a=I1(t-=o,this.unsigned)).mul(e);a.isZero()&&(a=Nr),n=n.add(a),r=r.sub(s)}return n},Nu.div=Nu.divide,Nu.modulo=function(e){return IK(e)||(e=I4(e)),IG?I2((this.unsigned?IG.rem_u:IG.rem_s)(this.low,this.high,e.low,e.high),IG.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},Nu.mod=Nu.modulo,Nu.rem=Nu.modulo,Nu.not=function(){return I2(~this.low,~this.high,this.unsigned)},Nu.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},Nu.clz=Nu.countLeadingZeros,Nu.countTrailingZeros=function(){return this.low?IX(this.low):IX(this.high)+32},Nu.ctz=Nu.countTrailingZeros,Nu.and=function(e){return IK(e)||(e=I4(e)),I2(this.low&e.low,this.high&e.high,this.unsigned)},Nu.or=function(e){return IK(e)||(e=I4(e)),I2(this.low|e.low,this.high|e.high,this.unsigned)},Nu.xor=function(e){return IK(e)||(e=I4(e)),I2(this.low^e.low,this.high^e.high,this.unsigned)},Nu.shiftLeft=function(e){return IK(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?I2(this.low<>>32-e,this.unsigned):I2(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):I2(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},Nu.shr=Nu.shiftRight,Nu.shiftRightUnsigned=function(e){return IK(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?I2(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):I2(32===e?this.high:this.high>>>e-32,0,this.unsigned)},Nu.shru=Nu.shiftRightUnsigned,Nu.shr_u=Nu.shiftRightUnsigned,Nu.rotateLeft=function(e){var t;return IK(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?I2(this.high,this.low,this.unsigned):e<32?(t=32-e,I2(this.low<>>t,this.high<>>t,this.unsigned)):(t=32-(e-=32),I2(this.high<>>t,this.low<>>t,this.unsigned))},Nu.rotl=Nu.rotateLeft,Nu.rotateRight=function(e){var t;return IK(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?I2(this.high,this.low,this.unsigned):e<32?(t=32-e,I2(this.high<>>e,this.low<>>e,this.unsigned)):(t=32-(e-=32),I2(this.low<>>e,this.high<>>e,this.unsigned))},Nu.rotr=Nu.rotateRight,Nu.toSigned=function(){return this.unsigned?I2(this.low,this.high,!1):this},Nu.toUnsigned=function(){return this.unsigned?this:I2(this.low,this.high,!0)},Nu.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},Nu.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},Nu.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},IZ.fromBytes=function(e,t,r){return r?IZ.fromBytesLE(e,t):IZ.fromBytesBE(e,t)},IZ.fromBytesLE=function(e,t){return new IZ(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},IZ.fromBytesBE=function(e,t){return new IZ(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var Nc={},Nl={},Nf=function(e,t){for(var r=Array(arguments.length-1),n=0,i=2,o=!0;i1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var r=Array(64),n=Array(123),i=0;i<64;)n[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;t.encode=function(e,t,n){for(var i,o=null,a=[],s=0,u=0;t>2],i=(3&c)<<4,u=1;break;case 1:a[s++]=r[i|c>>4],i=(15&c)<<2,u=2;break;case 2:a[s++]=r[i|c>>6],a[s++]=r[63&c],u=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0)}return u&&(a[s++]=r[i],a[s++]=61,1===u&&(a[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var o="invalid encoding";t.decode=function(e,t,r){for(var i,a=r,s=0,u=0;u1)break;if(void 0===(c=n[c]))throw Error(o);switch(s){case 0:i=c,s=1;break;case 1:t[r++]=i<<2|(48&c)>>4,i=c,s=2;break;case 2:t[r++]=(15&i)<<4|(60&c)>>2,i=c,s=3;break;case 3:t[r++]=(3&i)<<6|c,s=0}}if(1===s)throw Error(o);return r-a},t.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}(Nd);var Nh=Np;function Np(){this._listeners={}}Np.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},Np.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;ntypeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3]}function o(e,n,i){t[0]=e,n[i]=r[3],n[i+1]=r[2],n[i+2]=r[1],n[i+3]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function s(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?i:o,e.writeFloatBE=n?o:i,e.readFloatLE=n?a:s,e.readFloatBE=n?s:a}():function(){function t(e,t,r,n){var i=+(t<0);if(i&&(t=-t),0===t)e(1/t>0?0:0x80000000,r,n);else if(isNaN(t))e(0x7fc00000,r,n);else if(t>34028234663852886e22)e((i<<31|0x7f800000)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2);e((i<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,n)}}function r(e,t,r){var n=e(t,r),i=2*(n>>31)+1,o=n>>>23&255,a=8388607&n;return 255===o?a?NaN:1/0*i:0===o?1401298464324817e-60*i*a:i*Math.pow(2,o-150)*(a+8388608)}e.writeFloatLE=t.bind(null,Ng),e.writeFloatBE=t.bind(null,Nb),e.readFloatLE=r.bind(null,Nv),e.readFloatBE=r.bind(null,N_)}(),"u">typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,i,o){var a,s=+(n<0);if(s&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:0x80000000,i,o+r);else if(isNaN(n))e(0,i,o+t),e(0x7ff80000,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((s<<31|0x7ff00000)>>>0,i,o+r);else if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,i,o+t),e((s<<31|a/0x100000000)>>>0,i,o+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),e(0x10000000000000*(a=n*Math.pow(2,-u))>>>0,i,o+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}function r(e,t,r,n,i){var o=e(n,i+t),a=e(n,i+r),s=2*(a>>31)+1,u=a>>>20&2047,c=0x100000000*(1048575&a)+o;return 2047===u?c?NaN:1/0*s:0===u?5e-324*s*c:s*Math.pow(2,u-1075)*(c+0x10000000000000)}e.writeDoubleLE=t.bind(null,Ng,0,4),e.writeDoubleBE=t.bind(null,Nb,4,0),e.readDoubleLE=r.bind(null,Nv,0,4),e.readDoubleBE=r.bind(null,N_,4,0)}(),e}function Ng(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function Nb(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function Nv(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function N_(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}var NS=function(e){return null},NE={};!function(e){var t=e;t.length=function(e){for(var t=0,r=0,n=0;n191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0);return i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))},t.write=function(e,t,r){for(var n,i,o=r,a=0;a>6|192:(55296==(64512&n)&&56320==(64512&(i=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&i),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128);return r-o}}(NE);var Nw,NT,Nx,NA=function(e,t,r){var n=r||8192,i=n>>>1,o=null,a=n;return function(r){if(r<1||r>i)return e(r);a+r>n&&(o=e(n),a=0);var s=t.call(o,a,a+=r);return 7&a&&(a=1+(7|a)),s}};function NO(){return Nx||(Nx=1,function(e){var t=e;function r(e,t,r){for(var n=Object.keys(t),i=0;i>>0,this.hi=t>>>0}var r=t.zero=new t(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var n=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(e){if(0===e)return r;var n=e<0;n&&(e=-e);var i=e>>>0,o=(e-i)/0x100000000>>>0;return n&&(o=~o>>>0,i=~i>>>0,++i>0xffffffff&&(i=0,++o>0xffffffff&&(o=0))),new t(i,o)},t.from=function(n){if("number"==typeof n)return t.fromNumber(n);if(e.isString(n)){if(!e.Long)return t.fromNumber(parseInt(n,10));n=e.Long.fromString(n)}return n.low||n.high?new t(n.low>>>0,n.high>>>0):r},t.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+0x100000000*r)}return this.lo+0x100000000*this.hi},t.prototype.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var i=String.prototype.charCodeAt;return t.fromHash=function(e){return e===n?r:new t((i.call(e,0)|i.call(e,1)<<8|i.call(e,2)<<16|i.call(e,3)<<24)>>>0,(i.call(e,4)|i.call(e,5)<<8|i.call(e,6)<<16|i.call(e,7)<<24)>>>0)},t.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},t.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},t.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10},Nw}(),t.isNode=!!(void 0!==o&&o&&o.process&&o.process.versions&&o.process.versions.node),t.global=t.isNode&&o||"u">typeof window&&window||"u">typeof self&&self||o,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.isString=function(e){return"string"==typeof e||e instanceof String},t.isObject=function(e){return e&&"object"==typeof e},t.isset=t.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"u"typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var n=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)},t.merge=r,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=n,t.ProtocolError=n("ProtocolError"),t.oneOfGetter=function(e){for(var t={},r=0;r-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},t.oneOfSetter=function(e){return function(t){for(var r=0;r>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function N$(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}Nj.create=NU(),Nj.alloc=function(e){return new NC.Array(e)},NC.Array!==Array&&(Nj.alloc=NC.pool(Nj.alloc,NC.Array.prototype.subarray)),Nj.prototype._push=function(e,t,r){return this.tail=this.tail.next=new Nk(e,t,r),this.len+=t,this},NF.prototype=Object.create(Nk.prototype),NF.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},Nj.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new NF((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:5,e)).len,this},Nj.prototype.int32=function(e){return e<0?this._push(Nz,10,NI.fromNumber(e)):this.uint32(e)},Nj.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},Nj.prototype.uint64=function(e){var t=NI.from(e);return this._push(Nz,t.length(),t)},Nj.prototype.int64=Nj.prototype.uint64,Nj.prototype.sint64=function(e){var t=NI.from(e).zzEncode();return this._push(Nz,t.length(),t)},Nj.prototype.bool=function(e){return this._push(NB,1,+!!e)},Nj.prototype.fixed32=function(e){return this._push(N$,4,e>>>0)},Nj.prototype.sfixed32=Nj.prototype.fixed32,Nj.prototype.fixed64=function(e){var t=NI.from(e);return this._push(N$,4,t.lo)._push(N$,4,t.hi)},Nj.prototype.sfixed64=Nj.prototype.fixed64,Nj.prototype.float=function(e){return this._push(NC.float.writeFloatLE,4,e)},Nj.prototype.double=function(e){return this._push(NC.float.writeDoubleLE,8,e)};var NV=NC.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if(!t)return this._push(NB,1,0);if(NC.isString(e)){var r=Nj.alloc(t=NN.length(e));NN.decode(e,r,0),e=r}return this.uint32(t)._push(NV,t,e)},Nj.prototype.string=function(e){var t=NP.length(e);return t?this.uint32(t)._push(NP.write,t,e):this._push(NB,1,0)},Nj.prototype.fork=function(){return this.states=new NL(this),this.head=this.tail=new Nk(ND,0,0),this.len=0,this},Nj.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Nk(ND,0,0),this.len=0),this},Nj.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},Nj.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},Nj._configure=function(e){NM=e,Nj.create=NU(),NM._configure()};var NY=NW,Nq=NR;(NW.prototype=Object.create(Nq.prototype)).constructor=NW;var NH=NO();function NW(){Nq.call(this)}function NG(e,t,r){e.length<40?NH.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}NW._configure=function(){NW.alloc=NH._Buffer_allocUnsafe,NW.writeBytesBuffer=NH.Buffer&&NH.Buffer.prototype instanceof Uint8Array&&"set"===NH.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n>>0;return this.uint32(t),t&&this._push(NW.writeBytesBuffer,t,e),this},NW.prototype.string=function(e){var t=NH.Buffer.byteLength(e);return this.uint32(t),t&&this._push(NG,t,e),this},NW._configure();var NZ,NK=N1,NX=NO(),NJ=NX.LongBits,NQ=NX.utf8;function N0(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function N1(e){this.buf=e,this.pos=0,this.len=e.length}var N2,N6="u">typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new N1(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new N1(e);throw Error("illegal buffer")},N3=function(){return NX.Buffer?function(e){return(N1.create=function(e){return NX.Buffer.isBuffer(e)?new NZ(e):N6(e)})(e)}:N6};function N4(){var e=new NJ(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw N0(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw N0(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function N5(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function N8(){if(this.pos+8>this.len)throw N0(this,8);return new NJ(N5(this.buf,this.pos+=4),N5(this.buf,this.pos+=4))}N1.create=N3(),N1.prototype._slice=NX.Array.prototype.subarray||NX.Array.prototype.slice,N1.prototype.uint32=(N2=0xffffffff,function(){if(N2=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(N2=(N2|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(N2=(N2|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(N2=(N2|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(N2=(N2|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return N2;if((this.pos+=5)>this.len)throw this.pos=this.len,N0(this,10);return N2}),N1.prototype.int32=function(){return 0|this.uint32()},N1.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},N1.prototype.bool=function(){return 0!==this.uint32()},N1.prototype.fixed32=function(){if(this.pos+4>this.len)throw N0(this,4);return N5(this.buf,this.pos+=4)},N1.prototype.sfixed32=function(){if(this.pos+4>this.len)throw N0(this,4);return 0|N5(this.buf,this.pos+=4)},N1.prototype.float=function(){if(this.pos+4>this.len)throw N0(this,4);var e=NX.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},N1.prototype.double=function(){if(this.pos+8>this.len)throw N0(this,4);var e=NX.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},N1.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw N0(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},N1.prototype.string=function(){var e=this.bytes();return NQ.read(e,0,e.length)},N1.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw N0(this,e);this.pos+=e}else do if(this.pos>=this.len)throw N0(this);while(128&this.buf[this.pos++]);return this},N1.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},N1._configure=function(e){NZ=e,N1.create=N3(),NZ._configure();var t=NX.Long?"toLong":"toNumber";NX.merge(N1.prototype,{int64:function(){return N4.call(this)[t](!1)},uint64:function(){return N4.call(this)[t](!0)},sint64:function(){return N4.call(this).zzDecode()[t](!1)},fixed64:function(){return N8.call(this)[t](!0)},sfixed64:function(){return N8.call(this)[t](!1)}})};var N9=Pt,N7=NK;(Pt.prototype=Object.create(N7.prototype)).constructor=Pt;var Pe=NO();function Pt(e){N7.call(this,e)}Pt._configure=function(){Pe.Buffer&&(Pt.prototype._slice=Pe.Buffer.prototype.slice)},Pt.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},Pt._configure();var Pr={},Pn=Po,Pi=NO();function Po(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");Pi.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}(Po.prototype=Object.create(Pi.EventEmitter.prototype)).constructor=Po,Po.prototype.rpcCall=function e(t,r,n,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return Pi.asPromise(e,a,t,r,n,i);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(e,r){if(e)return a.emit("error",e,t),o(e);if(null!==r){if(!(r instanceof n))try{r=n[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),o(e)}return a.emit("data",r,t),o(null,r)}a.end(!0)})}catch(e){return a.emit("error",e,t),void setTimeout(function(){o(e)},0)}setTimeout(function(){o(Error("already ended"))},0)},Po.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},function(e){e.Service=Pn}(Pr);var Pa={};!function(e){var t=e;function r(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}t.build="minimal",t.Writer=NR,t.BufferWriter=NY,t.Reader=NK,t.BufferReader=N9,t.util=NO(),t.rpc=Pr,t.roots=Pa,t.configure=r,r()}(Nc);var Ps=a(Nc);let Pu={encode:(e,t=Ps.Writer.create())=>(void 0!==e.stringValue&&t.uint32(10).string(e.stringValue),void 0!==e.boolValue&&t.uint32(16).bool(e.boolValue),void 0!==e.intValue&&t.uint32(24).int64(e.intValue),void 0!==e.doubleValue&&t.uint32(33).double(e.doubleValue),void 0!==e.arrayValue&&Pc.encode(e.arrayValue,t.uint32(42).fork()).ldelim(),void 0!==e.kvlistValue&&Pl.encode(e.kvlistValue,t.uint32(50).fork()).ldelim(),void 0!==e.bytesValue&&t.uint32(58).bytes(e.bytesValue),t),decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i={stringValue:void 0,boolValue:void 0,intValue:void 0,doubleValue:void 0,arrayValue:void 0,kvlistValue:void 0,bytesValue:void 0};for(;r.pos>>3){case 1:if(10!==e)break;i.stringValue=r.string();continue;case 2:if(16!==e)break;i.boolValue=r.bool();continue;case 3:if(24!==e)break;i.intValue=Pm(r.int64());continue;case 4:if(33!==e)break;i.doubleValue=r.double();continue;case 5:if(42!==e)break;i.arrayValue=Pc.decode(r,r.uint32());continue;case 6:if(50!==e)break;i.kvlistValue=Pl.decode(r,r.uint32());continue;case 7:if(58!==e)break;i.bytesValue=r.bytes();continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({stringValue:Py(e.stringValue)?globalThis.String(e.stringValue):void 0,boolValue:Py(e.boolValue)?globalThis.Boolean(e.boolValue):void 0,intValue:Py(e.intValue)?globalThis.Number(e.intValue):void 0,doubleValue:Py(e.doubleValue)?globalThis.Number(e.doubleValue):void 0,arrayValue:Py(e.arrayValue)?Pc.fromJSON(e.arrayValue):void 0,kvlistValue:Py(e.kvlistValue)?Pl.fromJSON(e.kvlistValue):void 0,bytesValue:Py(e.bytesValue)?Pp(e.bytesValue):void 0}),toJSON(e){let t={};return void 0!==e.stringValue&&(t.stringValue=e.stringValue),void 0!==e.boolValue&&(t.boolValue=e.boolValue),void 0!==e.intValue&&(t.intValue=Math.round(e.intValue)),void 0!==e.doubleValue&&(t.doubleValue=e.doubleValue),void 0!==e.arrayValue&&(t.arrayValue=Pc.toJSON(e.arrayValue)),void 0!==e.kvlistValue&&(t.kvlistValue=Pl.toJSON(e.kvlistValue)),void 0!==e.bytesValue&&(t.bytesValue=function(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{let t=[];return e.forEach(e=>{t.push(globalThis.String.fromCharCode(e))}),globalThis.btoa(t.join(""))}}(e.bytesValue)),t},create:e=>Pu.fromPartial(null!=e?e:{}),fromPartial(e){var t,r,n,i,o;let a={stringValue:void 0,boolValue:void 0,intValue:void 0,doubleValue:void 0,arrayValue:void 0,kvlistValue:void 0,bytesValue:void 0};return a.stringValue=null!=(t=e.stringValue)?t:void 0,a.boolValue=null!=(r=e.boolValue)?r:void 0,a.intValue=null!=(n=e.intValue)?n:void 0,a.doubleValue=null!=(i=e.doubleValue)?i:void 0,a.arrayValue=void 0!==e.arrayValue&&null!==e.arrayValue?Pc.fromPartial(e.arrayValue):void 0,a.kvlistValue=void 0!==e.kvlistValue&&null!==e.kvlistValue?Pl.fromPartial(e.kvlistValue):void 0,a.bytesValue=null!=(o=e.bytesValue)?o:void 0,a}},Pc={encode(e,t=Ps.Writer.create()){if(void 0!==e.values&&0!==e.values.length)for(let r of e.values)Pu.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i={values:[]};for(;r.pos>>3){case 1:if(10!==e)break;i.values.push(Pu.decode(r,r.uint32()));continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({values:globalThis.Array.isArray(null==e?void 0:e.values)?e.values.map(e=>Pu.fromJSON(e)):[]}),toJSON(e){var t;let r={};return(null==(t=e.values)?void 0:t.length)&&(r.values=e.values.map(e=>Pu.toJSON(e))),r},create:e=>Pc.fromPartial(null!=e?e:{}),fromPartial(e){var t;let r={values:[]};return r.values=(null==(t=e.values)?void 0:t.map(e=>Pu.fromPartial(e)))||[],r}},Pl={encode(e,t=Ps.Writer.create()){if(void 0!==e.values&&0!==e.values.length)for(let r of e.values)Pf.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i={values:[]};for(;r.pos>>3){case 1:if(10!==e)break;i.values.push(Pf.decode(r,r.uint32()));continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({values:globalThis.Array.isArray(null==e?void 0:e.values)?e.values.map(e=>Pf.fromJSON(e)):[]}),toJSON(e){var t;let r={};return(null==(t=e.values)?void 0:t.length)&&(r.values=e.values.map(e=>Pf.toJSON(e))),r},create:e=>Pl.fromPartial(null!=e?e:{}),fromPartial(e){var t;let r={values:[]};return r.values=(null==(t=e.values)?void 0:t.map(e=>Pf.fromPartial(e)))||[],r}},Pf={encode:(e,t=Ps.Writer.create())=>(void 0!==e.key&&""!==e.key&&t.uint32(10).string(e.key),void 0!==e.value&&Pu.encode(e.value,t.uint32(18).fork()).ldelim(),t),decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i={key:"",value:void 0};for(;r.pos>>3){case 1:if(10!==e)break;i.key=r.string();continue;case 2:if(18!==e)break;i.value=Pu.decode(r,r.uint32());continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({key:Py(e.key)?globalThis.String(e.key):"",value:Py(e.value)?Pu.fromJSON(e.value):void 0}),toJSON(e){let t={};return void 0!==e.key&&""!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=Pu.toJSON(e.value)),t},create:e=>Pf.fromPartial(null!=e?e:{}),fromPartial(e){var t;let r={key:"",value:void 0};return r.key=null!=(t=e.key)?t:"",r.value=void 0!==e.value&&null!==e.value?Pu.fromPartial(e.value):void 0,r}},Pd={encode:(e,t=Ps.Writer.create())=>(void 0!==e.name&&""!==e.name&&t.uint32(10).string(e.name),void 0!==e.version&&""!==e.version&&t.uint32(18).string(e.version),t),decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i={name:"",version:""};for(;r.pos>>3){case 1:if(10!==e)break;i.name=r.string();continue;case 2:if(18!==e)break;i.version=r.string();continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({name:Py(e.name)?globalThis.String(e.name):"",version:Py(e.version)?globalThis.String(e.version):""}),toJSON(e){let t={};return void 0!==e.name&&""!==e.name&&(t.name=e.name),void 0!==e.version&&""!==e.version&&(t.version=e.version),t},create:e=>Pd.fromPartial(null!=e?e:{}),fromPartial(e){var t,r;let n={name:"",version:""};return n.name=null!=(t=e.name)?t:"",n.version=null!=(r=e.version)?r:"",n}},Ph={encode:(e,t=Ps.Writer.create())=>(void 0!==e.name&&""!==e.name&&t.uint32(10).string(e.name),void 0!==e.version&&""!==e.version&&t.uint32(18).string(e.version),t),decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i={name:"",version:""};for(;r.pos>>3){case 1:if(10!==e)break;i.name=r.string();continue;case 2:if(18!==e)break;i.version=r.string();continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({name:Py(e.name)?globalThis.String(e.name):"",version:Py(e.version)?globalThis.String(e.version):""}),toJSON(e){let t={};return void 0!==e.name&&""!==e.name&&(t.name=e.name),void 0!==e.version&&""!==e.version&&(t.version=e.version),t},create:e=>Ph.fromPartial(null!=e?e:{}),fromPartial(e){var t,r;let n={name:"",version:""};return n.name=null!=(t=e.name)?t:"",n.version=null!=(r=e.version)?r:"",n}};function Pp(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{let t=globalThis.atob(e),r=new Uint8Array(t.length);for(let e=0;e>>3){case 1:if(10!==e)break;i.attributes.push(Pf.decode(r,r.uint32()));continue;case 2:if(16!==e)break;i.droppedAttributesCount=r.uint32();continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({attributes:globalThis.Array.isArray(null==e?void 0:e.attributes)?e.attributes.map(e=>Pf.fromJSON(e)):[],droppedAttributesCount:Pb(e.droppedAttributesCount)?globalThis.Number(e.droppedAttributesCount):0}),toJSON(e){var t;let r={};return(null==(t=e.attributes)?void 0:t.length)&&(r.attributes=e.attributes.map(e=>Pf.toJSON(e))),void 0!==e.droppedAttributesCount&&0!==e.droppedAttributesCount&&(r.droppedAttributesCount=Math.round(e.droppedAttributesCount)),r},create:e=>Pg.fromPartial(null!=e?e:{}),fromPartial(e){var t,r;let n={attributes:[],droppedAttributesCount:0};return n.attributes=(null==(t=e.attributes)?void 0:t.map(e=>Pf.fromPartial(e)))||[],n.droppedAttributesCount=null!=(r=e.droppedAttributesCount)?r:0,n}};function Pb(e){return null!=e}function Pv(e){switch(e){case 0:case"SEVERITY_NUMBER_UNSPECIFIED":return t.SEVERITY_NUMBER_UNSPECIFIED;case 1:case"SEVERITY_NUMBER_TRACE":return t.SEVERITY_NUMBER_TRACE;case 2:case"SEVERITY_NUMBER_TRACE2":return t.SEVERITY_NUMBER_TRACE2;case 3:case"SEVERITY_NUMBER_TRACE3":return t.SEVERITY_NUMBER_TRACE3;case 4:case"SEVERITY_NUMBER_TRACE4":return t.SEVERITY_NUMBER_TRACE4;case 5:case"SEVERITY_NUMBER_DEBUG":return t.SEVERITY_NUMBER_DEBUG;case 6:case"SEVERITY_NUMBER_DEBUG2":return t.SEVERITY_NUMBER_DEBUG2;case 7:case"SEVERITY_NUMBER_DEBUG3":return t.SEVERITY_NUMBER_DEBUG3;case 8:case"SEVERITY_NUMBER_DEBUG4":return t.SEVERITY_NUMBER_DEBUG4;case 9:case"SEVERITY_NUMBER_INFO":return t.SEVERITY_NUMBER_INFO;case 10:case"SEVERITY_NUMBER_INFO2":return t.SEVERITY_NUMBER_INFO2;case 11:case"SEVERITY_NUMBER_INFO3":return t.SEVERITY_NUMBER_INFO3;case 12:case"SEVERITY_NUMBER_INFO4":return t.SEVERITY_NUMBER_INFO4;case 13:case"SEVERITY_NUMBER_WARN":return t.SEVERITY_NUMBER_WARN;case 14:case"SEVERITY_NUMBER_WARN2":return t.SEVERITY_NUMBER_WARN2;case 15:case"SEVERITY_NUMBER_WARN3":return t.SEVERITY_NUMBER_WARN3;case 16:case"SEVERITY_NUMBER_WARN4":return t.SEVERITY_NUMBER_WARN4;case 17:case"SEVERITY_NUMBER_ERROR":return t.SEVERITY_NUMBER_ERROR;case 18:case"SEVERITY_NUMBER_ERROR2":return t.SEVERITY_NUMBER_ERROR2;case 19:case"SEVERITY_NUMBER_ERROR3":return t.SEVERITY_NUMBER_ERROR3;case 20:case"SEVERITY_NUMBER_ERROR4":return t.SEVERITY_NUMBER_ERROR4;case 21:case"SEVERITY_NUMBER_FATAL":return t.SEVERITY_NUMBER_FATAL;case 22:case"SEVERITY_NUMBER_FATAL2":return t.SEVERITY_NUMBER_FATAL2;case 23:case"SEVERITY_NUMBER_FATAL3":return t.SEVERITY_NUMBER_FATAL3;case 24:case"SEVERITY_NUMBER_FATAL4":return t.SEVERITY_NUMBER_FATAL4;default:return t.UNRECOGNIZED}}!function(e){e[e.SEVERITY_NUMBER_UNSPECIFIED=0]="SEVERITY_NUMBER_UNSPECIFIED",e[e.SEVERITY_NUMBER_TRACE=1]="SEVERITY_NUMBER_TRACE",e[e.SEVERITY_NUMBER_TRACE2=2]="SEVERITY_NUMBER_TRACE2",e[e.SEVERITY_NUMBER_TRACE3=3]="SEVERITY_NUMBER_TRACE3",e[e.SEVERITY_NUMBER_TRACE4=4]="SEVERITY_NUMBER_TRACE4",e[e.SEVERITY_NUMBER_DEBUG=5]="SEVERITY_NUMBER_DEBUG",e[e.SEVERITY_NUMBER_DEBUG2=6]="SEVERITY_NUMBER_DEBUG2",e[e.SEVERITY_NUMBER_DEBUG3=7]="SEVERITY_NUMBER_DEBUG3",e[e.SEVERITY_NUMBER_DEBUG4=8]="SEVERITY_NUMBER_DEBUG4",e[e.SEVERITY_NUMBER_INFO=9]="SEVERITY_NUMBER_INFO",e[e.SEVERITY_NUMBER_INFO2=10]="SEVERITY_NUMBER_INFO2",e[e.SEVERITY_NUMBER_INFO3=11]="SEVERITY_NUMBER_INFO3",e[e.SEVERITY_NUMBER_INFO4=12]="SEVERITY_NUMBER_INFO4",e[e.SEVERITY_NUMBER_WARN=13]="SEVERITY_NUMBER_WARN",e[e.SEVERITY_NUMBER_WARN2=14]="SEVERITY_NUMBER_WARN2",e[e.SEVERITY_NUMBER_WARN3=15]="SEVERITY_NUMBER_WARN3",e[e.SEVERITY_NUMBER_WARN4=16]="SEVERITY_NUMBER_WARN4",e[e.SEVERITY_NUMBER_ERROR=17]="SEVERITY_NUMBER_ERROR",e[e.SEVERITY_NUMBER_ERROR2=18]="SEVERITY_NUMBER_ERROR2",e[e.SEVERITY_NUMBER_ERROR3=19]="SEVERITY_NUMBER_ERROR3",e[e.SEVERITY_NUMBER_ERROR4=20]="SEVERITY_NUMBER_ERROR4",e[e.SEVERITY_NUMBER_FATAL=21]="SEVERITY_NUMBER_FATAL",e[e.SEVERITY_NUMBER_FATAL2=22]="SEVERITY_NUMBER_FATAL2",e[e.SEVERITY_NUMBER_FATAL3=23]="SEVERITY_NUMBER_FATAL3",e[e.SEVERITY_NUMBER_FATAL4=24]="SEVERITY_NUMBER_FATAL4",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(t||(t={})),function(e){e[e.LOG_RECORD_FLAG_UNSPECIFIED=0]="LOG_RECORD_FLAG_UNSPECIFIED",e[e.LOG_RECORD_FLAG_TRACE_FLAGS_MASK=255]="LOG_RECORD_FLAG_TRACE_FLAGS_MASK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(i={}));let P_={encode(e,t=Ps.Writer.create()){if(void 0!==e.resourceLogs&&0!==e.resourceLogs.length)for(let r of e.resourceLogs)PS.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i={resourceLogs:[]};for(;r.pos>>3){case 1:if(10!==e)break;i.resourceLogs.push(PS.decode(r,r.uint32()));continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({resourceLogs:globalThis.Array.isArray(null==e?void 0:e.resourceLogs)?e.resourceLogs.map(e=>PS.fromJSON(e)):[]}),toJSON(e){var t;let r={};return(null==(t=e.resourceLogs)?void 0:t.length)&&(r.resourceLogs=e.resourceLogs.map(e=>PS.toJSON(e))),r},create:e=>P_.fromPartial(null!=e?e:{}),fromPartial(e){var t;let r={resourceLogs:[]};return r.resourceLogs=(null==(t=e.resourceLogs)?void 0:t.map(e=>PS.fromPartial(e)))||[],r}},PS={encode(e,t=Ps.Writer.create()){if(void 0!==e.resource&&Pg.encode(e.resource,t.uint32(10).fork()).ldelim(),void 0!==e.scopeLogs&&0!==e.scopeLogs.length)for(let r of e.scopeLogs)PE.encode(r,t.uint32(18).fork()).ldelim();if(void 0!==e.instrumentationLibraryLogs&&0!==e.instrumentationLibraryLogs.length)for(let r of e.instrumentationLibraryLogs)Pw.encode(r,t.uint32(8002).fork()).ldelim();return void 0!==e.schemaUrl&&""!==e.schemaUrl&&t.uint32(26).string(e.schemaUrl),t},decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i={resource:void 0,scopeLogs:[],instrumentationLibraryLogs:[],schemaUrl:""};for(;r.pos>>3){case 1:if(10!==e)break;i.resource=Pg.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.scopeLogs.push(PE.decode(r,r.uint32()));continue;case 1e3:if(8002!==e)break;i.instrumentationLibraryLogs.push(Pw.decode(r,r.uint32()));continue;case 3:if(26!==e)break;i.schemaUrl=r.string();continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({resource:PR(e.resource)?Pg.fromJSON(e.resource):void 0,scopeLogs:globalThis.Array.isArray(null==e?void 0:e.scopeLogs)?e.scopeLogs.map(e=>PE.fromJSON(e)):[],instrumentationLibraryLogs:globalThis.Array.isArray(null==e?void 0:e.instrumentationLibraryLogs)?e.instrumentationLibraryLogs.map(e=>Pw.fromJSON(e)):[],schemaUrl:PR(e.schemaUrl)?globalThis.String(e.schemaUrl):""}),toJSON(e){var t,r;let n={};return void 0!==e.resource&&(n.resource=Pg.toJSON(e.resource)),(null==(t=e.scopeLogs)?void 0:t.length)&&(n.scopeLogs=e.scopeLogs.map(e=>PE.toJSON(e))),(null==(r=e.instrumentationLibraryLogs)?void 0:r.length)&&(n.instrumentationLibraryLogs=e.instrumentationLibraryLogs.map(e=>Pw.toJSON(e))),void 0!==e.schemaUrl&&""!==e.schemaUrl&&(n.schemaUrl=e.schemaUrl),n},create:e=>PS.fromPartial(null!=e?e:{}),fromPartial(e){var t,r,n;let i={resource:void 0,scopeLogs:[],instrumentationLibraryLogs:[],schemaUrl:""};return i.resource=void 0!==e.resource&&null!==e.resource?Pg.fromPartial(e.resource):void 0,i.scopeLogs=(null==(t=e.scopeLogs)?void 0:t.map(e=>PE.fromPartial(e)))||[],i.instrumentationLibraryLogs=(null==(r=e.instrumentationLibraryLogs)?void 0:r.map(e=>Pw.fromPartial(e)))||[],i.schemaUrl=null!=(n=e.schemaUrl)?n:"",i}},PE={encode(e,t=Ps.Writer.create()){if(void 0!==e.scope&&Ph.encode(e.scope,t.uint32(10).fork()).ldelim(),void 0!==e.logRecords&&0!==e.logRecords.length)for(let r of e.logRecords)Px.encode(r,t.uint32(18).fork()).ldelim();return void 0!==e.schemaUrl&&""!==e.schemaUrl&&t.uint32(26).string(e.schemaUrl),t},decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i={scope:void 0,logRecords:[],schemaUrl:""};for(;r.pos>>3){case 1:if(10!==e)break;i.scope=Ph.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.logRecords.push(Px.decode(r,r.uint32()));continue;case 3:if(26!==e)break;i.schemaUrl=r.string();continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({scope:PR(e.scope)?Ph.fromJSON(e.scope):void 0,logRecords:globalThis.Array.isArray(null==e?void 0:e.logRecords)?e.logRecords.map(e=>Px.fromJSON(e)):[],schemaUrl:PR(e.schemaUrl)?globalThis.String(e.schemaUrl):""}),toJSON(e){var t;let r={};return void 0!==e.scope&&(r.scope=Ph.toJSON(e.scope)),(null==(t=e.logRecords)?void 0:t.length)&&(r.logRecords=e.logRecords.map(e=>Px.toJSON(e))),void 0!==e.schemaUrl&&""!==e.schemaUrl&&(r.schemaUrl=e.schemaUrl),r},create:e=>PE.fromPartial(null!=e?e:{}),fromPartial(e){var t,r;let n={scope:void 0,logRecords:[],schemaUrl:""};return n.scope=void 0!==e.scope&&null!==e.scope?Ph.fromPartial(e.scope):void 0,n.logRecords=(null==(t=e.logRecords)?void 0:t.map(e=>Px.fromPartial(e)))||[],n.schemaUrl=null!=(r=e.schemaUrl)?r:"",n}},Pw={encode(e,t=Ps.Writer.create()){if(void 0!==e.instrumentationLibrary&&Pd.encode(e.instrumentationLibrary,t.uint32(10).fork()).ldelim(),void 0!==e.logRecords&&0!==e.logRecords.length)for(let r of e.logRecords)Px.encode(r,t.uint32(18).fork()).ldelim();return void 0!==e.schemaUrl&&""!==e.schemaUrl&&t.uint32(26).string(e.schemaUrl),t},decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i={instrumentationLibrary:void 0,logRecords:[],schemaUrl:""};for(;r.pos>>3){case 1:if(10!==e)break;i.instrumentationLibrary=Pd.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.logRecords.push(Px.decode(r,r.uint32()));continue;case 3:if(26!==e)break;i.schemaUrl=r.string();continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({instrumentationLibrary:PR(e.instrumentationLibrary)?Pd.fromJSON(e.instrumentationLibrary):void 0,logRecords:globalThis.Array.isArray(null==e?void 0:e.logRecords)?e.logRecords.map(e=>Px.fromJSON(e)):[],schemaUrl:PR(e.schemaUrl)?globalThis.String(e.schemaUrl):""}),toJSON(e){var t;let r={};return void 0!==e.instrumentationLibrary&&(r.instrumentationLibrary=Pd.toJSON(e.instrumentationLibrary)),(null==(t=e.logRecords)?void 0:t.length)&&(r.logRecords=e.logRecords.map(e=>Px.toJSON(e))),void 0!==e.schemaUrl&&""!==e.schemaUrl&&(r.schemaUrl=e.schemaUrl),r},create:e=>Pw.fromPartial(null!=e?e:{}),fromPartial(e){var t,r;let n={instrumentationLibrary:void 0,logRecords:[],schemaUrl:""};return n.instrumentationLibrary=void 0!==e.instrumentationLibrary&&null!==e.instrumentationLibrary?Pd.fromPartial(e.instrumentationLibrary):void 0,n.logRecords=(null==(t=e.logRecords)?void 0:t.map(e=>Px.fromPartial(e)))||[],n.schemaUrl=null!=(r=e.schemaUrl)?r:"",n}};function PT(){return{timeUnixNano:0,observedTimeUnixNano:0,severityNumber:0,severityText:"",body:void 0,attributes:[],droppedAttributesCount:0,flags:0,traceId:new Uint8Array(0),spanId:new Uint8Array(0)}}let Px={encode(e,t=Ps.Writer.create()){if(void 0!==e.timeUnixNano&&0!==e.timeUnixNano&&t.uint32(9).fixed64(e.timeUnixNano),void 0!==e.observedTimeUnixNano&&0!==e.observedTimeUnixNano&&t.uint32(89).fixed64(e.observedTimeUnixNano),void 0!==e.severityNumber&&0!==e.severityNumber&&t.uint32(16).int32(e.severityNumber),void 0!==e.severityText&&""!==e.severityText&&t.uint32(26).string(e.severityText),void 0!==e.body&&Pu.encode(e.body,t.uint32(42).fork()).ldelim(),void 0!==e.attributes&&0!==e.attributes.length)for(let r of e.attributes)Pf.encode(r,t.uint32(50).fork()).ldelim();return void 0!==e.droppedAttributesCount&&0!==e.droppedAttributesCount&&t.uint32(56).uint32(e.droppedAttributesCount),void 0!==e.flags&&0!==e.flags&&t.uint32(69).fixed32(e.flags),void 0!==e.traceId&&0!==e.traceId.length&&t.uint32(74).bytes(e.traceId),void 0!==e.spanId&&0!==e.spanId.length&&t.uint32(82).bytes(e.spanId),t},decode(e,t){let r=e instanceof Ps.Reader?e:Ps.Reader.create(e),n=void 0===t?r.len:r.pos+t,i=PT();for(;r.pos>>3){case 1:if(9!==e)break;i.timeUnixNano=PM(r.fixed64());continue;case 11:if(89!==e)break;i.observedTimeUnixNano=PM(r.fixed64());continue;case 2:if(16!==e)break;i.severityNumber=r.int32();continue;case 3:if(26!==e)break;i.severityText=r.string();continue;case 5:if(42!==e)break;i.body=Pu.decode(r,r.uint32());continue;case 6:if(50!==e)break;i.attributes.push(Pf.decode(r,r.uint32()));continue;case 7:if(56!==e)break;i.droppedAttributesCount=r.uint32();continue;case 8:if(69!==e)break;i.flags=r.fixed32();continue;case 9:if(74!==e)break;i.traceId=r.bytes();continue;case 10:if(82!==e)break;i.spanId=r.bytes();continue}if(4==(7&e)||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({timeUnixNano:PR(e.timeUnixNano)?globalThis.Number(e.timeUnixNano):0,observedTimeUnixNano:PR(e.observedTimeUnixNano)?globalThis.Number(e.observedTimeUnixNano):0,severityNumber:PR(e.severityNumber)?Pv(e.severityNumber):0,severityText:PR(e.severityText)?globalThis.String(e.severityText):"",body:PR(e.body)?Pu.fromJSON(e.body):void 0,attributes:globalThis.Array.isArray(null==e?void 0:e.attributes)?e.attributes.map(e=>Pf.fromJSON(e)):[],droppedAttributesCount:PR(e.droppedAttributesCount)?globalThis.Number(e.droppedAttributesCount):0,flags:PR(e.flags)?globalThis.Number(e.flags):0,traceId:PR(e.traceId)?PA(e.traceId):new Uint8Array(0),spanId:PR(e.spanId)?PA(e.spanId):new Uint8Array(0)}),toJSON(e){var r;let n={};return void 0!==e.timeUnixNano&&0!==e.timeUnixNano&&(n.timeUnixNano=Math.round(e.timeUnixNano)),void 0!==e.observedTimeUnixNano&&0!==e.observedTimeUnixNano&&(n.observedTimeUnixNano=Math.round(e.observedTimeUnixNano)),void 0!==e.severityNumber&&0!==e.severityNumber&&(n.severityNumber=function(e){switch(e){case t.SEVERITY_NUMBER_UNSPECIFIED:return"SEVERITY_NUMBER_UNSPECIFIED";case t.SEVERITY_NUMBER_TRACE:return"SEVERITY_NUMBER_TRACE";case t.SEVERITY_NUMBER_TRACE2:return"SEVERITY_NUMBER_TRACE2";case t.SEVERITY_NUMBER_TRACE3:return"SEVERITY_NUMBER_TRACE3";case t.SEVERITY_NUMBER_TRACE4:return"SEVERITY_NUMBER_TRACE4";case t.SEVERITY_NUMBER_DEBUG:return"SEVERITY_NUMBER_DEBUG";case t.SEVERITY_NUMBER_DEBUG2:return"SEVERITY_NUMBER_DEBUG2";case t.SEVERITY_NUMBER_DEBUG3:return"SEVERITY_NUMBER_DEBUG3";case t.SEVERITY_NUMBER_DEBUG4:return"SEVERITY_NUMBER_DEBUG4";case t.SEVERITY_NUMBER_INFO:return"SEVERITY_NUMBER_INFO";case t.SEVERITY_NUMBER_INFO2:return"SEVERITY_NUMBER_INFO2";case t.SEVERITY_NUMBER_INFO3:return"SEVERITY_NUMBER_INFO3";case t.SEVERITY_NUMBER_INFO4:return"SEVERITY_NUMBER_INFO4";case t.SEVERITY_NUMBER_WARN:return"SEVERITY_NUMBER_WARN";case t.SEVERITY_NUMBER_WARN2:return"SEVERITY_NUMBER_WARN2";case t.SEVERITY_NUMBER_WARN3:return"SEVERITY_NUMBER_WARN3";case t.SEVERITY_NUMBER_WARN4:return"SEVERITY_NUMBER_WARN4";case t.SEVERITY_NUMBER_ERROR:return"SEVERITY_NUMBER_ERROR";case t.SEVERITY_NUMBER_ERROR2:return"SEVERITY_NUMBER_ERROR2";case t.SEVERITY_NUMBER_ERROR3:return"SEVERITY_NUMBER_ERROR3";case t.SEVERITY_NUMBER_ERROR4:return"SEVERITY_NUMBER_ERROR4";case t.SEVERITY_NUMBER_FATAL:return"SEVERITY_NUMBER_FATAL";case t.SEVERITY_NUMBER_FATAL2:return"SEVERITY_NUMBER_FATAL2";case t.SEVERITY_NUMBER_FATAL3:return"SEVERITY_NUMBER_FATAL3";case t.SEVERITY_NUMBER_FATAL4:return"SEVERITY_NUMBER_FATAL4";case t.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.severityNumber)),void 0!==e.severityText&&""!==e.severityText&&(n.severityText=e.severityText),void 0!==e.body&&(n.body=Pu.toJSON(e.body)),(null==(r=e.attributes)?void 0:r.length)&&(n.attributes=e.attributes.map(e=>Pf.toJSON(e))),void 0!==e.droppedAttributesCount&&0!==e.droppedAttributesCount&&(n.droppedAttributesCount=Math.round(e.droppedAttributesCount)),void 0!==e.flags&&0!==e.flags&&(n.flags=Math.round(e.flags)),void 0!==e.traceId&&0!==e.traceId.length&&(n.traceId=PO(e.traceId)),void 0!==e.spanId&&0!==e.spanId.length&&(n.spanId=PO(e.spanId)),n},create:e=>Px.fromPartial(null!=e?e:{}),fromPartial(e){var t,r,n,i,o,a,s,u,c;let l=PT();return l.timeUnixNano=null!=(t=e.timeUnixNano)?t:0,l.observedTimeUnixNano=null!=(r=e.observedTimeUnixNano)?r:0,l.severityNumber=null!=(n=e.severityNumber)?n:0,l.severityText=null!=(i=e.severityText)?i:"",l.body=void 0!==e.body&&null!==e.body?Pu.fromPartial(e.body):void 0,l.attributes=(null==(o=e.attributes)?void 0:o.map(e=>Pf.fromPartial(e)))||[],l.droppedAttributesCount=null!=(a=e.droppedAttributesCount)?a:0,l.flags=null!=(s=e.flags)?s:0,l.traceId=null!=(u=e.traceId)?u:new Uint8Array(0),l.spanId=null!=(c=e.spanId)?c:new Uint8Array(0),l}};function PA(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{let t=globalThis.atob(e),r=new Uint8Array(t.length);for(let e=0;e{t.push(globalThis.String.fromCharCode(e))}),globalThis.btoa(t.join(""))}}function PM(e){if(e.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e.toNumber()}function PR(e){return null!=e}Ps.util.Long!==IZ&&(Ps.util.Long=IZ,Ps.configure());let PC="0.16.2",PI={"Content-Type":"application/x-protobuf","Content-Encoding":"gzip"},PN=P_;function PP(e){return Array.isArray(e)}function Pk(e){return!function(e){return!!e&&"object"==typeof e&&!PP(e)}(e)?PP(e)?{arrayValue:{values:e.map(e=>Pk(e))}}:"string"==typeof e?{stringValue:e}:"number"==typeof e?{doubleValue:e}:"boolean"==typeof e?{boolValue:e}:{}:{kvlistValue:{values:Object.entries(e).map(([e,t])=>({key:e,value:Pk(t)}))}}}class PD{constructor(e){this.config=e}constructLogData(e){var t,r,n;return{resourceLogs:[{resource:{attributes:null==(n=null==(r=Pk((null==(t=this.config.resource)?void 0:t.attributes)||{}))?void 0:r.kvlistValue)?void 0:n.values},scopeLogs:[{scope:{name:"rum.rr-web",version:PC},logRecords:e.map(e=>{var t;return{body:Pk(e.body),timeUnixNano:1e6*e.timeUnixNano,attributes:null==(t=Pk(e.attributes||{}).kvlistValue)?void 0:t.values}})}]}]}}export(e){if(0===e.length)return;let t=this.constructLogData(e);this.config.debug&&console.log("otlp request",t);let r=IH(PN.encode(t).finish()),n=this.config.headers?Object.assign({},PI,this.config.headers):PI;fetch(this.config.beaconUrl,{method:"POST",body:r,headers:n}).catch(()=>{})}}class PL{constructor(e,t){this.logs=[],this.scheduledDelayMillis=(null==t?void 0:t.scheduledDelayMillis)||5e3,this.exporter=e,window.addEventListener("unload",()=>{this._flushAll()})}onLog(e){this.logs.push(e),void 0===this.timeout&&(this.timeout=setTimeout(()=>{this.timeout=void 0,this._flushAll()},this.scheduledDelayMillis))}_flushAll(){this.lastBatchSent=Date.now(),th.with(TU(th.active()),()=>{let e=this.logs.splice(0,this.logs.length);this.exporter.export(e)})}}function Pj(e,t,r){return{body:e,timeUnixNano:t,attributes:r}}class PU{constructor(e,t={}){var r,n;this.rrweb=e,this.options=t,this.bucketSize=100,this.refillRate=10,this.mutationBuckets={},this.loggedTracker={},this.refillBuckets=()=>{Object.keys(this.mutationBuckets).forEach(e=>{this.mutationBuckets[e]=this.mutationBuckets[e]+this.refillRate,this.mutationBuckets[e]>=this.bucketSize&&delete this.mutationBuckets[e]})},this.getNodeOrRelevantParent=e=>{let t=this.rrweb.mirror.getNode(e);if("svg"!==(null==t?void 0:t.nodeName)&&t instanceof Element){let e=t.closest("svg");if(e)return[this.rrweb.mirror.getId(e),e]}return[e,t]},this.numberOfChanges=e=>{var t,r,n,i,o,a,s,u;return(null!=(r=null==(t=e.removes)?void 0:t.length)?r:0)+(null!=(i=null==(n=e.attributes)?void 0:n.length)?i:0)+(null!=(a=null==(o=e.texts)?void 0:o.length)?a:0)+(null!=(u=null==(s=e.adds)?void 0:s.length)?u:0)},this.throttleMutations=e=>{if(3!==e.type||0!==e.data.source)return e;let t=e.data,r=this.numberOfChanges(t);t.attributes&&(t.attributes=t.attributes.filter(e=>{var t,r,n;let[i,o]=this.getNodeOrRelevantParent(e.id);return 0!==this.mutationBuckets[i]&&(this.mutationBuckets[i]=null!=(t=this.mutationBuckets[i])?t:this.bucketSize,this.mutationBuckets[i]=Math.max(this.mutationBuckets[i]-1,0),0===this.mutationBuckets[i]&&(this.loggedTracker[i]||(this.loggedTracker[i]=!0,null==(n=(r=this.options).onBlockedNode)||n.call(r,i,o))),e)}));let n=this.numberOfChanges(t);return 0!==n||r===n?e:void 0},this.refillRate=null!=(r=this.options.refillRate)?r:this.refillRate,this.bucketSize=null!=(n=this.options.bucketSize)?n:this.bucketSize,setInterval(()=>{this.refillBuckets()},1e3)}}var PB=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){var i=0;for(n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};let PF=972800,Pz=new TextEncoder,P$=new TextDecoder,PV,PY,Pq,PH,PW=!1,PG=0,PZ=!1,PK=1,PX=1,PJ={get inited(){return!!PW},init(e){if(PW)return;if("u"{let r=`OpenTelemetry Session Recorder: Rate limiting recording mutations on node ${e}. This can be due to excessive animations.`,n=Date.now(),i=PV.startSpan("console.warn",{kind:te.INTERNAL,startTime:n});i.setAttribute("component","console"),i.setAttribute("level","warn"),i.setAttribute("message",r),i.end(n),o&&console.warn(r,t),clearTimeout(PH),PH=setTimeout(()=>{Id.takeFullSnapshot()},1e3)}}),PW=Id(Object.assign(Object.assign({maskAllInputs:!0,maskTextSelector:"*"},a),{emit(e){if(PZ)return;if(r.attributes["rum.sessionId"]!==PY){if(document.hidden)return;PY=r.attributes["rum.sessionId"],PG=Date.now(),PK=1,PX=1,Id.takeFullSnapshot()}if(e.timestamp>PG+1446e4)return;let t=Pq?Pq.throttleMutations(e):e;if(!t)return;let n=t.timestamp,i=PK++,a=Pz.encode(function(e){if(e.length>5e6){let t=/data:([\w/\-.]+);(\w+),([^)"]*)/gim;for(let r of e.matchAll(t))e="image/"===r[1].toLocaleLowerCase().slice(0,6)?e.replace(r[0],"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg=="):e.replace(r[0],"")}return e}(JSON.stringify(t))),s=Math.ceil(a.byteLength/PF);for(let e=0;etypeof window}return new class{constructor(){this._advancedNetworkCapture=!1}init({advancedNetworkCapture:e=!1,apiKey:t,blockClass:r,captureConsole:n,consoleCapture:i,debug:o=!1,disableIntercom:a=!1,disableReplay:s=!1,ignoreClass:u,ignoreUrls:c,instrumentations:l={},maskAllInputs:f=!0,maskAllText:d=!1,maskClass:h,recordCanvas:p=!1,sampling:m,service:y,tracePropagationTargets:g,url:b}){var v;if(!PQ())return;null==t?console.warn("HyperDX: Missing apiKey, telemetry will not be saved."):""===t?console.warn("HyperDX: apiKey is empty string, telemetry will not be saved."):"string"!=typeof t&&console.warn("HyperDX: apiKey must be a string, telemetry will not be saved.");let _=null!=b?b:"https://in-otel.hyperdx.io";this._advancedNetworkCapture=e,RQ.init({debug:o,url:`${_}/v1/traces`,allowInsecureUrl:!0,apiKey:t,app:y,ignoreUrls:c,instrumentations:{visibility:!0,console:null!=(v=null!=n?n:i)&&v,fetch:{...null!=g?{propagateTraceHeaderCorsUrls:g}:{},advancedNetworkCapture:()=>this._advancedNetworkCapture},xhr:{...null!=g?{propagateTraceHeaderCorsUrls:g}:{},advancedNetworkCapture:()=>this._advancedNetworkCapture},...l}}),!0!==s&&PJ.init({apiKey:t,blockClass:r,debug:o,ignoreClass:u,maskAllInputs:f,maskTextClass:h,maskTextSelector:d?"*":void 0,recordCanvas:p,sampling:m,url:`${_}/v1/logs`});let S=tC.trace.getTracer("@hyperdx/browser");!0!==a&&(function(e){return new Promise((t,r)=>{let n=0,i=setInterval(()=>{n>20&&(clearInterval(i),r(Error(`Global ${e} not found`))),window[e]&&(clearInterval(i),t(window[e])),n++},100)})})("Intercom").then(()=>{window.Intercom("onShow",()=>{let e=this.getSessionUrl();if(null!=e){let t={hyperdxSessionUrl:e};window.Intercom("update",t),window.Intercom("trackEvent","HyperDX",t);let r=Date.now(),n=S.startSpan("intercom.onShow",{startTime:r});n.setAttribute("component","intercom"),n.end(r)}})}).catch(()=>{})}stopSessionRecorder(){PQ()&&PJ.stop()}resumeSessionRecorder(){PQ()&&PJ.resume()}addAction(e,t){PQ()&&RQ.addAction(e,t)}recordException(e,t){PQ()&&RQ.recordException(e,t)}enableAdvancedNetworkCapture(){this._advancedNetworkCapture=!0}disableAdvancedNetworkCapture(){this._advancedNetworkCapture=!1}setGlobalAttributes(e){PQ()&&RQ.setGlobalAttributes(e)}getSessionId(){return RQ.getSessionId()}getSessionUrl(){let e=Date.now(),t=e-144e5,r=e+144e5;return RQ.inited?`https://www.hyperdx.io/sessions?q=process.tag.rum.sessionId%3A"${RQ.getSessionId()}"&sid=${RQ.getSessionId()}&sfrom=${t}&sto=${r}&ts=${e}`:void 0}attachToReactErrorBoundary(e){if(!e)return console.warn("Attempted to attach to an ErrorBoundary that does not exist.");let t=this.recordException,r=e.prototype.componentDidCatch;e.prototype.componentDidCatch=function(e,n){t(e,{componentStack:null==n?void 0:n.componentStack}),r.call(this,e,n)}}}})},16638:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},17547:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultErrorMap=void 0,t.setErrorMap=a,t.getErrorMap=s;let i=n(r(40467));t.defaultErrorMap=i.default;let o=i.default;function a(e){o=e}function s(){return o}},18e3:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=void 0,t.isBrowser=function(){return!!("u">typeof window&&window.__ENV)}},19086:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(64892),i=r(45859);let o=(e,t)=>{let r;switch(e.code){case n.eq.invalid_type:r=e.received===i.Zp.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case n.eq.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,i.ZS.jsonStringifyReplacer)}`;break;case n.eq.unrecognized_keys:r=`Unrecognized key(s) in object: ${i.ZS.joinValues(e.keys,", ")}`;break;case n.eq.invalid_union:r="Invalid input";break;case n.eq.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${i.ZS.joinValues(e.options)}`;break;case n.eq.invalid_enum_value:r=`Invalid enum value. Expected ${i.ZS.joinValues(e.options)}, received '${e.received}'`;break;case n.eq.invalid_arguments:r="Invalid function arguments";break;case n.eq.invalid_return_type:r="Invalid function return type";break;case n.eq.invalid_date:r="Invalid date";break;case n.eq.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:i.ZS.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case n.eq.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case n.eq.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case n.eq.custom:r="Invalid input";break;case n.eq.invalid_intersection_types:r="Intersection results could not be merged";break;case n.eq.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case n.eq.not_finite:r="Number must be finite";break;default:r=t.defaultError,i.ZS.assertNever(e)}return{message:r}}},19589:(e,t,r)=>{"use strict";r.d(t,{K:()=>c});var n=r(6029);r(55729);var i=r(85824),o=r(78704);function a(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function s(e){return(0,o.H)(e).reduce((t,r)=>void 0!==e[r]?`${t}${a(r)}:${e[r]};`:t,"").trim()}function u({selector:e,styles:t,media:r,container:n}){let i=t?s(t):"",o=Array.isArray(r)?r.map(t=>`@media${t.query}{${e}{${s(t.styles)}}}`):[],a=Array.isArray(n)?n.map(t=>`@container ${t.query}{${e}{${s(t.styles)}}}`):[];return`${i?`${e}{${i}}`:""}${o.join("")}${a.join("")}`.trim()}function c(e){let t=(0,i.WV)();return(0,n.jsx)("style",{"data-mantine-styles":"inline",nonce:t?.(),dangerouslySetInnerHTML:{__html:u(e)}})}},19848:(e,t,r)=>{"use strict";r.d(t,{m:()=>o});var n=r(24090),i=r(4308),o=new class extends n.Q{#s;#t;#r;constructor(){super(),this.#r=e=>{if(!i.S$&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#s!==e&&(this.#s=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#s?this.#s:globalThis.document?.visibilityState!=="hidden"}}},20158:(e,t,r)=>{"use strict";r.d(t,{J:()=>y});var n=r(6029),i=r(26615),o=r(55729),a=r(76),s=r(5618),u=r(80616),c=r(37666),l=r(63863),f=r(8737);let d=(0,o.forwardRef)(({size:e="var(--cb-icon-size, 70%)",style:t,...r},i)=>(0,n.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:i,...r,children:(0,n.jsx)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));d.displayName="@mantine/core/CloseIcon";var h={root:"m_86a44da5","root--subtle":"m_220c80f2"};let p={variant:"subtle"},m=(0,s.V)((e,{size:t,radius:r,iconSize:n})=>({root:{"--cb-size":(0,a.YC)(t,"cb-size"),"--cb-radius":void 0===r?void 0:(0,a.nJ)(r),"--cb-icon-size":(0,i.D)(n)}})),y=(0,l.v)((e,t)=>{let r=(0,u.Y)("CloseButton",p,e),{iconSize:i,children:o,vars:a,radius:s,className:l,classNames:y,style:g,styles:b,unstyled:v,"data-disabled":_,disabled:S,variant:E,icon:w,mod:T,__staticSelector:x,...A}=r,O=(0,c.I)({name:x||"CloseButton",props:r,className:l,style:g,classes:h,classNames:y,styles:b,unstyled:v,vars:a,varsResolver:m});return(0,n.jsxs)(f.N,{ref:t,...A,unstyled:v,variant:E,disabled:S,mod:[{disabled:S||_},T],...O("root",{variant:E,active:!S&&!_}),children:[w||(0,n.jsx)(d,{}),o]})});y.classes=h,y.displayName="@mantine/core/CloseButton"},20586:(e,t,r)=>{"use strict";var n=r(29143);Object.defineProperty(t,"__esModule",{value:!0}),t.env=void 0;let i=r(18e3);t.env=function(e){return(0,i.isBrowser)()?window.__ENV[e]:n.env[e]}},21093:(e,t,r)=>{"use strict";var n,i=r(83639),o=r(27654);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!n&&o&&o(Object.prototype,"__proto__"),s=Object,u=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?i([a.get]):"function"==typeof u&&function(e){return u(null==e?e:s(e))}},21667:(e,t,r)=>{"use strict";var n=r(24813),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=function(e,t,r){for(var n=0,i=e.length;n=3&&(i=r),c(e)?a(e,t,i):"string"==typeof e?s(e,t,i):u(e,t,i)}},21981:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(41742),i=r(89250);function o(e){(0,i.A)(1,arguments);var t=(0,n.A)(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}},22497:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(47971),i=r(41742),o=r(89250);function a(e){return(0,o.A)(1,arguments),(!!(0,n.A)(e)||"number"==typeof e)&&!isNaN(Number((0,i.A)(e)))}},22623:(e,t,r)=>{"use strict";r.d(t,{t:()=>h});var n=r(6029);r(55729);var i=r(76),o=r(5618),a=r(80616),s=r(37666),u=r(60481),c=r(63863),l={root:"m_1b7284a3"};let f={},d=(0,o.V)((e,{radius:t,shadow:r})=>({root:{"--paper-radius":void 0===t?void 0:(0,i.nJ)(t),"--paper-shadow":(0,i.dh)(r)}})),h=(0,c.v)((e,t)=>{let r=(0,a.Y)("Paper",f,e),{classNames:i,className:o,style:c,styles:h,unstyled:p,withBorder:m,vars:y,radius:g,shadow:b,variant:v,mod:_,...S}=r,E=(0,s.I)({name:"Paper",props:r,classes:l,className:o,style:c,classNames:i,styles:h,unstyled:p,vars:y,varsResolver:d});return(0,n.jsx)(u.a,{ref:t,mod:[{"data-with-border":m},_],...E("root"),variant:v,...S})});h.classes=l,h.displayName="@mantine/core/Paper"},22843:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var n=s(r(3514)),i=s(r(42462)),o=s(r(78229)),a=r(31055);function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){(0,i.default)(1,arguments);var r,s,u,c,l,f,d,h,p=(0,a.getDefaultOptions)(),m=(0,o.default)(null!=(r=null!=(s=null!=(u=null!=(c=null==t?void 0:t.weekStartsOn)?c:null==t||null==(l=t.locale)||null==(f=l.options)?void 0:f.weekStartsOn)?u:p.weekStartsOn)?s:null==(d=p.locale)||null==(h=d.options)?void 0:h.weekStartsOn)?r:0);if(!(m>=0&&m<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var y=(0,n.default)(e),g=y.getUTCDay(),b=7*(g{"use strict";r.d(t,{u:()=>o});var n={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},i="trunc";function o(e){return e?n[e]:n[i]}},24090:(e,t,r)=>{"use strict";r.d(t,{Q:()=>n});var n=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},24345:(e,t,r)=>{"use strict";var n=r(21667),i=r(96779),o=r(62094),a=r(81074),s=r(27654),u=a("Object.prototype.toString"),c=r(27721)(),l="u"-1?t:"Object"===t&&g(e)}return s?y(e):null}},24708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var n=s(r(3514)),i=s(r(22843)),o=s(r(34738)),a=s(r(42462));function s(e){return e&&e.__esModule?e:{default:e}}var u=6048e5;function c(e,t){(0,a.default)(1,arguments);var r=(0,n.default)(e);return Math.round(((0,i.default)(r,t).getTime()-(0,o.default)(r,t).getTime())/u)+1}e.exports=t.default},24813:e=>{"use strict";var t,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i(function(){throw 42},null,t)}catch(e){e!==r&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(e){try{var t=n.call(e);return o.test(t)}catch(e){return!1}},s=function(e){try{if(a(e))return!1;return n.call(e),!0}catch(e){return!1}},u=Object.prototype.toString,c="[object Object]",l="[object Function]",f="[object GeneratorFunction]",d="[object HTMLAllCollection]",h="[object HTML document.all class]",p="[object HTMLCollection]",m="function"==typeof Symbol&&!!Symbol.toStringTag,y=!(0 in[,]),g=function(){return!1};if("object"==typeof document){var b=document.all;u.call(b)===u.call(document.all)&&(g=function(e){if((y||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return(t===d||t===h||t===p||t===c)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(g(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==r)return!1}return!a(e)&&s(e)}:function(e){if(g(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;if(m)return s(e);if(a(e))return!1;var t=u.call(e);return(t===l||t===f||!!/^\[object HTML/.test(t))&&s(e)}},24935:(e,t,r)=>{"use strict";r.d(t,{B:()=>u});var n=r(55729),i=r(3001);function o(e,t,r){for(let r=e-1;r>=0;r-=1)if(!t[r].hasAttribute("data-combobox-disabled"))return r;if(r){for(let e=t.length-1;e>-1;e-=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e}return e}function a(e,t,r){for(let r=e+1;r{h||(p(!0),l?.(e))},[p,l,h]),w=(0,n.useCallback)((e="unknown")=>{h&&(p(!1),c?.(e))},[p,c,h]),T=(0,n.useCallback)((e="unknown")=>{h?w(e):E(e)},[w,E,h]),x=(0,n.useCallback)(()=>{let e=document.querySelector(`#${m.current} [data-combobox-selected]`);e?.removeAttribute("data-combobox-selected"),e?.removeAttribute("aria-selected")},[]),A=(0,n.useCallback)(e=>{let t=document.getElementById(m.current),r=t?.querySelectorAll("[data-combobox-option]");if(!r)return null;let n=e>=r.length?0:e<0?r.length-1:e;return(y.current=n,r?.[n]&&!r[n].hasAttribute("data-combobox-disabled"))?(x(),r[n].setAttribute("data-combobox-selected","true"),r[n].setAttribute("aria-selected","true"),r[n].scrollIntoView({block:"nearest",behavior:d}),r[n].id):null},[d,x]),O=(0,n.useCallback)(()=>{let e=document.querySelector(`#${m.current} [data-combobox-active]`);return e?A(Array.from(document.querySelectorAll(`#${m.current} [data-combobox-option]`)).findIndex(t=>t===e)):A(0)},[A]),M=(0,n.useCallback)(()=>A(a(y.current,document.querySelectorAll(`#${m.current} [data-combobox-option]`),f)),[A,f]),R=(0,n.useCallback)(()=>A(o(y.current,document.querySelectorAll(`#${m.current} [data-combobox-option]`),f)),[A,f]),C=(0,n.useCallback)(()=>A(s(document.querySelectorAll(`#${m.current} [data-combobox-option]`))),[A]),I=(0,n.useCallback)((e="selected",t)=>{S.current=window.setTimeout(()=>{let r=document.querySelectorAll(`#${m.current} [data-combobox-option]`),n=Array.from(r).findIndex(t=>t.hasAttribute(`data-combobox-${e}`));y.current=n,t?.scrollIntoView&&r[n]?.scrollIntoView({block:"nearest",behavior:d})},0)},[]),N=(0,n.useCallback)(()=>{y.current=-1,x()},[x]),P=(0,n.useCallback)(()=>{let e=document.querySelectorAll(`#${m.current} [data-combobox-option]`),t=e?.[y.current];t?.click()},[]),k=(0,n.useCallback)(e=>{m.current=e},[]),D=(0,n.useCallback)(()=>{v.current=window.setTimeout(()=>g.current.focus(),0)},[]),L=(0,n.useCallback)(()=>{_.current=window.setTimeout(()=>b.current.focus(),0)},[]),j=(0,n.useCallback)(()=>y.current,[]);return(0,n.useEffect)(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(_.current),window.clearTimeout(S.current)},[]),{dropdownOpened:h,openDropdown:E,closeDropdown:w,toggleDropdown:T,selectedOptionIndex:y.current,getSelectedOptionIndex:j,selectOption:A,selectFirstOption:C,selectActiveOption:O,selectNextOption:M,selectPreviousOption:R,resetSelectedOption:N,updateSelectedOptionIndex:I,listId:m.current,setListId:k,clickSelectedOption:P,searchRef:g,focusSearchInput:D,targetRef:b,focusTarget:L}}},25062:(e,t,r)=>{"use strict";r.d(t,{$:()=>x});var n=r(6029),i=r(26615);r(55729);var o=r(76),a=r(5618),s=r(80616),u=r(37666),c=r(60481),l=r(63863),f=r(94720),d=r(56738),h=r(8737),p=r(43016),m={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};let y={orientation:"horizontal"},g=(0,a.V)((e,{borderWidth:t})=>({group:{"--button-border-width":(0,i.D)(t)}})),b=(0,p.P9)((e,t)=>{let r=(0,s.Y)("ButtonGroup",y,e),{className:i,style:o,classNames:a,styles:l,unstyled:f,orientation:d,vars:h,borderWidth:p,variant:b,mod:v,..._}=(0,s.Y)("ButtonGroup",y,e),S=(0,u.I)({name:"ButtonGroup",props:r,classes:m,className:i,style:o,classNames:a,styles:l,unstyled:f,vars:h,varsResolver:g,rootSelector:"group"});return(0,n.jsx)(c.a,{...S("group"),ref:t,variant:b,mod:[{"data-orientation":d},v],role:"group",..._})});b.classes=m,b.displayName="@mantine/core/ButtonGroup";let v={},_=(0,a.V)((e,{radius:t,color:r,gradient:n,variant:i,autoContrast:a,size:s})=>{let u=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:i||"filled",autoContrast:a});return{groupSection:{"--section-height":(0,o.YC)(s,"section-height"),"--section-padding-x":(0,o.YC)(s,"section-padding-x"),"--section-fz":s?.includes("compact")?(0,o.ny)(s.replace("compact-","")):(0,o.ny)(s),"--section-radius":void 0===t?void 0:(0,o.nJ)(t),"--section-bg":r||i?u.background:void 0,"--section-color":u.color,"--section-bd":r||i?u.border:void 0}}}),S=(0,p.P9)((e,t)=>{let r=(0,s.Y)("ButtonGroupSection",v,e),{className:i,style:o,classNames:a,styles:l,unstyled:f,vars:d,variant:h,gradient:p,radius:y,autoContrast:g,...b}=(0,s.Y)("ButtonGroupSection",v,e),S=(0,u.I)({name:"ButtonGroupSection",props:r,classes:m,className:i,style:o,classNames:a,styles:l,unstyled:f,vars:d,varsResolver:_,rootSelector:"groupSection"});return(0,n.jsx)(c.a,{...S("groupSection"),ref:t,variant:h,...b})});S.classes=m,S.displayName="@mantine/core/ButtonGroupSection";let E={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${(0,i.D)(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},w={},T=(0,a.V)((e,{radius:t,color:r,gradient:n,variant:i,size:a,justify:s,autoContrast:u})=>{let c=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:i||"filled",autoContrast:u});return{root:{"--button-justify":s,"--button-height":(0,o.YC)(a,"button-height"),"--button-padding-x":(0,o.YC)(a,"button-padding-x"),"--button-fz":a?.includes("compact")?(0,o.ny)(a.replace("compact-","")):(0,o.ny)(a),"--button-radius":void 0===t?void 0:(0,o.nJ)(t),"--button-bg":r||i?c.background:void 0,"--button-hover":r||i?c.hover:void 0,"--button-color":c.color,"--button-bd":r||i?c.border:void 0,"--button-hover-color":r||i?c.hoverColor:void 0}}}),x=(0,l.v)((e,t)=>{let r=(0,s.Y)("Button",w,e),{style:i,vars:o,className:a,color:l,disabled:p,children:y,leftSection:g,rightSection:b,fullWidth:v,variant:_,radius:S,loading:x,loaderProps:A,gradient:O,classNames:M,styles:R,unstyled:C,"data-disabled":I,autoContrast:N,mod:P,...k}=r,D=(0,u.I)({name:"Button",props:r,classes:m,className:a,style:i,classNames:M,styles:R,unstyled:C,vars:o,varsResolver:T}),L=!!g,j=!!b;return(0,n.jsxs)(h.N,{ref:t,...D("root",{active:!p&&!x&&!I}),unstyled:C,variant:_,disabled:p||x,mod:[{disabled:p||I,loading:x,block:v,"with-left-section":L,"with-right-section":j},P],...k,children:[(0,n.jsx)(d.e,{mounted:!!x,transition:E,duration:150,children:e=>(0,n.jsx)(c.a,{component:"span",...D("loader",{style:e}),"aria-hidden":!0,children:(0,n.jsx)(f.a,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...A})})}),(0,n.jsxs)("span",{...D("inner"),children:[g&&(0,n.jsx)(c.a,{component:"span",...D("section"),mod:{position:"left"},children:g}),(0,n.jsx)(c.a,{component:"span",mod:{loading:x},...D("label"),children:y}),b&&(0,n.jsx)(c.a,{component:"span",...D("section"),mod:{position:"right"},children:b})]})]})});x.classes=m,x.displayName="@mantine/core/Button",x.Group=b,x.GroupSection=S},25169:(e,t,r)=>{"use strict";var n=r(24345);e.exports=function(e){return!!n(e)}},25605:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(29326),i=r(89250);function o(e,t){(0,i.A)(2,arguments);var r=(0,n.A)(e),o=(0,n.A)(t);return r.getTime()===o.getTime()}},25655:(e,t,r)=>{"use strict";var n;let i;Object.defineProperty(t,"__esModule",{value:!0}),t.discriminatedUnion=t.date=t.boolean=t.bigint=t.array=t.any=t.coerce=t.ZodFirstPartyTypeKind=t.late=t.ZodSchema=t.Schema=t.ZodReadonly=t.ZodPipeline=t.ZodBranded=t.BRAND=t.ZodNaN=t.ZodCatch=t.ZodDefault=t.ZodNullable=t.ZodOptional=t.ZodTransformer=t.ZodEffects=t.ZodPromise=t.ZodNativeEnum=t.ZodEnum=t.ZodLiteral=t.ZodLazy=t.ZodFunction=t.ZodSet=t.ZodMap=t.ZodRecord=t.ZodTuple=t.ZodIntersection=t.ZodDiscriminatedUnion=t.ZodUnion=t.ZodObject=t.ZodArray=t.ZodVoid=t.ZodNever=t.ZodUnknown=t.ZodAny=t.ZodNull=t.ZodUndefined=t.ZodSymbol=t.ZodDate=t.ZodBoolean=t.ZodBigInt=t.ZodNumber=t.ZodString=t.ZodType=void 0,t.NEVER=t.void=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.symbol=t.string=t.strictObject=t.set=t.record=t.promise=t.preprocess=t.pipeline=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=t.nullable=t.null=t.never=t.nativeEnum=t.nan=t.map=t.literal=t.lazy=t.intersection=t.instanceof=t.function=t.enum=t.effect=void 0,t.datetimeRegex=P,t.custom=ex;let o=r(2301),a=r(17547),s=r(92536),u=r(48603),c=r(27176);class l{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let f=(e,t)=>{if((0,u.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new o.ZodError(e.common.issues);return this._error=t,this._error}}};function d(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:o}=e;return"invalid_enum_value"===t.code?{message:o??i.defaultError}:void 0===i.data?{message:o??n??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:o??r??i.defaultError}},description:i}}class h{get description(){return this._def.description}_getType(e){return(0,c.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,c.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new u.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,c.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if((0,u.isAsync)(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,c.getParsedType)(e)},n=this._parseSync({data:e,path:r.path,parent:r});return f(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,c.getParsedType)(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return(0,u.isValid)(r)?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>(0,u.isValid)(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,c.getParsedType)(e)},n=this._parse({data:e,path:r.path,parent:r});return f(r,await ((0,u.isAsync)(n)?n:Promise.resolve(n)))}refine(e,t){let r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{let i=e(t),a=()=>n.addIssue({code:o.ZodIssueCode.custom,...r(t)});return"u">typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new em({schema:this,typeName:n.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return ey.create(this,this._def)}nullable(){return eg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return K.create(this)}promise(){return ep.create(this,this._def)}or(e){return Q.create([this,e],this._def)}and(e){return en.create(this,e,this._def)}transform(e){return new em({...d(this._def),schema:this,typeName:n.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t="function"==typeof e?e:()=>e;return new eb({...d(this._def),innerType:this,defaultValue:t,typeName:n.ZodDefault})}brand(){return new eS({typeName:n.ZodBranded,type:this,...d(this._def)})}catch(e){let t="function"==typeof e?e:()=>e;return new ev({...d(this._def),innerType:this,catchValue:t,typeName:n.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eE.create(this,e)}readonly(){return ew.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}t.ZodType=h,t.Schema=h,t.ZodSchema=h;let p=/^c[^\s-]{8,}$/i,m=/^[0-9a-z]+$/,y=/^[0-9A-HJKMNP-TV-Z]{26}$/i,g=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,b=/^[a-z0-9_-]{21}$/i,v=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,S=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,E="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",w=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,T=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,x=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,A=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,O=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,M=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,R="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",C=RegExp(`^${R}$`);function I(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function N(e){return RegExp(`^${I(e)}$`)}function P(e){let t=`${R}T${I(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)}function k(e,t){return!!(("v4"===t||!t)&&w.test(e)||("v6"===t||!t)&&x.test(e))}function D(e,t){if(!v.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}function L(e,t){return!!(("v4"===t||!t)&&T.test(e)||("v6"===t||!t)&&A.test(e))}class j extends h{_parse(e){let t;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==c.ZodParsedType.string){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.string,received:t.parsedType}),u.INVALID}let r=new u.ParseStatus;for(let n of this._def.checks)if("min"===n.kind)e.data.lengthn.value&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if("length"===n.kind){let i=e.data.length>n.value,a=e.data.lengthe.test(t),{validation:t,code:o.ZodIssueCode.invalid_string,...s.errorUtil.errToObj(r)})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...s.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...s.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...s.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...s.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...s.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...s.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...s.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...s.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...s.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...s.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...s.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...s.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...s.errorUtil.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...s.errorUtil.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...s.errorUtil.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...s.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...s.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...s.errorUtil.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...s.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...s.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...s.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...s.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...s.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,s.errorUtil.errToObj(e))}trim(){return new j({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuen?r:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}t.ZodString=j,j.create=e=>new j({checks:[],typeName:n.ZodString,coerce:e?.coerce??!1,...d(e)});class B extends h{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==c.ZodParsedType.number){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.number,received:t.parsedType}),u.INVALID}let r=new u.ParseStatus;for(let n of this._def.checks)"int"===n.kind?c.util.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.datan.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==U(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.not_finite,message:n.message}),r.dirty()):c.util.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.errorUtil.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.errorUtil.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:s.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:s.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.errorUtil.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value"int"===e.kind||"multipleOf"===e.kind&&c.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.valuenew B({checks:[],typeName:n.ZodNumber,coerce:e?.coerce||!1,...d(e)});class F extends h{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==c.ZodParsedType.bigint)return this._getInvalidInput(e);let r=new u.ParseStatus;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.datan.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):c.util.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.bigint,received:t.parsedType}),u.INVALID}gte(e,t){return this.setLimit("min",e,!0,s.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.errorUtil.toString(t))}setLimit(e,t,r,n){return new F({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.errorUtil.toString(n)}]})}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:s.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:s.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:s.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:s.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.errorUtil.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew F({checks:[],typeName:n.ZodBigInt,coerce:e?.coerce??!1,...d(e)});class z extends h{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==c.ZodParsedType.boolean){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.boolean,received:t.parsedType}),u.INVALID}return(0,u.OK)(e.data)}}t.ZodBoolean=z,z.create=e=>new z({typeName:n.ZodBoolean,coerce:e?.coerce||!1,...d(e)});class $ extends h{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==c.ZodParsedType.date){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.date,received:t.parsedType}),u.INVALID}if(Number.isNaN(e.data.getTime())){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_date}),u.INVALID}let r=new u.ParseStatus;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()n.value&&(t=this._getOrReturnCtx(e,t),(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):c.util.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:s.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:s.errorUtil.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew $({checks:[],coerce:e?.coerce||!1,typeName:n.ZodDate,...d(e)});class V extends h{_parse(e){if(this._getType(e)!==c.ZodParsedType.symbol){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.symbol,received:t.parsedType}),u.INVALID}return(0,u.OK)(e.data)}}t.ZodSymbol=V,V.create=e=>new V({typeName:n.ZodSymbol,...d(e)});class Y extends h{_parse(e){if(this._getType(e)!==c.ZodParsedType.undefined){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.undefined,received:t.parsedType}),u.INVALID}return(0,u.OK)(e.data)}}t.ZodUndefined=Y,Y.create=e=>new Y({typeName:n.ZodUndefined,...d(e)});class q extends h{_parse(e){if(this._getType(e)!==c.ZodParsedType.null){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.null,received:t.parsedType}),u.INVALID}return(0,u.OK)(e.data)}}t.ZodNull=q,q.create=e=>new q({typeName:n.ZodNull,...d(e)});class H extends h{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,u.OK)(e.data)}}t.ZodAny=H,H.create=e=>new H({typeName:n.ZodAny,...d(e)});class W extends h{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,u.OK)(e.data)}}t.ZodUnknown=W,W.create=e=>new W({typeName:n.ZodUnknown,...d(e)});class G extends h{_parse(e){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.never,received:t.parsedType}),u.INVALID}}t.ZodNever=G,G.create=e=>new G({typeName:n.ZodNever,...d(e)});class Z extends h{_parse(e){if(this._getType(e)!==c.ZodParsedType.undefined){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.void,received:t.parsedType}),u.INVALID}return(0,u.OK)(e.data)}}t.ZodVoid=Z,Z.create=e=>new Z({typeName:n.ZodVoid,...d(e)});class K extends h{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==c.ZodParsedType.array)return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.array,received:t.parsedType}),u.INVALID;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.lengthn.maxLength.value&&((0,u.addIssueToContext)(t,{code:o.ZodIssueCode.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new l(t,e,t.path,r)))).then(e=>u.ParseStatus.mergeArray(r,e));let i=[...t.data].map((e,r)=>n.type._parseSync(new l(t,e,t.path,r)));return u.ParseStatus.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new K({...this._def,minLength:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new K({...this._def,maxLength:{value:e,message:s.errorUtil.toString(t)}})}length(e,t){return new K({...this._def,exactLength:{value:e,message:s.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function X(e){if(e instanceof J){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=ey.create(X(n))}return new J({...e._def,shape:()=>t})}if(e instanceof K)return new K({...e._def,type:X(e.element)});if(e instanceof ey)return ey.create(X(e.unwrap()));if(e instanceof eg)return eg.create(X(e.unwrap()));if(e instanceof ei)return ei.create(e.items.map(e=>X(e)));else return e}t.ZodArray=K,K.create=(e,t)=>new K({type:e,minLength:null,maxLength:null,exactLength:null,typeName:n.ZodArray,...d(t)});class J extends h{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=c.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==c.ZodParsedType.object){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.object,received:t.parsedType}),u.INVALID}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof G&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||a.push(e);let s=[];for(let e of i){let t=n[e],i=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new l(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof G){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)a.length>0&&((0,u.addIssueToContext)(r,{code:o.ZodIssueCode.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let n=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new l(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>u.ParseStatus.mergeObjectSync(t,e)):u.ParseStatus.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return s.errorUtil.errToObj,new J({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:s.errorUtil.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new J({...this._def,unknownKeys:"strip"})}passthrough(){return new J({...this._def,unknownKeys:"passthrough"})}extend(e){return new J({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new J({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:n.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new J({...this._def,catchall:e})}pick(e){let t={};for(let r of c.util.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new J({...this._def,shape:()=>t})}omit(e){let t={};for(let r of c.util.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new J({...this._def,shape:()=>t})}deepPartial(){return X(this)}partial(e){let t={};for(let r of c.util.objectKeys(this.shape)){let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new J({...this._def,shape:()=>t})}required(e){let t={};for(let r of c.util.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof ey;)e=e._def.innerType;t[r]=e}return new J({...this._def,shape:()=>t})}keyof(){return ef(c.util.objectKeys(this.shape))}}t.ZodObject=J,J.create=(e,t)=>new J({shape:()=>e,unknownKeys:"strip",catchall:G.create(),typeName:n.ZodObject,...d(t)}),J.strictCreate=(e,t)=>new J({shape:()=>e,unknownKeys:"strict",catchall:G.create(),typeName:n.ZodObject,...d(t)}),J.lazycreate=(e,t)=>new J({shape:e,unknownKeys:"strip",catchall:G.create(),typeName:n.ZodObject,...d(t)});class Q extends h{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function n(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new o.ZodError(e.ctx.common.issues));return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_union,unionErrors:r}),u.INVALID}if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(n);{let e,n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new o.ZodError(e));return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_union,unionErrors:i}),u.INVALID}}get options(){return this._def.options}}t.ZodUnion=Q,Q.create=(e,t)=>new Q({options:e,typeName:n.ZodUnion,...d(t)});let ee=e=>{if(e instanceof ec)return ee(e.schema);if(e instanceof em)return ee(e.innerType());if(e instanceof el)return[e.value];if(e instanceof ed)return e.options;if(e instanceof eh)return c.util.objectValues(e.enum);else if(e instanceof eb)return ee(e._def.innerType);else if(e instanceof Y)return[void 0];else if(e instanceof q)return[null];else if(e instanceof ey)return[void 0,...ee(e.unwrap())];else if(e instanceof eg)return[null,...ee(e.unwrap())];else if(e instanceof eS)return ee(e.unwrap());else if(e instanceof ew)return ee(e.unwrap());else if(e instanceof ev)return ee(e._def.innerType);else return[]};class et extends h{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.ZodParsedType.object)return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.object,received:t.parsedType}),u.INVALID;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):((0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),u.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let i=new Map;for(let r of t){let t=ee(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let n of t){if(i.has(n))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);i.set(n,r)}}return new et({typeName:n.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...d(r)})}}function er(e,t){let r=(0,c.getParsedType)(e),n=(0,c.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(r===c.ZodParsedType.object&&n===c.ZodParsedType.object){let r=c.util.objectKeys(t),n=c.util.objectKeys(e).filter(e=>-1!==r.indexOf(e)),i={...e,...t};for(let r of n){let n=er(e[r],t[r]);if(!n.valid)return{valid:!1};i[r]=n.data}return{valid:!0,data:i}}if(r===c.ZodParsedType.array&&n===c.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let n=0;n{if((0,u.isAborted)(e)||(0,u.isAborted)(n))return u.INVALID;let i=er(e.value,n.value);return i.valid?(((0,u.isDirty)(e)||(0,u.isDirty)(n))&&t.dirty(),{status:t.value,value:i.data}):((0,u.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_intersection_types}),u.INVALID)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}t.ZodIntersection=en,en.create=(e,t,r)=>new en({left:e,right:t,typeName:n.ZodIntersection,...d(r)});class ei extends h{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==c.ZodParsedType.array)return(0,u.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.array,received:r.parsedType}),u.INVALID;if(r.data.lengththis._def.items.length&&((0,u.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new l(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>u.ParseStatus.mergeArray(t,e)):u.ParseStatus.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new ei({...this._def,rest:e})}}t.ZodTuple=ei,ei.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ei({items:e,typeName:n.ZodTuple,rest:null,...d(t)})};class eo extends h{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==c.ZodParsedType.object)return(0,u.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.object,received:r.parsedType}),u.INVALID;let n=[],i=this._def.keyType,a=this._def.valueType;for(let e in r.data)n.push({key:i._parse(new l(r,e,r.path,e)),value:a._parse(new l(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?u.ParseStatus.mergeObjectAsync(t,n):u.ParseStatus.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new eo(t instanceof h?{keyType:e,valueType:t,typeName:n.ZodRecord,...d(r)}:{keyType:j.create(),valueType:e,typeName:n.ZodRecord,...d(t)})}}t.ZodRecord=eo;class ea extends h{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==c.ZodParsedType.map)return(0,u.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.map,received:r.parsedType}),u.INVALID;let n=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([e,t],o)=>({key:n._parse(new l(r,e,r.path,[o,"key"])),value:i._parse(new l(r,t,r.path,[o,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of a){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return u.INVALID;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of a){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return u.INVALID;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}t.ZodMap=ea,ea.create=(e,t,r)=>new ea({valueType:t,keyType:e,typeName:n.ZodMap,...d(r)});class es extends h{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==c.ZodParsedType.set)return(0,u.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.set,received:r.parsedType}),u.INVALID;let n=this._def;null!==n.minSize&&r.data.sizen.maxSize.value&&((0,u.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let r=new Set;for(let n of e){if("aborted"===n.status)return u.INVALID;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let s=[...r.data.values()].map((e,t)=>i._parse(new l(r,e,r.path,t)));return r.common.async?Promise.all(s).then(e=>a(e)):a(s)}min(e,t){return new es({...this._def,minSize:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new es({...this._def,maxSize:{value:e,message:s.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}t.ZodSet=es,es.create=(e,t)=>new es({valueType:e,minSize:null,maxSize:null,typeName:n.ZodSet,...d(t)});class eu extends h{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.ZodParsedType.function)return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.function,received:t.parsedType}),u.INVALID;function r(e,r){return(0,u.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,a.getErrorMap)(),a.defaultErrorMap].filter(e=>!!e),issueData:{code:o.ZodIssueCode.invalid_arguments,argumentsError:r}})}function n(e,r){return(0,u.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,a.getErrorMap)(),a.defaultErrorMap].filter(e=>!!e),issueData:{code:o.ZodIssueCode.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof ep){let e=this;return(0,u.OK)(async function(...t){let a=new o.ZodError([]),u=await e._def.args.parseAsync(t,i).catch(e=>{throw a.addIssue(r(t,e)),a}),c=await Reflect.apply(s,this,u);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw a.addIssue(n(c,e)),a})})}{let e=this;return(0,u.OK)(function(...t){let a=e._def.args.safeParse(t,i);if(!a.success)throw new o.ZodError([r(t,a.error)]);let u=Reflect.apply(s,this,a.data),c=e._def.returns.safeParse(u,i);if(!c.success)throw new o.ZodError([n(u,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eu({...this._def,args:ei.create(e).rest(W.create())})}returns(e){return new eu({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eu({args:e||ei.create([]).rest(W.create()),returns:t||W.create(),typeName:n.ZodFunction,...d(r)})}}t.ZodFunction=eu;class ec extends h{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}t.ZodLazy=ec,ec.create=(e,t)=>new ec({getter:e,typeName:n.ZodLazy,...d(t)});class el extends h{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{received:t.data,code:o.ZodIssueCode.invalid_literal,expected:this._def.value}),u.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ef(e,t){return new ed({values:e,typeName:n.ZodEnum,...d(t)})}t.ZodLiteral=el,el.create=(e,t)=>new el({value:e,typeName:n.ZodLiteral,...d(t)});class ed extends h{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return(0,u.addIssueToContext)(t,{expected:c.util.joinValues(r),received:t.parsedType,code:o.ZodIssueCode.invalid_type}),u.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return(0,u.addIssueToContext)(t,{received:t.data,code:o.ZodIssueCode.invalid_enum_value,options:r}),u.INVALID}return(0,u.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ed.create(e,{...this._def,...t})}exclude(e,t=this._def){return ed.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}t.ZodEnum=ed,ed.create=ef;class eh extends h{_parse(e){let t=c.util.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==c.ZodParsedType.string&&r.parsedType!==c.ZodParsedType.number){let e=c.util.objectValues(t);return(0,u.addIssueToContext)(r,{expected:c.util.joinValues(e),received:r.parsedType,code:o.ZodIssueCode.invalid_type}),u.INVALID}if(this._cache||(this._cache=new Set(c.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=c.util.objectValues(t);return(0,u.addIssueToContext)(r,{received:r.data,code:o.ZodIssueCode.invalid_enum_value,options:e}),u.INVALID}return(0,u.OK)(e.data)}get enum(){return this._def.values}}t.ZodNativeEnum=eh,eh.create=(e,t)=>new eh({values:e,typeName:n.ZodNativeEnum,...d(t)});class ep extends h{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.ZodParsedType.promise&&!1===t.common.async)return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.promise,received:t.parsedType}),u.INVALID;let r=t.parsedType===c.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,u.OK)(r.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}t.ZodPromise=ep,ep.create=(e,t)=>new ep({type:e,typeName:n.ZodPromise,...d(t)});class em extends h{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===n.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{(0,u.addIssueToContext)(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let e=n.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return u.INVALID;let n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?u.INVALID:"dirty"===n.status||"dirty"===t.value?(0,u.DIRTY)(n.value):n});{if("aborted"===t.value)return u.INVALID;let n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?u.INVALID:"dirty"===n.status||"dirty"===t.value?(0,u.DIRTY)(n.value):n}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?u.INVALID:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?u.INVALID:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>(0,u.isValid)(e)?Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})):u.INVALID);else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!(0,u.isValid)(e))return u.INVALID;let o=n.transform(e.value,i);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}c.util.assertNever(n)}}t.ZodEffects=em,t.ZodTransformer=em,em.create=(e,t,r)=>new em({schema:e,typeName:n.ZodEffects,effect:t,...d(r)}),em.createWithPreprocess=(e,t,r)=>new em({schema:t,effect:{type:"preprocess",transform:e},typeName:n.ZodEffects,...d(r)});class ey extends h{_parse(e){return this._getType(e)===c.ZodParsedType.undefined?(0,u.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodOptional=ey,ey.create=(e,t)=>new ey({innerType:e,typeName:n.ZodOptional,...d(t)});class eg extends h{_parse(e){return this._getType(e)===c.ZodParsedType.null?(0,u.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodNullable=eg,eg.create=(e,t)=>new eg({innerType:e,typeName:n.ZodNullable,...d(t)});class eb extends h{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===c.ZodParsedType.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}t.ZodDefault=eb,eb.create=(e,t)=>new eb({innerType:e,typeName:n.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...d(t)});class ev extends h{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return(0,u.isAsync)(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new o.ZodError(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new o.ZodError(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}t.ZodCatch=ev,ev.create=(e,t)=>new ev({innerType:e,typeName:n.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...d(t)});class e_ extends h{_parse(e){if(this._getType(e)!==c.ZodParsedType.nan){let t=this._getOrReturnCtx(e);return(0,u.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:c.ZodParsedType.nan,received:t.parsedType}),u.INVALID}return{status:"valid",value:e.data}}}t.ZodNaN=e_,e_.create=e=>new e_({typeName:n.ZodNaN,...d(e)}),t.BRAND=Symbol("zod_brand");class eS extends h{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}t.ZodBranded=eS;class eE extends h{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?u.INVALID:"dirty"===e.status?(t.dirty(),(0,u.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?u.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eE({in:e,out:t,typeName:n.ZodPipeline})}}t.ZodPipeline=eE;class ew extends h{_parse(e){let t=this._def.innerType._parse(e),r=e=>((0,u.isValid)(e)&&(e.value=Object.freeze(e.value)),e);return(0,u.isAsync)(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function eT(e,t){let r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function ex(e,t={},r){return e?H.create().superRefine((n,i)=>{let o=e(n);if(o instanceof Promise)return o.then(e=>{if(!e){let e=eT(t,n),o=e.fatal??r??!0;i.addIssue({code:"custom",...e,fatal:o})}});if(!o){let e=eT(t,n),o=e.fatal??r??!0;i.addIssue({code:"custom",...e,fatal:o})}}):H.create()}t.ZodReadonly=ew,ew.create=(e,t)=>new ew({innerType:e,typeName:n.ZodReadonly,...d(t)}),t.late={object:J.lazycreate},function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(n||(t.ZodFirstPartyTypeKind=n={})),t.instanceof=(e,t={message:`Input not instance of ${e.name}`})=>ex(t=>t instanceof e,t);let eA=j.create;t.string=eA;let eO=B.create;t.number=eO,t.nan=e_.create,t.bigint=F.create;let eM=z.create;t.boolean=eM,t.date=$.create,t.symbol=V.create,t.undefined=Y.create,t.null=q.create,t.any=H.create,t.unknown=W.create,t.never=G.create,t.void=Z.create,t.array=K.create,t.object=J.create,t.strictObject=J.strictCreate,t.union=Q.create,t.discriminatedUnion=et.create,t.intersection=en.create,t.tuple=ei.create,t.record=eo.create,t.map=ea.create,t.set=es.create,t.function=eu.create,t.lazy=ec.create,t.literal=el.create,t.enum=ed.create,t.nativeEnum=eh.create,t.promise=ep.create;let eR=em.create;t.effect=eR,t.transformer=eR,t.optional=ey.create,t.nullable=eg.create,t.preprocess=em.createWithPreprocess,t.pipeline=eE.create,t.ostring=()=>eA().optional(),t.onumber=()=>eO().optional(),t.oboolean=()=>eM().optional(),t.coerce={string:e=>j.create({...e,coerce:!0}),number:e=>B.create({...e,coerce:!0}),boolean:e=>z.create({...e,coerce:!0}),bigint:e=>F.create({...e,coerce:!0}),date:e=>$.create({...e,coerce:!0})},t.NEVER=u.INVALID},25878:(e,t,r)=>{"use strict";r.d(t,{c:()=>f});var n=r(6029),i=r(55729),o=r(50212),a=r(41271),s=r(22623),u=r(56738),c=r(15242),l=r(31188);let f=(0,i.forwardRef)(({transitionProps:e,className:t,innerProps:r,onKeyDown:i,style:f,...d},h)=>{let p=(0,c.x)();return(0,n.jsx)(u.e,{mounted:p.opened,transition:"pop",...p.transitionProps,onExited:()=>{p.onExitTransitionEnd?.(),p.transitionProps?.onExited?.()},onEntered:()=>{p.onEnterTransitionEnd?.(),p.transitionProps?.onEntered?.()},...e,children:e=>(0,n.jsx)("div",{...r,className:(0,o.A)({[l.A.inner]:!p.unstyled},r.className),children:(0,n.jsx)(a.s,{active:p.opened&&p.trapFocus,innerRef:h,children:(0,n.jsx)(s.t,{...d,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":p.bodyMounted?p.getBodyId():void 0,"aria-labelledby":p.titleMounted?p.getTitleId():void 0,style:[f,e],className:(0,o.A)({[l.A.content]:!p.unstyled},t),unstyled:p.unstyled,children:d.children})})})})});f.displayName="@mantine/core/ModalBaseContent"},26193:(e,t)=>{"use strict";function r(e,t,r,n,i,o,a){var s=new Date(0);return s.setUTCFullYear(e,t,r),s.setUTCHours(n,i,o,a),s}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},26572:(e,t,r)=>{"use strict";var n=r(14274),i=r(57379),o=r(95605);e.exports=function(){return o(n,i,arguments)}},26615:(e,t,r)=>{"use strict";function n(e){return"0rem"===e?"0rem":`calc(${e} * var(--mantine-scale))`}function i(e,{shouldScale:t=!1}={}){function r(i){if(0===i||"0"===i)return`0${e}`;if("number"==typeof i){let r=`${i/16}${e}`;return t?n(r):r}if("string"==typeof i){if(""===i||i.startsWith("calc(")||i.startsWith("clamp(")||i.includes("rgba("))return i;if(i.includes(","))return i.split(",").map(e=>r(e)).join(",");if(i.includes(" "))return i.split(" ").map(e=>r(e)).join(" ");if(i.includes(e))return t?n(i):i;let o=i.replace("px","");if(!Number.isNaN(Number(o))){let r=`${Number(o)/16}${e}`;return t?n(r):r}}return i}return r}r.d(t,{D:()=>o,em:()=>a});let o=i("rem",{shouldScale:!0}),a=i("em")},26654:()=>{},27166:(e,t,r)=>{"use strict";r.d(t,{a:()=>V});var n=r(6029),i=r(55729),o=r(69626),a=r(80616),s=r(43016),u=r(65837);let[c,l]=(0,r(36254).F)("Modal component was not found in tree");var f={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};let d={},h=(0,s.P9)((e,t)=>{let{classNames:r,className:i,style:o,styles:s,vars:c,...f}=(0,a.Y)("ModalBody",d,e),h=l();return(0,n.jsx)(u.v,{ref:t,...h.getStyles("body",{classNames:r,style:o,styles:s,className:i}),...f})});h.classes=f,h.displayName="@mantine/core/ModalBody";var p=r(68373);let m={},y=(0,s.P9)((e,t)=>{let{classNames:r,className:i,style:o,styles:s,vars:u,...c}=(0,a.Y)("ModalCloseButton",m,e),f=l();return(0,n.jsx)(p.F,{ref:t,...f.getStyles("close",{classNames:r,style:o,styles:s,className:i}),...c})});y.classes=f,y.displayName="@mantine/core/ModalCloseButton";var g=r(26615),b=r(25878),v=r(87816);let _={},S=(0,s.P9)((e,t)=>{let{classNames:r,className:i,style:o,styles:s,vars:u,children:c,__hidden:f,...d}=(0,a.Y)("ModalContent",_,e),h=l(),p=h.scrollAreaComponent||v.a;return(0,n.jsx)(b.c,{...h.getStyles("content",{className:i,style:o,styles:s,classNames:r}),innerProps:h.getStyles("inner",{className:i,style:o,styles:s,classNames:r}),"data-full-screen":h.fullScreen||void 0,"data-modal-content":!0,"data-hidden":f||void 0,ref:t,...d,children:(0,n.jsx)(p,{style:{maxHeight:h.fullScreen?"100dvh":`calc(100dvh - (${(0,g.D)(h.yOffset)} * 2))`},children:c})})});S.classes=f,S.displayName="@mantine/core/ModalContent";var E=r(62358);let w={},T=(0,s.P9)((e,t)=>{let{classNames:r,className:i,style:o,styles:s,vars:u,...c}=(0,a.Y)("ModalHeader",w,e),f=l();return(0,n.jsx)(E.m,{ref:t,...f.getStyles("header",{classNames:r,style:o,styles:s,className:i}),...c})});T.classes=f,T.displayName="@mantine/core/ModalHeader";var x=r(97762);let A={},O=(0,s.P9)((e,t)=>{let{classNames:r,className:i,style:o,styles:s,vars:u,...c}=(0,a.Y)("ModalOverlay",A,e),f=l();return(0,n.jsx)(x.V,{ref:t,...f.getStyles("overlay",{classNames:r,style:o,styles:s,className:i}),...c})});O.classes=f,O.displayName="@mantine/core/ModalOverlay";var M=r(76),R=r(5618),C=r(37666),I=r(43256),N=r(53993);let P={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:(0,o.I)("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},k=(0,R.V)((e,{radius:t,size:r,yOffset:n,xOffset:i})=>({root:{"--modal-radius":void 0===t?void 0:(0,M.nJ)(t),"--modal-size":(0,M.YC)(r,"modal-size"),"--modal-y-offset":(0,g.D)(n),"--modal-x-offset":(0,g.D)(i)}})),D=(0,s.P9)((e,t)=>{let r=(0,a.Y)("ModalRoot",P,e),{classNames:i,className:o,style:s,styles:u,unstyled:l,vars:d,yOffset:h,scrollAreaComponent:p,radius:m,fullScreen:y,centered:g,xOffset:b,__staticSelector:v,..._}=r,S=(0,C.I)({name:v,classes:f,props:r,className:o,style:s,classNames:i,styles:u,unstyled:l,vars:d,varsResolver:k});return(0,n.jsx)(c,{value:{yOffset:h,scrollAreaComponent:p,getStyles:S,fullScreen:y},children:(0,n.jsx)(I.f,{ref:t,...S("root"),"data-full-screen":y||void 0,"data-centered":g||void 0,"data-offset-scrollbars":p===N.F.Autosize||void 0,unstyled:l,..._})})});D.classes=f,D.displayName="@mantine/core/ModalRoot";let[L,j]=(0,r(48930).e)();function U({children:e}){let[t,r]=(0,i.useState)([]),[a,s]=(0,i.useState)((0,o.I)("modal"));return(0,n.jsx)(L,{value:{stack:t,addModal:(e,t)=>{r(t=>[...new Set([...t,e])]),s(e=>"number"==typeof t&&"number"==typeof e?Math.max(e,t):e)},removeModal:e=>r(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${a} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:a},children:e})}U.displayName="@mantine/core/ModalStack";var B=r(66951);let F={},z=(0,s.P9)((e,t)=>{let{classNames:r,className:i,style:o,styles:s,vars:u,...c}=(0,a.Y)("ModalTitle",F,e),f=l();return(0,n.jsx)(B.$,{ref:t,...f.getStyles("title",{classNames:r,style:o,styles:s,className:i}),...c})});z.classes=f,z.displayName="@mantine/core/ModalTitle";let $={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:(0,o.I)("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},V=(0,s.P9)((e,t)=>{let{title:r,withOverlay:s,overlayProps:u,withCloseButton:c,closeButtonProps:l,children:f,radius:d,opened:p,stackId:m,zIndex:g,...b}=(0,a.Y)("Modal",$,e),v=j(),_=!!r||c,E=v&&m?{closeOnEscape:v.currentId===m,trapFocus:v.currentId===m,zIndex:v.getZIndex(m)}:{},w=!1!==s&&(m&&v?v.currentId===m:p);return(0,i.useEffect)(()=>{v&&m&&(p?v.addModal(m,g||(0,o.I)("modal")):v.removeModal(m))},[p,m,g]),(0,n.jsxs)(D,{ref:t,radius:d,opened:p,zIndex:v&&m?v.getZIndex(m):g,...b,...E,children:[s&&(0,n.jsx)(O,{visible:w,transitionProps:v&&m?{duration:0}:void 0,...u}),(0,n.jsxs)(S,{radius:d,__hidden:!!v&&!!m&&!!p&&m!==v.currentId,children:[_&&(0,n.jsxs)(T,{children:[r&&(0,n.jsx)(z,{children:r}),c&&(0,n.jsx)(y,{...l})]}),(0,n.jsx)(h,{children:f})]})]})});V.classes=f,V.displayName="@mantine/core/Modal",V.Root=D,V.Overlay=O,V.Content=S,V.Body=h,V.Header=T,V.Title=z,V.CloseButton=y,V.Stack=U},27176:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedType=t.ZodParsedType=t.objectUtil=t.util=void 0,function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw Error()},e.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},e.getValidEnumValues=t=>{let r=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),n={};for(let e of r)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(let r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(r||(t.util=r={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(n||(t.objectUtil=n={})),t.ZodParsedType=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);let i=e=>{switch(typeof e){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return Number.isNaN(e)?t.ZodParsedType.nan:t.ZodParsedType.number;case"boolean":return t.ZodParsedType.boolean;case"function":return t.ZodParsedType.function;case"bigint":return t.ZodParsedType.bigint;case"symbol":return t.ZodParsedType.symbol;case"object":if(Array.isArray(e))return t.ZodParsedType.array;if(null===e)return t.ZodParsedType.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return t.ZodParsedType.promise;if("u">typeof Map&&e instanceof Map)return t.ZodParsedType.map;if("u">typeof Set&&e instanceof Set)return t.ZodParsedType.set;if("u">typeof Date&&e instanceof Date)return t.ZodParsedType.date;return t.ZodParsedType.object;default:return t.ZodParsedType.unknown}};t.getParsedType=i},27202:(e,t,r)=>{"use strict";function n(e){return e&&"object"==typeof e&&!Array.isArray(e)}function i(e,t){let r={...e},o=t;return n(e)&&n(t)&&Object.keys(t).forEach(t=>{n(o[t])&&t in e?r[t]=i(r[t],o[t]):r[t]=o[t]}),r}r.d(t,{$:()=>i})},27273:(e,t,r)=>{"use strict";function n(e){return e.reduce((e,t)=>"group"in t?{...e,...n(t.items)}:(e[t.value]=t,e),{})}r.d(t,{D:()=>n})},27299:e=>{"use strict";let t=(async function*(){}).constructor;e.exports=()=>t},27654:(e,t,r)=>{"use strict";var n=r(31652);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},27721:(e,t,r)=>{"use strict";var n=r(47684);e.exports=function(){return n()&&!!Symbol.toStringTag}},28160:(e,t,r)=>{"use strict";var n=r(3194),i=r(69497),o=r(72206),a=r(27654);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new o("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!a&&a(e,t);if(n)n(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===s&&f?f.enumerable:!s,value:r,writable:null===u&&f?f.writable:!u});else if(!l&&(s||u||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},28180:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(6027),i=r(77561),o=["years","months","weeks","days","hours","minutes","seconds"];function a(e,t){if(arguments.length<1)throw TypeError("1 argument required, but only ".concat(arguments.length," present"));var r,a,s,u,c,l=(0,n.q)(),f=null!=(r=null!=(a=null==t?void 0:t.locale)?a:l.locale)?r:i.A,d=null!=(s=null==t?void 0:t.format)?s:o,h=null!=(u=null==t?void 0:t.zero)&&u,p=null!=(c=null==t?void 0:t.delimiter)?c:" ";return f.formatDistance?d.reduce(function(t,r){var n="x".concat(r.replace(/(^.)/,function(e){return e.toUpperCase()})),i=e[r];return"number"==typeof i&&(h||e[r])?t.concat(f.formatDistance(n,i)):t},[]).join(p):""}},28730:(e,t,r)=>{"use strict";function n(e,t,r=!0){let i=(...n)=>{let i=e.decode(...n);return void 0===i||r&&null===i?t:i};return{...e,default:t,decode:i}}function i(e,t){if(null==e)return e;if(0===e.length&&(!t||t&&""!==e))return null;let r=e instanceof Array?e[0]:e;return null==r||t||""!==r?r:null}r.d(t,{hc:()=>a,fr:()=>o,Vl:()=>s,oO:()=>c,eR:()=>u,IQ:()=>n});let o={encode:function(e){return null==e?e:String(e)},decode:function(e){let t=i(e,!0);return null==t?t:String(t)}},a={encode:function(e){return null==e?e:String(e)},decode:function(e){let t=i(e);return null==t?t:""===t?null:+t}};function s(e,t){let r={};for(let n of Object.keys(t)){let i=t[n];e[n]?r[n]=e[n].encode(t[n]):r[n]=null==i?i:String(i)}return r}function u(e){let t=new URLSearchParams(e),r={};for(let[e,n]of t)Object.prototype.hasOwnProperty.call(r,e)?Array.isArray(r[e])?r[e].push(n):r[e]=[r[e],n]:r[e]=n;return r}function c(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(void 0!==n&&null!==n)if(Array.isArray(n))for(let e of n)t.append(r,null!=e?e:"");else t.append(r,n);return t.toString()}'{}[],":'.split("").map(e=>[e,encodeURIComponent(e)])},28751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return o.ReadonlyURLSearchParams},RedirectType:function(){return c.RedirectType},ServerInsertedHTMLContext:function(){return s.ServerInsertedHTMLContext},forbidden:function(){return c.forbidden},notFound:function(){return c.notFound},permanentRedirect:function(){return c.permanentRedirect},redirect:function(){return c.redirect},unauthorized:function(){return c.unauthorized},unstable_isUnrecognizedActionError:function(){return u.unstable_isUnrecognizedActionError},unstable_rethrow:function(){return c.unstable_rethrow},useParams:function(){return m},usePathname:function(){return h},useRouter:function(){return p},useSearchParams:function(){return d},useSelectedLayoutSegment:function(){return g},useSelectedLayoutSegments:function(){return y},useServerInsertedHTML:function(){return s.useServerInsertedHTML}});let n=r(13514)._(r(55729)),i=r(39003),o=r(66522),a=r(37459),s=r(96352),u=r(52176),c=r(84350),l,f;function d(){f?.("useSearchParams()");let e=(0,n.useContext)(o.SearchParamsContext);return(0,n.useMemo)(()=>e?new o.ReadonlyURLSearchParams(e):null,[e])}function h(){return l?.("usePathname()"),(0,n.useContext)(o.PathnameContext)}function p(){let e=(0,n.useContext)(i.AppRouterContext);if(null===e)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});return e}function m(){return l?.("useParams()"),(0,n.useContext)(o.PathParamsContext)}function y(e="children"){l?.("useSelectedLayoutSegments()");let t=(0,n.useContext)(i.LayoutRouterContext);return t?(0,a.getSelectedLayoutSegmentPath)(t.parentTree,e):null}function g(e="children"){l?.("useSelectedLayoutSegment()"),(0,n.useContext)(o.NavigationPromisesContext);let t=y(e);return(0,a.computeSelectedLayoutSegment)(t,e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},29326:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(41742),i=r(89250);function o(e){(0,i.A)(1,arguments);var t=(0,n.A)(e);return t.setMilliseconds(0),t}},29499:(e,t,r)=>{"use strict";r.d(t,{Q:()=>a});var n=r(55729),i=r(71775),o=r(3465);function a({opened:e,floating:t,position:r,positionDependencies:a}){let[s,u]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(t.refs.reference.current&&t.refs.floating.current&&e)return(0,i.ll)(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,s,r]),(0,o.C)(()=>{t.update()},a),(0,o.C)(()=>{u(e=>e+1)},[e])}},29548:(e,t,r)=>{"use strict";r.d(t,{A:()=>eh});var n,i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function a(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;itypeof window?s.useLayoutEffect:s.useEffect,m=new WeakMap;function y(e,t){var r=h(t||null,function(t){return e.forEach(function(e){return d(e,t)})});return p(function(){var t=m.get(r);if(t){var n=new Set(t),i=new Set(e),o=r.current;n.forEach(function(e){i.has(e)||d(e,null)}),i.forEach(function(e){n.has(e)||d(e,o)})}m.set(r,e)},[e]),r}var g=function(){return(g=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function v(e){return e}function _(e,t){void 0===t&&(t=v);var r=[],n=!1;return{read:function(){if(n)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var i=t(e,n);return r.push(i),function(){r=r.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var i=r;r=[],i.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}"function"==typeof SuppressedError&&SuppressedError;var S=function(e){void 0===e&&(e={});var t=_(null);return t.options=g({async:!0,ssr:!1},e),t}(),E=function(){},w=s.forwardRef(function(e,t){var r=s.useRef(null),n=s.useState({onScrollCapture:E,onWheelCapture:E,onTouchMoveCapture:E}),a=n[0],u=n[1],c=e.forwardProps,l=e.children,f=e.className,d=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,g=e.noRelative,b=e.noIsolation,v=e.inert,_=e.allowPinchZoom,w=e.as,T=void 0===w?"div":w,x=e.gapMode,A=o(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=m,M=y([r,t]),R=i(i({},A),a);return s.createElement(s.Fragment,null,h&&s.createElement(O,{sideCar:S,removeScrollBar:d,shards:p,noRelative:g,noIsolation:b,inert:v,setCallbacks:u,allowPinchZoom:!!_,lockRef:r,gapMode:x}),c?s.cloneElement(s.Children.only(l),i(i({},R),{ref:M})):s.createElement(T,i({},R,{className:f,ref:M}),l))});w.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},w.classNames={fullWidth:c,zeroRight:u};var T=function(e){var t=e.sideCar,r=b(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return s.createElement(n,g({},r))};function x(e,t){return e.useMedium(t),T}T.isSideCarExport=!0;var A=function(){return n||r.nc};function O(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=A();return t&&e.setAttribute("nonce",t),e}function M(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function R(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var C=function(){var e=0,t=null;return{add:function(r){0==e&&(t=O())&&(M(t,r),R(t)),e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},I=function(){var e=C();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},N=function(){var e=I();return function(t){return e(t.styles,t.dynamic),null}},P={left:0,top:0,right:0,gap:0},k=function(e){return parseInt(e||"",10)||0},D=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[k(r),k(n),k(i)]},L=function(e){if(void 0===e&&(e="margin"),"u"