@deephaven/embed-widget 1.28.0 → 1.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/build/assets/{App-Bl4SKddo.js → App-7TBaoVz8.js} +2 -2
  2. package/build/assets/{App-Bl4SKddo.js.map → App-7TBaoVz8.js.map} +1 -1
  3. package/build/assets/{Chart-CkMwA6lb.js → Chart-Po5PD22-.js} +2 -2
  4. package/build/assets/{Chart-CkMwA6lb.js.map → Chart-Po5PD22-.js.map} +1 -1
  5. package/build/assets/{IrisGrid-CS7G3Rw1.js → IrisGrid-CLAgnC-o.js} +2 -2
  6. package/build/assets/{IrisGrid-CS7G3Rw1.js.map → IrisGrid-CLAgnC-o.js.map} +1 -1
  7. package/build/assets/{IrisGridContextProvider-VqqXlQQ2.js → IrisGridContextProvider-C1RLweww.js} +2 -2
  8. package/build/assets/{IrisGridContextProvider-VqqXlQQ2.js.map → IrisGridContextProvider-C1RLweww.js.map} +1 -1
  9. package/build/assets/{LocalWorkspaceStorage-Dl1vxDea.js → LocalWorkspaceStorage-BzXtO448.js} +2 -2
  10. package/build/assets/{LocalWorkspaceStorage-Dl1vxDea.js.map → LocalWorkspaceStorage-BzXtO448.js.map} +1 -1
  11. package/build/assets/{LogPanel-B1HOW4Tx.js → LogPanel-DGMrBV0W.js} +2 -2
  12. package/build/assets/{LogPanel-B1HOW4Tx.js.map → LogPanel-DGMrBV0W.js.map} +1 -1
  13. package/build/assets/{MarkdownEditor-C3-cLwup.js → MarkdownEditor-Cri7Xw_3.js} +2 -2
  14. package/build/assets/{MarkdownEditor-C3-cLwup.js.map → MarkdownEditor-Cri7Xw_3.js.map} +1 -1
  15. package/build/assets/{MarkdownNotebook-trDdaz4y.js → MarkdownNotebook-BDxk9rMV.js} +2 -2
  16. package/build/assets/{MarkdownNotebook-trDdaz4y.js.map → MarkdownNotebook-BDxk9rMV.js.map} +1 -1
  17. package/build/assets/{index-HU_kftWh.js → index-BXgDhGXT.js} +20 -20
  18. package/build/assets/index-BXgDhGXT.js.map +1 -0
  19. package/build/assets/{index-wrAAwdsh.js → index-CuuL1-IW.js} +3 -3
  20. package/build/assets/{index-wrAAwdsh.js.map → index-CuuL1-IW.js.map} +1 -1
  21. package/build/assets/{index-DhKpNUtg.js → index-LlFHaD5l.js} +6 -6
  22. package/build/assets/{index-DhKpNUtg.js.map → index-LlFHaD5l.js.map} +1 -1
  23. package/build/index.html +2 -2
  24. package/package.json +9 -9
  25. package/build/assets/index-HU_kftWh.js.map +0 -1
@@ -1,36 +1,36 @@
1
- import{r as c,J as X,P as El,D as d,Q as _l,S as Ot,T as jl,U as Il,V as Al,W as $l,C as xn,X as kl,G as H,Y as Tn,Z as Wa,a0 as Rl,a1 as Ll,a2 as Dl,a3 as Ml,a4 as Nl,a5 as Fl,a6 as Ul,a7 as Wl,a8 as Vl,a9 as Bl,aa as Qt,ab as Hl,ac as Va,ad as xt,ae as Xe,I as ae,af as Ba,ag as Ha,ah as Cn,ai as Ka,aj as Ga,ak as Zt,al as Kl,am as He,an as Ya,H as za,ao as qa,ap as Gl,aq as Yl,ar as zl,as as Xa,at as ql,au as Xl,av as Ql,aw as Zl,ax as Jl,ay as eu,az as tu,aA as nu,aB as ru,aC as iu,aD as au,aE as ou,aF as su,aG as lu,aH as uu,aI as cu,aJ as du,aK as fu,aL as pu,aM as hu,aN as mu,aO as yu,aP as gu,aQ as bu,aR as Qa,aS as vu,aT as Su,aU as Pu,aV as wu,aW as Ou,aX as xu,aY as Tu,aZ as Cu,a_ as Eu,a$ as _u,b0 as ju,b1 as Iu,b2 as Au,b3 as $u,b4 as ku,b5 as Ru,b6 as Lu,b7 as Du,b8 as Mu,b9 as Nu,ba as Fu,bb as Uu,bc as Wu,O as Vu,bd as Bu,be as Hu,bf as Ku,bg as Gu,bh as Yu,bi as zu,L as qu,N as Xu,bj as Jt,bk as Qu,bl as Zu,bm as or,bn as Ju,bo as ec,bp as tc,bq as nc,br as rc,bs as ic,bt as ac,bu as oc,R as sc,bv as lc,bw as uc,bx as Za,by as cc,bz as dc}from"./vendor-DNp6JF3q.js";import{i as Ja,b as En,p as eo,r as to,a as J,M as no,c as ro,g as _n,L as Ae,v as io,d as jn,e as In,f as Tt,h as fc,j as pc,k as hc,l as mc,m as yc,n as An,o as gc,q as bc,s as vc,t as ao,u as Ct,w as Sc,T as en,C as Pc,D as wc,x as Oc,y as xc,z as Tc,A as Cc,B as Ec,E as _c,F as jc,G as oo,N as Ic,P as Ac,S as $c,H as kc,I as Rc,J as Lc,K as Dc,W as Mc,O as Nc,Q as Fc,R as Uc,U as Wc,V as Vc,X as Bc,Y as Hc,Z as Kc,_ as Gc,$ as Yc,a0 as zc,a1 as qc,a2 as Xc,a3 as Qc,a4 as Zc,a5 as Jc,a6 as ed,a7 as td,a8 as nd,a9 as rd,aa as id,ab as ad,ac as $n,ad as Et,ae as kn,af as od,ag as so,ah as sd,ai as ld,aj as ud,ak as cd,al as dd,am as fd,an as pd}from"./index-wrAAwdsh.js";import{F as hd,f as md,e as yd,C as lo,g as gd,a as Qe,D as sr,h as bd,i as vd,d as Sd,U as _t,j as uo,k as co,l as Pd,c as wd,S as Od}from"./LocalWorkspaceStorage-Dl1vxDea.js";import{A as u1,m as c1,n as d1,G as f1,L as p1,o as h1,p as m1,q as y1,r as g1,s as b1,t as v1,u as S1,b as P1}from"./LocalWorkspaceStorage-Dl1vxDea.js";import{k as xd,l as Td,m as Cd,n as Ed,o as Ke,p as _d,q as jd,t as Id,v as Ad,w as jt,x as pe,y as fe,z as $d,T as It,A as Ze,H as Rn,P as At,C as Pe,B as je,D as fo,F as mt,G as po,r as Ce,M as ne,K as oe,R as lr,I as tn,J as re,L as ho,N as nn,O as $t,E as mo,Q as Ln,U as kt,V as yo,W as kd,X as Rd,c as Ld,Y as Dd,Z as go,_ as bo,S as Md,$ as Nd,a0 as Fd,a1 as vo,a2 as Ud,a3 as Wd,a4 as Vd,a5 as So,a6 as Bd,a7 as Hd,a8 as Kd,a9 as Gd,aa as Po,ab as Yd,u as xe,ac as zd,ad as qd,ae as Xd,af as Qd,ag as Zd,ah as wo,g as Jd,ai as ef,aj as tf,ak as nf,al as Oo,am as rf,an as xo,ao as To,ap as Co,aq as Eo,s as _o,ar as ur,as as af,at as of,au as sf,av as lf,aw as uf,ax as cf,ay as df,az as ff,aA as pf,aB as hf,aC as mf,aD as yf,aE as gf,aF as bf,aG as jo,aH as vf,aI as Sf,aJ as Pf,aK as wf,aL as Of,aM as xf,aN as Tf,aO as Cf,aP as Ef,aQ as _f,e as jf,b as If,aR as Af,aS as $f,aT as kf,aU as Rf,aV as Lf,aW as Df,aX as Mf,aY as Nf,aZ as Ff,a_ as Uf,a$ as Wf,b0 as Vf,b1 as Bf,b2 as Hf,b3 as Kf,b4 as Gf,b5 as Yf,b6 as Io,b7 as zf,b8 as qf,a as Xf,b9 as Qf,ba as Zf,bb as Jf,bc as ep,bd as tp,be as np,bf as rp,bg as ip,bh as ap,bi as Ao,bj as $o,bk as ko,bl as Rt,bm as op,bn as sp,bo as lp,bp as up,bq as cp,br as dp,bs as fp,bt as pp,bu as Ro,bv as Lo,bw as hp,bx as mp,by as rn,bz as yp,bA as gp,bB as bp,bC as Do,bD as vp,bE as Sp,bF as Pp,bG as wp,bH as Op,bI as xp,bJ as Tp,bK as Cp,bL as Mo,bM as Ep,bN as Ge,bO as No,bP as Fo,bQ as _p,bR as Uo,bS as jp,bT as Ip,bU as Wo,bV as Vo,bW as Bo,bX as cr,bY as Ap,bZ as $p,b_ as kp,b$ as Rp,c0 as Lp,c1 as Dp,c2 as Mp,c3 as Np,c4 as Fp,c5 as Up,c6 as Wp,c7 as Vp,c8 as Bp,c9 as Hp,ca as Kp,cb as Gp,cc as Yp,cd as zp,ce as qp,cf as Xp,cg as Ee,ch as Qp,ci as Zp}from"./LogPanel-B1HOW4Tx.js";import{F as Dn,C as Jp,S as eh,u as Mn,B as th,a as nh,D as rh,b as ih,c as Nn,d as an,I as ah,e as oh,T as Ho,f as sh,g as Fn,h as lh,i as Un,j as Ko,k as uh,l as Go,m as Wn,n as Yo,o as zo,p as ch,q as dh,r as fh,s as ph,t as hh,v as mh,w as yh,x as gh,y as bh,z as vh,A as qo,E as Sh,G as Ph,H as wh,J as Xo,K as Qo,L as Zo,M as Oh,N as xh,O as Th,P as Ch,Q as Eh,R as Jo,U as _h,V as jh,W as es,X as Ih,Y as dr,Z as Ah,_ as $h,$ as kh,a0 as Rh,a1 as Lh,a2 as Dh,a3 as Mh,a4 as Nh,a5 as Fh,a6 as Uh,a7 as Wh,a8 as Vh,a9 as Bh,aa as Hh,ab as Kh,ac as Gh,ad as Yh,ae as zh,af as qh,ag as Xh,ah as Qh,ai as Zh,aj as ts}from"./index-DhKpNUtg.js";import{D as Jh}from"./DownsamplingError--AAvWHv_.js";import{e as bt,c as em,d as tm,a as on,f as nm,b as rm,g as im,h as am,i as om,j as ns,u as sm,k as lm,l as um,m as cm,n as Ie,o as dm,p as fm,q as yt,r as vt,s as rs,t as Je,v as Lt,w as is,x as Vn,T as as,y as sn,M as os,z as Bn,A as Hn,B as Kn,D as ss,C as pm,E as ln,F as hm,G as mm,H as ym,I as gm,J as bm,K as vm,L as Sm,N as Pm,O as ls,P as wm,Q as Om,R as xm,S as Tm,U as us,V as Cm,W as Em,X as _m,Y as jm,Z as Im,_ as Am,$ as cs,a0 as $m,a1 as km,a2 as Rm,a3 as Lm,a4 as Dm,a5 as Mm,a6 as Nm,a7 as Fm,a8 as Um,a9 as Wm,aa as Vm,ab as Bm,ac as Hm,ad as Gn,ae as Km,af as Gm,ag as Ym,ah as zm,ai as qm,aj as Xm,ak as gt,al as Yn,am as zn,an as Qm,ao as Zm,ap as ds,aq as fs,ar as ge,as as Jm,at as qn,au as fr,av as ps,aw as hs,ax as ey,ay as ty,az as ny,aA as ry,aB as iy,aC as ay,aD as oy,aE as sy,aF as ly,aG as uy,aH as cy,aI as dy,aJ as fy,aK as py,aL as hy,aM as my,aN as yy,aO as gy,aP as by,aQ as vy,aR as Sy,aS as Py,aT as wy,aU as Oy,aV as pr,aW as xy,aX as un,aY as Ty,aZ as Cy,a_ as Ey,a$ as _y,b0 as jy,b1 as Iy,b2 as Ay,b3 as $y,b4 as ky,b5 as Ry,b6 as Ly,b7 as Dy,b8 as My,b9 as Ny,ba as Fy,bb as Uy,bc as Wy,bd as Vy,be as By,bf as Hy}from"./IrisGridContextProvider-VqqXlQQ2.js";import{u as Dt}from"./useResizeObserver-DqFyPCL-.js";import{m as Ky,u as Gy}from"./useMergeRef-B55qytMA.js";import"./helpers-BosuxZz1.js";var Yy=["children","keepMounted"];function hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hr(Object(n),!0).forEach(function(r){zy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zy(e,t,n){return(t=qy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qy(e){var t=Xy(e,"string");return typeof t=="symbol"?t:t+""}function Xy(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qy(e,t){if(e==null)return{};var n,r,i=Zy(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Zy(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Jy(e){var t=e.children,n=e.keepMounted,r=n===void 0?!1:n,i=Qy(e,Yy),a=r&&typeof t!="function",o=c.useRef(new Map),s=c.useMemo(()=>{var u=[],f=new Map;return a?(X.Children.forEach(t,h=>{if(!(h==null||h.key==null)){if(typeof h.props.children=="function")throw new Error("DHCTabPanels cannot use keepMounted with an ItemRenderer function as its children");var p=o.current.get(h.key);p==null&&(p=El({attributes:{style:"display: contents"}})),f.set(h.key,p),u.push(d.jsx(_l,{node:p,children:h.props.children},h.key))}}),o.current=f,u):(o.current=f,u)},[t,a]),l=c.useMemo(()=>{var u=[];return a&&X.Children.forEach(t,f=>{if(f==null||f.key==null){u.push(f);return}var h=o.current.get(f.key);if(h==null){u.push(f);return}u.push(d.jsx(Ot,{children:d.jsx(jl,{node:h})},f.key))}),u},[t,a]);return d.jsxs(d.Fragment,{children:[a&&s,d.jsx(Il,mr(mr({},i),{},{children:a?l:t}))]})}function yr(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function eg(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){yr(a,r,i,o,s,"next",l)}function s(l){yr(a,r,i,o,s,"throw",l)}o(void 0)})}}var tg=[["api"],["client"],["dashboardData","*","connection"],["dashboardData","*","sessionWrapper"],["dashboardData","*","openedMap"],["layoutStorage"],["storage"]],ms=10;function ng(e){var t=new Map;return function(r,i){var a,o=[...(a=t.get(this))!==null&&a!==void 0?a:[],r];if(i===Object(i)&&t.set(i,[...o]),o.shift(),!rg(o,e))return i instanceof Map?Array.from(i.entries()):i}}function rg(e,t){for(var n=function(o){if(e.length===t[o].length&&e.every((s,l)=>t[o][l]==="*"||s===t[o][l]))return{v:!0}},r,i=0;i<t.length;i+=1)if(r=n(i),r)return r.v;return!1}function ig(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ms,i=$l({maximumDepth:r});return(t=i(e,ng(n),2))!==null&&t!==void 0?t:""}function ag(e){return JSON.stringify(e,null,2)}function og(e){var t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),i=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(r,"-").concat(i).concat(a).concat(o)}function sg(e,t,n){return cn.apply(this,arguments)}function cn(){return cn=eg(function*(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:tg,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"".concat(og(new Date),"_support_logs"),a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:ms,o=new Al,s=o.folder(i);s.file("console.txt",e.getFormattedHistory()),t!=null&&s.file("metadata.json",ag(t)),n!=null&&s.file("redux.json",ig(n,r,a));var l=yield o.generateAsync({type:"blob"}),u=document.createElement("a");u.href=URL.createObjectURL(l),u.download="".concat(i,".zip"),u.click()}),cn.apply(this,arguments)}function lg(e,t){return e===0?0:t==="all"||e===t.size?"all":t.size}function ys(e,t){return e===t?!0:e==="all"||t==="all"||e.size!==t.size?!1:[...e.keys()].every(n=>t.has(n))}function gs(e,t){return e.isInverted===t.isInverted&&ys(e.selection,t.selection)}function bs(e,t,n){if(e==="all")return"all";var r=[...e.keys()];return new Set(r.map(i=>{var a=t(i);if(a===void 0)throw new Error("Could not find item with key ".concat(i));return n(a)}))}function vs(e,t,n){var r=e==="all"||e.size>t/2,i=e;return r&&(i=e==="all"?new Set:new Set([...xd(0,t-1)].map(n).filter(a=>!e.has(a)))),{selection:i,isInverted:r}}function ug(e,t){return c.useCallback(function(){var n=e(...arguments);return t(),n},[t,e])}function cg(e){return c.useCallback(t=>{e(t.target.value)},[e])}function Xn(e,t){return c.useCallback(n=>{typeof e=="function"?e(t(n)):e.current=t(n)},[t,e])}function $e(e,t){return hg(e)||pg(e,t)||fg(e,t)||dg()}function dg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fg(e,t){if(e){if(typeof e=="string")return gr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gr(e,t):void 0}}function gr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pg(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function hg(e){if(Array.isArray(e))return e}function Ss(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ja,t=c.useState(0),n=$e(t,2),r=n[0],i=n[1],a=c.useState(0),o=$e(a,2),s=o[0],l=o[1],u=c.useState(0),f=$e(u,2),h=f[0],p=f[1],m=c.useState(0),g=$e(m,2),b=g[0],y=g[1],S=c.useMemo(()=>new DOMRect(r,s,h,b),[b,h,r,s]),v=c.useState(null),T=$e(v,2),w=T[0],x=T[1],P=Xn(x,e),E=c.useCallback(C=>{var A,D=$e(C,1),L=D[0],j=(A=L==null?void 0:L.contentRect)!==null&&A!==void 0?A:{x:0,y:0,width:0,height:0};i(j.x),l(j.y),p(j.width),y(j.height)},[]);return Dt(w,E),{ref:P,contentRect:S}}function mg(e,t){return vg(e)||bg(e,t)||gg(e,t)||yg()}function yg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as c,J as X,P as El,D as d,Q as _l,S as Ot,T as jl,U as Il,V as Al,W as $l,C as xn,X as kl,G as H,Y as Tn,Z as Wa,a0 as Rl,a1 as Ll,a2 as Dl,a3 as Ml,a4 as Nl,a5 as Fl,a6 as Ul,a7 as Wl,a8 as Vl,a9 as Bl,aa as Qt,ab as Hl,ac as Va,ad as xt,ae as Xe,I as ae,af as Ba,ag as Ha,ah as Cn,ai as Ka,aj as Ga,ak as Zt,al as Kl,am as He,an as Ya,H as za,ao as qa,ap as Gl,aq as Yl,ar as zl,as as Xa,at as ql,au as Xl,av as Ql,aw as Zl,ax as Jl,ay as eu,az as tu,aA as nu,aB as ru,aC as iu,aD as au,aE as ou,aF as su,aG as lu,aH as uu,aI as cu,aJ as du,aK as fu,aL as pu,aM as hu,aN as mu,aO as yu,aP as gu,aQ as bu,aR as Qa,aS as vu,aT as Su,aU as Pu,aV as wu,aW as Ou,aX as xu,aY as Tu,aZ as Cu,a_ as Eu,a$ as _u,b0 as ju,b1 as Iu,b2 as Au,b3 as $u,b4 as ku,b5 as Ru,b6 as Lu,b7 as Du,b8 as Mu,b9 as Nu,ba as Fu,bb as Uu,bc as Wu,O as Vu,bd as Bu,be as Hu,bf as Ku,bg as Gu,bh as Yu,bi as zu,L as qu,N as Xu,bj as Jt,bk as Qu,bl as Zu,bm as or,bn as Ju,bo as ec,bp as tc,bq as nc,br as rc,bs as ic,bt as ac,bu as oc,R as sc,bv as lc,bw as uc,bx as Za,by as cc,bz as dc}from"./vendor-DNp6JF3q.js";import{i as Ja,b as En,p as eo,r as to,a as J,M as no,c as ro,g as _n,L as Ae,v as io,d as jn,e as In,f as Tt,h as fc,j as pc,k as hc,l as mc,m as yc,n as An,o as gc,q as bc,s as vc,t as ao,u as Ct,w as Sc,T as en,C as Pc,D as wc,x as Oc,y as xc,z as Tc,A as Cc,B as Ec,E as _c,F as jc,G as oo,N as Ic,P as Ac,S as $c,H as kc,I as Rc,J as Lc,K as Dc,W as Mc,O as Nc,Q as Fc,R as Uc,U as Wc,V as Vc,X as Bc,Y as Hc,Z as Kc,_ as Gc,$ as Yc,a0 as zc,a1 as qc,a2 as Xc,a3 as Qc,a4 as Zc,a5 as Jc,a6 as ed,a7 as td,a8 as nd,a9 as rd,aa as id,ab as ad,ac as $n,ad as Et,ae as kn,af as od,ag as so,ah as sd,ai as ld,aj as ud,ak as cd,al as dd,am as fd,an as pd}from"./index-CuuL1-IW.js";import{F as hd,f as md,e as yd,C as lo,g as gd,a as Qe,D as sr,h as bd,i as vd,d as Sd,U as _t,j as uo,k as co,l as Pd,c as wd,S as Od}from"./LocalWorkspaceStorage-BzXtO448.js";import{A as u1,m as c1,n as d1,G as f1,L as p1,o as h1,p as m1,q as y1,r as g1,s as b1,t as v1,u as S1,b as P1}from"./LocalWorkspaceStorage-BzXtO448.js";import{k as xd,l as Td,m as Cd,n as Ed,o as Ke,p as _d,q as jd,t as Id,v as Ad,w as jt,x as pe,y as fe,z as $d,T as It,A as Ze,H as Rn,P as At,C as Pe,B as je,D as fo,F as mt,G as po,r as Ce,M as ne,K as oe,R as lr,I as tn,J as re,L as ho,N as nn,O as $t,E as mo,Q as Ln,U as kt,V as yo,W as kd,X as Rd,c as Ld,Y as Dd,Z as go,_ as bo,S as Md,$ as Nd,a0 as Fd,a1 as vo,a2 as Ud,a3 as Wd,a4 as Vd,a5 as So,a6 as Bd,a7 as Hd,a8 as Kd,a9 as Gd,aa as Po,ab as Yd,u as xe,ac as zd,ad as qd,ae as Xd,af as Qd,ag as Zd,ah as wo,g as Jd,ai as ef,aj as tf,ak as nf,al as Oo,am as rf,an as xo,ao as To,ap as Co,aq as Eo,s as _o,ar as ur,as as af,at as of,au as sf,av as lf,aw as uf,ax as cf,ay as df,az as ff,aA as pf,aB as hf,aC as mf,aD as yf,aE as gf,aF as bf,aG as jo,aH as vf,aI as Sf,aJ as Pf,aK as wf,aL as Of,aM as xf,aN as Tf,aO as Cf,aP as Ef,aQ as _f,e as jf,b as If,aR as Af,aS as $f,aT as kf,aU as Rf,aV as Lf,aW as Df,aX as Mf,aY as Nf,aZ as Ff,a_ as Uf,a$ as Wf,b0 as Vf,b1 as Bf,b2 as Hf,b3 as Kf,b4 as Gf,b5 as Yf,b6 as Io,b7 as zf,b8 as qf,a as Xf,b9 as Qf,ba as Zf,bb as Jf,bc as ep,bd as tp,be as np,bf as rp,bg as ip,bh as ap,bi as Ao,bj as $o,bk as ko,bl as Rt,bm as op,bn as sp,bo as lp,bp as up,bq as cp,br as dp,bs as fp,bt as pp,bu as Ro,bv as Lo,bw as hp,bx as mp,by as rn,bz as yp,bA as gp,bB as bp,bC as Do,bD as vp,bE as Sp,bF as Pp,bG as wp,bH as Op,bI as xp,bJ as Tp,bK as Cp,bL as Mo,bM as Ep,bN as Ge,bO as No,bP as Fo,bQ as _p,bR as Uo,bS as jp,bT as Ip,bU as Wo,bV as Vo,bW as Bo,bX as cr,bY as Ap,bZ as $p,b_ as kp,b$ as Rp,c0 as Lp,c1 as Dp,c2 as Mp,c3 as Np,c4 as Fp,c5 as Up,c6 as Wp,c7 as Vp,c8 as Bp,c9 as Hp,ca as Kp,cb as Gp,cc as Yp,cd as zp,ce as qp,cf as Xp,cg as Ee,ch as Qp,ci as Zp}from"./LogPanel-DGMrBV0W.js";import{F as Dn,C as Jp,S as eh,u as Mn,B as th,a as nh,D as rh,b as ih,c as Nn,d as an,I as ah,e as oh,T as Ho,f as sh,g as Fn,h as lh,i as Un,j as Ko,k as uh,l as Go,m as Wn,n as Yo,o as zo,p as ch,q as dh,r as fh,s as ph,t as hh,v as mh,w as yh,x as gh,y as bh,z as vh,A as qo,E as Sh,G as Ph,H as wh,J as Xo,K as Qo,L as Zo,M as Oh,N as xh,O as Th,P as Ch,Q as Eh,R as Jo,U as _h,V as jh,W as es,X as Ih,Y as dr,Z as Ah,_ as $h,$ as kh,a0 as Rh,a1 as Lh,a2 as Dh,a3 as Mh,a4 as Nh,a5 as Fh,a6 as Uh,a7 as Wh,a8 as Vh,a9 as Bh,aa as Hh,ab as Kh,ac as Gh,ad as Yh,ae as zh,af as qh,ag as Xh,ah as Qh,ai as Zh,aj as ts}from"./index-LlFHaD5l.js";import{D as Jh}from"./DownsamplingError--AAvWHv_.js";import{e as bt,c as em,d as tm,a as on,f as nm,b as rm,g as im,h as am,i as om,j as ns,u as sm,k as lm,l as um,m as cm,n as Ie,o as dm,p as fm,q as yt,r as vt,s as rs,t as Je,v as Lt,w as is,x as Vn,T as as,y as sn,M as os,z as Bn,A as Hn,B as Kn,D as ss,C as pm,E as ln,F as hm,G as mm,H as ym,I as gm,J as bm,K as vm,L as Sm,N as Pm,O as ls,P as wm,Q as Om,R as xm,S as Tm,U as us,V as Cm,W as Em,X as _m,Y as jm,Z as Im,_ as Am,$ as cs,a0 as $m,a1 as km,a2 as Rm,a3 as Lm,a4 as Dm,a5 as Mm,a6 as Nm,a7 as Fm,a8 as Um,a9 as Wm,aa as Vm,ab as Bm,ac as Hm,ad as Gn,ae as Km,af as Gm,ag as Ym,ah as zm,ai as qm,aj as Xm,ak as gt,al as Yn,am as zn,an as Qm,ao as Zm,ap as ds,aq as fs,ar as ge,as as Jm,at as qn,au as fr,av as ps,aw as hs,ax as ey,ay as ty,az as ny,aA as ry,aB as iy,aC as ay,aD as oy,aE as sy,aF as ly,aG as uy,aH as cy,aI as dy,aJ as fy,aK as py,aL as hy,aM as my,aN as yy,aO as gy,aP as by,aQ as vy,aR as Sy,aS as Py,aT as wy,aU as Oy,aV as pr,aW as xy,aX as un,aY as Ty,aZ as Cy,a_ as Ey,a$ as _y,b0 as jy,b1 as Iy,b2 as Ay,b3 as $y,b4 as ky,b5 as Ry,b6 as Ly,b7 as Dy,b8 as My,b9 as Ny,ba as Fy,bb as Uy,bc as Wy,bd as Vy,be as By,bf as Hy}from"./IrisGridContextProvider-C1RLweww.js";import{u as Dt}from"./useResizeObserver-DqFyPCL-.js";import{m as Ky,u as Gy}from"./useMergeRef-B55qytMA.js";import"./helpers-BosuxZz1.js";var Yy=["children","keepMounted"];function hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hr(Object(n),!0).forEach(function(r){zy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zy(e,t,n){return(t=qy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qy(e){var t=Xy(e,"string");return typeof t=="symbol"?t:t+""}function Xy(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qy(e,t){if(e==null)return{};var n,r,i=Zy(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Zy(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Jy(e){var t=e.children,n=e.keepMounted,r=n===void 0?!1:n,i=Qy(e,Yy),a=r&&typeof t!="function",o=c.useRef(new Map),s=c.useMemo(()=>{var u=[],f=new Map;return a?(X.Children.forEach(t,h=>{if(!(h==null||h.key==null)){if(typeof h.props.children=="function")throw new Error("DHCTabPanels cannot use keepMounted with an ItemRenderer function as its children");var p=o.current.get(h.key);p==null&&(p=El({attributes:{style:"display: contents"}})),f.set(h.key,p),u.push(d.jsx(_l,{node:p,children:h.props.children},h.key))}}),o.current=f,u):(o.current=f,u)},[t,a]),l=c.useMemo(()=>{var u=[];return a&&X.Children.forEach(t,f=>{if(f==null||f.key==null){u.push(f);return}var h=o.current.get(f.key);if(h==null){u.push(f);return}u.push(d.jsx(Ot,{children:d.jsx(jl,{node:h})},f.key))}),u},[t,a]);return d.jsxs(d.Fragment,{children:[a&&s,d.jsx(Il,mr(mr({},i),{},{children:a?l:t}))]})}function yr(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function eg(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){yr(a,r,i,o,s,"next",l)}function s(l){yr(a,r,i,o,s,"throw",l)}o(void 0)})}}var tg=[["api"],["client"],["dashboardData","*","connection"],["dashboardData","*","sessionWrapper"],["dashboardData","*","openedMap"],["layoutStorage"],["storage"]],ms=10;function ng(e){var t=new Map;return function(r,i){var a,o=[...(a=t.get(this))!==null&&a!==void 0?a:[],r];if(i===Object(i)&&t.set(i,[...o]),o.shift(),!rg(o,e))return i instanceof Map?Array.from(i.entries()):i}}function rg(e,t){for(var n=function(o){if(e.length===t[o].length&&e.every((s,l)=>t[o][l]==="*"||s===t[o][l]))return{v:!0}},r,i=0;i<t.length;i+=1)if(r=n(i),r)return r.v;return!1}function ig(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ms,i=$l({maximumDepth:r});return(t=i(e,ng(n),2))!==null&&t!==void 0?t:""}function ag(e){return JSON.stringify(e,null,2)}function og(e){var t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),i=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(r,"-").concat(i).concat(a).concat(o)}function sg(e,t,n){return cn.apply(this,arguments)}function cn(){return cn=eg(function*(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:tg,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"".concat(og(new Date),"_support_logs"),a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:ms,o=new Al,s=o.folder(i);s.file("console.txt",e.getFormattedHistory()),t!=null&&s.file("metadata.json",ag(t)),n!=null&&s.file("redux.json",ig(n,r,a));var l=yield o.generateAsync({type:"blob"}),u=document.createElement("a");u.href=URL.createObjectURL(l),u.download="".concat(i,".zip"),u.click()}),cn.apply(this,arguments)}function lg(e,t){return e===0?0:t==="all"||e===t.size?"all":t.size}function ys(e,t){return e===t?!0:e==="all"||t==="all"||e.size!==t.size?!1:[...e.keys()].every(n=>t.has(n))}function gs(e,t){return e.isInverted===t.isInverted&&ys(e.selection,t.selection)}function bs(e,t,n){if(e==="all")return"all";var r=[...e.keys()];return new Set(r.map(i=>{var a=t(i);if(a===void 0)throw new Error("Could not find item with key ".concat(i));return n(a)}))}function vs(e,t,n){var r=e==="all"||e.size>t/2,i=e;return r&&(i=e==="all"?new Set:new Set([...xd(0,t-1)].map(n).filter(a=>!e.has(a)))),{selection:i,isInverted:r}}function ug(e,t){return c.useCallback(function(){var n=e(...arguments);return t(),n},[t,e])}function cg(e){return c.useCallback(t=>{e(t.target.value)},[e])}function Xn(e,t){return c.useCallback(n=>{typeof e=="function"?e(t(n)):e.current=t(n)},[t,e])}function $e(e,t){return hg(e)||pg(e,t)||fg(e,t)||dg()}function dg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fg(e,t){if(e){if(typeof e=="string")return gr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gr(e,t):void 0}}function gr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pg(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function hg(e){if(Array.isArray(e))return e}function Ss(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ja,t=c.useState(0),n=$e(t,2),r=n[0],i=n[1],a=c.useState(0),o=$e(a,2),s=o[0],l=o[1],u=c.useState(0),f=$e(u,2),h=f[0],p=f[1],m=c.useState(0),g=$e(m,2),b=g[0],y=g[1],S=c.useMemo(()=>new DOMRect(r,s,h,b),[b,h,r,s]),v=c.useState(null),T=$e(v,2),w=T[0],x=T[1],P=Xn(x,e),_=c.useCallback(C=>{var A,D=$e(C,1),L=D[0],j=(A=L==null?void 0:L.contentRect)!==null&&A!==void 0?A:{x:0,y:0,width:0,height:0};i(j.x),l(j.y),p(j.width),y(j.height)},[]);return Dt(w,_),{ref:P,contentRect:S}}function mg(e,t){return vg(e)||bg(e,t)||gg(e,t)||yg()}function yg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gg(e,t){if(e){if(typeof e=="string")return br(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?br(e,t):void 0}}function br(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bg(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function vg(e){if(Array.isArray(e))return e}function Sg(e){var t=c.useState(!0),n=mg(t,2),r=n[0],i=n[1];return c.useEffect(()=>{var a=setTimeout(()=>{i(!1)},e);return()=>{clearTimeout(a)}},[e]),r}function Pg(e,t){return Tg(e)||xg(e,t)||Og(e,t)||wg()}function wg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Og(e,t){if(e){if(typeof e=="string")return vr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vr(e,t):void 0}}function vr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xg(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Tg(e){if(Array.isArray(e))return e}function Cg(e){var t=c.useState(e),n=Pg(t,2),r=n[0],i=n[1];return c.useEffect(()=>{i(e)},[e]),[r,i]}function Eg(e,t,n,r){var i=c.useRef(0);c.useEffect(()=>{i.current>=n||r&&(i.current+=1,e())},[n,r,...t])}function Ps(e,t){var n=c.useRef(e),r=t(n.current,e)?n.current:e;return n.current=r,r}function _g(e){e.preventDefault()}function ws(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=c.useMemo(()=>"useSubmitButtonRef-".concat(xn()),[]),n=c.useCallback(a=>{var o;a==null||(o=a.UNSAFE_getDOMNode())===null||o===void 0||o.setAttribute("form",t)},[t]),r=c.useMemo(()=>({id:t,onSubmit:e?void 0:_g}),[t,e]),i=c.useMemo(()=>({form:t,ref:n}),[t,n]);return{formProps:r,submitButtonProps:i}}function Os(e,t,n){var r=e.getItem,i=e.selectedKeys,a=e.items;return c.useMemo(()=>{var o=vs(i,a.length,n),s=o.selection,l=o.isInverted;return{selection:bs(s,r,t),isInverted:l}},[i,a.length,n,r,t])}function Qn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ja,n=c.useRef();return c.useEffect(()=>()=>{var r;return(r=n.current)===null||r===void 0?void 0:r.call(n)},[]),c.useCallback(r=>{var i;(i=n.current)===null||i===void 0||i.call(n);var a=t(r);a&&(a.addEventListener("scroll",e),n.current=()=>{a.removeEventListener("scroll",e),n.current=void 0})},[t,e])}function Sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sr(Object(n),!0).forEach(function(r){jg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jg(e,t,n){return(t=Ig(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ig(e){var t=Ag(e,"string");return typeof t=="symbol"?t:t+""}function Ag(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $g(e,t,n,r){var i=arguments.length===4;return c.useCallback(a=>{var o=i?a??r:a;n(Pr(Pr({},e),{},{[t]:o}))},[n,e,t,i,r])}function nt(e,t){return Dg(e)||Lg(e,t)||Rg(e,t)||kg()}function kg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
5
5
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rg(e,t){if(e){if(typeof e=="string")return wr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wr(e,t):void 0}}function wr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Lg(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Dg(e){if(Array.isArray(e))return e}function et(e,t){var n=c.useState(!0),r=nt(n,2),i=r[0],a=r[1],o=c.useState(e),s=nt(o,2),l=s[0],u=s[1],f=c.useState(e),h=nt(f,2),p=h[0],m=h[1],g=c.useState(t),b=nt(g,2),y=b[0],S=b[1];return(e!==p||t!==y)&&(a(!0),m(e),S(t)),c.useEffect(()=>{var v=!1,T=setTimeout(()=>{v||(a(!1),u(e))},t);return()=>{v=!0,clearTimeout(T)}},[e,t]),{isDebouncing:i,value:l}}function Mg(e,t){return Wg(e)||Ug(e,t)||Fg(e,t)||Ng()}function Ng(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fg(e,t){if(e){if(typeof e=="string")return Or(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Or(e,t):void 0}}function Or(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ug(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Wg(e){if(Array.isArray(e))return e}function xs(e,t){return c.useCallback(n=>{if(n!=null){var r=t==null?[n]:n.querySelectorAll(t);r.forEach(i=>{Object.entries(e).forEach(a=>{var o=Mg(a,2),s=o[0],l=o[1];i.setAttribute(s,l)})})}},[e,t])}var Ts={spellCheck:!1};function Vg(e){var t=xs(Ts,e);return Xn(t,bt)}function Bg(e,t,n){var r=c.useMemo(()=>typeof e=="string"?[e]:e,[e]);c.useEffect(()=>(r.forEach(i=>window.addEventListener(i,t,n)),()=>r.forEach(i=>window.removeEventListener(i,t,n))),[r,t,n])}const Hg=Object.freeze(Object.defineProperty({__proto__:null,SPELLCHECK_FALSE_ATTRIBUTE:Ts,createValidationProps:em,defaultGetKey:tm,extractSpectrumHTMLElement:bt,extractSpectrumLastChildHTMLElement:on,findSpectrumComboBoxScrollArea:nm,findSpectrumPickerScrollArea:rm,findSpectrumPopoverScrollArea:im,getPositionOfSelectedItem:am,getSelectedItemCountOrAll:lg,identityExtractHTMLElement:om,isElementOfType:ns,isSelectionEqual:ys,isSelectionMaybeInvertedEqual:gs,mapSelection:bs,mergeRefs:Ky,optimizeSelection:vs,useAsyncInterval:Td,useCallbackWithAction:ug,useChangeEventValueCallback:cg,useCheckOverflow:sm,useContentRect:Ss,useContextOrThrow:Cd,useCopyToClipboard:Ed,useDebouncedCallback:Ke,useDebouncedValue:et,useDelay:Sg,useDependentState:Cg,useEffectNTimesWhen:Eg,useFormWithDetachedSubmitButton:ws,useForwardedRef:_d,useIsEqualMemo:Ps,useIsMountedRef:jd,useMappedRef:Xn,useMappedSelection:Os,useMergeRef:Gy,useOnChange:lm,useOnScrollOffsetChangeCallback:um,useOnScrollRef:Qn,usePopoverOnScrollRef:cm,usePrevious:Id,usePromiseFactory:Ie,usePropChangeCallback:$g,useResizeObserver:Dt,useSetAttributesCallback:xs,useSpectrumDisableSpellcheckRef:Vg,useThrottledCallback:Ad,useUndoRedo:dm,useWindowListener:Bg,useWindowedListData:fm},Symbol.toStringTag,{value:"Module"}));var Kg=["aria-label","aria-labelledby","aria-describedby","aria-details","marginX","marginY","width","height","minWidth","minHeight","maxWidth","maxHeight","flex","flexGrow","flexShrink","flexBasis","justifySelf","alignSelf","order","gridArea","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","position","zIndex","top","bottom","start","end","left","right","isHidden"];function Gg(e,t){if(e==null)return{};var n,r,i=Yg(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yg(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Cs(e){var t=e["aria-label"],n=e["aria-labelledby"],r=e["aria-describedby"],i=e["aria-details"],a=e.marginX,o=e.marginY,s=e.width,l=e.height,u=e.minWidth,f=e.minHeight,h=e.maxWidth,p=e.maxHeight,m=e.flex,g=e.flexGrow,b=e.flexShrink,y=e.flexBasis,S=e.justifySelf,v=e.alignSelf,T=e.order,w=e.gridArea,x=e.gridColumn,P=e.gridRow,E=e.gridColumnStart,C=e.gridColumnEnd,A=e.gridRowStart,D=e.gridRowEnd,L=e.position,j=e.zIndex,$=e.top,N=e.bottom,O=e.start,_=e.end,I=e.left,M=e.right,K=e.isHidden,G=Gg(e,Kg);return{ariaLabelProps:{"aria-label":t,"aria-labelledby":n,"aria-describedby":r,"aria-details":i},styleProps:{marginX:a,marginY:o,width:s,height:l,minWidth:u,minHeight:f,maxWidth:h,maxHeight:p,flex:m,flexGrow:g,flexShrink:b,flexBasis:y,justifySelf:S,alignSelf:v,order:T,gridArea:w,gridColumn:x,gridRow:P,gridColumnStart:E,gridColumnEnd:C,gridRowStart:A,gridRowEnd:D,position:L,zIndex:j,top:$,bottom:N,start:O,end:_,left:I,right:M,isHidden:K},componentProps:G}}function Zn(e){var t=e.normalizedItems,n=e.defaultSelectedKeys,r=e.disabledKeys,i=e.selectedKeys,a=e.onChange,o=c.useMemo(()=>yt(i),[i]),s=c.useMemo(()=>yt(n),[n]),l=c.useMemo(()=>yt(r),[r]),u=c.useCallback(f=>{if(a!=null){if(f==="all"){a("all");return}var h=new Set,p=new Set;t.forEach(m=>{var g=String(vt(m));f.has(g)&&(h.add(vt(m)),p.add(g))}),f.forEach(m=>{p.has(String(m))||h.add(m)}),a(h)}},[t,a]);return{selectedStringKeys:o,defaultSelectedStringKeys:s,disabledStringKeys:l,onStringSelectionChange:u}}function zg(){var e=jt(),t=e.selectedThemeKey,n=e.setSelectedThemeKey,r=e.themes,i=c.useCallback(a=>{a!=null&&n("".concat(a))},[n]);return d.jsx(kl,{label:"Pick a color scheme",items:r,selectedKey:t,onSelectionChange:i,children:a=>d.jsx(Ot,{children:a.name},a.themeKey)})}function qg(e){var t=e.className,n=e.style;return d.jsx("div",{className:H("dh-logo",t),style:n})}function Xg(e,t){return eb(e)||Jg(e,t)||Zg(e,t)||Qg()}function Qg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fg(e,t){if(e){if(typeof e=="string")return Or(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Or(e,t):void 0}}function Or(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ug(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Wg(e){if(Array.isArray(e))return e}function xs(e,t){return c.useCallback(n=>{if(n!=null){var r=t==null?[n]:n.querySelectorAll(t);r.forEach(i=>{Object.entries(e).forEach(a=>{var o=Mg(a,2),s=o[0],l=o[1];i.setAttribute(s,l)})})}},[e,t])}var Ts={spellCheck:!1};function Vg(e){var t=xs(Ts,e);return Xn(t,bt)}function Bg(e,t,n){var r=c.useMemo(()=>typeof e=="string"?[e]:e,[e]);c.useEffect(()=>(r.forEach(i=>window.addEventListener(i,t,n)),()=>r.forEach(i=>window.removeEventListener(i,t,n))),[r,t,n])}const Hg=Object.freeze(Object.defineProperty({__proto__:null,SPELLCHECK_FALSE_ATTRIBUTE:Ts,createValidationProps:em,defaultGetKey:tm,extractSpectrumHTMLElement:bt,extractSpectrumLastChildHTMLElement:on,findSpectrumComboBoxScrollArea:nm,findSpectrumPickerScrollArea:rm,findSpectrumPopoverScrollArea:im,getPositionOfSelectedItem:am,getSelectedItemCountOrAll:lg,identityExtractHTMLElement:om,isElementOfType:ns,isSelectionEqual:ys,isSelectionMaybeInvertedEqual:gs,mapSelection:bs,mergeRefs:Ky,optimizeSelection:vs,useAsyncInterval:Td,useCallbackWithAction:ug,useChangeEventValueCallback:cg,useCheckOverflow:sm,useContentRect:Ss,useContextOrThrow:Cd,useCopyToClipboard:Ed,useDebouncedCallback:Ke,useDebouncedValue:et,useDelay:Sg,useDependentState:Cg,useEffectNTimesWhen:Eg,useFormWithDetachedSubmitButton:ws,useForwardedRef:_d,useIsEqualMemo:Ps,useIsMountedRef:jd,useMappedRef:Xn,useMappedSelection:Os,useMergeRef:Gy,useOnChange:lm,useOnScrollOffsetChangeCallback:um,useOnScrollRef:Qn,usePopoverOnScrollRef:cm,usePrevious:Id,usePromiseFactory:Ie,usePropChangeCallback:$g,useResizeObserver:Dt,useSetAttributesCallback:xs,useSpectrumDisableSpellcheckRef:Vg,useThrottledCallback:Ad,useUndoRedo:dm,useWindowListener:Bg,useWindowedListData:fm},Symbol.toStringTag,{value:"Module"}));var Kg=["aria-label","aria-labelledby","aria-describedby","aria-details","marginX","marginY","width","height","minWidth","minHeight","maxWidth","maxHeight","flex","flexGrow","flexShrink","flexBasis","justifySelf","alignSelf","order","gridArea","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","position","zIndex","top","bottom","start","end","left","right","isHidden"];function Gg(e,t){if(e==null)return{};var n,r,i=Yg(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yg(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Cs(e){var t=e["aria-label"],n=e["aria-labelledby"],r=e["aria-describedby"],i=e["aria-details"],a=e.marginX,o=e.marginY,s=e.width,l=e.height,u=e.minWidth,f=e.minHeight,h=e.maxWidth,p=e.maxHeight,m=e.flex,g=e.flexGrow,b=e.flexShrink,y=e.flexBasis,S=e.justifySelf,v=e.alignSelf,T=e.order,w=e.gridArea,x=e.gridColumn,P=e.gridRow,_=e.gridColumnStart,C=e.gridColumnEnd,A=e.gridRowStart,D=e.gridRowEnd,L=e.position,j=e.zIndex,$=e.top,N=e.bottom,O=e.start,E=e.end,I=e.left,M=e.right,K=e.isHidden,G=Gg(e,Kg);return{ariaLabelProps:{"aria-label":t,"aria-labelledby":n,"aria-describedby":r,"aria-details":i},styleProps:{marginX:a,marginY:o,width:s,height:l,minWidth:u,minHeight:f,maxWidth:h,maxHeight:p,flex:m,flexGrow:g,flexShrink:b,flexBasis:y,justifySelf:S,alignSelf:v,order:T,gridArea:w,gridColumn:x,gridRow:P,gridColumnStart:_,gridColumnEnd:C,gridRowStart:A,gridRowEnd:D,position:L,zIndex:j,top:$,bottom:N,start:O,end:E,left:I,right:M,isHidden:K},componentProps:G}}function Zn(e){var t=e.normalizedItems,n=e.defaultSelectedKeys,r=e.disabledKeys,i=e.selectedKeys,a=e.onChange,o=c.useMemo(()=>yt(i),[i]),s=c.useMemo(()=>yt(n),[n]),l=c.useMemo(()=>yt(r),[r]),u=c.useCallback(f=>{if(a!=null){if(f==="all"){a("all");return}var h=new Set,p=new Set;t.forEach(m=>{var g=String(vt(m));f.has(g)&&(h.add(vt(m)),p.add(g))}),f.forEach(m=>{p.has(String(m))||h.add(m)}),a(h)}},[t,a]);return{selectedStringKeys:o,defaultSelectedStringKeys:s,disabledStringKeys:l,onStringSelectionChange:u}}function zg(){var e=jt(),t=e.selectedThemeKey,n=e.setSelectedThemeKey,r=e.themes,i=c.useCallback(a=>{a!=null&&n("".concat(a))},[n]);return d.jsx(kl,{label:"Pick a color scheme",items:r,selectedKey:t,onSelectionChange:i,children:a=>d.jsx(Ot,{children:a.name},a.themeKey)})}function qg(e){var t=e.className,n=e.style;return d.jsx("div",{className:H("dh-logo",t),style:n})}function Xg(e,t){return eb(e)||Jg(e,t)||Zg(e,t)||Qg()}function Qg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
7
7
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zg(e,t){if(e){if(typeof e=="string")return xr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xr(e,t):void 0}}function xr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Jg(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function eb(e){if(Array.isArray(e))return e}var Tr=J.module("useExternalTheme");function Es(){var e=c.useState(()=>{var a=En();return{isEnabled:a,isPending:a}}),t=Xg(e,2),n=t[0],r=t[1],i=c.useCallback(a=>{var o=eo(a);r({isEnabled:!0,isPending:!1,themeData:o})},[]);return c.useEffect(()=>{if(!n.isEnabled)return;Tr.debug("Requesting external theme data");function a(o){var s=_n();o.source!==window&&o.source!==s||o.data.message===no&&ro(o.data.payload)&&i(o.data.payload)}return window.addEventListener("message",a),to().then(i).catch(o=>{Tr.error(o),r({isEnabled:!0,isPending:!1})}),()=>{window.removeEventListener("message",a)}},[i,n.isEnabled]),n}function tb(e,t){return ab(e)||ib(e,t)||rb(e,t)||nb()}function nb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
8
8
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rb(e,t){if(e){if(typeof e=="string")return Cr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cr(e,t):void 0}}function Cr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ib(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function ab(e){if(Array.isArray(e))return e}var Mt=c.createContext(!1);Mt.displayName="FontsLoadedContext";function _s(e){var t=e.fontClassNames,n=t===void 0?["fira-sans-regular","fira-sans-semibold","fira-mono"]:t,r=e.children,i=c.useState(!1),a=tb(i,2),o=a[0],s=a[1];return c.useEffect(function(){document.fonts.ready.then(()=>{s(!0)})},[]),d.jsxs(d.Fragment,{children:[d.jsx(Mt.Provider,{value:o,children:r}),d.jsx("div",{id:"preload-fonts",style:{visibility:"hidden",position:"absolute",top:-1e4},children:n.map(l=>d.jsx("p",{className:l,children:"preload"},l))})]})}function js(e){var t=e.children,n=c.useContext(Mt);return n?d.jsx(d.Fragment,{children:t}):d.jsx(Ae,{"data-testid":"fonts-loaded-loading"})}var ob=["UNSAFE_className"],sb=["forceRerenderKey","ref"];function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Er(Object(n),!0).forEach(function(r){lb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lb(e,t,n){return(t=ub(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ub(e){var t=cb(e,"string");return typeof t=="symbol"?t:t+""}function cb(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jr(e,t){if(e==null)return{};var n,r,i=db(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function db(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Is(e){var t=e.UNSAFE_className,n=jr(e,ob),r=rs(n),i=r.forceRerenderKey,a=r.ref,o=jr(r,sb);return c.createElement(Tn,_r(_r({},o),{},{key:i,ref:a,UNSAFE_className:H("dh-combobox","dh-combobox-normalized",t)}))}var fb=["onScroll"];function Ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ir(Object(n),!0).forEach(function(r){pb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ir(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pb(e,t,n){return(t=hb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hb(e){var t=mb(e,"string");return typeof t=="symbol"?t:t+""}function mb(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yb(e,t){if(e==null)return{};var n,r,i=gb(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Jn(e){var t,n,r=Cs(e),i=r.ariaLabelProps,a=r.componentProps,o=r.styleProps,s=a.onScroll,l=s===void 0?pe:s,u=yb(a,fb),f=Je(),h=f.scale,p=Qn(l,bt),m=Ss(bt),g=m.ref,b=m.contentRect;return d.jsx(Wa,rt(rt({direction:"column",ref:g},o),{},{minHeight:(t=o.minHeight)!==null&&t!==void 0?t:1,UNSAFE_className:H("dh-list-view-wrapper","dh-list-view-wrapper-density-".concat((n=u.density)!==null&&n!==void 0?n:"regular"),"dh-list-view-wrapper-scale-".concat(h),o.UNSAFE_className),children:b.height===0?null:d.jsx(Rl,rt(rt({ref:p},i),u))}))}var bb=["children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","UNSAFE_className","onChange","onScroll","onSelectionChange"];function Ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ar(Object(n),!0).forEach(function(r){vb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vb(e,t,n){return(t=Sb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sb(e){var t=Pb(e,"string");return typeof t=="symbol"?t:t+""}function Pb(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wb(e,t){if(e==null)return{};var n,r,i=Ob(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ob(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function xb(e){var t=e.children,n=e.tooltip,r=n===void 0?!0:n,i=e.selectedKeys,a=e.defaultSelectedKeys,o=e.disabledKeys,s=e.UNSAFE_className,l=e.onChange,u=e.onScroll,f=u===void 0?pe:u,h=e.onSelectionChange,p=wb(e,bb),m=c.useMemo(()=>Lt(r,"bottom"),[r]),g=c.useMemo(()=>is(t,m),[t,m]);return d.jsx(Jn,$r($r({},p),{},{UNSAFE_className:H("dh-list-view",s),selectedKeys:i,defaultSelectedKeys:a,disabledKeys:o,onScroll:f,onSelectionChange:l??h,children:g}))}var Tb=["normalizedItems","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","showItemIcons","actions","UNSAFE_className","onChange","onSelectionChange"];function kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(n),!0).forEach(function(r){Cb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cb(e,t,n){return(t=Eb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eb(e){var t=_b(e,"string");return typeof t=="symbol"?t:t+""}function _b(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jb(e,t){if(e==null)return{};var n,r,i=Ib(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ib(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function As(e){var t=e.normalizedItems,n=e.tooltip,r=n===void 0?!0:n,i=e.selectedKeys,a=e.defaultSelectedKeys,o=e.disabledKeys,s=e.showItemIcons,l=e.actions,u=e.UNSAFE_className,f=e.onChange,h=e.onSelectionChange,p=jb(e,Tb),m=c.useMemo(()=>Lt(r,"bottom"),[r]),g=Vn({itemIconSlot:"illustration",showItemDescriptions:!1,showItemIcons:s,tooltipOptions:m,actions:l}),b="".concat(s,"-").concat(m==null?void 0:m.placement),y=Zn({normalizedItems:t,selectedKeys:i,defaultSelectedKeys:a,disabledKeys:o,onChange:f??h}),S=y.selectedStringKeys,v=y.defaultSelectedStringKeys,T=y.disabledStringKeys,w=y.onStringSelectionChange;return c.createElement(Jn,Rr(Rr({},p),{},{UNSAFE_className:H("dh-list-view-normalized",u),key:b,items:t,selectedKeys:S,defaultSelectedKeys:v,disabledKeys:T,onSelectionChange:w}),g)}var Ab=["itemCount","onScroll","onViewportChange","rowHeight","UNSAFE_className"];function Lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lr(Object(n),!0).forEach(function(r){$b(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $b(e,t,n){return(t=kb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kb(e){var t=Rb(e,"string");return typeof t=="symbol"?t:t+""}function Rb(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lb(e,t){return Fb(e)||Nb(e,t)||Mb(e,t)||Db()}function Db(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
9
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mb(e,t){if(e){if(typeof e=="string")return Mr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mr(e,t):void 0}}function Mr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Nb(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Fb(e){if(Array.isArray(e))return e}function Ub(e,t){if(e==null)return{};var n,r,i=Wb(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Wb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $s(e){var t,n=e.itemCount,r=n===void 0?0:n,i=e.onScroll,a=i===void 0?pe:i,o=e.onViewportChange,s=e.rowHeight,l=e.UNSAFE_className,u=Ub(e,Ab),f=Je(),h=f.scale,p=c.useState(null),m=Lb(p,2),g=m[0],b=m[1],y=c.useRef(o);y.current=o;var S=c.useRef(null),v=c.useCallback(P=>{if(!(y.current==null||s==null||s<=0||r<=0)){var E=Math.min(r-1,Math.max(0,Math.floor(P.scrollTop/s))),C=Math.max(1,Math.ceil(P.clientHeight/s)),A=Math.max(E,Math.min(r-1,E+C)),D=S.current;D!=null&&D[0]===E&&D[1]===A||(S.current=[E,A],y.current(E,A))}},[r,s]),T=c.useCallback(P=>{a(P),v(P.target)},[a,v]),w=Qn(T,on),x=c.useCallback(P=>{w(P),b(on(P))},[w]);return c.useEffect(()=>{if(g!=null){S.current=null,v(g);var P=new ResizeObserver(()=>{v(g)});return P.observe(g),()=>{P.disconnect()}}},[g,v]),d.jsx(Ll,Dr(Dr({ref:x},u),{},{UNSAFE_className:H("dh-table-view-wrapper","dh-table-view-wrapper-density-".concat((t=u.density)!==null&&t!==void 0?t:"regular"),"dh-table-view-wrapper-scale-".concat(h),l)}))}var Vb=["columns","normalizedItems","onScroll","onViewportChange","renderCell","getTextValue","aria-label","density","selectedKeys","defaultSelectedKeys","disabledKeys","onSelectionChange"];function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nr(Object(n),!0).forEach(function(r){Bb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bb(e,t,n){return(t=Hb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hb(e){var t=Kb(e,"string");return typeof t=="symbol"?t:t+""}function Kb(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gb(e,t){if(e==null)return{};var n,r,i=Yb(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ks(e){var t=e.columns,n=e.normalizedItems,r=e.onScroll,i=e.onViewportChange,a=e.renderCell,o=e.getTextValue,s=e["aria-label"],l=s===void 0?"Table":s,u=e.density,f=u===void 0?"compact":u,h=e.selectedKeys,p=e.defaultSelectedKeys,m=e.disabledKeys,g=e.onSelectionChange,b=Gb(e,Vb),y=Je(),S=y.scale,v=w=>{if(w!=null)return w==="all"?"all":new Set([...w].map(String))},T=c.useCallback(w=>{if(g!=null){if(w==="all"){g("all");return}g(new Set([...w].map(x=>{var P=Number(x);return Number.isNaN(P)?x:P})))}},[g]);return d.jsxs($s,Fr(Fr({"aria-label":l,density:f,selectionMode:"none",selectedKeys:v(h),defaultSelectedKeys:v(p),disabledKeys:v(m),onSelectionChange:g!=null?T:void 0,onScroll:r,itemCount:n.length,rowHeight:as[f??"compact"][S],onViewportChange:i},b),{},{children:[d.jsx(Dl,{columns:t,children:w=>d.jsx(Ml,{width:w.width,defaultWidth:w.defaultWidth,minWidth:w.minWidth,maxWidth:w.maxWidth,align:w.align,allowsResizing:w.allowsResizing,allowsSorting:w.allowsSorting,showDivider:w.showDivider,hideHeader:w.hideHeader,children:w.name},w.key)}),d.jsx(Nl,{items:n,children:w=>{var x,P=w.key,E=w.item;return d.jsx(Fl,{textValue:E==null?"":(x=o==null?void 0:o(E))!==null&&x!==void 0?x:"",children:C=>d.jsx(Ul,{children:E==null?null:a(E,C)})},P)}})]}))}var zb=["columns","items","itemCount","offset","onViewportChange","onScroll","renderCell","getTextValue","aria-label"];function Ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ur(Object(n),!0).forEach(function(r){Xb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ur(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xb(e,t,n){return(t=Qb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qb(e){var t=Zb(e,"string");return typeof t=="symbol"?t:t+""}function Zb(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jb(e,t){if(e==null)return{};var n,r,i=ev(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ev(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function tv(e){var t=e.columns,n=e.items,r=e.itemCount,i=e.offset,a=i===void 0?0:i,o=e.onViewportChange,s=e.onScroll,l=e.renderCell,u=e.getTextValue,f=e["aria-label"],h=f===void 0?"Table":f,p=Jb(e,zb),m=Math.max(0,r),g=c.useMemo(()=>{var b=Array.from({length:m},(y,S)=>({key:S}));return n.forEach((y,S)=>{var v=a+S;v>=0&&v<b.length&&(b[v]={key:v,item:y})}),b},[n,a,m]);return d.jsx(ks,qb({"aria-label":h,columns:t,normalizedItems:g,onViewportChange:o,onScroll:s,renderCell:l,getTextValue:u},p))}var nv=["normalizedItems","showItemIcons","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","onChange","onSelectionChange"];function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(r){rv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rv(e,t,n){return(t=iv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iv(e){var t=av(e,"string");return typeof t=="symbol"?t:t+""}function av(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ov(e,t){if(e==null)return{};var n,r,i=sv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lv(e){var t=e.normalizedItems,n=e.showItemIcons,r=e.tooltip,i=r===void 0?!0:r,a=e.selectedKeys,o=e.defaultSelectedKeys,s=e.disabledKeys,l=e.onChange,u=e.onSelectionChange,f=ov(e,nv),h=c.useMemo(()=>Lt(i),[i]),p=Vn({itemIconSlot:"icon",showItemDescriptions:!1,showItemIcons:n,tooltipOptions:h}),m="".concat(n,"-").concat(h==null?void 0:h.placement),g=c.useMemo(()=>t.flatMap(x=>{var P,E;return sn(x)?(P=(E=x.item)===null||E===void 0?void 0:E.items)!==null&&P!==void 0?P:[]:[x]}),[t]),b=Zn({normalizedItems:g,selectedKeys:a,defaultSelectedKeys:o,disabledKeys:s,onChange:l??u}),y=b.selectedStringKeys,S=b.defaultSelectedStringKeys,v=b.disabledStringKeys,T=b.onStringSelectionChange,w=c.useMemo(()=>t.map(x=>{if(sn(x)){var P,E;return d.jsx(Wl,{title:(P=x.item)===null||P===void 0?void 0:P.title,items:(E=x.item)===null||E===void 0?void 0:E.items,children:p},vt(x))}return p(x)}),[t,p]);return Vr(Vr({},f),{},{children:w,forceRerenderKey:m,selectedKeys:y,defaultSelectedKeys:S,disabledKeys:v,onChange:T})}var uv=["UNSAFE_className"],cv=["forceRerenderKey","children"];function Br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Br(Object(n),!0).forEach(function(r){dv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Br(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dv(e,t,n){return(t=fv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fv(e){var t=pv(e,"string");return typeof t=="symbol"?t:t+""}function pv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kr(e,t){if(e==null)return{};var n,r,i=hv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Rs(e){var t=e.UNSAFE_className,n=Kr(e,uv),r=lv(n),i=r.forceRerenderKey,a=r.children,o=Kr(r,cv);return c.createElement(os,Hr(Hr({},o),{},{key:i,UNSAFE_className:H("dh-multi-select-normalized",t)}),a)}var mv=["backgroundColor","borderColor","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderXColor","borderYColor","UNSAFE_style"];function Gr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gr(Object(n),!0).forEach(function(r){yv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yv(e,t,n){return(t=gv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gv(e){var t=bv(e,"string");return typeof t=="symbol"?t:t+""}function bv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vv(e,t){if(e==null)return{};var n,r,i=Sv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Sv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ls=c.forwardRef((e,t)=>{var n=e.backgroundColor,r=e.borderColor,i=e.borderStartColor,a=e.borderEndColor,o=e.borderTopColor,s=e.borderBottomColor,l=e.borderXColor,u=e.borderYColor,f=e.UNSAFE_style,h=vv(e,mv),p=Vl(),m=p.direction,g=c.useMemo(()=>{var b={};return r!==void 0&&(b.borderColor=fe(r)),l!==void 0&&(b.borderLeftColor=fe(l),b.borderRightColor=fe(l)),u!==void 0&&(b.borderTopColor=fe(u),b.borderBottomColor=fe(u)),i!==void 0&&(b[m==="rtl"?"borderRightColor":"borderLeftColor"]=fe(i)),a!==void 0&&(b[m==="rtl"?"borderLeftColor":"borderRightColor"]=fe(a)),o!==void 0&&(b.borderTopColor=fe(o)),s!==void 0&&(b.borderBottomColor=fe(s)),it(it({},f),{},{backgroundColor:fe(n)},b)},[n,f,r,i,a,o,s,l,u,m]);return d.jsx(Bl,it(it({},h),{},{ref:t,UNSAFE_style:g}))});Ls.displayName="View";var Pv=["children"];function Yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yr(Object(n),!0).forEach(function(r){wv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wv(e,t,n){return(t=Ov(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ov(e){var t=xv(e,"string");return typeof t=="symbol"?t:t+""}function xv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tv(e,t){if(e==null)return{};var n,r,i=Cv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Cv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ev(e){var t=e.children,n=Tv(e,Pv),r=c.useMemo(()=>$d(t).map(i=>ns(i,Qt)?i:d.jsx(Qt,{value:String(i),children:String(i)},String(i))),[t]);return d.jsx(Hl,zr(zr({},n),{},{children:r}))}var _v=["ariaLabel","icon","isQuiet","labelText","children","onOpenChange","tooltip"];function qr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qr(Object(n),!0).forEach(function(r){jv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jv(e,t,n){return(t=Iv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iv(e){var t=Av(e,"string");return typeof t=="symbol"?t:t+""}function Av(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $v(e,t){if(e==null)return{};var n,r,i=kv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ds(e){var t=e.ariaLabel,n=e.icon,r=e.isQuiet,i=e.labelText,a=e.children,o=e.onOpenChange,s=e.tooltip,l=$v(e,_v),u=i==null&&s!=null?"action-button-icon-with-tooltip":void 0;return d.jsxs(Va,{type:"popover",onOpenChange:o,children:[d.jsxs(xt,Xr(Xr({},l),{},{"aria-label":t??i,isQuiet:r,children:[d.jsx(Xe,{UNSAFE_className:u,children:d.jsx(ae,{icon:n})}),i==null?null:d.jsx(It,{children:i}),s==null?null:d.jsx(Ze,{children:s})]})),a]})}function Qr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qr(Object(n),!0).forEach(function(r){Rv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rv(e,t,n){return(t=Lv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lv(e){var t=Dv(e,"string");return typeof t=="symbol"?t:t+""}function Dv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ms(e){var t=e.heading,n=e.confirmationButtonLabel,r=e.children,i=e.onCancel,a=e.onConfirm,o=ws(),s=o.formProps,l=o.submitButtonProps;return d.jsxs(Ba,{children:[d.jsx(Rn,{level:3,UNSAFE_className:Bn.spectrumDialogComponentHeading,children:t}),d.jsx(Ha,{}),d.jsx(Cn,{children:d.jsx(Ka,at(at({},s),{},{children:r}))}),d.jsxs(Ga,{children:[d.jsx(Zt,{variant:"secondary",onPress:i,children:"Cancel"}),d.jsx(Zt,at(at({},l),{},{style:"fill",variant:"negative",onPress:a,type:"submit",children:n}))]})]})}function Mv(e){var t=e.ariaLabel,n=e.heading,r=e.confirmationButtonLabel,i=e.isHidden,a=e.children,o=e.tooltip,s=e.onConfirm,l=c.useCallback(u=>d.jsx(Ms,{heading:n,confirmationButtonLabel:r,onCancel:u,onConfirm:()=>{u(),s()},children:a}),[a,r,n,s]);return d.jsx(Ds,{ariaLabel:t,icon:io,isHidden:i,isQuiet:!0,height:Hn,tooltip:o,children:l})}var Nv=["icon","label","tooltip"];function Zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zr(Object(n),!0).forEach(function(r){Fv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fv(e,t,n){return(t=Uv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uv(e){var t=Wv(e,"string");return typeof t=="symbol"?t:t+""}function Wv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vv(e,t){if(e==null)return{};var n,r,i=Bv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ns(e){var t=e.icon,n=e.label,r=e.tooltip,i=Vv(e,Nv);return d.jsxs(xt,Jr(Jr({},i),{},{"aria-label":n,isQuiet:!0,height:Hn,children:[d.jsx(Xe,{UNSAFE_className:r==null?void 0:"action-button-icon-with-tooltip",children:d.jsx(ae,{icon:t})}),r==null?null:d.jsx(Ze,{children:r})]}))}Ns.displayName="IconActionButton";function ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ei(Object(n),!0).forEach(function(r){we(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function we(e,t,n){return(t=Kv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kv(e){var t=Gv(e,"string");return typeof t=="symbol"?t:t+""}function Gv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yv=100,Fs=function(e){return e.UP="UP",e.DOWN="DOWN",e}(Fs||{});class me extends c.Component{constructor(t){super(t),we(this,"popper",void 0),we(this,"cbContainer",void 0),we(this,"menuContainer",void 0),we(this,"input",void 0),we(this,"getCachedFilteredOptions",Kl((r,i)=>r.filter(a=>a.title.toLowerCase().indexOf(i.toLowerCase())>=0),{max:1e3}));var n=this.props.popperOptions;n=Hv({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},n),this.state={title:"",filteredOptions:[],keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,invalid:!1,popperOptions:n},this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handelInputFocus=this.handelInputFocus.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.updateInputValue=He(this.updateInputValue,Yv),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=X.createRef(),this.cbContainer=X.createRef(),this.menuContainer=X.createRef(),this.input=X.createRef()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}getValueAndValidate(t){if(!t)return this.setState({invalid:!1}),{value:t,isValid:!1};var n=this.props.options,r=n.filter(i=>i.title.toLowerCase()===t.toLowerCase());return r.length<1?(this.setState({invalid:!0}),{value:t,isValid:!1}):(this.setState({invalid:!1}),{value:r[0].value,isValid:!0})}updateInputValue(t){var n=this.state.menuIsOpen,r=this.getValueAndValidate(t),i=r.value,a=r.isValid;n&&this.processFilterChange(t),this.fireOnChange(i,a)}fireOnChange(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this.props.onChange;r(t,n)}processFilterChange(t){var n,r=this.props.options,i=this.state.menuIsOpen,a=t?this.getCachedFilteredOptions(r,t):r,o=a.length===1&&a[0].title===t;if(this.setState({filteredOptions:a,keyboardOptionIndex:0}),o&&i){this.closeMenu();return}(n=this.popper.current)===null||n===void 0||n.scheduleUpdate()}resetValue(){this.setState({title:""}),this.fireOnChange("")}handleResize(){this.setInputWidth()}handleMenuKeyDown(t){var n,r=this.state,i=r.filteredOptions,a=r.keyboardOptionIndex,o=i[a];switch(t.key){case"Enter":case"ArrowRight":t.stopPropagation(),t.preventDefault(),o!=null&&(this.setState({title:o.title,invalid:!1}),this.fireOnChange(o.value)),this.closeMenu(),(n=this.input.current)===null||n===void 0||n.focus();break;case"ArrowUp":t.stopPropagation(),t.preventDefault(),this.navigateMenu(me.MENU_NAVIGATION_DIRECTION.UP);break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.navigateMenu(me.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Tab":if(t.stopPropagation(),t.preventDefault(),t.shiftKey){this.navigateMenu(me.MENU_NAVIGATION_DIRECTION.UP);break}this.navigateMenu(me.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Escape":t.preventDefault(),t.stopPropagation(),this.closeMenu();break}}navigateMenu(t){var n=this.state,r=n.filteredOptions,i=n.keyboardOptionIndex,a=i;t===me.MENU_NAVIGATION_DIRECTION.UP?i>0?(a=(a-1)%r.length,this.setState({keyboardOptionIndex:a})):i===0&&(a=r.length-1,this.setState({keyboardOptionIndex:a})):t===me.MENU_NAVIGATION_DIRECTION.DOWN&&i<r.length&&(a=(a+1)%r.length,this.setState({keyboardOptionIndex:a})),this.scrollOptionIntoView(a)}handleInputKeyDown(t){var n=this.props.onEnter,r=this.state.menuIsOpen;r?this.handleMenuKeyDown(t):t.key==="Enter"?n():t.key==="Escape"?(this.resetValue(),t.preventDefault(),t.stopPropagation()):t.key==="ArrowRight"||t.key==="ArrowLeft"||t.key==="Tab"||t.key==="Shift"||this.openMenu()}handleInputChange(t){this.setState({title:t.target.value}),this.updateInputValue(t.target.value)}handleOptionClick(t){var n;this.setState({title:t.title,invalid:!1}),this.fireOnChange(t.value),this.closeMenu(),(n=this.input.current)===null||n===void 0||n.focus()}handelInputFocus(){var t=this.state.menuIsOpen;t||this.openMenu()}handleInputClick(){var t=this.state.menuIsOpen;t||this.openMenu()}handleInputBlur(t){var n=this.state.menuIsOpen;n&&t.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(t.relatedTarget)||this.closeMenu(!1)}handleMenuBlur(t){t.relatedTarget===this.input.current||t.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(t.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var t;(t=this.input.current)===null||t===void 0||t.focus()}handleMenuExited(){var t=this.state.menuIsOpen;t&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}openMenu(){var t=this.state.title;this.processFilterChange(t),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var n;(n=this.popper.current)===null||n===void 0||n.show()})}closeMenu(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1,keyboardOptionIndex:0}),n){var r;(r=this.input.current)===null||r===void 0||r.focus()}(t=this.popper.current)===null||t===void 0||t.hide()}scrollOptionIntoView(t){if(this.menuContainer.current){var n;(n=this.menuContainer.current.children.item(t))===null||n===void 0||n.scrollIntoView({behavior:"smooth",block:"nearest"})}}renderMenuElement(){var t=this.state.inputWidth;return d.jsx("div",{className:H("aci-options"),ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,style:{width:t},onBlur:this.handleMenuBlur,children:this.renderOptions()})}renderOptions(){var t=this.props.noMatchText,n=this.state,r=n.title,i=n.filteredOptions;return r&&i.length===0?d.jsx("div",{className:"no-match",children:t}):i.map((a,o)=>this.renderOption(a,o))}renderOption(t,n){var r=this.state.keyboardOptionIndex,i="option-".concat(n,"-").concat(t.value);return d.jsx("button",{type:"button",className:H("aci-option-btn",{"keyboard-active":r===n}),onClick:()=>this.handleOptionClick(t),onFocus:()=>this.setState({keyboardOptionIndex:n}),children:t.title},i)}render(){var t=this.props,n=t.options,r=t.inputPlaceholder,i=t.disabled,a=t.className,o=t.defaultTitle,s=t.spellCheck,l=t["data-testid"],u=this.state,f=u.title,h=u.menuIsOpen,p=u.popperOptions,m=u.invalid;return d.jsxs("div",{className:"aci-container",ref:this.cbContainer,children:[d.jsx("input",{value:f||o,className:H("form-control",a,"aci-input",{"is-invalid":m&&!h}),ref:this.input,onChange:this.handleInputChange,placeholder:r||n[0].title,disabled:i,onFocus:this.handelInputFocus,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:s,"data-testid":l}),d.jsx(At,{ref:this.popper,options:p,className:H("aci-options-popper interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})}}we(me,"defaultProps",{onChange(){},inputPlaceholder:"",disabled:!1,className:"",defaultTitle:"",popperOptions:null,spellCheck:!0,onEnter(){},noMatchText:"No matching items found","data-testid":void 0});we(me,"MENU_NAVIGATION_DIRECTION",Fs);function ti(e,t){return Qv(e)||Xv(e,t)||qv(e,t)||zv()}function zv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mb(e,t){if(e){if(typeof e=="string")return Mr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mr(e,t):void 0}}function Mr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Nb(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Fb(e){if(Array.isArray(e))return e}function Ub(e,t){if(e==null)return{};var n,r,i=Wb(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Wb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $s(e){var t,n=e.itemCount,r=n===void 0?0:n,i=e.onScroll,a=i===void 0?pe:i,o=e.onViewportChange,s=e.rowHeight,l=e.UNSAFE_className,u=Ub(e,Ab),f=Je(),h=f.scale,p=c.useState(null),m=Lb(p,2),g=m[0],b=m[1],y=c.useRef(o);y.current=o;var S=c.useRef(null),v=c.useCallback(P=>{if(!(y.current==null||s==null||s<=0||r<=0)){var _=P.scrollHeight>0?P.scrollHeight/r:s,C=Math.min(r-1,Math.max(0,Math.floor(P.scrollTop/_))),A=Math.max(1,Math.ceil(P.clientHeight/_)),D=Math.max(C,Math.min(r-1,C+A)),L=S.current;L!=null&&L[0]===C&&L[1]===D||(S.current=[C,D],y.current(C,D))}},[r,s]),T=c.useCallback(P=>{a(P),v(P.target)},[a,v]),w=Qn(T,on),x=c.useCallback(P=>{w(P),b(on(P))},[w]);return c.useEffect(()=>{if(g!=null){S.current=null,v(g);var P=new ResizeObserver(()=>{v(g)});return P.observe(g),()=>{P.disconnect()}}},[g,v]),d.jsx(Ll,Dr(Dr({ref:x},u),{},{UNSAFE_className:H("dh-table-view-wrapper","dh-table-view-wrapper-density-".concat((t=u.density)!==null&&t!==void 0?t:"regular"),"dh-table-view-wrapper-scale-".concat(h),l)}))}var Vb=["columns","normalizedItems","onScroll","onViewportChange","renderCell","getTextValue","aria-label","density","selectedKeys","defaultSelectedKeys","disabledKeys","onSelectionChange"];function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nr(Object(n),!0).forEach(function(r){Bb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bb(e,t,n){return(t=Hb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hb(e){var t=Kb(e,"string");return typeof t=="symbol"?t:t+""}function Kb(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gb(e,t){if(e==null)return{};var n,r,i=Yb(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ks(e){var t=e.columns,n=e.normalizedItems,r=e.onScroll,i=e.onViewportChange,a=e.renderCell,o=e.getTextValue,s=e["aria-label"],l=s===void 0?"Table":s,u=e.density,f=u===void 0?"compact":u,h=e.selectedKeys,p=e.defaultSelectedKeys,m=e.disabledKeys,g=e.onSelectionChange,b=Gb(e,Vb),y=Je(),S=y.scale,v=w=>{if(w!=null)return w==="all"?"all":new Set([...w].map(String))},T=c.useCallback(w=>{if(g!=null){if(w==="all"){g("all");return}g(new Set([...w].map(x=>{var P=Number(x);return Number.isNaN(P)?x:P})))}},[g]);return d.jsxs($s,Fr(Fr({"aria-label":l,density:f,selectionMode:"none",selectedKeys:v(h),defaultSelectedKeys:v(p),disabledKeys:v(m),onSelectionChange:g!=null?T:void 0,onScroll:r,itemCount:n.length,rowHeight:as[f??"compact"][S],onViewportChange:i},b),{},{children:[d.jsx(Dl,{columns:t,children:w=>d.jsx(Ml,{width:w.width,defaultWidth:w.defaultWidth,minWidth:w.minWidth,maxWidth:w.maxWidth,align:w.align,allowsResizing:w.allowsResizing,allowsSorting:w.allowsSorting,showDivider:w.showDivider,hideHeader:w.hideHeader,children:w.name},w.key)}),d.jsx(Nl,{items:n,children:w=>{var x,P=w.key,_=w.item;return d.jsx(Fl,{textValue:_==null?"":(x=o==null?void 0:o(_))!==null&&x!==void 0?x:"",children:C=>d.jsx(Ul,{children:_==null?null:a(_,C)})},P)}})]}))}var zb=["columns","items","itemCount","offset","onViewportChange","onScroll","renderCell","getTextValue","aria-label"];function Ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ur(Object(n),!0).forEach(function(r){Xb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ur(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xb(e,t,n){return(t=Qb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qb(e){var t=Zb(e,"string");return typeof t=="symbol"?t:t+""}function Zb(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jb(e,t){if(e==null)return{};var n,r,i=ev(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ev(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function tv(e){var t=e.columns,n=e.items,r=e.itemCount,i=e.offset,a=i===void 0?0:i,o=e.onViewportChange,s=e.onScroll,l=e.renderCell,u=e.getTextValue,f=e["aria-label"],h=f===void 0?"Table":f,p=Jb(e,zb),m=Math.max(0,r),g=c.useMemo(()=>{var b=Array.from({length:m},(y,S)=>({key:S}));return n.forEach((y,S)=>{var v=a+S;v>=0&&v<b.length&&(b[v]={key:v,item:y})}),b},[n,a,m]);return d.jsx(ks,qb({"aria-label":h,columns:t,normalizedItems:g,onViewportChange:o,onScroll:s,renderCell:l,getTextValue:u},p))}var nv=["normalizedItems","showItemIcons","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","onChange","onSelectionChange"];function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(r){rv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rv(e,t,n){return(t=iv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iv(e){var t=av(e,"string");return typeof t=="symbol"?t:t+""}function av(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ov(e,t){if(e==null)return{};var n,r,i=sv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lv(e){var t=e.normalizedItems,n=e.showItemIcons,r=e.tooltip,i=r===void 0?!0:r,a=e.selectedKeys,o=e.defaultSelectedKeys,s=e.disabledKeys,l=e.onChange,u=e.onSelectionChange,f=ov(e,nv),h=c.useMemo(()=>Lt(i),[i]),p=Vn({itemIconSlot:"icon",showItemDescriptions:!1,showItemIcons:n,tooltipOptions:h}),m="".concat(n,"-").concat(h==null?void 0:h.placement),g=c.useMemo(()=>t.flatMap(x=>{var P,_;return sn(x)?(P=(_=x.item)===null||_===void 0?void 0:_.items)!==null&&P!==void 0?P:[]:[x]}),[t]),b=Zn({normalizedItems:g,selectedKeys:a,defaultSelectedKeys:o,disabledKeys:s,onChange:l??u}),y=b.selectedStringKeys,S=b.defaultSelectedStringKeys,v=b.disabledStringKeys,T=b.onStringSelectionChange,w=c.useMemo(()=>t.map(x=>{if(sn(x)){var P,_;return d.jsx(Wl,{title:(P=x.item)===null||P===void 0?void 0:P.title,items:(_=x.item)===null||_===void 0?void 0:_.items,children:p},vt(x))}return p(x)}),[t,p]);return Vr(Vr({},f),{},{children:w,forceRerenderKey:m,selectedKeys:y,defaultSelectedKeys:S,disabledKeys:v,onChange:T})}var uv=["UNSAFE_className"],cv=["forceRerenderKey","children"];function Br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Br(Object(n),!0).forEach(function(r){dv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Br(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dv(e,t,n){return(t=fv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fv(e){var t=pv(e,"string");return typeof t=="symbol"?t:t+""}function pv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kr(e,t){if(e==null)return{};var n,r,i=hv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Rs(e){var t=e.UNSAFE_className,n=Kr(e,uv),r=lv(n),i=r.forceRerenderKey,a=r.children,o=Kr(r,cv);return c.createElement(os,Hr(Hr({},o),{},{key:i,UNSAFE_className:H("dh-multi-select-normalized",t)}),a)}var mv=["backgroundColor","borderColor","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderXColor","borderYColor","UNSAFE_style"];function Gr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gr(Object(n),!0).forEach(function(r){yv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yv(e,t,n){return(t=gv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gv(e){var t=bv(e,"string");return typeof t=="symbol"?t:t+""}function bv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vv(e,t){if(e==null)return{};var n,r,i=Sv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Sv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ls=c.forwardRef((e,t)=>{var n=e.backgroundColor,r=e.borderColor,i=e.borderStartColor,a=e.borderEndColor,o=e.borderTopColor,s=e.borderBottomColor,l=e.borderXColor,u=e.borderYColor,f=e.UNSAFE_style,h=vv(e,mv),p=Vl(),m=p.direction,g=c.useMemo(()=>{var b={};return r!==void 0&&(b.borderColor=fe(r)),l!==void 0&&(b.borderLeftColor=fe(l),b.borderRightColor=fe(l)),u!==void 0&&(b.borderTopColor=fe(u),b.borderBottomColor=fe(u)),i!==void 0&&(b[m==="rtl"?"borderRightColor":"borderLeftColor"]=fe(i)),a!==void 0&&(b[m==="rtl"?"borderLeftColor":"borderRightColor"]=fe(a)),o!==void 0&&(b.borderTopColor=fe(o)),s!==void 0&&(b.borderBottomColor=fe(s)),it(it({},f),{},{backgroundColor:fe(n)},b)},[n,f,r,i,a,o,s,l,u,m]);return d.jsx(Bl,it(it({},h),{},{ref:t,UNSAFE_style:g}))});Ls.displayName="View";var Pv=["children"];function Yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yr(Object(n),!0).forEach(function(r){wv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wv(e,t,n){return(t=Ov(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ov(e){var t=xv(e,"string");return typeof t=="symbol"?t:t+""}function xv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tv(e,t){if(e==null)return{};var n,r,i=Cv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Cv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ev(e){var t=e.children,n=Tv(e,Pv),r=c.useMemo(()=>$d(t).map(i=>ns(i,Qt)?i:d.jsx(Qt,{value:String(i),children:String(i)},String(i))),[t]);return d.jsx(Hl,zr(zr({},n),{},{children:r}))}var _v=["ariaLabel","icon","isQuiet","labelText","children","onOpenChange","tooltip"];function qr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qr(Object(n),!0).forEach(function(r){jv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jv(e,t,n){return(t=Iv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iv(e){var t=Av(e,"string");return typeof t=="symbol"?t:t+""}function Av(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $v(e,t){if(e==null)return{};var n,r,i=kv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ds(e){var t=e.ariaLabel,n=e.icon,r=e.isQuiet,i=e.labelText,a=e.children,o=e.onOpenChange,s=e.tooltip,l=$v(e,_v),u=i==null&&s!=null?"action-button-icon-with-tooltip":void 0;return d.jsxs(Va,{type:"popover",onOpenChange:o,children:[d.jsxs(xt,Xr(Xr({},l),{},{"aria-label":t??i,isQuiet:r,children:[d.jsx(Xe,{UNSAFE_className:u,children:d.jsx(ae,{icon:n})}),i==null?null:d.jsx(It,{children:i}),s==null?null:d.jsx(Ze,{children:s})]})),a]})}function Qr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qr(Object(n),!0).forEach(function(r){Rv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rv(e,t,n){return(t=Lv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lv(e){var t=Dv(e,"string");return typeof t=="symbol"?t:t+""}function Dv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ms(e){var t=e.heading,n=e.confirmationButtonLabel,r=e.children,i=e.onCancel,a=e.onConfirm,o=ws(),s=o.formProps,l=o.submitButtonProps;return d.jsxs(Ba,{children:[d.jsx(Rn,{level:3,UNSAFE_className:Bn.spectrumDialogComponentHeading,children:t}),d.jsx(Ha,{}),d.jsx(Cn,{children:d.jsx(Ka,at(at({},s),{},{children:r}))}),d.jsxs(Ga,{children:[d.jsx(Zt,{variant:"secondary",onPress:i,children:"Cancel"}),d.jsx(Zt,at(at({},l),{},{style:"fill",variant:"negative",onPress:a,type:"submit",children:n}))]})]})}function Mv(e){var t=e.ariaLabel,n=e.heading,r=e.confirmationButtonLabel,i=e.isHidden,a=e.children,o=e.tooltip,s=e.onConfirm,l=c.useCallback(u=>d.jsx(Ms,{heading:n,confirmationButtonLabel:r,onCancel:u,onConfirm:()=>{u(),s()},children:a}),[a,r,n,s]);return d.jsx(Ds,{ariaLabel:t,icon:io,isHidden:i,isQuiet:!0,height:Hn,tooltip:o,children:l})}var Nv=["icon","label","tooltip"];function Zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zr(Object(n),!0).forEach(function(r){Fv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fv(e,t,n){return(t=Uv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uv(e){var t=Wv(e,"string");return typeof t=="symbol"?t:t+""}function Wv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vv(e,t){if(e==null)return{};var n,r,i=Bv(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ns(e){var t=e.icon,n=e.label,r=e.tooltip,i=Vv(e,Nv);return d.jsxs(xt,Jr(Jr({},i),{},{"aria-label":n,isQuiet:!0,height:Hn,children:[d.jsx(Xe,{UNSAFE_className:r==null?void 0:"action-button-icon-with-tooltip",children:d.jsx(ae,{icon:t})}),r==null?null:d.jsx(Ze,{children:r})]}))}Ns.displayName="IconActionButton";function ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ei(Object(n),!0).forEach(function(r){we(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function we(e,t,n){return(t=Kv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kv(e){var t=Gv(e,"string");return typeof t=="symbol"?t:t+""}function Gv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yv=100,Fs=function(e){return e.UP="UP",e.DOWN="DOWN",e}(Fs||{});class me extends c.Component{constructor(t){super(t),we(this,"popper",void 0),we(this,"cbContainer",void 0),we(this,"menuContainer",void 0),we(this,"input",void 0),we(this,"getCachedFilteredOptions",Kl((r,i)=>r.filter(a=>a.title.toLowerCase().indexOf(i.toLowerCase())>=0),{max:1e3}));var n=this.props.popperOptions;n=Hv({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},n),this.state={title:"",filteredOptions:[],keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,invalid:!1,popperOptions:n},this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handelInputFocus=this.handelInputFocus.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.updateInputValue=He(this.updateInputValue,Yv),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=X.createRef(),this.cbContainer=X.createRef(),this.menuContainer=X.createRef(),this.input=X.createRef()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}getValueAndValidate(t){if(!t)return this.setState({invalid:!1}),{value:t,isValid:!1};var n=this.props.options,r=n.filter(i=>i.title.toLowerCase()===t.toLowerCase());return r.length<1?(this.setState({invalid:!0}),{value:t,isValid:!1}):(this.setState({invalid:!1}),{value:r[0].value,isValid:!0})}updateInputValue(t){var n=this.state.menuIsOpen,r=this.getValueAndValidate(t),i=r.value,a=r.isValid;n&&this.processFilterChange(t),this.fireOnChange(i,a)}fireOnChange(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this.props.onChange;r(t,n)}processFilterChange(t){var n,r=this.props.options,i=this.state.menuIsOpen,a=t?this.getCachedFilteredOptions(r,t):r,o=a.length===1&&a[0].title===t;if(this.setState({filteredOptions:a,keyboardOptionIndex:0}),o&&i){this.closeMenu();return}(n=this.popper.current)===null||n===void 0||n.scheduleUpdate()}resetValue(){this.setState({title:""}),this.fireOnChange("")}handleResize(){this.setInputWidth()}handleMenuKeyDown(t){var n,r=this.state,i=r.filteredOptions,a=r.keyboardOptionIndex,o=i[a];switch(t.key){case"Enter":case"ArrowRight":t.stopPropagation(),t.preventDefault(),o!=null&&(this.setState({title:o.title,invalid:!1}),this.fireOnChange(o.value)),this.closeMenu(),(n=this.input.current)===null||n===void 0||n.focus();break;case"ArrowUp":t.stopPropagation(),t.preventDefault(),this.navigateMenu(me.MENU_NAVIGATION_DIRECTION.UP);break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.navigateMenu(me.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Tab":if(t.stopPropagation(),t.preventDefault(),t.shiftKey){this.navigateMenu(me.MENU_NAVIGATION_DIRECTION.UP);break}this.navigateMenu(me.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Escape":t.preventDefault(),t.stopPropagation(),this.closeMenu();break}}navigateMenu(t){var n=this.state,r=n.filteredOptions,i=n.keyboardOptionIndex,a=i;t===me.MENU_NAVIGATION_DIRECTION.UP?i>0?(a=(a-1)%r.length,this.setState({keyboardOptionIndex:a})):i===0&&(a=r.length-1,this.setState({keyboardOptionIndex:a})):t===me.MENU_NAVIGATION_DIRECTION.DOWN&&i<r.length&&(a=(a+1)%r.length,this.setState({keyboardOptionIndex:a})),this.scrollOptionIntoView(a)}handleInputKeyDown(t){var n=this.props.onEnter,r=this.state.menuIsOpen;r?this.handleMenuKeyDown(t):t.key==="Enter"?n():t.key==="Escape"?(this.resetValue(),t.preventDefault(),t.stopPropagation()):t.key==="ArrowRight"||t.key==="ArrowLeft"||t.key==="Tab"||t.key==="Shift"||this.openMenu()}handleInputChange(t){this.setState({title:t.target.value}),this.updateInputValue(t.target.value)}handleOptionClick(t){var n;this.setState({title:t.title,invalid:!1}),this.fireOnChange(t.value),this.closeMenu(),(n=this.input.current)===null||n===void 0||n.focus()}handelInputFocus(){var t=this.state.menuIsOpen;t||this.openMenu()}handleInputClick(){var t=this.state.menuIsOpen;t||this.openMenu()}handleInputBlur(t){var n=this.state.menuIsOpen;n&&t.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(t.relatedTarget)||this.closeMenu(!1)}handleMenuBlur(t){t.relatedTarget===this.input.current||t.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(t.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var t;(t=this.input.current)===null||t===void 0||t.focus()}handleMenuExited(){var t=this.state.menuIsOpen;t&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}openMenu(){var t=this.state.title;this.processFilterChange(t),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var n;(n=this.popper.current)===null||n===void 0||n.show()})}closeMenu(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1,keyboardOptionIndex:0}),n){var r;(r=this.input.current)===null||r===void 0||r.focus()}(t=this.popper.current)===null||t===void 0||t.hide()}scrollOptionIntoView(t){if(this.menuContainer.current){var n;(n=this.menuContainer.current.children.item(t))===null||n===void 0||n.scrollIntoView({behavior:"smooth",block:"nearest"})}}renderMenuElement(){var t=this.state.inputWidth;return d.jsx("div",{className:H("aci-options"),ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,style:{width:t},onBlur:this.handleMenuBlur,children:this.renderOptions()})}renderOptions(){var t=this.props.noMatchText,n=this.state,r=n.title,i=n.filteredOptions;return r&&i.length===0?d.jsx("div",{className:"no-match",children:t}):i.map((a,o)=>this.renderOption(a,o))}renderOption(t,n){var r=this.state.keyboardOptionIndex,i="option-".concat(n,"-").concat(t.value);return d.jsx("button",{type:"button",className:H("aci-option-btn",{"keyboard-active":r===n}),onClick:()=>this.handleOptionClick(t),onFocus:()=>this.setState({keyboardOptionIndex:n}),children:t.title},i)}render(){var t=this.props,n=t.options,r=t.inputPlaceholder,i=t.disabled,a=t.className,o=t.defaultTitle,s=t.spellCheck,l=t["data-testid"],u=this.state,f=u.title,h=u.menuIsOpen,p=u.popperOptions,m=u.invalid;return d.jsxs("div",{className:"aci-container",ref:this.cbContainer,children:[d.jsx("input",{value:f||o,className:H("form-control",a,"aci-input",{"is-invalid":m&&!h}),ref:this.input,onChange:this.handleInputChange,placeholder:r||n[0].title,disabled:i,onFocus:this.handelInputFocus,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:s,"data-testid":l}),d.jsx(At,{ref:this.popper,options:p,className:H("aci-options-popper interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})}}we(me,"defaultProps",{onChange(){},inputPlaceholder:"",disabled:!1,className:"",defaultTitle:"",popperOptions:null,spellCheck:!0,onEnter(){},noMatchText:"No matching items found","data-testid":void 0});we(me,"MENU_NAVIGATION_DIRECTION",Fs);function ti(e,t){return Qv(e)||Xv(e,t)||qv(e,t)||zv()}function zv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
10
10
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qv(e,t){if(e){if(typeof e=="string")return ni(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ni(e,t):void 0}}function ni(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Xv(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Qv(e){if(Array.isArray(e))return e}function Fe(e){return e.split(`
11
11
  `).map(t=>t.trim()).filter(t=>t).join(" ")}function Zv(e,t){for(var n=[],r="",i=null,a=0;a<e.length;){var o=e[a];if(i!==null)r+=o,o===i&&(i=null),a+=1;else if(o==='"'||o==="'"){var s=e.indexOf(o,a+1);s!==-1&&(i=o),r+=o,a+=1}else e.startsWith(t,a)?(n.push(r),r="",a+=t.length):(r+=o,a+=1)}return n.push(r),n}function Wt(e,t){return Zv(e.trim(),t).filter(n=>n!=="").join(`
12
- `.concat(t.trim()))}function Jv(e){var t=e.className,n=t===void 0?"":t,r=e.value,i=e.onChange,a=e.spellCheck,o=a===void 0?!1:a,s=e.placeholder,l=s===void 0?"":s,u=e.disabled,f=u===void 0?!1:u,h=e.delimiter,p=h===void 0?"":h,m=e.id,g=m===void 0?"":m,b=e["data-testid"],y=c.useState(r),S=ti(y,2),v=S[0],T=S[1],w=c.useState(!1),x=ti(w,2),P=x[0],E=x[1],C=c.useRef(null),A=c.useRef(!1),D=c.useRef(v);D.current=v,c.useEffect(function(){!A.current||!p?T(r):Fe(D.current)!==Fe(r)&&T(Wt(r,p))},[r,p]);function L(){if(C.current){C.current.style.height="0";var I=C.current.scrollHeight+(C.current.offsetHeight-C.current.clientHeight);I>0&&(C.current.style.height="".concat(I,"px"))}}function j(I){var M=I.target.value;P&&(p&&(M=Wt(M,p)),E(!1)),T(M),i(p?Fe(M):M)}function $(){C.current&&(A.current=!0,p&&(T(Wt(v,p)),L()),C.current.scrollLeft=0)}function N(){C.current&&document.activeElement!==C.current&&C.current.focus()}function O(){A.current=!1,p&&(T(Fe(v)),i(Fe(v)))}function _(){E(!0)}return c.useEffect(function(){L()},[v]),d.jsx("textarea",{ref:C,id:g,className:H(n,"auto-resize-textarea form-control"),placeholder:l,value:v,rows:1,onChange:j,onFocus:$,onMouseDown:N,onBlur:O,onPaste:_,spellCheck:o,disabled:f,"data-testid":b})}function Us(e){var t=e.blockInteraction,n=t===void 0?!0:t,r=e.children,i=e.debounceMs,a=e.isOpen,o=a===void 0?!1:a,s=et(o,i),l=s.value;return d.jsxs(d.Fragment,{children:[n&&o&&d.jsx("div",{className:"modal-backdrop",style:{backgroundColor:"transparent"},"data-testid":"debounced-modal-backdrop"}),X.cloneElement(r,{isOpen:o&&l})]})}function Ws(e){var t=e.className,n=e.icon,r=e.isOpen,i=r===void 0?!1:r,a=e.subtitle,o=e.title;return d.jsx(jn,{isOpen:i,className:t,children:d.jsx(In,{children:d.jsxs("div",{className:"info-modal",children:[n!=null&&d.jsx("div",{className:"message-icon",children:d.jsx(ae,{icon:n})}),d.jsx("div",{className:"message-header",children:o}),a!=null&&d.jsx("div",{className:"message-content",children:a})]})})})}function ri(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ii(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ri(Object(n),!0).forEach(function(r){e0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ri(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e0(e,t,n){return(t=t0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t0(e){var t=n0(e,"string");return typeof t=="symbol"?t:t+""}function n0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r0=[];function i0(e){var t=e.styleProps,n=e.selectedItemCount,r=e.onClearSelection;return d.jsx(Ya,ii(ii({UNSAFE_className:Bn.spectrumActionBar},t),{},{isEmphasized:!0,selectedItemCount:n,onClearSelection:r,children:r0}))}function ai(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function a0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ai(Object(n),!0).forEach(function(r){Se(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ai(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Se(e,t,n){return(t=o0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o0(e){var t=s0(e,"string");return typeof t=="symbol"?t:t+""}function s0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oi=J.module("ContextMenu");class Ye extends c.PureComponent{static handleContextMenu(t){t.metaKey||(t.stopPropagation(),t.preventDefault())}constructor(t){super(t),Se(this,"container",void 0),Se(this,"oldFocus",void 0),Se(this,"activeSubMenuRef",void 0),Se(this,"subMenuTimer",void 0),Se(this,"rAF",void 0),Se(this,"initialPosition",void 0),this.handleBlur=this.handleBlur.bind(this),this.handleCloseSubMenu=this.handleCloseSubMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemContextMenu=this.handleMenuItemContextMenu.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.container=X.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=X.createRef(),this.subMenuTimer=0,this.rAF=0,this.initialPosition={top:t.top,left:t.left},this.state={menuItems:[],pendingItems:[],activeSubMenu:null,hasOverflow:!1,subMenuTop:null,subMenuLeft:null,subMenuParentWidth:0,subMenuParentHeight:0,keyboardIndex:-1,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.verifyPosition(),window.addEventListener("resize",this.handleWindowResize),this.rAF=window.requestAnimationFrame(()=>{var t;(t=this.container.current)===null||t===void 0||t.focus();var n=this.props.onMenuOpened;n(this)})}componentDidUpdate(t,n){var r=this.props.actions,i=this.state.activeSubMenu;if(i!==n.activeSubMenu)if(i==null){var a;(a=this.container.current)===null||a===void 0||a.focus()}else this.setActiveSubMenuPosition();if(t.actions!==r&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var o;(o=this.container.current)===null||o===void 0||o.focus()}this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var t=this.props.options;if(t.separateKeyboardMouse!==void 0&&t.separateKeyboardMouse){var n=this.state.keyboardIndex;return n}return this.getMouseIndex()}setKeyboardIndex(t){var n=this.props.options;n.separateKeyboardMouse!==void 0&&n.separateKeyboardMouse?this.setState({keyboardIndex:t}):this.setMouseIndex(t)}getMouseIndex(){var t=this.state.mouseIndex;return t}setMouseIndex(t){this.setState({mouseIndex:t})}initMenu(){this.cancelPromises(),cancelAnimationFrame(this.rAF);var t=this.props.options,n=t.initialKeyboardIndex;n===void 0&&(n=-1);for(var r=this.props.actions,i=Pe.getMenuItems(r),a=[],o=i.length-1;o>=0;o-=1){var s=i[o];s instanceof Promise?this.initMenuPromise(s):a.push(s)}this.setState({mouseIndex:-1,keyboardIndex:n,activeSubMenu:null,menuItems:Pe.sortActions(a)})}initMenuPromise(t){var n=je.makeCancelable(t);this.setState(r=>({pendingItems:r.pendingItems.concat(n)})),n.then(r=>{this.setState(i=>{var a=i.pendingItems.indexOf(n);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{menuItems:Pe.sortActions(i.menuItems.concat(r)),pendingItems:o}}return null})},r=>{je.isCanceled(r)||(this.setState(i=>{var a=i.pendingItems.indexOf(n);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{pendingItems:o}}return null}),oi.error(r))})}cancelPromises(){var t=this.state.pendingItems;t.map(n=>n.cancel())}setActiveSubMenuPosition(){if(this.activeSubMenuRef.current!==null){var t=this.activeSubMenuRef.current.getBoundingClientRect();this.setState({subMenuTop:t.top,subMenuLeft:t.right,subMenuParentHeight:t.height,subMenuParentWidth:t.width})}}verifyPosition(){var t,n,r,i,a=this.props,o=a.options,s=a.updatePosition,l=a.subMenuParentWidth,u=a.subMenuParentHeight,f=a.top,h=a.left;if(!(!this.container.current||o.doNotVerifyPosition!=null&&o.doNotVerifyPosition)){var p=this.initialPosition,m=p.top,g=p.left,b=(t=(n=this.container.current)===null||n===void 0?void 0:n.getBoundingClientRect())!==null&&t!==void 0?t:{width:0,height:0},y=b.width,S=b.height,v=((r=(i=this.container.current)===null||i===void 0?void 0:i.scrollHeight)!==null&&r!==void 0?r:0)>window.innerHeight;S===0||y===0||(m+S>window.innerHeight&&(m-S-u>0?m-=S-u:m=window.innerHeight-S),g+y>window.innerWidth&&(g=g-y-l),(h!==g||f!==m)&&(this.setState({hasOverflow:v}),s(m,g)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(t){if(!this.container.current){oi.warn("Container is null!");return}if(!this.container.current.contains(t.relatedTarget)){for(var n=t.relatedTarget,r=!1;n&&!r;)r=n.hasAttribute("data-dh-context-menu"),n=n.parentElement;r||this.closeMenu(!0)}}isEscapeKey(t){var n=this.props.left;return t==="Escape"||n<0&&t==="ArrowRight"||t==="ArrowLeft"}handleKeyDown(t){var n=this.state.menuItems,r=this.getKeyboardIndex(),i=r,a=!1;if(t.key==="Enter"||t.key===" "){r>=0&&r<n.length&&this.handleMenuItemClick(n[r],t);return}if(t.key==="ArrowRight"?r>=0&&r<=n.length?a=!0:i=0:this.isEscapeKey(t.key)?i=null:t.key==="ArrowUp"||t.shiftKey&&t.key==="Tab"?i=Pe.getNextMenuItem(i,-1,n):(t.key==="ArrowDown"||t.key==="Tab")&&(i=Pe.getNextMenuItem(i,1,n)),a){this.openSubMenu(r),t.preventDefault(),t.stopPropagation();return}r!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),t.preventDefault(),t.stopPropagation())}openSubMenu(t){var n=this.state,r=n.menuItems,i=n.activeSubMenu,a=r[t].actions?t:null;i!==a&&this.setState({activeSubMenu:a,subMenuTop:null,subMenuLeft:null})}closeMenu(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.props,r=n.closeMenu,i=n.onMenuClosed;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{r(t),i(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(t){t?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(t,n){n.preventDefault(),n.stopPropagation();var r=this.state.menuItems;t!=null&&(t.disabled===void 0||!t.disabled)&&(t.actions!=null?this.openSubMenu(r.indexOf(t)):t.action!=null&&(t.action(n.nativeEvent),this.closeMenu(!0)))}handleMenuItemContextMenu(t,n){n.metaKey||this.handleMenuItemClick(t,n)}handleMenuItemMouseMove(t){var n=this.state.menuItems,r=n.indexOf(t);this.setMouseIndex(r),r>=0&&r<n.length&&(t.disabled===void 0||!t.disabled)&&this.openSubMenu(r)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var t=[],n=this.props,r=n.top,i=n.left,a=this.state,o=a.activeSubMenu,s=a.hasOverflow,l=a.keyboardIndex,u=a.menuItems,f=a.mouseIndex,h=a.pendingItems,p=a.subMenuTop,m=a.subMenuLeft,g=a.subMenuParentWidth,b=a.subMenuParentHeight,y=0;y<u.length;y+=1){var S=u[y];y>0&&S.group!==u[y-1].group&&t.push(d.jsx("hr",{},"".concat(y,".separator")));var v=d.jsx(fo,{ref:o===y?this.activeSubMenuRef:null,isKeyboardSelected:l===y,isMouseSelected:f===y,menuItem:S,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},y);t.push(v)}var T=null;h.length>0&&(T=d.jsx("div",{className:"loading",children:d.jsx(Tt,{className:"loading-spinner-vertical-align"})}));var w=this.props,x=w.menuStyle,P=w["data-testid"],E=o!==null&&p!==null&&m!==null;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:H({"has-overflow":s},"context-menu-container"),style:a0({top:r,left:i},x),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:Ye.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":P,children:[t,T]}),E&&o!==null&&p!==null&&m!==null&&d.jsx(Ye,{actions:u[o].actions||[],closeMenu:this.handleCloseSubMenu,top:p,left:m,updatePosition:(C,A)=>{this.setState({subMenuTop:C,subMenuLeft:A})},subMenuParentWidth:g,subMenuParentHeight:b},"sub-".concat(o))]})}}Se(Ye,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});function si(e,t,n){return(t=l0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l0(e){var t=u0(e,"string");return typeof t=="symbol"?t:t+""}function u0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Vs extends c.Component{constructor(t){super(t),si(this,"container",void 0),si(this,"openMenu",void 0),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=X.createRef(),this.openMenu=X.createRef(),this.state={actions:null,left:0,top:0}}componentDidMount(){var t;(t=this.container.current)!==null&&t!==void 0&&t.parentElement&&this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu)}componentWillUnmount(){var t;(t=this.container.current)!==null&&t!==void 0&&t.parentElement&&this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu)}handleContextMenu(t){if(this.container.current){var n=this.container.current.getBoundingClientRect(),r=t.clientY-n.top,i=t.clientX-n.left,a=this.state.actions;if(a!=null&&t.target===this.container.current){t.preventDefault(),this.setState({actions:null},()=>{var s=document.elementFromPoint(i,r),l=new MouseEvent("contextmenu",{clientX:t.clientX,clientY:t.clientY,bubbles:!0,cancelable:!0});s==null||s.dispatchEvent(l)});return}if(Pe.isContextActionEvent(t)&&!(t.metaKey||t.ctrlKey)){var o=Pe.getMenuItems(t.contextActions);o.length!==0&&(t.preventDefault(),this.setState({actions:o,top:r,left:i}))}}}handleMenuClose(t){t===this.openMenu.current&&this.setState({actions:null})}render(){var t=null,n=this.props["data-testid"],r=this.state,i=r.actions,a=r.top,o=r.left;return i&&(t=d.jsx(Ye,{ref:this.openMenu,actions:i,onMenuClosed:this.handleMenuClose,top:a,left:o,updatePosition:(s,l)=>{this.setState({top:s,left:l})},"data-testid":n})),d.jsx("div",{className:H("context-menu-root",{active:i}),ref:this.container,children:t})}}function Bs(e,t,n){return(t=c0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c0(e){var t=d0(e,"string");return typeof t=="symbol"?t:t+""}function d0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class ze extends c.Component{static getHeight(t){var n=t.scrollWidth-t.clientWidth;return t.scrollHeight-n}constructor(t){super(t),Bs(this,"nodeRef",X.createRef()),this.handleEntered=this.handleEntered.bind(this)}handleEntered(){var t=this.nodeRef.current;if(t){t.style.height="";var n=this.props.autoFocusOnShow;if(n!==void 0&&n){var r=t.querySelector("input, select, textarea");r!=null&&r.focus()}}}handleEnter(){var t=this.nodeRef.current;t&&(t.style.height="0")}handleEntering(){var t=this.nodeRef.current;t&&(t.style.height="".concat(ze.getHeight(t),"px"))}handleExiting(){var t=this.nodeRef.current;t&&(t.style.height="0")}handleExit(){var t=this.nodeRef.current;t&&(t.style.height="".concat(ze.getHeight(t),"px"))}render(){var t=this.props,n=t.children,r=t.className,i=t.in,a=t["data-testid"];return d.jsx(za,{in:i,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered,onExit:this.handleExit,onExiting:this.handleExiting,timeout:350,nodeRef:this.nodeRef,children:o=>d.jsx("div",{ref:this.nodeRef,className:H({collapse:o==="exited"},r),"data-testid":a,children:n})})}}Bs(ze,"defaultProps",{className:"",autoFocusOnShow:!1,"data-testid":void 0});function li(e,t){return m0(e)||h0(e,t)||p0(e,t)||f0()}function f0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p0(e,t){if(e){if(typeof e=="string")return ui(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ui(e,t):void 0}}function ui(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function m0(e){if(Array.isArray(e))return e}var y0=J.module("TimeInput"),g0="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]",b0=["00:00:00","12:34:56","23:59:59"];function ci(e){return e!=null?"".concat(e.substring(0,8).replace(/\u2007/g,"0")).concat("00:00:00".substring(e.length)):e}var St=X.forwardRef((e,t)=>{var n=e.allowValueWrapping,r=n===void 0?!0:n,i=e.className,a=i===void 0?"":i,o=e.onChange,s=o===void 0?pe:o,l=e.value,u=l===void 0?0:l,f=e.onFocus,h=f===void 0?pe:f,p=e.onBlur,m=p===void 0?pe:p,g=e.onSelect,b=g===void 0?pe:g,y=e["data-testid"],S=c.useState(mt.formatTime(u)),v=li(S,2),T=v[0],w=v[1],x=c.useRef(u),P=c.useState(),E=li(P,2),C=E[0],A=E[1],D=c.useRef(null);c.useImperativeHandle(t,()=>({focus:()=>{var _;(_=D.current)===null||_===void 0||_.focus()},setSelection:_=>{var I;(I=D.current)===null||I===void 0||I.focus(),A(_)}}),[]),c.useEffect(function(){x.current!==u&&(w(mt.formatTime(u)),x.current=u)},[x,u]);function L(_,I,M){var K=_.selectionStart===0?24:60,G=parseInt(M,10)-I;return Number.isNaN(G)?G=0:r?G=(G%K+K)%K:G=Math.min(Math.max(0,G),K-1),"".concat(G).padStart(2,"0")}function j(_,I,M,K,G){return K===0&&G===2&&I===1&&parseInt(M,10)>1?"0".concat(M).concat(_.substring(2)):ss(_,I,M)}var $=c.useCallback(_=>{y0.debug("handleChange",_),w(_),x.current=mt.parseTime(ci(_)),s(x.current)},[s]),N=c.useCallback(()=>{var _=ci(T);_!==T&&w(_),m()},[T,m]),O=c.useCallback(_=>{A(_),b(_)},[b]);return d.jsx(Kn,{ref:D,className:a,example:b0,getNextSegmentValue:L,getPreferredReplacementString:j,onChange:$,onSelect:O,pattern:g0,selection:C,value:T,onFocus:h,onBlur:N,"data-testid":y})});function di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function v0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?di(Object(n),!0).forEach(function(r){Oe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):di(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oe(e,t,n){return(t=S0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S0(e){var t=P0(e,"string");return typeof t=="symbol"?t:t+""}function P0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fi=-1,Hs=function(e){return e.UP="UP",e.DOWN="DOWN",e}(Hs||{});class se extends c.Component{constructor(t){super(t),Oe(this,"csContainer",void 0),Oe(this,"menuContainer",void 0),Oe(this,"button",void 0),Oe(this,"input",void 0);var n=t.value,r=t.valueToTime;this.toggleMenu=this.toggleMenu.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.closeMenu=this.closeMenu.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.handleCustomInput=this.handleCustomInput.bind(this),this.csContainer=X.createRef(),this.menuContainer=X.createRef(),this.button=X.createRef(),this.input=X.createRef(),this.state={keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,customTime:r(n),inputFocused:!1}}getSelectedText(){var t=this.props,n=t.options,r=t.value,i=t.placeholder,a=this.state.customTime;if(r===null)return i;for(var o=0;o<n.length;o+=1){var s=n[o];if(s.value===r)return s.title}return mt.formatTime(a)}setInputWidth(){this.csContainer.current&&this.setState({inputWidth:this.csContainer.current.getBoundingClientRect().width})}focus(){var t;(t=this.button.current)===null||t===void 0||t.focus()}updateInputValue(t){var n=this.props.onChange;n(t)}handleResize(){this.setInputWidth()}handleMenuKeyDown(t){var n,r=this.state,i=r.keyboardOptionIndex,a=r.inputFocused,o=this.props.options;switch(t.key){case"Enter":case" ":a?this.updateFromCustom():this.updateInputValue(o[i].value),this.closeMenu(),(n=this.button.current)===null||n===void 0||n.focus(),t.stopPropagation(),t.preventDefault();break;case"Tab":t.shiftKey?this.handleMenuNavigation(se.MENU_NAVIGATION_DIRECTION.UP):this.handleMenuNavigation(se.MENU_NAVIGATION_DIRECTION.DOWN),t.stopPropagation(),t.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(se.MENU_NAVIGATION_DIRECTION.UP),t.stopPropagation(),t.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(se.MENU_NAVIGATION_DIRECTION.DOWN),t.stopPropagation(),t.preventDefault();break;case"Escape":this.closeMenu();break}}handleMenuNavigation(t){var n=this.state,r=n.keyboardOptionIndex,i=n.inputFocused,a=this.props.options,o=a.length,s=r;switch(t){case se.MENU_NAVIGATION_DIRECTION.UP:if(!i&&r===0){this.focusInput();break}else i&&this.focusOption(r);r>0&&!i?(s=(s-1)%o,this.setState({keyboardOptionIndex:s})):r===0&&(s=o-1,this.setState({keyboardOptionIndex:s})),this.scrollOptionIntoView(s);break;case se.MENU_NAVIGATION_DIRECTION.DOWN:if(!i&&r===o-1){this.focusInput();break}else i&&this.focusOption(r);r<o&&!(i&&r===0)&&(s=(s+1)%o,this.setState({keyboardOptionIndex:s})),this.scrollOptionIntoView(s);break}}handleOptionClick(t){var n=Number(t.currentTarget.value),r=this.props,i=r.options,a=r.timeToValue,o=this.state.customTime;if(n===fi){var s=a(o);this.updateAndClose(s)}else this.updateAndClose(i[n].value)}updateAndClose(t){var n;this.updateInputValue(t),this.closeMenu(),(n=this.button.current)===null||n===void 0||n.focus()}handleOptionFocus(t){this.setState({keyboardOptionIndex:Number(t.target.value)})}handleMenuOpened(){var t,n=this.props,r=n.options,i=n.value,a=this.state.keyboardOptionIndex;this.scrollOptionIntoView(a);var o=(t=this.menuContainer.current)===null||t===void 0?void 0:t.querySelector(".cs-option-btn.keyboard-active");if(o instanceof HTMLElement&&o.focus(),i!==null){var s=r.map(l=>l.value).indexOf(i);s<0&&this.focusInput()}}focusInput(){var t;(t=this.input.current)===null||t===void 0||t.focus()}focusOption(t){var n,r=(n=this.menuContainer.current)===null||n===void 0?void 0:n.querySelector(".cs-options");if(r&&r.children!=null){var i=r.children.item(t);i instanceof HTMLElement&&i.focus()}}handleMenuExited(){var t=this.state.menuIsOpen;t&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}handleCustomInput(t){var n=this.props.timeToValue,r=n(t);this.updateInputValue(r),this.setState({customTime:t})}updateFromCustom(){var t=this.props.timeToValue,n=this.state.customTime,r=t(n);this.updateInputValue(r)}toggleMenu(t){var n=this.state.menuIsOpen;n?this.closeMenu():this.openMenu(),t.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0})}closeMenu(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1}),t){var n;(n=this.button.current)===null||n===void 0||n.focus()}}updateKeyboardIndex(){var t=this.props,n=t.options,r=t.value;if(r!==null){var i=n.map(a=>a.value).indexOf(r);i>0&&this.setState({keyboardOptionIndex:i})}}scrollOptionIntoView(t){var n,r=(n=this.menuContainer.current)===null||n===void 0?void 0:n.querySelector(".cs-options");if(r&&r.children!=null){var i=r.children.item(t);i instanceof HTMLElement&&i.offsetTop>se.DROP_DOWN_MENU_HEIGHT?r.scrollTop=i.offsetTop-se.DROP_DOWN_MENU_HEIGHT:(i instanceof HTMLElement&&i.offsetTop<0||t===0)&&(r.scrollTop=0)}}renderMenuElement(){var t=this.state.inputWidth;return d.jsx("div",{className:"cs-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:n=>{n.stopPropagation()},style:{width:t},children:d.jsx("div",{className:"cs-options-container",children:d.jsx("div",{className:"cs-options",children:this.renderOptions()})})})}renderOptions(){for(var t=this.props,n=t.options,r=t.value,i=t.icon,a=t.customText,o=this.state,s=o.keyboardOptionIndex,l=o.customTime,u=o.inputFocused,f=!1,h=[],p=0;p<n.length;p+=1){var m=n[p],g="option-".concat(p,"-").concat(m.value);f=f||m.value===r,h.push(d.jsxs("button",{type:"button",value:p,className:H("cs-option-btn",{"keyboard-active":s===p&&!u}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[m.value===r&&d.jsx(ae,{icon:i,className:"mr-2"}),m.value!==r&&d.jsx("span",{className:"mr-4"}),m.title]},g))}return h.push(d.jsx("hr",{className:"cs-divider"},"option-divider")),h.push(d.jsxs("button",{type:"button",value:fi,className:H("cs-option-btn",{"keyboard-active":u}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[!f&&r!==null?d.jsx(ae,{icon:i,className:"mr-2"}):d.jsx("span",{className:"mr-4"}),a]},"option-custom-label")),h.push(d.jsxs("div",{className:"cs-custom-container",children:[d.jsx("span",{className:"mr-2"}),d.jsx(St,{ref:this.input,onChange:this.handleCustomInput,value:l,onFocus:()=>this.setState({inputFocused:!0}),onBlur:()=>this.setState({inputFocused:!1})},"option-input"),d.jsx("span",{className:"ml-2"})]},"cs-custom-container")),h.push(d.jsx("hr",{className:"mb-2"},"option-end")),h}render(){var t=this.props,n=t.disabled,r=t.invalid,i=t.value,a=t["data-testid"],o=this.state.menuIsOpen,s=this.props.popperOptions;return s=v0({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},s),d.jsx("div",{className:"input-group cs-container context-menu",ref:this.csContainer,"data-testid":a,children:d.jsx("div",{className:H("input-group-append cs-dropdown",{"cs-dropdown-invalid":r}),children:d.jsxs("button",{type:"button",className:H("btn cs-btn form-control",{"cs-btn-invalid":r}),ref:this.button,onClick:this.toggleMenu,disabled:n,children:[d.jsx("span",{className:H({"text-muted":i===null}),children:this.getSelectedText()}),d.jsx("span",{className:"cs-caret"}),d.jsx(po,{isShown:o,actions:{menuElement:this.renderMenuElement()},popperOptions:s,popperClassName:"CustomTimeSelect",onMenuOpened:this.handleMenuOpened,onMenuClosed:this.handleMenuExited,menuStyle:{maxWidth:"100rem"}})]})})})}}Oe(se,"MENU_NAVIGATION_DIRECTION",Hs);Oe(se,"DROP_DOWN_MENU_HEIGHT",125);Oe(se,"defaultProps",{onChange(){},value:null,disabled:!1,popperOptions:{},icon:fc,customText:"Custom",placeholder:"Select a time",valueToTime:e=>e===null?0:Math.round(e/1e3),timeToValue:e=>e*1e3,invalid:!1,"data-testid":void 0});function pi(e,t){return T0(e)||x0(e,t)||O0(e,t)||w0()}function w0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
12
+ `.concat(t.trim()))}function Jv(e){var t=e.className,n=t===void 0?"":t,r=e.value,i=e.onChange,a=e.spellCheck,o=a===void 0?!1:a,s=e.placeholder,l=s===void 0?"":s,u=e.disabled,f=u===void 0?!1:u,h=e.delimiter,p=h===void 0?"":h,m=e.id,g=m===void 0?"":m,b=e["data-testid"],y=c.useState(r),S=ti(y,2),v=S[0],T=S[1],w=c.useState(!1),x=ti(w,2),P=x[0],_=x[1],C=c.useRef(null),A=c.useRef(!1),D=c.useRef(v);D.current=v,c.useEffect(function(){!A.current||!p?T(r):Fe(D.current)!==Fe(r)&&T(Wt(r,p))},[r,p]);function L(){if(C.current){C.current.style.height="0";var I=C.current.scrollHeight+(C.current.offsetHeight-C.current.clientHeight);I>0&&(C.current.style.height="".concat(I,"px"))}}function j(I){var M=I.target.value;P&&(p&&(M=Wt(M,p)),_(!1)),T(M),i(p?Fe(M):M)}function $(){C.current&&(A.current=!0,p&&(T(Wt(v,p)),L()),C.current.scrollLeft=0)}function N(){C.current&&document.activeElement!==C.current&&C.current.focus()}function O(){A.current=!1,p&&(T(Fe(v)),i(Fe(v)))}function E(){_(!0)}return c.useEffect(function(){L()},[v]),d.jsx("textarea",{ref:C,id:g,className:H(n,"auto-resize-textarea form-control"),placeholder:l,value:v,rows:1,onChange:j,onFocus:$,onMouseDown:N,onBlur:O,onPaste:E,spellCheck:o,disabled:f,"data-testid":b})}function Us(e){var t=e.blockInteraction,n=t===void 0?!0:t,r=e.children,i=e.debounceMs,a=e.isOpen,o=a===void 0?!1:a,s=et(o,i),l=s.value;return d.jsxs(d.Fragment,{children:[n&&o&&d.jsx("div",{className:"modal-backdrop",style:{backgroundColor:"transparent"},"data-testid":"debounced-modal-backdrop"}),X.cloneElement(r,{isOpen:o&&l})]})}function Ws(e){var t=e.className,n=e.icon,r=e.isOpen,i=r===void 0?!1:r,a=e.subtitle,o=e.title;return d.jsx(jn,{isOpen:i,className:t,children:d.jsx(In,{children:d.jsxs("div",{className:"info-modal",children:[n!=null&&d.jsx("div",{className:"message-icon",children:d.jsx(ae,{icon:n})}),d.jsx("div",{className:"message-header",children:o}),a!=null&&d.jsx("div",{className:"message-content",children:a})]})})})}function ri(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ii(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ri(Object(n),!0).forEach(function(r){e0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ri(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e0(e,t,n){return(t=t0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t0(e){var t=n0(e,"string");return typeof t=="symbol"?t:t+""}function n0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r0=[];function i0(e){var t=e.styleProps,n=e.selectedItemCount,r=e.onClearSelection;return d.jsx(Ya,ii(ii({UNSAFE_className:Bn.spectrumActionBar},t),{},{isEmphasized:!0,selectedItemCount:n,onClearSelection:r,children:r0}))}function ai(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function a0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ai(Object(n),!0).forEach(function(r){Se(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ai(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Se(e,t,n){return(t=o0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o0(e){var t=s0(e,"string");return typeof t=="symbol"?t:t+""}function s0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oi=J.module("ContextMenu");class Ye extends c.PureComponent{static handleContextMenu(t){t.metaKey||(t.stopPropagation(),t.preventDefault())}constructor(t){super(t),Se(this,"container",void 0),Se(this,"oldFocus",void 0),Se(this,"activeSubMenuRef",void 0),Se(this,"subMenuTimer",void 0),Se(this,"rAF",void 0),Se(this,"initialPosition",void 0),this.handleBlur=this.handleBlur.bind(this),this.handleCloseSubMenu=this.handleCloseSubMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemContextMenu=this.handleMenuItemContextMenu.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.container=X.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=X.createRef(),this.subMenuTimer=0,this.rAF=0,this.initialPosition={top:t.top,left:t.left},this.state={menuItems:[],pendingItems:[],activeSubMenu:null,hasOverflow:!1,subMenuTop:null,subMenuLeft:null,subMenuParentWidth:0,subMenuParentHeight:0,keyboardIndex:-1,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.verifyPosition(),window.addEventListener("resize",this.handleWindowResize),this.rAF=window.requestAnimationFrame(()=>{var t;(t=this.container.current)===null||t===void 0||t.focus();var n=this.props.onMenuOpened;n(this)})}componentDidUpdate(t,n){var r=this.props.actions,i=this.state.activeSubMenu;if(i!==n.activeSubMenu)if(i==null){var a;(a=this.container.current)===null||a===void 0||a.focus()}else this.setActiveSubMenuPosition();if(t.actions!==r&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var o;(o=this.container.current)===null||o===void 0||o.focus()}this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var t=this.props.options;if(t.separateKeyboardMouse!==void 0&&t.separateKeyboardMouse){var n=this.state.keyboardIndex;return n}return this.getMouseIndex()}setKeyboardIndex(t){var n=this.props.options;n.separateKeyboardMouse!==void 0&&n.separateKeyboardMouse?this.setState({keyboardIndex:t}):this.setMouseIndex(t)}getMouseIndex(){var t=this.state.mouseIndex;return t}setMouseIndex(t){this.setState({mouseIndex:t})}initMenu(){this.cancelPromises(),cancelAnimationFrame(this.rAF);var t=this.props.options,n=t.initialKeyboardIndex;n===void 0&&(n=-1);for(var r=this.props.actions,i=Pe.getMenuItems(r),a=[],o=i.length-1;o>=0;o-=1){var s=i[o];s instanceof Promise?this.initMenuPromise(s):a.push(s)}this.setState({mouseIndex:-1,keyboardIndex:n,activeSubMenu:null,menuItems:Pe.sortActions(a)})}initMenuPromise(t){var n=je.makeCancelable(t);this.setState(r=>({pendingItems:r.pendingItems.concat(n)})),n.then(r=>{this.setState(i=>{var a=i.pendingItems.indexOf(n);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{menuItems:Pe.sortActions(i.menuItems.concat(r)),pendingItems:o}}return null})},r=>{je.isCanceled(r)||(this.setState(i=>{var a=i.pendingItems.indexOf(n);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{pendingItems:o}}return null}),oi.error(r))})}cancelPromises(){var t=this.state.pendingItems;t.map(n=>n.cancel())}setActiveSubMenuPosition(){if(this.activeSubMenuRef.current!==null){var t=this.activeSubMenuRef.current.getBoundingClientRect();this.setState({subMenuTop:t.top,subMenuLeft:t.right,subMenuParentHeight:t.height,subMenuParentWidth:t.width})}}verifyPosition(){var t,n,r,i,a=this.props,o=a.options,s=a.updatePosition,l=a.subMenuParentWidth,u=a.subMenuParentHeight,f=a.top,h=a.left;if(!(!this.container.current||o.doNotVerifyPosition!=null&&o.doNotVerifyPosition)){var p=this.initialPosition,m=p.top,g=p.left,b=(t=(n=this.container.current)===null||n===void 0?void 0:n.getBoundingClientRect())!==null&&t!==void 0?t:{width:0,height:0},y=b.width,S=b.height,v=((r=(i=this.container.current)===null||i===void 0?void 0:i.scrollHeight)!==null&&r!==void 0?r:0)>window.innerHeight;S===0||y===0||(m+S>window.innerHeight&&(m-S-u>0?m-=S-u:m=window.innerHeight-S),g+y>window.innerWidth&&(g=g-y-l),(h!==g||f!==m)&&(this.setState({hasOverflow:v}),s(m,g)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(t){if(!this.container.current){oi.warn("Container is null!");return}if(!this.container.current.contains(t.relatedTarget)){for(var n=t.relatedTarget,r=!1;n&&!r;)r=n.hasAttribute("data-dh-context-menu"),n=n.parentElement;r||this.closeMenu(!0)}}isEscapeKey(t){var n=this.props.left;return t==="Escape"||n<0&&t==="ArrowRight"||t==="ArrowLeft"}handleKeyDown(t){var n=this.state.menuItems,r=this.getKeyboardIndex(),i=r,a=!1;if(t.key==="Enter"||t.key===" "){r>=0&&r<n.length&&this.handleMenuItemClick(n[r],t);return}if(t.key==="ArrowRight"?r>=0&&r<=n.length?a=!0:i=0:this.isEscapeKey(t.key)?i=null:t.key==="ArrowUp"||t.shiftKey&&t.key==="Tab"?i=Pe.getNextMenuItem(i,-1,n):(t.key==="ArrowDown"||t.key==="Tab")&&(i=Pe.getNextMenuItem(i,1,n)),a){this.openSubMenu(r),t.preventDefault(),t.stopPropagation();return}r!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),t.preventDefault(),t.stopPropagation())}openSubMenu(t){var n=this.state,r=n.menuItems,i=n.activeSubMenu,a=r[t].actions?t:null;i!==a&&this.setState({activeSubMenu:a,subMenuTop:null,subMenuLeft:null})}closeMenu(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.props,r=n.closeMenu,i=n.onMenuClosed;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{r(t),i(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(t){t?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(t,n){n.preventDefault(),n.stopPropagation();var r=this.state.menuItems;t!=null&&(t.disabled===void 0||!t.disabled)&&(t.actions!=null?this.openSubMenu(r.indexOf(t)):t.action!=null&&(t.action(n.nativeEvent),this.closeMenu(!0)))}handleMenuItemContextMenu(t,n){n.metaKey||this.handleMenuItemClick(t,n)}handleMenuItemMouseMove(t){var n=this.state.menuItems,r=n.indexOf(t);this.setMouseIndex(r),r>=0&&r<n.length&&(t.disabled===void 0||!t.disabled)&&this.openSubMenu(r)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var t=[],n=this.props,r=n.top,i=n.left,a=this.state,o=a.activeSubMenu,s=a.hasOverflow,l=a.keyboardIndex,u=a.menuItems,f=a.mouseIndex,h=a.pendingItems,p=a.subMenuTop,m=a.subMenuLeft,g=a.subMenuParentWidth,b=a.subMenuParentHeight,y=0;y<u.length;y+=1){var S=u[y];y>0&&S.group!==u[y-1].group&&t.push(d.jsx("hr",{},"".concat(y,".separator")));var v=d.jsx(fo,{ref:o===y?this.activeSubMenuRef:null,isKeyboardSelected:l===y,isMouseSelected:f===y,menuItem:S,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},y);t.push(v)}var T=null;h.length>0&&(T=d.jsx("div",{className:"loading",children:d.jsx(Tt,{className:"loading-spinner-vertical-align"})}));var w=this.props,x=w.menuStyle,P=w["data-testid"],_=o!==null&&p!==null&&m!==null;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:H({"has-overflow":s},"context-menu-container"),style:a0({top:r,left:i},x),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:Ye.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":P,children:[t,T]}),_&&o!==null&&p!==null&&m!==null&&d.jsx(Ye,{actions:u[o].actions||[],closeMenu:this.handleCloseSubMenu,top:p,left:m,updatePosition:(C,A)=>{this.setState({subMenuTop:C,subMenuLeft:A})},subMenuParentWidth:g,subMenuParentHeight:b},"sub-".concat(o))]})}}Se(Ye,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});function si(e,t,n){return(t=l0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l0(e){var t=u0(e,"string");return typeof t=="symbol"?t:t+""}function u0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Vs extends c.Component{constructor(t){super(t),si(this,"container",void 0),si(this,"openMenu",void 0),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=X.createRef(),this.openMenu=X.createRef(),this.state={actions:null,left:0,top:0}}componentDidMount(){var t;(t=this.container.current)!==null&&t!==void 0&&t.parentElement&&this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu)}componentWillUnmount(){var t;(t=this.container.current)!==null&&t!==void 0&&t.parentElement&&this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu)}handleContextMenu(t){if(this.container.current){var n=this.container.current.getBoundingClientRect(),r=t.clientY-n.top,i=t.clientX-n.left,a=this.state.actions;if(a!=null&&t.target===this.container.current){t.preventDefault(),this.setState({actions:null},()=>{var s=document.elementFromPoint(i,r),l=new MouseEvent("contextmenu",{clientX:t.clientX,clientY:t.clientY,bubbles:!0,cancelable:!0});s==null||s.dispatchEvent(l)});return}if(Pe.isContextActionEvent(t)&&!(t.metaKey||t.ctrlKey)){var o=Pe.getMenuItems(t.contextActions);o.length!==0&&(t.preventDefault(),this.setState({actions:o,top:r,left:i}))}}}handleMenuClose(t){t===this.openMenu.current&&this.setState({actions:null})}render(){var t=null,n=this.props["data-testid"],r=this.state,i=r.actions,a=r.top,o=r.left;return i&&(t=d.jsx(Ye,{ref:this.openMenu,actions:i,onMenuClosed:this.handleMenuClose,top:a,left:o,updatePosition:(s,l)=>{this.setState({top:s,left:l})},"data-testid":n})),d.jsx("div",{className:H("context-menu-root",{active:i}),ref:this.container,children:t})}}function Bs(e,t,n){return(t=c0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c0(e){var t=d0(e,"string");return typeof t=="symbol"?t:t+""}function d0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class ze extends c.Component{static getHeight(t){var n=t.scrollWidth-t.clientWidth;return t.scrollHeight-n}constructor(t){super(t),Bs(this,"nodeRef",X.createRef()),this.handleEntered=this.handleEntered.bind(this)}handleEntered(){var t=this.nodeRef.current;if(t){t.style.height="";var n=this.props.autoFocusOnShow;if(n!==void 0&&n){var r=t.querySelector("input, select, textarea");r!=null&&r.focus()}}}handleEnter(){var t=this.nodeRef.current;t&&(t.style.height="0")}handleEntering(){var t=this.nodeRef.current;t&&(t.style.height="".concat(ze.getHeight(t),"px"))}handleExiting(){var t=this.nodeRef.current;t&&(t.style.height="0")}handleExit(){var t=this.nodeRef.current;t&&(t.style.height="".concat(ze.getHeight(t),"px"))}render(){var t=this.props,n=t.children,r=t.className,i=t.in,a=t["data-testid"];return d.jsx(za,{in:i,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered,onExit:this.handleExit,onExiting:this.handleExiting,timeout:350,nodeRef:this.nodeRef,children:o=>d.jsx("div",{ref:this.nodeRef,className:H({collapse:o==="exited"},r),"data-testid":a,children:n})})}}Bs(ze,"defaultProps",{className:"",autoFocusOnShow:!1,"data-testid":void 0});function li(e,t){return m0(e)||h0(e,t)||p0(e,t)||f0()}function f0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p0(e,t){if(e){if(typeof e=="string")return ui(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ui(e,t):void 0}}function ui(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function m0(e){if(Array.isArray(e))return e}var y0=J.module("TimeInput"),g0="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]",b0=["00:00:00","12:34:56","23:59:59"];function ci(e){return e!=null?"".concat(e.substring(0,8).replace(/\u2007/g,"0")).concat("00:00:00".substring(e.length)):e}var St=X.forwardRef((e,t)=>{var n=e.allowValueWrapping,r=n===void 0?!0:n,i=e.className,a=i===void 0?"":i,o=e.onChange,s=o===void 0?pe:o,l=e.value,u=l===void 0?0:l,f=e.onFocus,h=f===void 0?pe:f,p=e.onBlur,m=p===void 0?pe:p,g=e.onSelect,b=g===void 0?pe:g,y=e["data-testid"],S=c.useState(mt.formatTime(u)),v=li(S,2),T=v[0],w=v[1],x=c.useRef(u),P=c.useState(),_=li(P,2),C=_[0],A=_[1],D=c.useRef(null);c.useImperativeHandle(t,()=>({focus:()=>{var E;(E=D.current)===null||E===void 0||E.focus()},setSelection:E=>{var I;(I=D.current)===null||I===void 0||I.focus(),A(E)}}),[]),c.useEffect(function(){x.current!==u&&(w(mt.formatTime(u)),x.current=u)},[x,u]);function L(E,I,M){var K=E.selectionStart===0?24:60,G=parseInt(M,10)-I;return Number.isNaN(G)?G=0:r?G=(G%K+K)%K:G=Math.min(Math.max(0,G),K-1),"".concat(G).padStart(2,"0")}function j(E,I,M,K,G){return K===0&&G===2&&I===1&&parseInt(M,10)>1?"0".concat(M).concat(E.substring(2)):ss(E,I,M)}var $=c.useCallback(E=>{y0.debug("handleChange",E),w(E),x.current=mt.parseTime(ci(E)),s(x.current)},[s]),N=c.useCallback(()=>{var E=ci(T);E!==T&&w(E),m()},[T,m]),O=c.useCallback(E=>{A(E),b(E)},[b]);return d.jsx(Kn,{ref:D,className:a,example:b0,getNextSegmentValue:L,getPreferredReplacementString:j,onChange:$,onSelect:O,pattern:g0,selection:C,value:T,onFocus:h,onBlur:N,"data-testid":y})});function di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function v0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?di(Object(n),!0).forEach(function(r){Oe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):di(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oe(e,t,n){return(t=S0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S0(e){var t=P0(e,"string");return typeof t=="symbol"?t:t+""}function P0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fi=-1,Hs=function(e){return e.UP="UP",e.DOWN="DOWN",e}(Hs||{});class se extends c.Component{constructor(t){super(t),Oe(this,"csContainer",void 0),Oe(this,"menuContainer",void 0),Oe(this,"button",void 0),Oe(this,"input",void 0);var n=t.value,r=t.valueToTime;this.toggleMenu=this.toggleMenu.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.closeMenu=this.closeMenu.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.handleCustomInput=this.handleCustomInput.bind(this),this.csContainer=X.createRef(),this.menuContainer=X.createRef(),this.button=X.createRef(),this.input=X.createRef(),this.state={keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,customTime:r(n),inputFocused:!1}}getSelectedText(){var t=this.props,n=t.options,r=t.value,i=t.placeholder,a=this.state.customTime;if(r===null)return i;for(var o=0;o<n.length;o+=1){var s=n[o];if(s.value===r)return s.title}return mt.formatTime(a)}setInputWidth(){this.csContainer.current&&this.setState({inputWidth:this.csContainer.current.getBoundingClientRect().width})}focus(){var t;(t=this.button.current)===null||t===void 0||t.focus()}updateInputValue(t){var n=this.props.onChange;n(t)}handleResize(){this.setInputWidth()}handleMenuKeyDown(t){var n,r=this.state,i=r.keyboardOptionIndex,a=r.inputFocused,o=this.props.options;switch(t.key){case"Enter":case" ":a?this.updateFromCustom():this.updateInputValue(o[i].value),this.closeMenu(),(n=this.button.current)===null||n===void 0||n.focus(),t.stopPropagation(),t.preventDefault();break;case"Tab":t.shiftKey?this.handleMenuNavigation(se.MENU_NAVIGATION_DIRECTION.UP):this.handleMenuNavigation(se.MENU_NAVIGATION_DIRECTION.DOWN),t.stopPropagation(),t.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(se.MENU_NAVIGATION_DIRECTION.UP),t.stopPropagation(),t.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(se.MENU_NAVIGATION_DIRECTION.DOWN),t.stopPropagation(),t.preventDefault();break;case"Escape":this.closeMenu();break}}handleMenuNavigation(t){var n=this.state,r=n.keyboardOptionIndex,i=n.inputFocused,a=this.props.options,o=a.length,s=r;switch(t){case se.MENU_NAVIGATION_DIRECTION.UP:if(!i&&r===0){this.focusInput();break}else i&&this.focusOption(r);r>0&&!i?(s=(s-1)%o,this.setState({keyboardOptionIndex:s})):r===0&&(s=o-1,this.setState({keyboardOptionIndex:s})),this.scrollOptionIntoView(s);break;case se.MENU_NAVIGATION_DIRECTION.DOWN:if(!i&&r===o-1){this.focusInput();break}else i&&this.focusOption(r);r<o&&!(i&&r===0)&&(s=(s+1)%o,this.setState({keyboardOptionIndex:s})),this.scrollOptionIntoView(s);break}}handleOptionClick(t){var n=Number(t.currentTarget.value),r=this.props,i=r.options,a=r.timeToValue,o=this.state.customTime;if(n===fi){var s=a(o);this.updateAndClose(s)}else this.updateAndClose(i[n].value)}updateAndClose(t){var n;this.updateInputValue(t),this.closeMenu(),(n=this.button.current)===null||n===void 0||n.focus()}handleOptionFocus(t){this.setState({keyboardOptionIndex:Number(t.target.value)})}handleMenuOpened(){var t,n=this.props,r=n.options,i=n.value,a=this.state.keyboardOptionIndex;this.scrollOptionIntoView(a);var o=(t=this.menuContainer.current)===null||t===void 0?void 0:t.querySelector(".cs-option-btn.keyboard-active");if(o instanceof HTMLElement&&o.focus(),i!==null){var s=r.map(l=>l.value).indexOf(i);s<0&&this.focusInput()}}focusInput(){var t;(t=this.input.current)===null||t===void 0||t.focus()}focusOption(t){var n,r=(n=this.menuContainer.current)===null||n===void 0?void 0:n.querySelector(".cs-options");if(r&&r.children!=null){var i=r.children.item(t);i instanceof HTMLElement&&i.focus()}}handleMenuExited(){var t=this.state.menuIsOpen;t&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}handleCustomInput(t){var n=this.props.timeToValue,r=n(t);this.updateInputValue(r),this.setState({customTime:t})}updateFromCustom(){var t=this.props.timeToValue,n=this.state.customTime,r=t(n);this.updateInputValue(r)}toggleMenu(t){var n=this.state.menuIsOpen;n?this.closeMenu():this.openMenu(),t.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0})}closeMenu(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1}),t){var n;(n=this.button.current)===null||n===void 0||n.focus()}}updateKeyboardIndex(){var t=this.props,n=t.options,r=t.value;if(r!==null){var i=n.map(a=>a.value).indexOf(r);i>0&&this.setState({keyboardOptionIndex:i})}}scrollOptionIntoView(t){var n,r=(n=this.menuContainer.current)===null||n===void 0?void 0:n.querySelector(".cs-options");if(r&&r.children!=null){var i=r.children.item(t);i instanceof HTMLElement&&i.offsetTop>se.DROP_DOWN_MENU_HEIGHT?r.scrollTop=i.offsetTop-se.DROP_DOWN_MENU_HEIGHT:(i instanceof HTMLElement&&i.offsetTop<0||t===0)&&(r.scrollTop=0)}}renderMenuElement(){var t=this.state.inputWidth;return d.jsx("div",{className:"cs-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:n=>{n.stopPropagation()},style:{width:t},children:d.jsx("div",{className:"cs-options-container",children:d.jsx("div",{className:"cs-options",children:this.renderOptions()})})})}renderOptions(){for(var t=this.props,n=t.options,r=t.value,i=t.icon,a=t.customText,o=this.state,s=o.keyboardOptionIndex,l=o.customTime,u=o.inputFocused,f=!1,h=[],p=0;p<n.length;p+=1){var m=n[p],g="option-".concat(p,"-").concat(m.value);f=f||m.value===r,h.push(d.jsxs("button",{type:"button",value:p,className:H("cs-option-btn",{"keyboard-active":s===p&&!u}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[m.value===r&&d.jsx(ae,{icon:i,className:"mr-2"}),m.value!==r&&d.jsx("span",{className:"mr-4"}),m.title]},g))}return h.push(d.jsx("hr",{className:"cs-divider"},"option-divider")),h.push(d.jsxs("button",{type:"button",value:fi,className:H("cs-option-btn",{"keyboard-active":u}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[!f&&r!==null?d.jsx(ae,{icon:i,className:"mr-2"}):d.jsx("span",{className:"mr-4"}),a]},"option-custom-label")),h.push(d.jsxs("div",{className:"cs-custom-container",children:[d.jsx("span",{className:"mr-2"}),d.jsx(St,{ref:this.input,onChange:this.handleCustomInput,value:l,onFocus:()=>this.setState({inputFocused:!0}),onBlur:()=>this.setState({inputFocused:!1})},"option-input"),d.jsx("span",{className:"ml-2"})]},"cs-custom-container")),h.push(d.jsx("hr",{className:"mb-2"},"option-end")),h}render(){var t=this.props,n=t.disabled,r=t.invalid,i=t.value,a=t["data-testid"],o=this.state.menuIsOpen,s=this.props.popperOptions;return s=v0({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},s),d.jsx("div",{className:"input-group cs-container context-menu",ref:this.csContainer,"data-testid":a,children:d.jsx("div",{className:H("input-group-append cs-dropdown",{"cs-dropdown-invalid":r}),children:d.jsxs("button",{type:"button",className:H("btn cs-btn form-control",{"cs-btn-invalid":r}),ref:this.button,onClick:this.toggleMenu,disabled:n,children:[d.jsx("span",{className:H({"text-muted":i===null}),children:this.getSelectedText()}),d.jsx("span",{className:"cs-caret"}),d.jsx(po,{isShown:o,actions:{menuElement:this.renderMenuElement()},popperOptions:s,popperClassName:"CustomTimeSelect",onMenuOpened:this.handleMenuOpened,onMenuClosed:this.handleMenuExited,menuStyle:{maxWidth:"100rem"}})]})})})}}Oe(se,"MENU_NAVIGATION_DIRECTION",Hs);Oe(se,"DROP_DOWN_MENU_HEIGHT",125);Oe(se,"defaultProps",{onChange(){},value:null,disabled:!1,popperOptions:{},icon:fc,customText:"Custom",placeholder:"Select a time",valueToTime:e=>e===null?0:Math.round(e/1e3),timeToValue:e=>e*1e3,invalid:!1,"data-testid":void 0});function pi(e,t){return T0(e)||x0(e,t)||O0(e,t)||w0()}function w0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
14
14
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O0(e,t){if(e){if(typeof e=="string")return hi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hi(e,t):void 0}}function hi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function T0(e){if(Array.isArray(e))return e}var C0=J.module("DateInput"),E0="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",_0=["2000-01-01","2022-12-31"],j0="YYYY-MM-DD",Ks=X.forwardRef((e,t)=>{var n=e.className,r=n===void 0?"":n,i=e.onChange,a=i===void 0?()=>{}:i,o=e.defaultValue,s=o===void 0?"":o,l=e.onFocus,u=l===void 0?()=>{}:l,f=e.onBlur,h=f===void 0?()=>{}:f,p=e["data-testid"],m=c.useState(s),g=pi(m,2),b=g[0],y=g[1],S=c.useState(),v=pi(S,2),T=v[0],w=v[1],x=c.useCallback(P=>{C0.debug("handleChange",P),y(P),a(P)},[a]);return d.jsx("div",{className:"d-flex flex-row align-items-center",children:d.jsx(Kn,{ref:t,className:H(r),example:_0,getNextSegmentValue:pm,onChange:x,onSelect:w,pattern:E0,placeholder:j0,selection:T,value:b,onFocus:u,onBlur:h,"data-testid":p})})});Ks.displayName="DateInput";var I0={CYCLE_TO_NEXT_STACK:Ce.createAndAdd({id:"NAVIGATION.CYCLE_TO_NEXT_STACK",name:"Cycle To Next Stack",shortcut:[ne.CTRL,oe.SINGLE_QUOTE],macShortcut:[ne.CMD,oe.SINGLE_QUOTE],isEditable:!0}),CYCLE_TO_PREVIOUS_STACK:Ce.createAndAdd({id:"NAVIGATION.CYCLE_TO_PREVIOUS_STACK",name:"Cycle To Previous Stack",shortcut:[ne.CTRL,oe.SEMICOLON],macShortcut:[ne.CMD,oe.SEMICOLON],isEditable:!0}),CYCLE_TO_NEXT_TAB:Ce.createAndAdd({id:"NAVIGATION.CYCLE_TO_NEXT_TAB",name:"Cycle To Next Tab",shortcut:[ne.CTRL,ne.SHIFT,oe.DOUBLE_QUOTE],macShortcut:[ne.CMD,ne.SHIFT,oe.SINGLE_QUOTE],isEditable:!0}),CYCLE_TO_PREVIOUS_TAB:Ce.createAndAdd({id:"NAVIGATION.CYCLE_TO_PREVIOUS_TAB",name:"Cycle To Previous Tab",shortcut:[ne.CTRL,ne.SHIFT,oe.COLON],macShortcut:[ne.CMD,ne.SHIFT,oe.SEMICOLON],isEditable:!0}),CYCLE_TO_NEXT_DASHBOARD:Ce.createAndAdd({id:"NAVIGATION.CYCLE_TO_NEXT_DASHBOARD",name:"Cycle To Next Dashboard",shortcut:[ne.CTRL,oe.PERIOD],macShortcut:[ne.CMD,oe.PERIOD],isEditable:!0}),CYCLE_TO_PREVIOUS_DASHBOARD:Ce.createAndAdd({id:"NAVIGATION.CYCLE_TO_PREVIOUS_DASHBOARD",name:"Cycle To Previous Dashboard",shortcut:[ne.CTRL,oe.COMMA],macShortcut:[ne.CMD,oe.COMMA],isEditable:!0})};function Vt(e,t){return R0(e)||k0(e,t)||$0(e,t)||A0()}function A0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
15
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $0(e,t){if(e){if(typeof e=="string")return mi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mi(e,t):void 0}}function mi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function R0(e){if(Array.isArray(e))return e}function L0(e){var t=e.isInvalid,n=t===void 0?!1:t,r=e.items,i=e.onAdd,a=i===void 0?()=>{}:i,o=e.onDelete,s=o===void 0?()=>{}:o,l=e.validate,u=l===void 0?()=>null:l,f=c.useState(null),h=Vt(f,2),p=h[0],m=h[1],g=c.useState([]),b=Vt(g,2),y=b[0],S=b[1],v=c.useState(""),T=Vt(v,2),w=T[0],x=T[1],P=c.useCallback($=>{S($)},[]),E=c.useCallback(()=>{s(lr.getItemsInRanges(r,y)),S([])},[r,y,s]),C=c.useCallback(()=>{if(w!==""){var $=u(w);$==null?(a(w),x("")):m($)}},[w,a,u]),A=c.useCallback($=>{var N=$.target.value;x(N),m(N===""?null:u(N))},[u]),D=c.useCallback(()=>{S([])},[]),L=c.useCallback($=>{$.key==="Enter"&&C()},[C]),j=c.useMemo(()=>14+qa(r.length,1,6)*tn.DEFAULT_ROW_HEIGHT,[r.length]);return d.jsxs("div",{className:H("editable-item-list-container",{"is-invalid":n}),children:[d.jsx("div",{style:{height:j},children:d.jsx(tn,{itemCount:r.length,items:r.map(($,N)=>({value:$,isSelected:lr.isSelected(y,N)})),offset:0,selectedRanges:y,onSelectionChange:P,isMultiSelect:!0})}),d.jsxs("div",{className:"d-flex flex-row pt-2",children:[d.jsx("div",{className:"d-flex flex-grow-1",children:d.jsx("input",{className:H("form-control",{"is-invalid":p!=null}),placeholder:"Enter value",type:"text",value:w,onChange:A,onFocus:D,onKeyDown:L})}),d.jsxs("div",{className:"d-flex align-items-start mt-1 ml-2",children:[d.jsx(re,{kind:"ghost",onClick:C,disabled:p!=null||w==="",icon:pc,tooltip:"Add new item","data-testid":"add-item-button"}),d.jsx(re,{kind:"ghost",onClick:E,disabled:y.length===0,icon:io,tooltip:"Delete selected items","data-testid":"delete-item-button"})]})]})]})}function yi(e,t){return F0(e)||N0(e,t)||M0(e,t)||D0()}function D0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
15
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $0(e,t){if(e){if(typeof e=="string")return mi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mi(e,t):void 0}}function mi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function R0(e){if(Array.isArray(e))return e}function L0(e){var t=e.isInvalid,n=t===void 0?!1:t,r=e.items,i=e.onAdd,a=i===void 0?()=>{}:i,o=e.onDelete,s=o===void 0?()=>{}:o,l=e.validate,u=l===void 0?()=>null:l,f=c.useState(null),h=Vt(f,2),p=h[0],m=h[1],g=c.useState([]),b=Vt(g,2),y=b[0],S=b[1],v=c.useState(""),T=Vt(v,2),w=T[0],x=T[1],P=c.useCallback($=>{S($)},[]),_=c.useCallback(()=>{s(lr.getItemsInRanges(r,y)),S([])},[r,y,s]),C=c.useCallback(()=>{if(w!==""){var $=u(w);$==null?(a(w),x("")):m($)}},[w,a,u]),A=c.useCallback($=>{var N=$.target.value;x(N),m(N===""?null:u(N))},[u]),D=c.useCallback(()=>{S([])},[]),L=c.useCallback($=>{$.key==="Enter"&&C()},[C]),j=c.useMemo(()=>14+qa(r.length,1,6)*tn.DEFAULT_ROW_HEIGHT,[r.length]);return d.jsxs("div",{className:H("editable-item-list-container",{"is-invalid":n}),children:[d.jsx("div",{style:{height:j},children:d.jsx(tn,{itemCount:r.length,items:r.map(($,N)=>({value:$,isSelected:lr.isSelected(y,N)})),offset:0,selectedRanges:y,onSelectionChange:P,isMultiSelect:!0})}),d.jsxs("div",{className:"d-flex flex-row pt-2",children:[d.jsx("div",{className:"d-flex flex-grow-1",children:d.jsx("input",{className:H("form-control",{"is-invalid":p!=null}),placeholder:"Enter value",type:"text",value:w,onChange:A,onFocus:D,onKeyDown:L})}),d.jsxs("div",{className:"d-flex align-items-start mt-1 ml-2",children:[d.jsx(re,{kind:"ghost",onClick:C,disabled:p!=null||w==="",icon:pc,tooltip:"Add new item","data-testid":"add-item-button"}),d.jsx(re,{kind:"ghost",onClick:_,disabled:y.length===0,icon:io,tooltip:"Delete selected items","data-testid":"delete-item-button"})]})]})]})}function yi(e,t){return F0(e)||N0(e,t)||M0(e,t)||D0()}function D0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
16
16
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M0(e,t){if(e){if(typeof e=="string")return gi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gi(e,t):void 0}}function gi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function N0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function F0(e){if(Array.isArray(e))return e}function U0(e){var t=e.message,n=e.isExpanded,r=n===void 0?!1:n,i=e.type,a=i===void 0?"Error":i,o=e.onDismiss,s=c.useState(!1),l=yi(s,2),u=l[0],f=l[1],h=c.useState(!1),p=yi(h,2),m=p[0],g=p[1],b=c.useRef(null),y=c.useRef(null),S=c.useCallback(()=>{if(!(m||r||y.current==null)){var T=y.current.scrollHeight>y.current.clientHeight;f(T)}},[m,r]),v=Ke(S,100);return Dt(b.current,v),c.useLayoutEffect(v,[v]),d.jsxs("div",{className:H("error-view",{expanded:m||r}),ref:b,children:[d.jsxs("div",{className:"error-view-header",children:[d.jsxs("div",{className:"error-view-header-text",children:[d.jsx(ae,{icon:hc}),d.jsx("span",{children:a})]}),d.jsxs("div",{className:"error-view-buttons",children:[d.jsx(ho,{UNSAFE_className:"error-view-copy-button",tooltip:"Copy error contents",copy:"".concat(a,": ").concat(t).trim()}),(u||m)&&!r&&d.jsx(re,{kind:"danger",className:"error-view-expand-button",onClick:()=>{g(!m)},icon:m?mc:yc,children:m?"Show Less":"Show More"}),o!=null&&d.jsx(re,{kind:"danger",className:"error-view-dismiss-button",onClick:o,icon:An,children:"Dismiss"})]})]}),d.jsx("pre",{className:"error-view-text",ref:y,children:t})]})}function bi(e,t){return H0(e)||B0(e,t)||V0(e,t)||W0()}function W0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
17
17
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V0(e,t){if(e){if(typeof e=="string")return vi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vi(e,t):void 0}}function vi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function B0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function H0(e){if(Array.isArray(e))return e}function K0(e,t,n){return(t=G0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G0(e){var t=Y0(e,"string");return typeof t=="symbol"?t:t+""}function Y0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class De extends c.Component{static isParentSelected(t,n){var r=n.get(t);if(r===void 0)return!1;if(typeof r=="boolean")return r;var i=Array.from(r.values()).includes(!0),a=Array.from(r.values()).includes(!1);return i&&a?null:i}constructor(t){super(t),this.toggleMenu=this.toggleMenu.bind(this),this.toggleValueFor=this.toggleValueFor.bind(this),this.selectAll=this.selectAll.bind(this),this.clear=this.clear.bind(this),this.state={menuIsOpen:!1}}toggleMenu(t){t.stopPropagation(),t.preventDefault(),this.setState(n=>{var r=n.menuIsOpen;return{menuIsOpen:!r}})}toggleValueFor(t,n){var r=this.props,i=r.valueMap,a=r.onUpdateValueMap,o=new Map(i),s=o.get(t);if(s instanceof Map){var l=new Map(s);if(n!=null)l.set(n,s.get(n)!==!0);else{var u=De.isParentSelected(t,o),f=u==null||!u;s.forEach((m,g)=>l.set(g,f))}o.set(t,l)}else o.set(t,s==null||!s);var h=o.get(t);if(n===void 0&&h!==void 0&&typeof h!="boolean"){var p=De.isParentSelected(t,i);p!=null&&p?h.forEach((m,g)=>h.set(g,!1)):h.forEach((m,g)=>h.set(g,!0))}a(o)}setAllValues(t){var n=this.props,r=n.valueMap,i=n.onUpdateValueMap,a=new Map;r.forEach((o,s)=>{if(typeof o=="boolean")a.set(s,t);else{var l=new Map;o.forEach((u,f)=>l.set(f,t)),a.set(s,l)}}),i(a)}selectAll(){this.setAllValues(!0)}clear(){this.setAllValues(!1)}renderMenuElement(){var t=this.props,n=t.valueMap,r=t["data-testid"];return d.jsxs("div",{className:"hcm-menu-container",children:[Array.from(n.entries()).map(i=>{var a=bi(i,2),o=a[0],s=a[1];return d.jsxs("div",{children:[d.jsx(nn,{className:"hcm-parent",checked:De.isParentSelected(o,n),onChange:()=>this.toggleValueFor(o),children:o}),s!==void 0&&typeof s!="boolean"&&Array.from(s.entries()).map(l=>{var u=bi(l,2),f=u[0],h=u[1];return d.jsx(nn,{className:"hcm-child",checked:h,onChange:()=>this.toggleValueFor(o,f),children:f},f)})]},o)}),d.jsx(re,{kind:"ghost",onClick:this.selectAll,"data-testid":r!==void 0?"".concat(r,"-btn-select-all"):void 0,children:"Select All"}),d.jsx(re,{kind:"ghost",onClick:this.clear,"data-testid":r!==void 0?"".concat(r,"-btn-clear"):void 0,children:"Clear"})]})}render(){var t=this.props,n=t.menuText,r=t.className,i=t.icon,a=t.id,o=t["data-testid"],s=this.state.menuIsOpen;return d.jsxs("button",{type:"button",className:H("btn hcm-btn",r),onClick:this.toggleMenu,id:a,"data-testid":o,children:[d.jsxs("span",{children:[i&&d.jsx(ae,{icon:i,className:"hcm-icon mr-1"}),n]}),d.jsx("span",{className:"cs-caret"}),d.jsx(At,{options:{placement:"bottom"},isShown:s,onExited:()=>{this.setState({menuIsOpen:!1})},closeOnBlur:!0,interactive:!0,children:this.renderMenuElement()})]})}}K0(De,"defaultProps",{className:"",icon:null,id:"","data-testid":void 0});function Si(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Si(Object(n),!0).forEach(function(r){z0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Si(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z0(e,t,n){return(t=q0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q0(e){var t=X0(e,"string");return typeof t=="symbol"?t:t+""}function X0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gs=c.memo(e=>{var t=e.tab,n=e.onClose,r=e.onSelect,i=e.isActive,a=e.activeRef,o=e.index,s=e.isDraggable,l=e.contextActions,u=e.renderAfterTabContent,f=t.key,h=t.isClosable,p=h===void 0?n!=null:h,m=t.title,g=t.icon,b;return g!=null&&(b=X.isValidElement(g)?g:d.jsx(ae,{icon:g})),d.jsx(Gl,{draggableId:f,index:o,isDragDisabled:!s,children:(y,S)=>d.jsxs("div",{className:"context-menu-wrapper",ref:i?a:null,children:[d.jsxs("div",Bt(Bt(Bt({ref:y.innerRef},y.draggableProps),y.dragHandleProps),{},{className:H("btn btn-link btn-nav-tab",{active:i},{dragging:S.isDragging}),"data-testid":"btn-nav-tab-".concat(m),role:"tab",tabIndex:0,onAuxClick:v=>{p&&v.button===1&&v.buttons===0&&(n==null||n(f))},onClick:v=>{if(p&&v.button===1&&v.buttons===0){n==null||n(f);return}v.button===0&&v.buttons===0&&(v.target.focus(),r(f))},onKeyPress:v=>{v.key==="Enter"&&r(f)},children:[b,d.jsxs("span",{className:"btn-nav-tab-title",children:[m,d.jsx(Ze,{children:m})]}),u==null?void 0:u(t),p&&d.jsx(re,{kind:"ghost",className:"btn-nav-tab-close",onClick:v=>{n==null||n(f),v.stopPropagation(),v.preventDefault()},icon:An,tooltip:"Close"})]})),d.jsx($t,{actions:l})]})},f)});Gs.displayName="NavTab";function Pi(e,t){return eS(e)||J0(e,t)||Z0(e,t)||Q0()}function Q0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z0(e,t){if(e){if(typeof e=="string")return wi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wi(e,t):void 0}}function wi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function J0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function eS(e){if(Array.isArray(e))return e}function Ys(e){var t=e.onSelect,n=e.tabs,r=n===void 0?mo:n,i=c.useState(""),a=Pi(i,2),o=a[0],s=a[1],l=c.useState(0),u=Pi(l,2),f=u[0],h=u[1],p=c.useRef(null),m=c.useRef(null),g=c.useRef([]);c.useEffect(()=>{var P;(P=p.current)===null||P===void 0||P.focus()},[]),c.useEffect(()=>{h(0)},[o]),c.useEffect(()=>{if(f>=0&&g.current[f]){var P;(P=g.current[f])===null||P===void 0||P.scrollIntoView({behavior:"auto",block:"nearest"})}},[f]);var b=c.useCallback(P=>{s(P.target.value)},[]),y=c.useCallback(P=>{t(P)},[t]),S=c.useCallback(P=>{P.preventDefault()},[]),v=c.useMemo(()=>r.filter(P=>P.title.toLowerCase().includes(o.toLowerCase())),[o,r]).sort((P,E)=>{var C;return(C=P.title.localeCompare(E.title))!==null&&C!==void 0?C:0}),T=c.useCallback(P=>{if(P.key==="ArrowDown"&&v.length>0)P.preventDefault(),h(C=>C===-1?0:(C+1)%v.length);else if(P.key==="ArrowUp"&&v.length>0)P.preventDefault(),h(C=>C===-1?v.length-1:(C-1+v.length)%v.length);else if(P.key==="Enter"&&v.length>0){P.preventDefault();var E=f>=0?f:0;y(v[E])}else P.key==="Tab"&&P.preventDefault()},[v,f,y]),w=c.useMemo(()=>v.map((P,E)=>{var C;return d.jsx("li",{ref:A=>{g.current[E]=A},onMouseDown:S,children:d.jsxs(re,{kind:"ghost","data-testid":"dashboard-list-item-".concat((C=P.key)!==null&&C!==void 0?C:"","-button"),onClick:()=>y(P),className:f===E?"focused":"",style:{transition:"none"},children:[P.icon?d.jsx("span",{className:"dashboard-list-item-icon",children:X.isValidElement(P.icon)?P.icon:d.jsx(ae,{icon:P.icon})}):null,P.title]})},P.key)}),[v,y,f,S]),x=c.useMemo(()=>w.length===0?d.jsx("span",{children:"No open dashboard found."}):null,[w]);return d.jsxs("div",{className:"dashboard-list-container d-flex flex-column",children:[d.jsx("div",{className:"dashboard-list-header",children:d.jsx(Ln,{value:o,placeholder:"Find open dashboard",endPlaceholder:kt.OPEN_DASHBOARD_LIST.getDisplayText(),onChange:b,onKeyDown:T,ref:p})}),d.jsxs("ul",{className:"dashboard-list flex-grow-1",ref:m,children:[x&&d.jsx("li",{className:"dashboard-list-message",children:x}),!x&&w]})]})}function Oi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oi(Object(n),!0).forEach(function(r){tS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oi(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tS(e,t,n){return(t=nS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nS(e){var t=rS(e,"string");return typeof t=="symbol"?t:t+""}function rS(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ot(e,t){return sS(e)||oS(e,t)||aS(e,t)||iS()}function iS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aS(e,t){if(e){if(typeof e=="string")return Ti(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ti(e,t):void 0}}function Ti(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function sS(e){if(Array.isArray(e))return e}var lS=500,uS=.01,cS=5e-4;function Ci(e){return e.scrollLeft===0}function Ei(e){return Math.abs(e.scrollLeft+e.clientWidth-e.scrollWidth)<=1||e.scrollWidth===0}function dS(e,t,n){var r=e.isClosable,i=r===void 0?!1:r,a=e.key,o=[];if(i&&n!=null){o.push({title:"Close",order:10,group:20,action:()=>{n(a)}});for(var s=!0,l=t.length-1;l>0&&t[l].key!==e.key;l-=1)if(t[l].isClosable===!0){s=!1;break}o.push({title:"Close to the Right",order:20,group:20,action:()=>{for(var u=t.length-1;u>0&&t[u].key!==a;u-=1)t[u].isClosable===!0&&n(t[u].key)},disabled:s}),o.push({title:"Close All",order:30,group:20,action:()=>{t.forEach(u=>{u.isClosable===!0&&n(u.key)})}})}return o}function fS(e){var t=e.activeKey,n=e.tabs,r=e.onSelect,i=e.onReorder,a=e.onClose,o=e.makeContextActions,s=e.renderAfterTabContent,l=c.useRef(),u=c.useState(!0),f=ot(u,2),h=f[0],p=f[1],m=c.useState(!1),g=ot(m,2),b=g[0],y=g[1],S=c.useState(!0),v=ot(S,2),T=v[0],w=v[1],x=c.useState(!0),P=ot(x,2),E=P[0],C=P[1],A=c.useCallback(()=>{l.current!=null&&(l.current.clientWidth<l.current.scrollWidth&&n.length>0?p(!0):p(!1),w(Ci(l.current)),C(Ei(l.current)))},[n]);Dt(l.current,A);var D=c.useCallback(k=>{ln.stopDragging(),k.destination&&(i==null||i(k.source.index,k.destination.index))},[i]),L=c.useCallback(()=>{if(l.current!=null){var k=Ci(l.current);k!==T&&w(k);var U=Ei(l.current);U!==E&&C(U)}},[T,E]),j=c.useRef({cancelClick:!1}),$=c.useCallback(()=>{if(!(l.current==null||j.current.cancelClick))for(var k=l.current.children,U=k.length-1;U>=0;U-=1){var B=k[U];if(B.offsetLeft<l.current.scrollLeft-5){B.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});return}}},[]),N=c.useCallback(()=>{if(!(l.current==null||j.current.cancelClick))for(var k=l.current.children,U=0;U<k.length;U+=1){var B=k[U];if(B.offsetLeft+B.offsetWidth-5>l.current.scrollLeft+l.current.offsetWidth){B.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"});return}}},[]),O=c.useCallback(function(k,U){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,V=arguments.length>3?arguments[3]:void 0,Z=l.current;Z!=null&&(j.current.cancelClick=!0,k==="left"?Z.scrollLeft=U-B:k==="right"&&(Z.scrollLeft=U+B),j.current.rAF=requestAnimationFrame(te=>{var ce=V??te,R=te-ce,F=uS*R+.5*cS*R**2;F=Math.min(F,Z.scrollWidth),O(k,U,F,ce)}))},[]),_=c.useCallback(()=>{var k=j.current,U=k.holdTimer,B=k.rAF;U!=null&&(clearTimeout(U),j.current.holdTimer=void 0),B!=null&&(cancelAnimationFrame(B),j.current.rAF=void 0),window.removeEventListener("mouseup",_)},[]);c.useEffect(()=>()=>window.removeEventListener("mouseup",_),[_]);var I=c.useCallback(k=>{l.current!=null&&(j.current.holdTimer=window.setTimeout(O,lS,k,l.current.scrollLeft)),j.current.cancelClick=!1,window.addEventListener("mouseup",_)},[_,O]),M=c.useCallback(()=>{I("left")},[I]),K=c.useCallback(()=>{I("right")},[I]);c.useEffect(function(){var U,B=V=>{V.stopPropagation(),V.preventDefault();var Z=V.currentTarget,te=Math.abs(V.deltaY)>Math.abs(V.deltaX)?V.deltaY:V.deltaX;Z.scrollLeft+=qa(te,-30,30)};return(U=l.current)===null||U===void 0||U.addEventListener("wheel",B),()=>{var V;(V=l.current)===null||V===void 0||V.removeEventListener("wheel",B)}},[]);var G=c.useMemo(()=>{var k=new Map;return n.forEach(U=>{var B=U.key,V=[()=>dS(U,n,a),()=>{var Z;return(Z=o==null?void 0:o(U))!==null&&Z!==void 0?Z:[]}];k.set(B,V)}),k},[o,n,a]),ie=c.useRef(null),Te=n.find(k=>k.key===t),ue=n.map((k,U)=>{var B=k.key,V=k===Te;return d.jsx(Gs,{tab:k,index:U,isActive:V,activeRef:ie,onSelect:r,onClose:a,isDraggable:i!=null,contextActions:G.get(B),renderAfterTabContent:s},B)});c.useEffect(function(){ie.current!=null&&ie.current.scrollIntoView({block:"nearest",inline:"nearest"})},[t]);var Q=()=>{y(!b)},ee=k=>{y(!1),r(k.key)},z=()=>{y(!1)};return d.jsxs("nav",{className:"nav-container",children:[h&&d.jsx(re,{kind:"ghost",icon:d.jsx(ae,{icon:gc,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-left",tooltip:"Scroll left",onClick:$,onMouseDown:M,disabled:T}),d.jsx(Yl,{onDragStart:ln.startDragging,onDragEnd:D,children:d.jsx(zl,{droppableId:"droppable-tab-navigation",direction:"horizontal",children:(k,U)=>d.jsxs("div",xi(xi({ref:B=>{B!=null&&(l.current=B,k.innerRef(B))}},k.droppableProps),{},{className:H("nav nav-tabs",{dragging:U.draggingFromThisWith}),role:"tablist",onScroll:L,children:[ue,k.placeholder]}))})}),h&&d.jsx(re,{kind:"ghost",icon:d.jsx(ae,{icon:bc,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-right",tooltip:"Scroll right",onClick:N,onMouseDown:K,disabled:E}),d.jsx(re,{kind:"ghost",icon:d.jsx(ae,{icon:vc,transform:"grow-4"}),className:"btn-dashboard-list-menu btn-show-dashboard-list",tooltip:"Search open dashboards",onClick:Q,disabled:n.length<2,style:{visibility:h?"visible":"hidden",marginLeft:"auto"},children:d.jsx(At,{isShown:b,className:"dashboard-list-menu-popper",onExited:z,options:{placement:"bottom-start"},closeOnBlur:!0,interactive:!0,children:d.jsx(Ys,{tabs:n,onSelect:ee})})}),d.jsx($t,{actions:[{action:()=>{y(!b)},shortcut:kt.OPEN_DASHBOARD_LIST,isGlobal:!0}]})]})}function pS(e,t){return gS(e)||yS(e,t)||mS(e,t)||hS()}function hS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mS(e,t){if(e){if(typeof e=="string")return _i(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_i(e,t):void 0}}function _i(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function gS(e){if(Array.isArray(e))return e}var bS=.025,vS=.9,SS=.1,PS=.618,ji=80,ke={SIZE:8,DOT_SIZE:2},be=18,wS=250,OS=60*1e3,xS={background:"var(--dh-color-random-area-plot-animation-bg)",foregroundFill:"var(--dh-color-random-area-plot-animation-fg-fill)",foregroundStroke:"var(--dh-color-random-area-plot-animation-fg-stroke)",gridColor:"var(--dh-color-random-area-plot-animation-grid)"};function TS(){return ao(xS)}var zs=X.memo(()=>{var e=jt(),t=e.activeThemes,n=c.useMemo(TS,[t]),r=c.useRef(null),i=c.useRef(null),a=c.useState(!1),o=pS(a,2),s=o[0],l=o[1],u=window.devicePixelRatio,f,h,p,m,g,b=null,y=[];function S(){var O;i.current!=null&&(p=i.current.offsetWidth,m=i.current.offsetHeight),r.current!=null&&(r.current.style.width="".concat(p,"px"),r.current.style.height="".concat(m,"px"),r.current.width=p*u,r.current.height=m*u),(O=f)===null||O===void 0||O.scale(u,u)}function v(){var O=n.foregroundFill,_=n.foregroundStroke,I=document.createElement("canvas");I.width=ke.SIZE,I.height=ke.SIZE;var M=I.getContext("2d");return M!=null&&(M.fillStyle=_,M.fillRect(0,0,ke.DOT_SIZE,ke.DOT_SIZE),M.fillStyle=O,M.fillRect(0,0,ke.SIZE,ke.SIZE)),M==null?void 0:M.createPattern(I,"repeat")}function T(O){var _=Math.random()-.5,I=bS*_;return O<SS?I=Math.abs(I):O>vS&&(I=-Math.abs(I)),O+I}function w(){for(var O=[],_=PS,I=0;I<p+be;I+=1)_=T(_),O.push(_);return O}function x(){for(;y.length>=p+be;)y.pop();for(;y.length<p+be;)y.push(T(y[y.length-1]))}function P(O,_){_.beginPath(),_.moveTo(-1,m+1),_.lineTo(-1,m*O[0]);for(var I=0;I<O.length;I+=1)_.lineTo(I,m*O[I]);_.lineTo(p+be,m*O[O.length-1]),_.lineTo(p+be,m+1),_.closePath()}function E(O){O.beginPath();for(var _=1;_<p;_+=ji)O.moveTo(_,0),O.lineTo(_,m);for(var I=1;I<m;I+=ji)O.moveTo(0,I),O.lineTo(p,I)}function C(O){b=b??O;var _=n.background,I=n.foregroundStroke,M=n.gridColor;Ct(f),f.fillStyle=_,f.fillRect(0,0,p,m),E(f),f.lineWidth=1,f.strokeStyle=M,f.stroke();var K=((b??0)-(O??0))/(1e3/be);if(f.translate(K,0),P(y,f),f.lineWidth=2,f.strokeStyle=I,f.stroke(),f.translate(-K,0),h!=null&&(f.fillStyle=h),f.fill(),f.setTransform(u,0,0,u,0,0),(O??0)-(b??0)>1e3/be){for(var G=Math.floor(((O??0)-(b??0))/(1e3/be)),ie=0;ie<G;ie+=1)y.shift(),y.push(T(y[y.length-1]));b=O}g!=null&&cancelAnimationFrame(g),g=requestAnimationFrame(C)}var A=He(()=>{g=requestAnimationFrame(O=>{S(),x(),l(!1),C(O)})},wS,{leading:!0});function D(){l(!0),g!=null&&cancelAnimationFrame(g),g=null,b=null}var L=He(()=>{D()},OS);function j(){g==null&&(l(!1),S(),x(),g=requestAnimationFrame(C)),L()}function $(){document.hasFocus()&&j()}function N(){g!=null&&cancelAnimationFrame(g),L(),A()}return c.useEffect(()=>{var O;return f=(O=r.current)===null||O===void 0?void 0:O.getContext("2d",{alpha:!1}),S(),y=w(),h=v(),C(),L(),window.addEventListener("resize",N),window.addEventListener("focus",j),window.addEventListener("blur",D),window.addEventListener("mousemove",$),window.addEventListener("keydown",$),()=>{g!=null&&cancelAnimationFrame(g),window.removeEventListener("resize",N),window.removeEventListener("focus",j),window.removeEventListener("blur",D),window.removeEventListener("mousemove",$),window.removeEventListener("keydown",$),L.cancel(),A.cancel()}},[n]),d.jsx("div",{className:"random-area-plot-animation-container",ref:i,children:d.jsx("canvas",{ref:r,className:s?"shade":""})})});function qs(e){var t=e.text,n=e.placement,r=n===void 0?"top-start":n,i=c.useMemo(()=>({placement:r}),[r]);return d.jsxs(d.Fragment,{children:[d.jsx(It,{UNSAFE_className:Bn.spectrumEllipsis,children:t??d.jsx(d.Fragment,{children:" "})}),t==null||t===""?null:d.jsx(Ze,{options:i,children:t})]})}var CS=["scrollRef","getItemDisplayText","getKey"];function Ii(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ai(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ii(Object(n),!0).forEach(function(r){ES(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ii(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ES(e,t,n){return(t=_S(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _S(e){var t=jS(e,"string");return typeof t=="symbol"?t:t+""}function jS(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IS(e,t){if(e==null)return{};var n,r,i=AS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function AS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $S(e){var t=e.scrollRef,n=e.getItemDisplayText,r=e.getKey,i=IS(e,CS),a=c.useCallback(o=>{var s=r(o),l=n(o);return d.jsx(Ot,{textValue:l??String(s),children:d.jsx(qs,{text:l})},s)},[n,r]);return d.jsx(Tn,Ai(Ai({},i),{},{ref:t,menuTrigger:"focus",onSelectionChange:i.onSelectionChange,children:a}))}function kS(e,t){return MS(e)||DS(e,t)||LS(e,t)||RS()}function RS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z0(e,t){if(e){if(typeof e=="string")return wi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wi(e,t):void 0}}function wi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function J0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function eS(e){if(Array.isArray(e))return e}function Ys(e){var t=e.onSelect,n=e.tabs,r=n===void 0?mo:n,i=c.useState(""),a=Pi(i,2),o=a[0],s=a[1],l=c.useState(0),u=Pi(l,2),f=u[0],h=u[1],p=c.useRef(null),m=c.useRef(null),g=c.useRef([]);c.useEffect(()=>{var P;(P=p.current)===null||P===void 0||P.focus()},[]),c.useEffect(()=>{h(0)},[o]),c.useEffect(()=>{if(f>=0&&g.current[f]){var P;(P=g.current[f])===null||P===void 0||P.scrollIntoView({behavior:"auto",block:"nearest"})}},[f]);var b=c.useCallback(P=>{s(P.target.value)},[]),y=c.useCallback(P=>{t(P)},[t]),S=c.useCallback(P=>{P.preventDefault()},[]),v=c.useMemo(()=>r.filter(P=>P.title.toLowerCase().includes(o.toLowerCase())),[o,r]).sort((P,_)=>{var C;return(C=P.title.localeCompare(_.title))!==null&&C!==void 0?C:0}),T=c.useCallback(P=>{if(P.key==="ArrowDown"&&v.length>0)P.preventDefault(),h(C=>C===-1?0:(C+1)%v.length);else if(P.key==="ArrowUp"&&v.length>0)P.preventDefault(),h(C=>C===-1?v.length-1:(C-1+v.length)%v.length);else if(P.key==="Enter"&&v.length>0){P.preventDefault();var _=f>=0?f:0;y(v[_])}else P.key==="Tab"&&P.preventDefault()},[v,f,y]),w=c.useMemo(()=>v.map((P,_)=>{var C;return d.jsx("li",{ref:A=>{g.current[_]=A},onMouseDown:S,children:d.jsxs(re,{kind:"ghost","data-testid":"dashboard-list-item-".concat((C=P.key)!==null&&C!==void 0?C:"","-button"),onClick:()=>y(P),className:f===_?"focused":"",style:{transition:"none"},children:[P.icon?d.jsx("span",{className:"dashboard-list-item-icon",children:X.isValidElement(P.icon)?P.icon:d.jsx(ae,{icon:P.icon})}):null,P.title]})},P.key)}),[v,y,f,S]),x=c.useMemo(()=>w.length===0?d.jsx("span",{children:"No open dashboard found."}):null,[w]);return d.jsxs("div",{className:"dashboard-list-container d-flex flex-column",children:[d.jsx("div",{className:"dashboard-list-header",children:d.jsx(Ln,{value:o,placeholder:"Find open dashboard",endPlaceholder:kt.OPEN_DASHBOARD_LIST.getDisplayText(),onChange:b,onKeyDown:T,ref:p})}),d.jsxs("ul",{className:"dashboard-list flex-grow-1",ref:m,children:[x&&d.jsx("li",{className:"dashboard-list-message",children:x}),!x&&w]})]})}function Oi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oi(Object(n),!0).forEach(function(r){tS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oi(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tS(e,t,n){return(t=nS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nS(e){var t=rS(e,"string");return typeof t=="symbol"?t:t+""}function rS(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ot(e,t){return sS(e)||oS(e,t)||aS(e,t)||iS()}function iS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aS(e,t){if(e){if(typeof e=="string")return Ti(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ti(e,t):void 0}}function Ti(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function sS(e){if(Array.isArray(e))return e}var lS=500,uS=.01,cS=5e-4;function Ci(e){return e.scrollLeft===0}function Ei(e){return Math.abs(e.scrollLeft+e.clientWidth-e.scrollWidth)<=1||e.scrollWidth===0}function dS(e,t,n){var r=e.isClosable,i=r===void 0?!1:r,a=e.key,o=[];if(i&&n!=null){o.push({title:"Close",order:10,group:20,action:()=>{n(a)}});for(var s=!0,l=t.length-1;l>0&&t[l].key!==e.key;l-=1)if(t[l].isClosable===!0){s=!1;break}o.push({title:"Close to the Right",order:20,group:20,action:()=>{for(var u=t.length-1;u>0&&t[u].key!==a;u-=1)t[u].isClosable===!0&&n(t[u].key)},disabled:s}),o.push({title:"Close All",order:30,group:20,action:()=>{t.forEach(u=>{u.isClosable===!0&&n(u.key)})}})}return o}function fS(e){var t=e.activeKey,n=e.tabs,r=e.onSelect,i=e.onReorder,a=e.onClose,o=e.makeContextActions,s=e.renderAfterTabContent,l=c.useRef(),u=c.useState(!0),f=ot(u,2),h=f[0],p=f[1],m=c.useState(!1),g=ot(m,2),b=g[0],y=g[1],S=c.useState(!0),v=ot(S,2),T=v[0],w=v[1],x=c.useState(!0),P=ot(x,2),_=P[0],C=P[1],A=c.useCallback(()=>{l.current!=null&&(l.current.clientWidth<l.current.scrollWidth&&n.length>0?p(!0):p(!1),w(Ci(l.current)),C(Ei(l.current)))},[n]);Dt(l.current,A);var D=c.useCallback(k=>{ln.stopDragging(),k.destination&&(i==null||i(k.source.index,k.destination.index))},[i]),L=c.useCallback(()=>{if(l.current!=null){var k=Ci(l.current);k!==T&&w(k);var U=Ei(l.current);U!==_&&C(U)}},[T,_]),j=c.useRef({cancelClick:!1}),$=c.useCallback(()=>{if(!(l.current==null||j.current.cancelClick))for(var k=l.current.children,U=k.length-1;U>=0;U-=1){var B=k[U];if(B.offsetLeft<l.current.scrollLeft-5){B.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});return}}},[]),N=c.useCallback(()=>{if(!(l.current==null||j.current.cancelClick))for(var k=l.current.children,U=0;U<k.length;U+=1){var B=k[U];if(B.offsetLeft+B.offsetWidth-5>l.current.scrollLeft+l.current.offsetWidth){B.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"});return}}},[]),O=c.useCallback(function(k,U){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,V=arguments.length>3?arguments[3]:void 0,Z=l.current;Z!=null&&(j.current.cancelClick=!0,k==="left"?Z.scrollLeft=U-B:k==="right"&&(Z.scrollLeft=U+B),j.current.rAF=requestAnimationFrame(te=>{var ce=V??te,R=te-ce,F=uS*R+.5*cS*R**2;F=Math.min(F,Z.scrollWidth),O(k,U,F,ce)}))},[]),E=c.useCallback(()=>{var k=j.current,U=k.holdTimer,B=k.rAF;U!=null&&(clearTimeout(U),j.current.holdTimer=void 0),B!=null&&(cancelAnimationFrame(B),j.current.rAF=void 0),window.removeEventListener("mouseup",E)},[]);c.useEffect(()=>()=>window.removeEventListener("mouseup",E),[E]);var I=c.useCallback(k=>{l.current!=null&&(j.current.holdTimer=window.setTimeout(O,lS,k,l.current.scrollLeft)),j.current.cancelClick=!1,window.addEventListener("mouseup",E)},[E,O]),M=c.useCallback(()=>{I("left")},[I]),K=c.useCallback(()=>{I("right")},[I]);c.useEffect(function(){var U,B=V=>{V.stopPropagation(),V.preventDefault();var Z=V.currentTarget,te=Math.abs(V.deltaY)>Math.abs(V.deltaX)?V.deltaY:V.deltaX;Z.scrollLeft+=qa(te,-30,30)};return(U=l.current)===null||U===void 0||U.addEventListener("wheel",B),()=>{var V;(V=l.current)===null||V===void 0||V.removeEventListener("wheel",B)}},[]);var G=c.useMemo(()=>{var k=new Map;return n.forEach(U=>{var B=U.key,V=[()=>dS(U,n,a),()=>{var Z;return(Z=o==null?void 0:o(U))!==null&&Z!==void 0?Z:[]}];k.set(B,V)}),k},[o,n,a]),ie=c.useRef(null),Te=n.find(k=>k.key===t),ue=n.map((k,U)=>{var B=k.key,V=k===Te;return d.jsx(Gs,{tab:k,index:U,isActive:V,activeRef:ie,onSelect:r,onClose:a,isDraggable:i!=null,contextActions:G.get(B),renderAfterTabContent:s},B)});c.useEffect(function(){ie.current!=null&&ie.current.scrollIntoView({block:"nearest",inline:"nearest"})},[t]);var Q=()=>{y(!b)},ee=k=>{y(!1),r(k.key)},z=()=>{y(!1)};return d.jsxs("nav",{className:"nav-container",children:[h&&d.jsx(re,{kind:"ghost",icon:d.jsx(ae,{icon:gc,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-left",tooltip:"Scroll left",onClick:$,onMouseDown:M,disabled:T}),d.jsx(Yl,{onDragStart:ln.startDragging,onDragEnd:D,children:d.jsx(zl,{droppableId:"droppable-tab-navigation",direction:"horizontal",children:(k,U)=>d.jsxs("div",xi(xi({ref:B=>{B!=null&&(l.current=B,k.innerRef(B))}},k.droppableProps),{},{className:H("nav nav-tabs",{dragging:U.draggingFromThisWith}),role:"tablist",onScroll:L,children:[ue,k.placeholder]}))})}),h&&d.jsx(re,{kind:"ghost",icon:d.jsx(ae,{icon:bc,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-right",tooltip:"Scroll right",onClick:N,onMouseDown:K,disabled:_}),d.jsx(re,{kind:"ghost",icon:d.jsx(ae,{icon:vc,transform:"grow-4"}),className:"btn-dashboard-list-menu btn-show-dashboard-list",tooltip:"Search open dashboards",onClick:Q,disabled:n.length<2,style:{visibility:h?"visible":"hidden",marginLeft:"auto"},children:d.jsx(At,{isShown:b,className:"dashboard-list-menu-popper",onExited:z,options:{placement:"bottom-start"},closeOnBlur:!0,interactive:!0,children:d.jsx(Ys,{tabs:n,onSelect:ee})})}),d.jsx($t,{actions:[{action:()=>{y(!b)},shortcut:kt.OPEN_DASHBOARD_LIST,isGlobal:!0}]})]})}function pS(e,t){return gS(e)||yS(e,t)||mS(e,t)||hS()}function hS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mS(e,t){if(e){if(typeof e=="string")return _i(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_i(e,t):void 0}}function _i(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function gS(e){if(Array.isArray(e))return e}var bS=.025,vS=.9,SS=.1,PS=.618,ji=80,ke={SIZE:8,DOT_SIZE:2},be=18,wS=250,OS=60*1e3,xS={background:"var(--dh-color-random-area-plot-animation-bg)",foregroundFill:"var(--dh-color-random-area-plot-animation-fg-fill)",foregroundStroke:"var(--dh-color-random-area-plot-animation-fg-stroke)",gridColor:"var(--dh-color-random-area-plot-animation-grid)"};function TS(){return ao(xS)}var zs=X.memo(()=>{var e=jt(),t=e.activeThemes,n=c.useMemo(TS,[t]),r=c.useRef(null),i=c.useRef(null),a=c.useState(!1),o=pS(a,2),s=o[0],l=o[1],u=window.devicePixelRatio,f,h,p,m,g,b=null,y=[];function S(){var O;i.current!=null&&(p=i.current.offsetWidth,m=i.current.offsetHeight),r.current!=null&&(r.current.style.width="".concat(p,"px"),r.current.style.height="".concat(m,"px"),r.current.width=p*u,r.current.height=m*u),(O=f)===null||O===void 0||O.scale(u,u)}function v(){var O=n.foregroundFill,E=n.foregroundStroke,I=document.createElement("canvas");I.width=ke.SIZE,I.height=ke.SIZE;var M=I.getContext("2d");return M!=null&&(M.fillStyle=E,M.fillRect(0,0,ke.DOT_SIZE,ke.DOT_SIZE),M.fillStyle=O,M.fillRect(0,0,ke.SIZE,ke.SIZE)),M==null?void 0:M.createPattern(I,"repeat")}function T(O){var E=Math.random()-.5,I=bS*E;return O<SS?I=Math.abs(I):O>vS&&(I=-Math.abs(I)),O+I}function w(){for(var O=[],E=PS,I=0;I<p+be;I+=1)E=T(E),O.push(E);return O}function x(){for(;y.length>=p+be;)y.pop();for(;y.length<p+be;)y.push(T(y[y.length-1]))}function P(O,E){E.beginPath(),E.moveTo(-1,m+1),E.lineTo(-1,m*O[0]);for(var I=0;I<O.length;I+=1)E.lineTo(I,m*O[I]);E.lineTo(p+be,m*O[O.length-1]),E.lineTo(p+be,m+1),E.closePath()}function _(O){O.beginPath();for(var E=1;E<p;E+=ji)O.moveTo(E,0),O.lineTo(E,m);for(var I=1;I<m;I+=ji)O.moveTo(0,I),O.lineTo(p,I)}function C(O){b=b??O;var E=n.background,I=n.foregroundStroke,M=n.gridColor;Ct(f),f.fillStyle=E,f.fillRect(0,0,p,m),_(f),f.lineWidth=1,f.strokeStyle=M,f.stroke();var K=((b??0)-(O??0))/(1e3/be);if(f.translate(K,0),P(y,f),f.lineWidth=2,f.strokeStyle=I,f.stroke(),f.translate(-K,0),h!=null&&(f.fillStyle=h),f.fill(),f.setTransform(u,0,0,u,0,0),(O??0)-(b??0)>1e3/be){for(var G=Math.floor(((O??0)-(b??0))/(1e3/be)),ie=0;ie<G;ie+=1)y.shift(),y.push(T(y[y.length-1]));b=O}g!=null&&cancelAnimationFrame(g),g=requestAnimationFrame(C)}var A=He(()=>{g=requestAnimationFrame(O=>{S(),x(),l(!1),C(O)})},wS,{leading:!0});function D(){l(!0),g!=null&&cancelAnimationFrame(g),g=null,b=null}var L=He(()=>{D()},OS);function j(){g==null&&(l(!1),S(),x(),g=requestAnimationFrame(C)),L()}function $(){document.hasFocus()&&j()}function N(){g!=null&&cancelAnimationFrame(g),L(),A()}return c.useEffect(()=>{var O;return f=(O=r.current)===null||O===void 0?void 0:O.getContext("2d",{alpha:!1}),S(),y=w(),h=v(),C(),L(),window.addEventListener("resize",N),window.addEventListener("focus",j),window.addEventListener("blur",D),window.addEventListener("mousemove",$),window.addEventListener("keydown",$),()=>{g!=null&&cancelAnimationFrame(g),window.removeEventListener("resize",N),window.removeEventListener("focus",j),window.removeEventListener("blur",D),window.removeEventListener("mousemove",$),window.removeEventListener("keydown",$),L.cancel(),A.cancel()}},[n]),d.jsx("div",{className:"random-area-plot-animation-container",ref:i,children:d.jsx("canvas",{ref:r,className:s?"shade":""})})});function qs(e){var t=e.text,n=e.placement,r=n===void 0?"top-start":n,i=c.useMemo(()=>({placement:r}),[r]);return d.jsxs(d.Fragment,{children:[d.jsx(It,{UNSAFE_className:Bn.spectrumEllipsis,children:t??d.jsx(d.Fragment,{children:" "})}),t==null||t===""?null:d.jsx(Ze,{options:i,children:t})]})}var CS=["scrollRef","getItemDisplayText","getKey"];function Ii(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ai(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ii(Object(n),!0).forEach(function(r){ES(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ii(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ES(e,t,n){return(t=_S(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _S(e){var t=jS(e,"string");return typeof t=="symbol"?t:t+""}function jS(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IS(e,t){if(e==null)return{};var n,r,i=AS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function AS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $S(e){var t=e.scrollRef,n=e.getItemDisplayText,r=e.getKey,i=IS(e,CS),a=c.useCallback(o=>{var s=r(o),l=n(o);return d.jsx(Ot,{textValue:l??String(s),children:d.jsx(qs,{text:l})},s)},[n,r]);return d.jsx(Tn,Ai(Ai({},i),{},{ref:t,menuTrigger:"focus",onSelectionChange:i.onSelectionChange,children:a}))}function kS(e,t){return MS(e)||DS(e,t)||LS(e,t)||RS()}function RS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
21
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LS(e,t){if(e){if(typeof e=="string")return $i(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$i(e,t):void 0}}function $i(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function MS(e){if(Array.isArray(e))return e}var NS=500;function FS(e){var t=e.heading,n=e.content,r=e.delayMs,i=r===void 0?NS:r,a=c.useState(!1),o=kS(a,2),s=o[0],l=o[1];return c.useEffect(()=>{window.setTimeout(()=>{l(!0)},i)},[i]),s?d.jsxs(Xa,{children:[d.jsx(Xe,{size:"XXL",children:d.jsx(ae,{icon:Sc})}),d.jsx(Rn,{children:t}),n==null?null:d.jsx(Cn,{children:n})]}):null}const Xs={"handle-size":"15px","popover-width":"90px"};function Pt(e,t){return BS(e)||VS(e,t)||WS(e,t)||US()}function US(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
22
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WS(e,t){if(e){if(typeof e=="string")return ki(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ki(e,t):void 0}}function ki(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function VS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function BS(e){if(Array.isArray(e))return e}var st=parseInt(Xs["handle-size"],10),Ri=parseInt(Xs["popover-width"],10),le=24*60*60-1,Li=5*60;function HS(e){var t=e.startTime,n=e.endTime,r=e.onChange,i=e.isStartModified,a=i===void 0?!1:i,o=e.isEndModified,s=o===void 0?!1:o,l=e["data-testid"],u=c.useState(t),f=Pt(u,2),h=f[0],p=f[1],m=c.useState(n),g=Pt(m,2),b=g[0],y=g[1],S=c.useRef(null);c.useEffect(function(){p(t),y(n)},[t,n]);var v=c.useCallback((x,P)=>{var E=x,C=P;E===C&&(C<le?C+=1:E-=1),p(E),y(C),r({startTime:E,endTime:C})},[p,y,r]),T=c.useCallback(x=>{v(x,b)},[v,b]),w=c.useCallback(x=>{v(h,x)},[v,h]);return d.jsxs("div",{className:"time-slider","data-testid":l,children:[d.jsx(KS,{startTime:h,endTime:b,onStartTimeChange:T,onEndTimeChange:w,isStartModified:a,isEndModified:s}),d.jsxs("div",{className:"track",ref:S,children:[d.jsx(GS,{startTime:h,endTime:b}),d.jsx("div",{className:"ticks",children:Array(24).fill(null).map((x,P)=>d.jsx("div",{className:"tick"},P))}),d.jsx(Di,{track:S,time:h,setTime:T}),d.jsx(Di,{track:S,time:b,setTime:w})]}),d.jsxs("div",{className:"tick-labels",children:[d.jsx("div",{className:"tick-label",children:"0:00"}),d.jsx("div",{className:"tick-label-wrapper",children:Array(24).fill(null).map((x,P)=>d.jsx("div",{className:"tick-label",children:"".concat(P+1,":00")},P))})]})]})}function KS(e){var t=e.startTime,n=e.endTime,r=e.onStartTimeChange,i=e.onEndTimeChange,a=e.isStartModified,o=e.isEndModified,s=e["data-testid"],l=t>n,u=c.useState(l?n:t),f=Pt(u,2),h=f[0],p=f[1],m=c.useState(l?t:n),g=Pt(m,2),b=g[0],y=g[1],S=c.useRef(null),v=c.useRef(null),T=c.useRef(null),w=c.useRef(null);c.useEffect(function(){p(t>n?n:t),y(t>n?t:n)},[t,n]),c.useEffect(function(){if(T.current!==null){var D;(D=v.current)===null||D===void 0||D.setSelection(T.current)}if(w.current!==null){var L;(L=S.current)===null||L===void 0||L.setSelection(w.current)}},[l]);function x(A){t<=n?r(A):i(A)}function P(A){t<=n?i(A):r(A)}var E=c.useCallback(A=>{T.current=A,w.current=null},[]),C=c.useCallback(A=>{T.current=null,w.current=A},[]);return d.jsxs("div",{className:"time-slider-popovers",children:[d.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat(h/le*100,"% - ").concat(Ri/2,"px)")}}),d.jsxs("div",{className:"handle-popper",children:[d.jsx("label",{className:H({modified:l?o:a}),children:l?"End Time":"Start Time"}),d.jsx(St,{ref:S,allowValueWrapping:!1,value:h,onChange:x,onSelect:E,"data-testid":s!==void 0?"".concat(s,"-input-1"):void 0})]}),d.jsx("div",{className:"flex-spacer"}),d.jsxs("div",{className:"handle-popper",children:[d.jsx("label",{className:H({modified:l?a:o}),children:l?"Start Time":"End Time"}),d.jsx(St,{ref:v,allowValueWrapping:!1,value:b,onChange:P,onSelect:C,"data-testid":s!==void 0?"".concat(s,"-input-2"):void 0})]}),d.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat((le-b)/le*100,"% - ").concat(Ri/2,"px)")}})]})}function GS(e){var t=e.startTime,n=e.endTime,r=e["data-testid"];return d.jsxs("div",{className:"track-fills","data-testid":r,children:[t>n&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"track-fill track-fill-start",style:{transform:"scaleX(".concat(n/le,")")}}),d.jsx("div",{className:"track-fill track-fill-end",style:{transform:"scaleX(".concat((le-t)/le,")")}})]}),t<n&&d.jsx("div",{className:"track-fill track-fill-middle",style:{transform:"translateX(".concat(t/le*100,"%) scaleX(").concat((n-t)/le,")")}})]})}function Di(e){var t=e.track,n=e.time,r=e.setTime,i=e["data-testid"],a=c.useMemo(()=>{var p=3600,m=st/2;return n<p?m=n/p*(st/2):n>23*p&&(m=st/2+1/(le-23*p)*(n-23*p)*(st/2)),"translateX(calc(".concat(n/le*100,"% - ").concat(m,"px))")},[n]),o=c.useCallback(p=>{if(!t.current)return 0;var m=t.current.getBoundingClientRect(),g=Math.max(p-m.left,0),b=le*Math.min(1,g/m.width),y=Li*Math.round(b/Li),S=Math.min(le,y);return S},[t]),s=c.useCallback(p=>{var m=p.clientX;r(o(m))},[r,o]),l=c.useCallback(p=>{var m=p.clientX;r(o(m)),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[r,o,s]),u=c.useCallback(()=>{window.addEventListener("mousemove",s),window.addEventListener("mouseup",l),document.documentElement.classList.add("drag-pointer-events-none")},[s,l]),f=c.useCallback(()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[s,l]),h=c.useCallback(()=>{u()},[u]);return c.useEffect(function(){return()=>{f()}},[f]),d.jsx("div",{className:"handle-track",style:{transform:a},children:d.jsx("button",{className:"handle",type:"button","aria-label":"Change time",onMouseDown:h,"data-testid":i})})}function Qs(e){var t=e.buttons,n=e.isShown,r=n===void 0?!1:n,i=e.classNames,a=e.message,o=e.type,s=e.onClick,l=e.onDismiss,u=e["data-testid"],f=c.useRef(null),h=t&&t.length!==0;return d.jsx(za,{in:r,timeout:en.transitionMs,classNames:"toast-notification-slide-up",mountOnEnter:!0,unmountOnExit:!0,nodeRef:f,children:d.jsxs("div",{ref:f,className:H("toast-notification",i,o),role:"presentation",onClick:s,onKeyPress:s,"data-testid":u,children:[d.jsx("div",{className:"message-container",children:d.jsx("span",{className:"message",children:a})}),d.jsx(Dn,{in:h,timeout:en.transitionSlowMs,mountOnEnter:!0,unmountOnExit:!0,children:d.jsx("div",{className:"buttons-container",children:t})}),l&&d.jsx(re,{kind:"ghost",icon:An,tooltip:"Close notification",className:"my-2",onClick:l})]})})}Qs.TYPE=Object.freeze({ERROR:"error"});const YS=Object.freeze(Object.defineProperty({__proto__:null,ACTION_ICON_HEIGHT:Hn,Accordion:ql,ActionBar:Ya,ActionButton:xt,ActionButtonDialogTrigger:Ds,ActionGroup:hm,ActionMenu:mm,AlertDialog:Xl,AutoCompleteInput:me,AutoResizeTextarea:Jv,Avatar:Ql,Badge:Zl,BasicModal:yo,Breadcrumbs:Jl,BulkActionBar:i0,Button:re,ButtonGroup:Ga,CSS_VAR_EXPRESSION_PREFIX:Pc,Calendar:eu,CardFlip:Jp,Checkbox:nn,CheckboxGroup:Ev,Collapse:ze,ColorEditor:tu,ColorPicker:nu,ColorValues:kd,ComboBox:ym,ComboBoxNormalized:Is,ConfirmActionButton:Mv,ConfirmationDialog:Ms,Content:Cn,ContextActionUtils:Pe,ContextActions:$t,ContextMenuItem:fo,ContextMenuRoot:Vs,ContextualHelp:ru,ContextualHelpTrigger:iu,CopyButton:ho,CustomTimeSelect:se,DEFAULT_DARK_THEME_KEY:wc,DEFAULT_DARK_THEME_PALETTE:Oc,DEFAULT_GET_PREFERRED_REPLACEMENT_STRING:ss,DEFAULT_LIGHT_THEME_KEY:xc,DEFAULT_PRELOAD_DATA_VARIABLES:Tc,DH_CSS_VAR_NAME_REGEXP:Cc,DH_VAR_PREFIX:Ec,DashboardList:Ys,DateField:au,DateInput:Ks,DatePicker:ou,DateRangePicker:su,DateTimeInput:gm,DebouncedModal:Us,DebouncedSearchInput:Rd,Dialog:Ba,DialogContainer:lu,DialogTrigger:Va,Disclosure:uu,DisclosurePanel:cu,DisclosureTitle:du,Divider:Ha,DragUtils:ln,DraggableItemList:bm,DropdownMenu:po,EXTERNAL_THEME_KEY:_c,EditableItemList:L0,ErrorBoundary:Ld,ErrorView:U0,FadeTransition:Dn,Flex:Wa,FontBootstrap:_s,FontsLoaded:js,FontsLoadedContext:Mt,Footer:fu,Form:Ka,GLOBAL_SHORTCUTS:kt,Grid:pu,Header:hu,Heading:Rn,HierarchicalCheckboxMenu:De,ITEM_EMPTY_STRING_TEXT_VALUE:vm,Icon:Xe,IconActionButton:Ns,IllustratedMessage:Xa,Image:mu,InfoModal:Ws,InlineAlert:yu,Item:Ot,ItemContent:Sm,ItemList:tn,ItemListItem:Dd,ItemTooltip:Pm,KEY:oe,Keyboard:gu,LIST_VIEW_ROW_HEIGHTS:ls,LabeledValue:bu,Link:Qa,ListActionGroup:wm,ListActionMenu:Om,ListView:xb,ListViewNormalized:As,ListViewWrapper:Jn,LoadingOverlay:Ae,LoadingSpinner:Tt,LogicButton:vu,Logo:qg,MODIFIER:ne,MSG_REQUEST_GET_THEME:jc,MSG_REQUEST_SET_THEME:no,MaskedInput:Kn,Menu:xm,MenuItem:Tm,MenuTrigger:Su,Meter:Pu,Modal:jn,ModalBody:In,ModalFooter:go,ModalHeader:oo,MultiSelect:os,MultiSelectNormalized:Rs,NAVIGATION_SHORTCUTS:I0,NON_WHITESPACE_REGEX:Ic,NavTabList:fS,NumberField:wu,Option:us,PICKER_ITEM_HEIGHTS:Cm,PICKER_TOP_OFFSET:Em,PRELOAD_TRANSPARENT_THEME_QUERY_PARAM:Ac,Page:_m,Picker:jm,PickerNormalized:Im,Popper:At,ProgressBar:Ou,ProgressCircle:xu,Radio:Tu,RadioGroup:Cu,RandomAreaPlotAnimation:zs,RangeCalendar:Eu,RangeSlider:_u,ReactFontAwesome:ju,SVG_ICON_MANUAL_COLOR_MAP:$c,SearchField:Iu,SearchInput:Ln,SearchableCombobox:$S,Section:Am,Select:bo,SelectValueList:cs,Shortcut:Md,ShortcutRegistry:Ce,SlideTransition:$m,Slider:Au,SocketedButton:eh,SpectrumButton:Zt,SpectrumCheckbox:Qt,SpectrumComboBox:Tn,SpectrumMenu:$u,SplitButtonGroup:Nd,Stack:km,StatusLight:ku,SubmenuTrigger:Ru,Switch:Lu,TABLE_ROW_HEIGHT:Rm,TABLE_VIEW_ROW_HEIGHTS:as,THEME_CACHE_LOCAL_STORAGE_KEY:kc,THEME_KEY_OVERRIDE_QUERY_PARAM:Rc,TMP_CSS_PROP_PREFIX:Lc,TRANSPARENT_PRELOAD_DATA_VARIABLES:Dc,TabList:Du,TabPanels:Jy,TableView:tv,TableViewEmptyState:FS,TableViewNormalized:ks,TableViewWrapper:$s,Tabs:Mu,TagGroup:Nu,Text:It,TextArea:Fu,TextField:Uu,TextWithTooltip:qs,ThemeContext:Fd,ThemeExport:en,ThemePicker:zg,ThemeProvider:vo,TimeField:Wu,TimeInput:St,TimeSlider:HS,ToastContainer:Vu,ToastNotification:Qs,ToastQueue:Bu,ToggleButton:Hu,Tooltip:Ze,UISwitch:Ud,View:Ls,WHITESPACE_REGEX:Mc,Well:Ku,XComponentMapContext:Wd,XComponentMapProvider:Vd,baseStyleProps:Gu,calculatePreloadStyleContent:Nc,canHaveRef:So,colorValueStyle:fe,createCssVariableResolver:Fc,createPreloadStyleElement:Uc,createXComponent:Bd,extractDistinctCssVariableExpressions:Wc,fillToLength:Lm,getActiveThemes:Vc,getDefaultBaseThemes:Bc,getDefaultSelectedThemeKey:Hc,getExpressionRanges:Kc,getItemKey:vt,getItemTextValue:Dm,getPositionOfSelectedItemElement:Mm,getThemeKey:Gc,getThemeKeyOverride:Yc,getThemePreloadData:zc,isBaseThemeKey:qc,isClassComponent:Hd,isDHColorValue:Kd,isExternalThemeData:ro,isExternalThemeEnabled:En,isForwardRefComponentType:Gd,isItemElement:Nm,isItemElementWithDescription:Fm,isItemOrSection:Um,isNormalizedItemsWithKeysList:Wm,isNormalizedSection:sn,isPreloadTransparentTheme:Xc,isSectionElement:Vm,isValidColorVar:Qc,isWrappedComponent:Po,itemSelectionToStringSet:yt,normalizeTooltipOptions:Lt,overrideSVGFillColors:Zc,parseExternalThemeData:eo,preloadTheme:Jc,replaceSVGFillColor:ed,requestExternalThemeData:to,resolveCssVariablesInRecord:ao,resolveCssVariablesInString:td,separateSpectrumProps:Cs,setThemePreloadData:nd,themeDHDefault:rd,themeDark:id,themeLight:ad,trimTrailingMask:Bm,useExternalTheme:Es,useOnChangeTrackUncontrolled:Hm,usePickerItemScale:Gn,usePickerNormalizedProps:rs,usePickerProps:Km,usePickerScrollOnOpen:Gm,useRenderNormalizedItem:Vn,useSpectrumThemeProvider:Je,useStaticItemInitialScrollPosition:Ym,useStringifiedMultiSelection:Zn,useStringifiedSelection:zm,useStyleProps:Yu,useTheme:jt,useXComponent:Yd,viewStyleProps:zu,wrapIcon:qm,wrapItemChildren:is,wrapPrimitiveWithText:Xm},Symbol.toStringTag,{value:"Module"}));function zS(e,t){return ZS(e)||QS(e,t)||XS(e,t)||qS()}function qS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WS(e,t){if(e){if(typeof e=="string")return ki(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ki(e,t):void 0}}function ki(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function VS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function BS(e){if(Array.isArray(e))return e}var st=parseInt(Xs["handle-size"],10),Ri=parseInt(Xs["popover-width"],10),le=24*60*60-1,Li=5*60;function HS(e){var t=e.startTime,n=e.endTime,r=e.onChange,i=e.isStartModified,a=i===void 0?!1:i,o=e.isEndModified,s=o===void 0?!1:o,l=e["data-testid"],u=c.useState(t),f=Pt(u,2),h=f[0],p=f[1],m=c.useState(n),g=Pt(m,2),b=g[0],y=g[1],S=c.useRef(null);c.useEffect(function(){p(t),y(n)},[t,n]);var v=c.useCallback((x,P)=>{var _=x,C=P;_===C&&(C<le?C+=1:_-=1),p(_),y(C),r({startTime:_,endTime:C})},[p,y,r]),T=c.useCallback(x=>{v(x,b)},[v,b]),w=c.useCallback(x=>{v(h,x)},[v,h]);return d.jsxs("div",{className:"time-slider","data-testid":l,children:[d.jsx(KS,{startTime:h,endTime:b,onStartTimeChange:T,onEndTimeChange:w,isStartModified:a,isEndModified:s}),d.jsxs("div",{className:"track",ref:S,children:[d.jsx(GS,{startTime:h,endTime:b}),d.jsx("div",{className:"ticks",children:Array(24).fill(null).map((x,P)=>d.jsx("div",{className:"tick"},P))}),d.jsx(Di,{track:S,time:h,setTime:T}),d.jsx(Di,{track:S,time:b,setTime:w})]}),d.jsxs("div",{className:"tick-labels",children:[d.jsx("div",{className:"tick-label",children:"0:00"}),d.jsx("div",{className:"tick-label-wrapper",children:Array(24).fill(null).map((x,P)=>d.jsx("div",{className:"tick-label",children:"".concat(P+1,":00")},P))})]})]})}function KS(e){var t=e.startTime,n=e.endTime,r=e.onStartTimeChange,i=e.onEndTimeChange,a=e.isStartModified,o=e.isEndModified,s=e["data-testid"],l=t>n,u=c.useState(l?n:t),f=Pt(u,2),h=f[0],p=f[1],m=c.useState(l?t:n),g=Pt(m,2),b=g[0],y=g[1],S=c.useRef(null),v=c.useRef(null),T=c.useRef(null),w=c.useRef(null);c.useEffect(function(){p(t>n?n:t),y(t>n?t:n)},[t,n]),c.useEffect(function(){if(T.current!==null){var D;(D=v.current)===null||D===void 0||D.setSelection(T.current)}if(w.current!==null){var L;(L=S.current)===null||L===void 0||L.setSelection(w.current)}},[l]);function x(A){t<=n?r(A):i(A)}function P(A){t<=n?i(A):r(A)}var _=c.useCallback(A=>{T.current=A,w.current=null},[]),C=c.useCallback(A=>{T.current=null,w.current=A},[]);return d.jsxs("div",{className:"time-slider-popovers",children:[d.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat(h/le*100,"% - ").concat(Ri/2,"px)")}}),d.jsxs("div",{className:"handle-popper",children:[d.jsx("label",{className:H({modified:l?o:a}),children:l?"End Time":"Start Time"}),d.jsx(St,{ref:S,allowValueWrapping:!1,value:h,onChange:x,onSelect:_,"data-testid":s!==void 0?"".concat(s,"-input-1"):void 0})]}),d.jsx("div",{className:"flex-spacer"}),d.jsxs("div",{className:"handle-popper",children:[d.jsx("label",{className:H({modified:l?a:o}),children:l?"Start Time":"End Time"}),d.jsx(St,{ref:v,allowValueWrapping:!1,value:b,onChange:P,onSelect:C,"data-testid":s!==void 0?"".concat(s,"-input-2"):void 0})]}),d.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat((le-b)/le*100,"% - ").concat(Ri/2,"px)")}})]})}function GS(e){var t=e.startTime,n=e.endTime,r=e["data-testid"];return d.jsxs("div",{className:"track-fills","data-testid":r,children:[t>n&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"track-fill track-fill-start",style:{transform:"scaleX(".concat(n/le,")")}}),d.jsx("div",{className:"track-fill track-fill-end",style:{transform:"scaleX(".concat((le-t)/le,")")}})]}),t<n&&d.jsx("div",{className:"track-fill track-fill-middle",style:{transform:"translateX(".concat(t/le*100,"%) scaleX(").concat((n-t)/le,")")}})]})}function Di(e){var t=e.track,n=e.time,r=e.setTime,i=e["data-testid"],a=c.useMemo(()=>{var p=3600,m=st/2;return n<p?m=n/p*(st/2):n>23*p&&(m=st/2+1/(le-23*p)*(n-23*p)*(st/2)),"translateX(calc(".concat(n/le*100,"% - ").concat(m,"px))")},[n]),o=c.useCallback(p=>{if(!t.current)return 0;var m=t.current.getBoundingClientRect(),g=Math.max(p-m.left,0),b=le*Math.min(1,g/m.width),y=Li*Math.round(b/Li),S=Math.min(le,y);return S},[t]),s=c.useCallback(p=>{var m=p.clientX;r(o(m))},[r,o]),l=c.useCallback(p=>{var m=p.clientX;r(o(m)),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[r,o,s]),u=c.useCallback(()=>{window.addEventListener("mousemove",s),window.addEventListener("mouseup",l),document.documentElement.classList.add("drag-pointer-events-none")},[s,l]),f=c.useCallback(()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[s,l]),h=c.useCallback(()=>{u()},[u]);return c.useEffect(function(){return()=>{f()}},[f]),d.jsx("div",{className:"handle-track",style:{transform:a},children:d.jsx("button",{className:"handle",type:"button","aria-label":"Change time",onMouseDown:h,"data-testid":i})})}function Qs(e){var t=e.buttons,n=e.isShown,r=n===void 0?!1:n,i=e.classNames,a=e.message,o=e.type,s=e.onClick,l=e.onDismiss,u=e["data-testid"],f=c.useRef(null),h=t&&t.length!==0;return d.jsx(za,{in:r,timeout:en.transitionMs,classNames:"toast-notification-slide-up",mountOnEnter:!0,unmountOnExit:!0,nodeRef:f,children:d.jsxs("div",{ref:f,className:H("toast-notification",i,o),role:"presentation",onClick:s,onKeyPress:s,"data-testid":u,children:[d.jsx("div",{className:"message-container",children:d.jsx("span",{className:"message",children:a})}),d.jsx(Dn,{in:h,timeout:en.transitionSlowMs,mountOnEnter:!0,unmountOnExit:!0,children:d.jsx("div",{className:"buttons-container",children:t})}),l&&d.jsx(re,{kind:"ghost",icon:An,tooltip:"Close notification",className:"my-2",onClick:l})]})})}Qs.TYPE=Object.freeze({ERROR:"error"});const YS=Object.freeze(Object.defineProperty({__proto__:null,ACTION_ICON_HEIGHT:Hn,Accordion:ql,ActionBar:Ya,ActionButton:xt,ActionButtonDialogTrigger:Ds,ActionGroup:hm,ActionMenu:mm,AlertDialog:Xl,AutoCompleteInput:me,AutoResizeTextarea:Jv,Avatar:Ql,Badge:Zl,BasicModal:yo,Breadcrumbs:Jl,BulkActionBar:i0,Button:re,ButtonGroup:Ga,CSS_VAR_EXPRESSION_PREFIX:Pc,Calendar:eu,CardFlip:Jp,Checkbox:nn,CheckboxGroup:Ev,Collapse:ze,ColorEditor:tu,ColorPicker:nu,ColorValues:kd,ComboBox:ym,ComboBoxNormalized:Is,ConfirmActionButton:Mv,ConfirmationDialog:Ms,Content:Cn,ContextActionUtils:Pe,ContextActions:$t,ContextMenuItem:fo,ContextMenuRoot:Vs,ContextualHelp:ru,ContextualHelpTrigger:iu,CopyButton:ho,CustomTimeSelect:se,DEFAULT_DARK_THEME_KEY:wc,DEFAULT_DARK_THEME_PALETTE:Oc,DEFAULT_GET_PREFERRED_REPLACEMENT_STRING:ss,DEFAULT_LIGHT_THEME_KEY:xc,DEFAULT_PRELOAD_DATA_VARIABLES:Tc,DH_CSS_VAR_NAME_REGEXP:Cc,DH_VAR_PREFIX:Ec,DashboardList:Ys,DateField:au,DateInput:Ks,DatePicker:ou,DateRangePicker:su,DateTimeInput:gm,DebouncedModal:Us,DebouncedSearchInput:Rd,Dialog:Ba,DialogContainer:lu,DialogTrigger:Va,Disclosure:uu,DisclosurePanel:cu,DisclosureTitle:du,Divider:Ha,DragUtils:ln,DraggableItemList:bm,DropdownMenu:po,EXTERNAL_THEME_KEY:_c,EditableItemList:L0,ErrorBoundary:Ld,ErrorView:U0,FadeTransition:Dn,Flex:Wa,FontBootstrap:_s,FontsLoaded:js,FontsLoadedContext:Mt,Footer:fu,Form:Ka,GLOBAL_SHORTCUTS:kt,Grid:pu,Header:hu,Heading:Rn,HierarchicalCheckboxMenu:De,ITEM_EMPTY_STRING_TEXT_VALUE:vm,Icon:Xe,IconActionButton:Ns,IllustratedMessage:Xa,Image:mu,InfoModal:Ws,InlineAlert:yu,Item:Ot,ItemContent:Sm,ItemList:tn,ItemListItem:Dd,ItemTooltip:Pm,KEY:oe,Keyboard:gu,LIST_VIEW_ROW_HEIGHTS:ls,LabeledValue:bu,Link:Qa,ListActionGroup:wm,ListActionMenu:Om,ListView:xb,ListViewNormalized:As,ListViewWrapper:Jn,LoadingOverlay:Ae,LoadingSpinner:Tt,LogicButton:vu,Logo:qg,MODIFIER:ne,MSG_REQUEST_GET_THEME:jc,MSG_REQUEST_SET_THEME:no,MaskedInput:Kn,Menu:xm,MenuItem:Tm,MenuTrigger:Su,Meter:Pu,Modal:jn,ModalBody:In,ModalFooter:go,ModalHeader:oo,MultiSelect:os,MultiSelectNormalized:Rs,NAVIGATION_SHORTCUTS:I0,NON_WHITESPACE_REGEX:Ic,NavTabList:fS,NumberField:wu,Option:us,PICKER_ITEM_HEIGHTS:Cm,PICKER_TOP_OFFSET:Em,PRELOAD_TRANSPARENT_THEME_QUERY_PARAM:Ac,Page:_m,Picker:jm,PickerNormalized:Im,Popper:At,ProgressBar:Ou,ProgressCircle:xu,Radio:Tu,RadioGroup:Cu,RandomAreaPlotAnimation:zs,RangeCalendar:Eu,RangeSlider:_u,ReactFontAwesome:ju,SVG_ICON_MANUAL_COLOR_MAP:$c,SearchField:Iu,SearchInput:Ln,SearchableCombobox:$S,Section:Am,Select:bo,SelectValueList:cs,Shortcut:Md,ShortcutRegistry:Ce,SlideTransition:$m,Slider:Au,SocketedButton:eh,SpectrumButton:Zt,SpectrumCheckbox:Qt,SpectrumComboBox:Tn,SpectrumMenu:$u,SplitButtonGroup:Nd,Stack:km,StatusLight:ku,SubmenuTrigger:Ru,Switch:Lu,TABLE_ROW_HEIGHT:Rm,TABLE_VIEW_ROW_HEIGHTS:as,THEME_CACHE_LOCAL_STORAGE_KEY:kc,THEME_KEY_OVERRIDE_QUERY_PARAM:Rc,TMP_CSS_PROP_PREFIX:Lc,TRANSPARENT_PRELOAD_DATA_VARIABLES:Dc,TabList:Du,TabPanels:Jy,TableView:tv,TableViewEmptyState:FS,TableViewNormalized:ks,TableViewWrapper:$s,Tabs:Mu,TagGroup:Nu,Text:It,TextArea:Fu,TextField:Uu,TextWithTooltip:qs,ThemeContext:Fd,ThemeExport:en,ThemePicker:zg,ThemeProvider:vo,TimeField:Wu,TimeInput:St,TimeSlider:HS,ToastContainer:Vu,ToastNotification:Qs,ToastQueue:Bu,ToggleButton:Hu,Tooltip:Ze,UISwitch:Ud,View:Ls,WHITESPACE_REGEX:Mc,Well:Ku,XComponentMapContext:Wd,XComponentMapProvider:Vd,baseStyleProps:Gu,calculatePreloadStyleContent:Nc,canHaveRef:So,colorValueStyle:fe,createCssVariableResolver:Fc,createPreloadStyleElement:Uc,createXComponent:Bd,extractDistinctCssVariableExpressions:Wc,fillToLength:Lm,getActiveThemes:Vc,getDefaultBaseThemes:Bc,getDefaultSelectedThemeKey:Hc,getExpressionRanges:Kc,getItemKey:vt,getItemTextValue:Dm,getPositionOfSelectedItemElement:Mm,getThemeKey:Gc,getThemeKeyOverride:Yc,getThemePreloadData:zc,isBaseThemeKey:qc,isClassComponent:Hd,isDHColorValue:Kd,isExternalThemeData:ro,isExternalThemeEnabled:En,isForwardRefComponentType:Gd,isItemElement:Nm,isItemElementWithDescription:Fm,isItemOrSection:Um,isNormalizedItemsWithKeysList:Wm,isNormalizedSection:sn,isPreloadTransparentTheme:Xc,isSectionElement:Vm,isValidColorVar:Qc,isWrappedComponent:Po,itemSelectionToStringSet:yt,normalizeTooltipOptions:Lt,overrideSVGFillColors:Zc,parseExternalThemeData:eo,preloadTheme:Jc,replaceSVGFillColor:ed,requestExternalThemeData:to,resolveCssVariablesInRecord:ao,resolveCssVariablesInString:td,separateSpectrumProps:Cs,setThemePreloadData:nd,themeDHDefault:rd,themeDark:id,themeLight:ad,trimTrailingMask:Bm,useExternalTheme:Es,useOnChangeTrackUncontrolled:Hm,usePickerItemScale:Gn,usePickerNormalizedProps:rs,usePickerProps:Km,usePickerScrollOnOpen:Gm,useRenderNormalizedItem:Vn,useSpectrumThemeProvider:Je,useStaticItemInitialScrollPosition:Ym,useStringifiedMultiSelection:Zn,useStringifiedSelection:zm,useStyleProps:Yu,useTheme:jt,useXComponent:Yd,viewStyleProps:zu,wrapIcon:qm,wrapItemChildren:is,wrapPrimitiveWithText:Xm},Symbol.toStringTag,{value:"Module"}));function zS(e,t){return ZS(e)||QS(e,t)||XS(e,t)||qS()}function qS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
23
23
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XS(e,t){if(e){if(typeof e=="string")return Mi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mi(e,t):void 0}}function Mi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function QS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function ZS(e){if(Array.isArray(e))return e}var Zs=X.memo(e=>{var t=e.children,n=e.onError,r=e.widget,i=Mn(r),a=zS(i,2),o=a[0],s=a[1];return s!=null?(n==null||n(s),null):o==null?null:d.jsx($n.Provider,{value:o,children:t})});Zs.displayName="DeferredApiBootstrap";function JS(e,t){return rP(e)||nP(e,t)||tP(e,t)||eP()}function eP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
24
24
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tP(e,t){if(e){if(typeof e=="string")return Ni(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ni(e,t):void 0}}function Ni(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nP(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function rP(e){if(Array.isArray(e))return e}var Nt=c.createContext(null);Nt.displayName="ObjectFetchManagerContext";function Js(e){var t=c.useState({status:"loading"}),n=JS(t,2),r=n[0],i=n[1],a=c.useContext(Nt);return c.useEffect(()=>{if(a==null){i({error:new Error("No ObjectFetchManager available in context"),status:"error"});return}return i(o=>o.status==="loading"?o:{status:"loading"}),a.subscribe(e,i)},[e,a]),r}function Fi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ui(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fi(Object(n),!0).forEach(function(r){iP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fi(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iP(e,t,n){return(t=aP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aP(e){var t=oP(e,"string");return typeof t=="symbol"?t:t+""}function oP(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wi(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function sP(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Wi(a,r,i,o,s,"next",l)}function s(l){Wi(a,r,i,o,s,"throw",l)}o(void 0)})}}function Vi(e,t){return dP(e)||cP(e,t)||uP(e,t)||lP()}function lP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
25
25
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uP(e,t){if(e){if(typeof e=="string")return Bi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bi(e,t):void 0}}function Bi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function cP(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function dP(e){if(Array.isArray(e))return e}var lt=J.module("useWidget");function fP(e){var t=c.useState(()=>({widget:null,error:null})),n=Vi(t,2),r=n[0],i=n[1],a=Js(e),o=Mn(e),s=Vi(o,2),l=s[0],u=s[1],f=xe(),h=l??f;c.useEffect(function(){lt.debug("loadWidget",e);var g=a.status;if(g==="error"){i({widget:null,error:a.error});return}if(g==="loading"){i({widget:null,error:null});return}var b=a.fetch,y=!1;function S(){return v.apply(this,arguments)}function v(){return v=sP(function*(){try{Ct(b);var T=yield b();if(y){lt.debug2("loadWidgetInternal cancelled",e,T),T.close(),"exportedObjects"in T&&T.exportedObjects.forEach(w=>{w.close()});return}lt.debug("loadWidgetInternal done",e,T),i({widget:T,error:null})}catch(w){if(y)return;lt.debug("loadWidgetInternal error",e,w),i({widget:null,error:w??new Error("Null error")})}}),v.apply(this,arguments)}return S(),()=>{y=!0}},[e,a]);var p=c.useMemo(()=>{var m;return Ui(Ui({},r),{},{error:(m=r.error)!==null&&m!==void 0?m:u,api:r.widget!=null?h:null})},[r,h,u]);return p}var el="io.deephaven.message.LoginOptions.request",tl="io.deephaven.message.SessionDetails.request",nl="io.deephaven.broadcast",er="io.deephaven.broadcast.Login",rl="io.deephaven.broadcast.Logout";function il(e){return Et(e)&&e.message===er}function al(e){return Et(e)&&e.message===rl}function pP(e,t,n){return(t=hP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hP(e){var t=mP(e,"string");return typeof t=="symbol"?t:t+""}function mP(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class ol extends Error{constructor(){super(...arguments),pP(this,"isNoConsolesError",!0)}}function sl(e){return e.isNoConsolesError}function Hi(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function Ft(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Hi(a,r,i,o,s,"next",l)}function s(l){Hi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Be=J.module("SessionUtils");function ll(e,t,n){return dn.apply(this,arguments)}function dn(){return dn=Ft(function*(e,t,n){Be.info("Getting console types...");var r=yield t.getConsoleTypes();if(r.length===0)throw new ol("No console types available");Be.info("Available types:",r);var i=r[0];Be.info("Starting session with type",i);var a=yield t.startSession(i),o={type:i,id:xn()};return Be.info("Console session established",o),{session:a,config:o,connection:t,details:n,dh:e}}),dn.apply(this,arguments)}function yP(e,t,n){return Be.info("createCoreClient",t),new e.CoreClient(t,n)}function gP(e){return e!=null&&typeof e=="object"}function bP(){return fn.apply(this,arguments)}function fn(){return fn=Ft(function*(){var e=yield kn(tl);if(!gP(e))throw new Error("Unexpected session details response: ".concat(e));return e}),fn.apply(this,arguments)}function vP(){return pn.apply(this,arguments)}function pn(){return pn=Ft(function*(){var e=new URLSearchParams(window.location.search);switch(e.get("authProvider")){case"parent":return bP()}return{}}),pn.apply(this,arguments)}function SP(e,t,n){return hn.apply(this,arguments)}function hn(){return hn=Ft(function*(e,t,n){var r;try{r=yield ll(e,t,n)}catch(i){if(!sl(i))throw i}return r}),hn.apply(this,arguments)}function Ki(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function PP(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Ki(a,r,i,o,s,"next",l)}function s(l){Ki(a,r,i,o,s,"throw",l)}o(void 0)})}}var ut=J.module("@deephaven/jsapi-utils.WorkerVariablesStore"),mn="default";function ul(e){if(e==null)return mn;var t=e;return typeof t.querySerial=="string"&&t.querySerial.length>0?"q:".concat(t.querySerial):typeof t.queryName=="string"&&t.queryName.length>0?"qn:".concat(t.queryName):typeof t.sessionId=="string"&&t.sessionId.length>0?"s:".concat(t.sessionId):mn}function Ht(e){if(typeof e.id=="string"&&e.id.length>0)return"id:".concat(e.id);if(typeof e.name=="string"&&e.name.length>0)return"name:".concat(e.name);if(typeof e.title=="string"&&e.title.length>0)return"title:".concat(e.title)}function cl(e){var t=new Map;function n(h){var p=t.get(h);return p==null&&(p={list:null,listeners:new Set,unsubscribeFieldUpdates:null,resolving:!1,generation:0},t.set(h,p)),p}function r(h){h.listeners.forEach(p=>{try{p()}catch(m){ut.error("WorkerVariables listener threw",m)}})}function i(h){var p=t.get(h);if((p==null?void 0:p.unsubscribeFieldUpdates)!=null){try{p.unsubscribeFieldUpdates()}catch(m){ut.warn("Error unsubscribing from field updates",m)}p.unsubscribeFieldUpdates=null}}function a(h){return o.apply(this,arguments)}function o(){return o=PP(function*(h){var p=t.get(h);if(!(p==null||p.resolving||p.unsubscribeFieldUpdates!=null)){p.resolving=!0;var m=p.generation;try{var g=yield e(h);if(m!==p.generation||p.listeners.size===0||t.get(h)!==p)return;if(g==null){ut.debug("No connection available for worker",h);return}var b=g.subscribeToFieldUpdates(y=>{var S;if(m===p.generation){var v=new Set(y.removed.map(Ht).filter(x=>x!=null)),T=new Set(y.updated.map(Ht).filter(x=>x!=null)),w=((S=p.list)!==null&&S!==void 0?S:[]).filter(x=>{var P=Ht(x);return P==null||!v.has(P)&&!T.has(P)});w.push(...y.updated,...y.created),p.list=w,r(p)}});p.unsubscribeFieldUpdates=b}catch(y){ut.error("Failed to resolve worker connection",h,y)}finally{p.resolving=!1,t.get(h)===p&&m!==p.generation&&p.unsubscribeFieldUpdates==null&&p.listeners.size>0&&a(h).catch(()=>{})}}}),o.apply(this,arguments)}function s(h){var p,m;return(p=(m=t.get(h))===null||m===void 0?void 0:m.list)!==null&&p!==void 0?p:null}function l(h,p){var m=n(h);return m.listeners.add(p),m.unsubscribeFieldUpdates==null&&!m.resolving&&a(h).catch(()=>{}),()=>{m.listeners.delete(p),m.listeners.size===0&&(i(h),m.list=null,t.delete(h))}}function u(h){var p=t.get(h);p!=null&&(p.generation+=1,i(h),p.list=null,r(p),p.listeners.size>0&&a(h).catch(()=>{}))}function f(){Array.from(t.keys()).forEach(h=>{i(h)}),t.clear()}return{snapshot:s,subscribe:l,invalidate:u,destroy:f}}const wP=Object.freeze(Object.defineProperty({__proto__:null,BROADCAST_CHANNEL_NAME:nl,BROADCAST_LOGIN_MESSAGE:er,BROADCAST_LOGOUT_MESSAGE:rl,BooleanColumnFormatter:th,CharColumnFormatter:nh,DEFAULT_WORKER_KEY:mn,DateTimeColumnFormatter:zd,DateUtils:rh,DecimalColumnFormatter:qd,DefaultColumnFormatter:ih,FETCH_TIMEOUT:hd,Formatter:Nn,FormatterUtils:an,ITEM_KEY_PREFIX:ah,IntegerColumnFormatter:Xd,LOGIN_OPTIONS_REQUEST:el,NewTableColumnTypes:Qd,NoConsolesError:ol,SESSION_DETAILS_REQUEST:tl,StringColumnFormatter:oh,TableColumnFormatter:Zd,TableUtils:Ho,createComboboxFilterArgs:sh,createCoreClient:yP,createFilterConditionFactory:Fn,createFormatterFromSettings:lh,createKeyedItemKey:Un,createNotNullOrEmptyFilterCondition:Ko,createOnTableUpdatedHandler:uh,createSearchTextFilter:Go,createSelectedValuesFilter:Wn,createSessionWrapper:ll,createShowOnlyEmptyFilterCondition:Yo,createValueFilter:zo,createWorkerVariablesStore:cl,defaultRowDeserializer:ch,fetchVariableDefinition:md,fetchVariableDefinitionByPredicate:yd,generateEmptyKeyedItems:dh,getColumnFormats:fh,getDateTimeFormatterOptions:ph,getSessionDetails:vP,getSize:hh,getWindowParent:_n,getWorkerKey:ul,isBroadcastLoginMessage:il,isBroadcastLogoutMessage:al,isClosed:mh,isCustomColumnFormatDefined:yh,isMessage:Et,isNoConsolesError:sl,isResponse:od,isSortDirection:gh,loadSessionWrapper:SP,makeMessage:so,makeResponse:sd,padFirstAndLastRow:bh,requestParentResponse:kn},Symbol.toStringTag,{value:"Module"}));var Ut=c.createContext(null);Ut.displayName="WorkerVariablesContext";function OP(e){var t=c.useContext(Ut),n=ul(e),r=c.useCallback(a=>t==null?()=>{}:t.subscribe(n,a),[t,n]),i=c.useCallback(()=>t==null?null:t.snapshot(n),[t,n]);return c.useSyncExternalStore(r,i,i)}const xP=Object.freeze(Object.defineProperty({__proto__:null,ApiBootstrap:ld,ApiContext:$n,ClientBootstrap:lo,ClientContext:gd,DeferredApiBootstrap:Zs,DeferredApiContext:vh,ObjectFetchManagerContext:Nt,ObjectFetcherContext:wo,WorkerVariablesContext:Ut,getVariableDescriptor:Jd,isIdVariableDescriptor:ef,isNameVariableDescriptor:tf,isVariableDescriptor:nf,sanitizeVariableDescriptor:Oo,useApi:xe,useClient:Qe,useDeferredApi:Mn,useObjectFetch:Js,useObjectFetcher:rf,useWidget:fP,useWorkerVariables:OP},Symbol.toStringTag,{value:"Module"}));function TP(e){return function(n){var r=n.children;return d.jsx($n.Provider,{value:e,children:r})}}function CP(e,t,n){return(t=EP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EP(e){var t=_P(e,"string");return typeof t=="symbol"?t:t+""}function _P(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class jP extends Error{constructor(){super(...arguments),CP(this,"isColumnNameError",!0)}}function IP(e,t,n){return(t=AP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AP(e){var t=$P(e,"string");return typeof t=="symbol"?t:t+""}function $P(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class kP extends Error{constructor(){super(...arguments),IP(this,"isTableDisconnectError",!0)}}function ct(e,t){return MP(e)||DP(e,t)||LP(e,t)||RP()}function RP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
26
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LP(e,t){if(e){if(typeof e=="string")return Gi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gi(e,t):void 0}}function Gi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DP(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function MP(e){if(Array.isArray(e))return e}var dt=J.module("useTable"),dl=(e,t,n,r)=>{var i=xe(),a=c.useState(void 0),o=ct(a,2),s=o[0],l=o[1],u=c.useState([]),f=ct(u,2),h=f[0],p=f[1],m=c.useState(null),g=ct(m,2),b=g[0],y=g[1],S=c.useState(null),v=ct(S,2),T=v[0],w=v[1];c.useEffect(()=>{if(r===void 0){l(e==null?void 0:e.columns),y(null);return}try{l(e==null?void 0:e.findColumns(r)),y(null)}catch(C){dt.error("Column not found",C,r),y(new jP("Invalid columnNames argument"))}},[e,r]),c.useEffect(()=>{if(!s||!e){dt.debug2("Table or column not initialized, skip viewport update.");return}dt.debug2("Setting viewport",t,n),e.setViewport(t,n,s)},[s,e,t,n]);var x=c.useCallback(C=>{var A=C.detail;if(!s){dt.error("Columns not initialized.");return}var D=s.map(L=>A.rows.map(j=>j.get(L)));p(D)},[s]),P=c.useCallback(()=>{w(new kP("Table disconnected"))},[]),E=c.useCallback(()=>{w(null)},[]);return gt(e,i.Table.EVENT_UPDATED,x),gt(e,i.Table.EVENT_DISCONNECT,P),gt(e,i.Table.EVENT_RECONNECT,E),{columns:s,data:h,error:T??b}},fl=(e,t,n,r)=>{var i=c.useMemo(()=>[r],[r]),a=dl(e,t,n,i),o=a.columns,s=o===void 0?[]:o,l=a.data,u=l===void 0?[]:l,f=a.error;return{column:s[0],data:u[0],error:f}};function Yi(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function NP(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Yi(a,r,i,o,s,"next",l)}function s(l){Yi(a,r,i,o,s,"throw",l)}o(void 0)})}}function ft(e,t){return VP(e)||WP(e,t)||UP(e,t)||FP()}function FP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
27
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UP(e,t){if(e){if(typeof e=="string")return zi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zi(e,t):void 0}}function zi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function WP(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function VP(e){if(Array.isArray(e))return e}var ye=J.module("TableInput"),Kt=250;function BP(e){var t,n,r=e.className,i=r===void 0?void 0:r,a=e.columnName,o=e.settings,s=e.defaultValue,l=s===void 0?[]:s,u=e.isInvalid,f=u===void 0?!1:u,h=e.onChange,p=h===void 0?pe:h,m=e.onBlur,g=m===void 0?pe:m,b=e.table,y=c.useRef(null),S=xe(),v=c.useMemo(()=>{var R=an.getColumnFormats(o),F=an.getDateTimeFormatterOptions(o),W=o.defaultDecimalFormatOptions,Y=W===void 0?{}:W,de=o.defaultIntegerFormatOptions,tt=de===void 0?{}:de;return new Nn(S,R,F,Y,tt)},[S,o]),T=c.useState(""),w=ft(T,2),x=w[0],P=w[1],E=c.useState(new Set(l)),C=ft(E,2),A=C[0],D=C[1],L=c.useState(),j=ft(L,2),$=j[0],N=j[1],O=c.useRef(null),_=Math.min((t=$==null?void 0:$.size)!==null&&t!==void 0?t:0,Kt),I=fl($,0,Kt-1,a),M=I.column,K=I.data,G=I.error,ie=c.useCallback(R=>M?v.getFormattedString(R,M.type,M.name):"".concat(R),[M,v]),Te=c.useMemo(()=>{var R=new Set(A),F=[];if(K==null)return[F,null];if(K.forEach(Y=>{var de="".concat(Y),tt=A.has(de);tt&&R.delete(de),F.push({value:de,displayValue:ie(Y),isSelected:tt})}),R.size>0){ye.debug2("Selection has items that are missing from the viewport");var W=new Set(A);return Array.from(R).forEach(Y=>{W.delete(Y)}),[F,W]}return[F,null]},[K,A,ie]),ue=ft(Te,2),Q=ue[0],ee=ue[1];c.useEffect(()=>{ee!==null&&(D(ee),p(Array.from(ee)))},[p,ee]);var z=c.useCallback(function(){var R=NP(function*(F){try{var W=yield F;ye.debug("Table resolved",W),N(W)}catch(Y){if(je.isCanceled(Y))return;ye.error(Y)}});return function(F){return R.apply(this,arguments)}}(),[]);c.useEffect(()=>{var R=je.makeCancelable(b);return z(R),()=>{ye.debug2("Cancel table promise"),R.cancel()}},[b,z]);var k=c.useCallback(R=>{var F=R.target.value;P(F);var W=Q.findIndex(de=>de.displayValue.includes(F));if(W>-1){var Y;ye.debug2("Found ".concat(F," at index ").concat(W)),(Y=O.current)===null||Y===void 0||Y.scrollIntoView(W)}else ye.debug2("".concat(F," not found"))},[Q,O]),U=c.useCallback(R=>{if(ye.debug("handleSelect",R),R>=Q.length){ye.error("Invalid index",R);return}var F=Q[R].value,W=new Set(A);Q[R].isSelected?W.delete(F):W.add(F),D(W),p(Array.from(W))},[p,Q,A]),B=c.useCallback(()=>{var R=Q.map(W=>W.value),F=new Set(R);D(F),p(R)},[Q,p]),V=c.useCallback(()=>{D(new Set),p([])},[p]),Z=c.useCallback(()=>{},[]),te=c.useCallback(R=>{var F,W=R.relatedTarget;ye.debug("handleChildBlur",W,W instanceof HTMLElement,y.current,(F=y.current)===null||F===void 0?void 0:F.contains(W)),(!W||y.current&&W instanceof HTMLElement&&!y.current.contains(W))&&g()},[g]),ce=Q.length===0;return d.jsxs("div",{ref:y,className:H("table-input-container d-flex flex-column position-relative",i),children:[d.jsx(Ln,{disabled:!!G||ce,value:x,placeholder:"Search",onChange:k,className:"mb-2 d-flex",onBlur:te}),d.jsx(cs,{className:"table-input-list",disabled:$===void 0||ce,isInvalid:f,items:ce?[{value:"Empty",isSelected:!1}]:Q,itemCount:_,offset:0,onSelect:U,onViewportChange:Z,ref:O,onBlur:te}),$&&d.jsxs("div",{className:"meta-row",children:[d.jsx("div",{className:"d-flex align-items-center text-muted small",children:$!=null&&$.size>_&&d.jsxs(d.Fragment,{children:["Table is too large, showing the first ",Kt," items."]})}),d.jsxs("div",{children:[d.jsx("button",{type:"button",className:"btn btn-link",onBlur:te,onClick:B,children:"Select All"}),d.jsx("button",{type:"button",className:"btn btn-link mr-a",onBlur:te,onClick:V,children:"Clear"})]})]}),$==null||G&&d.jsx("div",{className:"h-100 w-100 position-absolute",children:d.jsx(Ae,{isLoaded:$!=null,isLoading:$==null&&G==null,errorMessage:(n=G==null?void 0:G.message)!==null&&n!==void 0?n:null,"data-testid":"table-input-loading"})})]})}var HP=["table","keyColumn","labelColumn","iconColumn","settings","onChange","onSelectionChange"];function qi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qi(Object(n),!0).forEach(function(r){KP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qi(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KP(e,t,n){return(t=GP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GP(e){var t=YP(e,"string");return typeof t=="symbol"?t:t+""}function YP(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qi(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function Zi(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Qi(a,r,i,o,s,"next",l)}function s(l){Qi(a,r,i,o,s,"throw",l)}o(void 0)})}}function Ji(e,t){return QP(e)||XP(e,t)||qP(e,t)||zP()}function zP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qP(e,t){if(e){if(typeof e=="string")return ea(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ea(e,t):void 0}}function ea(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function XP(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function QP(e){if(Array.isArray(e))return e}function ZP(e,t){if(e==null)return{};var n,r,i=JP(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function JP(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ew=J.module("jsapi-components.useMultiPickerProps");function tw(e){var t,n=e.table,r=e.keyColumn,i=e.labelColumn,a=e.iconColumn,o=e.settings,s=e.onChange,l=e.onSelectionChange,u=ZP(e,HP),f=Gn(),h=f.itemHeight,p=Yn(o),m=p.getFormattedString,g=p.timeZone,b=Ie(Ho.copyTableAndApplyFilters,[n]),y=b.data;zn(y);var S=c.useMemo(()=>y==null?null:Qm(y,r),[r,y]),v=c.useMemo(()=>y==null||S==null?null:Zm(y,S,i),[S,i,y]),T=c.useMemo(()=>v==null?[]:[v.name],[v]),w=ds({table:y,iconColumnName:a,keyColumnName:r,labelColumnName:i,formatValue:m}),x=fs({reuseItemsOnTableResize:!0,table:y,itemHeight:h,deserializeRow:w,searchColumnNames:T,timeZone:g}),P=x.onScroll,E=x.onSearchTextChange,C=x.viewportData,A=xe(),D=ge(),L=c.useMemo(()=>{if(y==null||S==null)return[];var ee=[S];if(v!=null&&v!==S&&ee.push(v),a!=null)try{var z=y.findColumn(a);ee.push(z)}catch{}return ee},[y,S,v,a]),j=(t=u.selectedKeys)!==null&&t!==void 0?t:u.defaultSelectedKeys,$=c.useRef(new Set),N=c.useState(new Map),O=Ji(N,2),_=O[0],I=O[1];c.useEffect(()=>{$.current=new Set,I(new Map)},[y]),c.useEffect(function(){if(!(y==null||S==null||j==null||j==="all")){var z=[...j].filter(V=>!$.current.has(String(V)));if(z.length!==0){var k=!1,U=y.findColumn(S.name),B=D.getValueType(U.type);return Zi(function*(){try{var V=[];if(yield Promise.all(z.map(function(){var R=Zi(function*(F){if(!k){var W=yield y.seekRow(0,U,B,F);W!==-1&&V.push(W)}});return function(F){return R.apply(this,arguments)}}())),V.sort((R,F)=>R-F),k||V.length===0)return;var Z=A.RangeSet.ofItems(V),te=yield y.createSnapshot({rows:Z,columns:L});if(k)return;var ce=new Map;te.rows.forEach((R,F)=>{var W=V[F],Y=w(R);ce.set(W,{key:Un(W),item:Y})}),k||(z.forEach(R=>$.current.add(String(R))),I(R=>{var F=new Map(R);return ce.forEach((W,Y)=>F.set(Y,W)),F}))}catch(R){ew.error("Error loading labels for selected keys",R)}})(),()=>{k=!0}}}},[j,y,S,D,A,w,L]);var M=c.useRef(new Map),K=c.useState(new Map),G=Ji(K,2),ie=G[0],Te=G[1],ue=c.useMemo(()=>_.size===0?C.items:C.items.map((ee,z)=>{if(ee.item==null){var k=_.get(z);if(k!=null)return k}return ee}),[C.items,_]);c.useEffect(function(){var z,k=(z=u.selectedKeys)!==null&&z!==void 0?z:u.defaultSelectedKeys,U;k instanceof Array?U=new Set(k.map(String)):k==="all"?U=null:U=new Set;var B=!1;ue.forEach(V=>{if(V.item!=null){var Z=String(V.item.key),te=V.item.textValue;te!=null&&(U==null||U.has(Z))&&M.current.get(Z)!==te&&(M.current.set(Z,te),B=!0)}}),B&&Te(new Map(M.current))},[ue,u.selectedKeys,u.defaultSelectedKeys]);var Q=c.useCallback(ee=>{var z;(z=s??l)===null||z===void 0||z(ee)},[s,l]);return Xi(Xi({},u),{},{normalizedItems:ue,selectedItemLabels:ie,showItemIcons:a!=null,onChange:Q,onScroll:P,onSearchTextChange:E})}var nw=["onInputChange","onSearchTextChange"];function ta(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function na(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ta(Object(n),!0).forEach(function(r){rw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ta(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rw(e,t,n){return(t=iw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iw(e){var t=aw(e,"string");return typeof t=="symbol"?t:t+""}function aw(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ow(e,t){if(e==null)return{};var n,r,i=sw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lw(e){var t=Jm(e),n=t.onInputChange,r=t.onSearchTextChange,i=ow(t,nw),a=c.useRef(!1),o=c.useRef(""),s=c.useCallback(u=>{n==null||n(u),a.current?r(u):(r(""),o.current=u)},[n,r]),l=c.useCallback((u,f)=>{var h;(h=i.onOpenChange)===null||h===void 0||h.call(i,u),u?f==="input"&&r(o.current):r(""),a.current=u},[r,i]);return d.jsx(Is,na(na({},i),{},{onInputChange:s,onOpenChange:l}))}var uw=["table","keyColumn","labelColumn","iconColumn","settings"];function ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ia(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ra(Object(n),!0).forEach(function(r){cw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ra(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cw(e,t,n){return(t=dw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dw(e){var t=fw(e,"string");return typeof t=="symbol"?t:t+""}function fw(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pw(e,t){if(e==null)return{};var n,r,i=hw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function mw(e){var t,n=e.table,r=e.keyColumn,i=e.labelColumn,a=e.iconColumn,o=e.settings,s=pw(e,uw),l=Je(),u=l.scale,f=ls[(t=s.density)!==null&&t!==void 0?t:"regular"][u],h=Yn(o),p=h.getFormattedString,m=ds({table:n,iconColumnName:a,keyColumnName:r,labelColumnName:i,formatValue:p}),g=qn({reuseItemsOnTableResize:!0,table:n,itemHeight:f,deserializeRow:m}),b=g.viewportData,y=g.onScroll;return d.jsx(As,ia(ia({},s),{},{normalizedItems:b.items,showItemIcons:a!=null,onScroll:y}))}var yw=["onInputChange","onOpenChange","onSearchTextChange"];function aa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function oa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aa(Object(n),!0).forEach(function(r){gw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gw(e,t,n){return(t=bw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bw(e){var t=vw(e,"string");return typeof t=="symbol"?t:t+""}function vw(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sw(e,t){if(e==null)return{};var n,r,i=Pw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ww(e){var t=tw(e),n=t.onInputChange,r=t.onOpenChange,i=t.onSearchTextChange,a=Sw(t,yw),o=c.useRef(!1),s=c.useRef(""),l=c.useCallback(f=>{n==null||n(f),o.current?i(f):(i(""),s.current=f)},[n,i]),u=c.useCallback(f=>{r==null||r(f),f?s.current!==""&&i(s.current):i(""),o.current=f},[i,r]);return d.jsx(Rs,oa(oa({},a),{},{onInputChange:l,onOpenChange:u}))}function Ow(e,t){return Ew(e)||Cw(e,t)||Tw(e,t)||xw()}function xw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tw(e,t){if(e){if(typeof e=="string")return sa(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sa(e,t):void 0}}function sa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cw(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Ew(e){if(Array.isArray(e))return e}function _w(e){return typeof e=="object"&&e!=null&&"equals"in e&&typeof e.equals=="function"}function jw(e){return"".concat(e)}function Iw(e){var t=e.column,n=e.table,r=e.filter,i=r===void 0?mo:r,a=e.onChange,o=e.selectedValue,s=e.disabled,l=e.className,u=e.formatValue,f=u===void 0?jw:u,h=e.maxSize,p=h===void 0?1e3:h,m=xe(),g=c.useState([]),b=Ow(g,2),y=b[0],S=b[1];c.useEffect(()=>{if(n==null){S([]);return}var x=t??n.columns[0];n.applyFilter(i);var P=n.setViewport(0,p,[x]);return P.addEventListener(m.Table.EVENT_UPDATED,E=>{var C=E.detail,A=C.rows.map(D=>{var L;return(L=D.get(x))!==null&&L!==void 0?L:null});S(A)}),()=>{P.close()}},[t,m,i,p,n]);var v=c.useMemo(()=>o===void 0?[void 0,...y]:y,[o,y]),T=c.useMemo(()=>v.findIndex(x=>x===o||_w(x)&&x.equals(o)),[o,v]),w=c.useCallback(x=>{var P=parseInt(x,10);a(v[P])},[a,v]);return d.jsx(bo,{className:l,value:T,onChange:w,disabled:s,children:v.map((x,P)=>d.jsx(us,{value:P,children:f(x)},"".concat(P)))})}var la=J.module("useBroadcastChannel");function tr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pe,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nl,n=c.useMemo(()=>new BroadcastChannel(t),[t]);return c.useEffect(()=>()=>{n.close()},[n]),c.useEffect(()=>{function r(i){var a=i.data;if(!Et(a)){la.debug("Ignoring non-deephaven message",a);return}la.debug("event received",a),e(i)}return n.addEventListener("message",r),()=>{n.removeEventListener("message",r)}},[n,e]),n}function nr(e,t){var n=c.useCallback(r=>{il(r.data)?e==null||e(r.data):al(r.data)&&(t==null||t(r.data))},[e,t]);tr(n)}function Aw(e,t){return Lw(e)||Rw(e,t)||kw(e,t)||$w()}function $w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LP(e,t){if(e){if(typeof e=="string")return Gi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gi(e,t):void 0}}function Gi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DP(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function MP(e){if(Array.isArray(e))return e}var dt=J.module("useTable"),dl=(e,t,n,r)=>{var i=xe(),a=c.useState(void 0),o=ct(a,2),s=o[0],l=o[1],u=c.useState([]),f=ct(u,2),h=f[0],p=f[1],m=c.useState(null),g=ct(m,2),b=g[0],y=g[1],S=c.useState(null),v=ct(S,2),T=v[0],w=v[1];c.useEffect(()=>{if(r===void 0){l(e==null?void 0:e.columns),y(null);return}try{l(e==null?void 0:e.findColumns(r)),y(null)}catch(C){dt.error("Column not found",C,r),y(new jP("Invalid columnNames argument"))}},[e,r]),c.useEffect(()=>{if(!s||!e){dt.debug2("Table or column not initialized, skip viewport update.");return}dt.debug2("Setting viewport",t,n),e.setViewport(t,n,s)},[s,e,t,n]);var x=c.useCallback(C=>{var A=C.detail;if(!s){dt.error("Columns not initialized.");return}var D=s.map(L=>A.rows.map(j=>j.get(L)));p(D)},[s]),P=c.useCallback(()=>{w(new kP("Table disconnected"))},[]),_=c.useCallback(()=>{w(null)},[]);return gt(e,i.Table.EVENT_UPDATED,x),gt(e,i.Table.EVENT_DISCONNECT,P),gt(e,i.Table.EVENT_RECONNECT,_),{columns:s,data:h,error:T??b}},fl=(e,t,n,r)=>{var i=c.useMemo(()=>[r],[r]),a=dl(e,t,n,i),o=a.columns,s=o===void 0?[]:o,l=a.data,u=l===void 0?[]:l,f=a.error;return{column:s[0],data:u[0],error:f}};function Yi(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function NP(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Yi(a,r,i,o,s,"next",l)}function s(l){Yi(a,r,i,o,s,"throw",l)}o(void 0)})}}function ft(e,t){return VP(e)||WP(e,t)||UP(e,t)||FP()}function FP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
27
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UP(e,t){if(e){if(typeof e=="string")return zi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zi(e,t):void 0}}function zi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function WP(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function VP(e){if(Array.isArray(e))return e}var ye=J.module("TableInput"),Kt=250;function BP(e){var t,n,r=e.className,i=r===void 0?void 0:r,a=e.columnName,o=e.settings,s=e.defaultValue,l=s===void 0?[]:s,u=e.isInvalid,f=u===void 0?!1:u,h=e.onChange,p=h===void 0?pe:h,m=e.onBlur,g=m===void 0?pe:m,b=e.table,y=c.useRef(null),S=xe(),v=c.useMemo(()=>{var R=an.getColumnFormats(o),F=an.getDateTimeFormatterOptions(o),W=o.defaultDecimalFormatOptions,Y=W===void 0?{}:W,de=o.defaultIntegerFormatOptions,tt=de===void 0?{}:de;return new Nn(S,R,F,Y,tt)},[S,o]),T=c.useState(""),w=ft(T,2),x=w[0],P=w[1],_=c.useState(new Set(l)),C=ft(_,2),A=C[0],D=C[1],L=c.useState(),j=ft(L,2),$=j[0],N=j[1],O=c.useRef(null),E=Math.min((t=$==null?void 0:$.size)!==null&&t!==void 0?t:0,Kt),I=fl($,0,Kt-1,a),M=I.column,K=I.data,G=I.error,ie=c.useCallback(R=>M?v.getFormattedString(R,M.type,M.name):"".concat(R),[M,v]),Te=c.useMemo(()=>{var R=new Set(A),F=[];if(K==null)return[F,null];if(K.forEach(Y=>{var de="".concat(Y),tt=A.has(de);tt&&R.delete(de),F.push({value:de,displayValue:ie(Y),isSelected:tt})}),R.size>0){ye.debug2("Selection has items that are missing from the viewport");var W=new Set(A);return Array.from(R).forEach(Y=>{W.delete(Y)}),[F,W]}return[F,null]},[K,A,ie]),ue=ft(Te,2),Q=ue[0],ee=ue[1];c.useEffect(()=>{ee!==null&&(D(ee),p(Array.from(ee)))},[p,ee]);var z=c.useCallback(function(){var R=NP(function*(F){try{var W=yield F;ye.debug("Table resolved",W),N(W)}catch(Y){if(je.isCanceled(Y))return;ye.error(Y)}});return function(F){return R.apply(this,arguments)}}(),[]);c.useEffect(()=>{var R=je.makeCancelable(b);return z(R),()=>{ye.debug2("Cancel table promise"),R.cancel()}},[b,z]);var k=c.useCallback(R=>{var F=R.target.value;P(F);var W=Q.findIndex(de=>de.displayValue.includes(F));if(W>-1){var Y;ye.debug2("Found ".concat(F," at index ").concat(W)),(Y=O.current)===null||Y===void 0||Y.scrollIntoView(W)}else ye.debug2("".concat(F," not found"))},[Q,O]),U=c.useCallback(R=>{if(ye.debug("handleSelect",R),R>=Q.length){ye.error("Invalid index",R);return}var F=Q[R].value,W=new Set(A);Q[R].isSelected?W.delete(F):W.add(F),D(W),p(Array.from(W))},[p,Q,A]),B=c.useCallback(()=>{var R=Q.map(W=>W.value),F=new Set(R);D(F),p(R)},[Q,p]),V=c.useCallback(()=>{D(new Set),p([])},[p]),Z=c.useCallback(()=>{},[]),te=c.useCallback(R=>{var F,W=R.relatedTarget;ye.debug("handleChildBlur",W,W instanceof HTMLElement,y.current,(F=y.current)===null||F===void 0?void 0:F.contains(W)),(!W||y.current&&W instanceof HTMLElement&&!y.current.contains(W))&&g()},[g]),ce=Q.length===0;return d.jsxs("div",{ref:y,className:H("table-input-container d-flex flex-column position-relative",i),children:[d.jsx(Ln,{disabled:!!G||ce,value:x,placeholder:"Search",onChange:k,className:"mb-2 d-flex",onBlur:te}),d.jsx(cs,{className:"table-input-list",disabled:$===void 0||ce,isInvalid:f,items:ce?[{value:"Empty",isSelected:!1}]:Q,itemCount:E,offset:0,onSelect:U,onViewportChange:Z,ref:O,onBlur:te}),$&&d.jsxs("div",{className:"meta-row",children:[d.jsx("div",{className:"d-flex align-items-center text-muted small",children:$!=null&&$.size>E&&d.jsxs(d.Fragment,{children:["Table is too large, showing the first ",Kt," items."]})}),d.jsxs("div",{children:[d.jsx("button",{type:"button",className:"btn btn-link",onBlur:te,onClick:B,children:"Select All"}),d.jsx("button",{type:"button",className:"btn btn-link mr-a",onBlur:te,onClick:V,children:"Clear"})]})]}),$==null||G&&d.jsx("div",{className:"h-100 w-100 position-absolute",children:d.jsx(Ae,{isLoaded:$!=null,isLoading:$==null&&G==null,errorMessage:(n=G==null?void 0:G.message)!==null&&n!==void 0?n:null,"data-testid":"table-input-loading"})})]})}var HP=["table","keyColumn","labelColumn","iconColumn","settings","onChange","onSelectionChange"];function qi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qi(Object(n),!0).forEach(function(r){KP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qi(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KP(e,t,n){return(t=GP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GP(e){var t=YP(e,"string");return typeof t=="symbol"?t:t+""}function YP(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qi(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function Zi(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Qi(a,r,i,o,s,"next",l)}function s(l){Qi(a,r,i,o,s,"throw",l)}o(void 0)})}}function Ji(e,t){return QP(e)||XP(e,t)||qP(e,t)||zP()}function zP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qP(e,t){if(e){if(typeof e=="string")return ea(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ea(e,t):void 0}}function ea(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function XP(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function QP(e){if(Array.isArray(e))return e}function ZP(e,t){if(e==null)return{};var n,r,i=JP(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function JP(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ew=J.module("jsapi-components.useMultiPickerProps");function tw(e){var t,n=e.table,r=e.keyColumn,i=e.labelColumn,a=e.iconColumn,o=e.settings,s=e.onChange,l=e.onSelectionChange,u=ZP(e,HP),f=Gn(),h=f.itemHeight,p=Yn(o),m=p.getFormattedString,g=p.timeZone,b=Ie(Ho.copyTableAndApplyFilters,[n]),y=b.data;zn(y);var S=c.useMemo(()=>y==null?null:Qm(y,r),[r,y]),v=c.useMemo(()=>y==null||S==null?null:Zm(y,S,i),[S,i,y]),T=c.useMemo(()=>v==null?[]:[v.name],[v]),w=ds({table:y,iconColumnName:a,keyColumnName:r,labelColumnName:i,formatValue:m}),x=fs({reuseItemsOnTableResize:!0,table:y,itemHeight:h,deserializeRow:w,searchColumnNames:T,timeZone:g}),P=x.onScroll,_=x.onSearchTextChange,C=x.viewportData,A=xe(),D=ge(),L=c.useMemo(()=>{if(y==null||S==null)return[];var ee=[S];if(v!=null&&v!==S&&ee.push(v),a!=null)try{var z=y.findColumn(a);ee.push(z)}catch{}return ee},[y,S,v,a]),j=(t=u.selectedKeys)!==null&&t!==void 0?t:u.defaultSelectedKeys,$=c.useRef(new Set),N=c.useState(new Map),O=Ji(N,2),E=O[0],I=O[1];c.useEffect(()=>{$.current=new Set,I(new Map)},[y]),c.useEffect(function(){if(!(y==null||S==null||j==null||j==="all")){var z=[...j].filter(V=>!$.current.has(String(V)));if(z.length!==0){var k=!1,U=y.findColumn(S.name),B=D.getValueType(U.type);return Zi(function*(){try{var V=[];if(yield Promise.all(z.map(function(){var R=Zi(function*(F){if(!k){var W=yield y.seekRow(0,U,B,F);W!==-1&&V.push(W)}});return function(F){return R.apply(this,arguments)}}())),V.sort((R,F)=>R-F),k||V.length===0)return;var Z=A.RangeSet.ofItems(V),te=yield y.createSnapshot({rows:Z,columns:L});if(k)return;var ce=new Map;te.rows.forEach((R,F)=>{var W=V[F],Y=w(R);ce.set(W,{key:Un(W),item:Y})}),k||(z.forEach(R=>$.current.add(String(R))),I(R=>{var F=new Map(R);return ce.forEach((W,Y)=>F.set(Y,W)),F}))}catch(R){ew.error("Error loading labels for selected keys",R)}})(),()=>{k=!0}}}},[j,y,S,D,A,w,L]);var M=c.useRef(new Map),K=c.useState(new Map),G=Ji(K,2),ie=G[0],Te=G[1],ue=c.useMemo(()=>E.size===0?C.items:C.items.map((ee,z)=>{if(ee.item==null){var k=E.get(z);if(k!=null)return k}return ee}),[C.items,E]);c.useEffect(function(){var z,k=(z=u.selectedKeys)!==null&&z!==void 0?z:u.defaultSelectedKeys,U;k instanceof Array?U=new Set(k.map(String)):k==="all"?U=null:U=new Set;var B=!1;ue.forEach(V=>{if(V.item!=null){var Z=String(V.item.key),te=V.item.textValue;te!=null&&(U==null||U.has(Z))&&M.current.get(Z)!==te&&(M.current.set(Z,te),B=!0)}}),B&&Te(new Map(M.current))},[ue,u.selectedKeys,u.defaultSelectedKeys]);var Q=c.useCallback(ee=>{var z;(z=s??l)===null||z===void 0||z(ee)},[s,l]);return Xi(Xi({},u),{},{normalizedItems:ue,selectedItemLabels:ie,showItemIcons:a!=null,onChange:Q,onScroll:P,onSearchTextChange:_})}var nw=["onInputChange","onSearchTextChange"];function ta(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function na(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ta(Object(n),!0).forEach(function(r){rw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ta(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rw(e,t,n){return(t=iw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iw(e){var t=aw(e,"string");return typeof t=="symbol"?t:t+""}function aw(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ow(e,t){if(e==null)return{};var n,r,i=sw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lw(e){var t=Jm(e),n=t.onInputChange,r=t.onSearchTextChange,i=ow(t,nw),a=c.useRef(!1),o=c.useRef(""),s=c.useCallback(u=>{n==null||n(u),a.current?r(u):(r(""),o.current=u)},[n,r]),l=c.useCallback((u,f)=>{var h;(h=i.onOpenChange)===null||h===void 0||h.call(i,u),u?f==="input"&&r(o.current):r(""),a.current=u},[r,i]);return d.jsx(Is,na(na({},i),{},{onInputChange:s,onOpenChange:l}))}var uw=["table","keyColumn","labelColumn","iconColumn","settings"];function ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ia(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ra(Object(n),!0).forEach(function(r){cw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ra(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cw(e,t,n){return(t=dw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dw(e){var t=fw(e,"string");return typeof t=="symbol"?t:t+""}function fw(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pw(e,t){if(e==null)return{};var n,r,i=hw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function mw(e){var t,n=e.table,r=e.keyColumn,i=e.labelColumn,a=e.iconColumn,o=e.settings,s=pw(e,uw),l=Je(),u=l.scale,f=ls[(t=s.density)!==null&&t!==void 0?t:"regular"][u],h=Yn(o),p=h.getFormattedString,m=ds({table:n,iconColumnName:a,keyColumnName:r,labelColumnName:i,formatValue:p}),g=qn({reuseItemsOnTableResize:!0,table:n,itemHeight:f,deserializeRow:m}),b=g.viewportData,y=g.onScroll;return d.jsx(As,ia(ia({},s),{},{normalizedItems:b.items,showItemIcons:a!=null,onScroll:y}))}var yw=["onInputChange","onOpenChange","onSearchTextChange"];function aa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function oa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aa(Object(n),!0).forEach(function(r){gw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gw(e,t,n){return(t=bw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bw(e){var t=vw(e,"string");return typeof t=="symbol"?t:t+""}function vw(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sw(e,t){if(e==null)return{};var n,r,i=Pw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ww(e){var t=tw(e),n=t.onInputChange,r=t.onOpenChange,i=t.onSearchTextChange,a=Sw(t,yw),o=c.useRef(!1),s=c.useRef(""),l=c.useCallback(f=>{n==null||n(f),o.current?i(f):(i(""),s.current=f)},[n,i]),u=c.useCallback(f=>{r==null||r(f),f?s.current!==""&&i(s.current):i(""),o.current=f},[i,r]);return d.jsx(Rs,oa(oa({},a),{},{onInputChange:l,onOpenChange:u}))}function Ow(e,t){return Ew(e)||Cw(e,t)||Tw(e,t)||xw()}function xw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tw(e,t){if(e){if(typeof e=="string")return sa(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sa(e,t):void 0}}function sa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cw(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Ew(e){if(Array.isArray(e))return e}function _w(e){return typeof e=="object"&&e!=null&&"equals"in e&&typeof e.equals=="function"}function jw(e){return"".concat(e)}function Iw(e){var t=e.column,n=e.table,r=e.filter,i=r===void 0?mo:r,a=e.onChange,o=e.selectedValue,s=e.disabled,l=e.className,u=e.formatValue,f=u===void 0?jw:u,h=e.maxSize,p=h===void 0?1e3:h,m=xe(),g=c.useState([]),b=Ow(g,2),y=b[0],S=b[1];c.useEffect(()=>{if(n==null){S([]);return}var x=t??n.columns[0];n.applyFilter(i);var P=n.setViewport(0,p,[x]);return P.addEventListener(m.Table.EVENT_UPDATED,_=>{var C=_.detail,A=C.rows.map(D=>{var L;return(L=D.get(x))!==null&&L!==void 0?L:null});S(A)}),()=>{P.close()}},[t,m,i,p,n]);var v=c.useMemo(()=>o===void 0?[void 0,...y]:y,[o,y]),T=c.useMemo(()=>v.findIndex(x=>x===o||_w(x)&&x.equals(o)),[o,v]),w=c.useCallback(x=>{var P=parseInt(x,10);a(v[P])},[a,v]);return d.jsx(bo,{className:l,value:T,onChange:w,disabled:s,children:v.map((x,P)=>d.jsx(us,{value:P,children:f(x)},"".concat(P)))})}var la=J.module("useBroadcastChannel");function tr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pe,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nl,n=c.useMemo(()=>new BroadcastChannel(t),[t]);return c.useEffect(()=>()=>{n.close()},[n]),c.useEffect(()=>{function r(i){var a=i.data;if(!Et(a)){la.debug("Ignoring non-deephaven message",a);return}la.debug("event received",a),e(i)}return n.addEventListener("message",r),()=>{n.removeEventListener("message",r)}},[n,e]),n}function nr(e,t){var n=c.useCallback(r=>{il(r.data)?e==null||e(r.data):al(r.data)&&(t==null||t(r.data))},[e,t]);tr(n)}function Aw(e,t){return Lw(e)||Rw(e,t)||kw(e,t)||$w()}function $w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
30
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kw(e,t){if(e){if(typeof e=="string")return ua(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ua(e,t):void 0}}function ua(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Rw(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Lw(e){if(Array.isArray(e))return e}function Dw(e,t,n,r){var i=ge(),a=c.useState(""),o=Aw(a,2),s=o[0],l=o[1],u=et(s,n),f=u.value,h=c.useCallback(y=>{l(y.trim())},[]),p=Ie(i.doesColumnValueExist,[e,t,f,r]),m=p.data,g=p.isLoading,b=g||s!==f?null:m;return{valueTrimmed:s,valueTrimmedDebounced:f,valueExists:b,trimAndUpdateValue:h}}var ca=J.module("useDebouncedViewportSearch"),Mw=200;function Nw(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Mw,r=ge(),i=e.table,a=e.applyFiltersAndRefresh,o=c.useMemo(()=>He(s=>{if(ca.debug("Applying debounced searchText '".concat(s,"'")),i!=null){var l=s.trim();if(l===""){a([]);return}var u=i.findColumn(t),f=r.makeFilterValue(u.type,l),h=[u.filter().contains(f)];a(h)}},n),[a,t,n,i,r]);return c.useEffect(()=>()=>{ca.debug("Cancelling debounced search function"),o.cancel()},[o]),o}var pl=300;function Fw(e){var t=e.viewportData,n=e.columnName,r=e.shouldSelectAllOnNoSelection,i=e.mapItemToValue,a=ge(),o=Os(t,i,Un),s=et(o,pl),l=s.value,u=Ps(l,gs);return c.useMemo(()=>Wn(a,n,u.selection,r,u.isInverted),[n,u,r,a])}function Uw(e,t,n,r){var i=c.useRef("");return i.current=n,c.useMemo(()=>{var a=e.length>0&&e[0].item==null;return!a&&r!=null&&(i.current===""||r.toLowerCase().includes(i.current.toLowerCase()))?[{key:r,item:{[t]:r}},...e]:e},[r,t,e])}function da(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function Ww(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){da(a,r,i,o,s,"next",l)}function s(l){da(a,r,i,o,s,"throw",l)}o(void 0)})}}function Vw(e){var t=e.table,n=e.columnName,r=e.defaultValue,i=e.itemHeight,a=e.topOffset,o=a===void 0?0:a,s=e.value;return c.useCallback(Ww(function*(){if(t==null||s===""||s===r)return o;var l=t.findColumn(n),u=yield t.seekRow(0,l,"String",s),f=r==null?0:1;return(u+f)*i+o}),[n,r,i,t,o,s])}function Bw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"or",n=ge(),r=c.useMemo(()=>Ko(n),[n]);return c.useMemo(()=>Fn(e,r,t),[e,t,r])}function pt(e,t){return Yw(e)||Gw(e,t)||Kw(e,t)||Hw()}function Hw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
31
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kw(e,t){if(e){if(typeof e=="string")return fa(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fa(e,t):void 0}}function fa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Gw(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Yw(e){if(Array.isArray(e))return e}function zw(e){var t=e.maybeTable,n=e.columnName,r=e.mapItemToValue,i=e.filterConditionFactories,a=i===void 0?[]:i,o=e.trimSearchText,s=o===void 0?!1:o,l=e.timeZone,u=Gn(),f=u.itemHeight,h=ge(),p=c.useState(""),m=pt(p,2),g=m[0],b=m[1],y=c.useState(""),S=pt(y,2),v=S[0],T=S[1],w=c.useCallback(R=>{T(s?R.trim():R)},[s]),x=c.useMemo(()=>s?g.trim():g,[g,s]),P=c.useState(null),E=pt(P,2),C=E[0],A=E[1],D=c.useState(()=>new Map),L=pt(D,2),j=L[0],$=L[1],N=Ie(h.doesColumnValueExist,[t,n,v,!1]),O=N.data,_=N.isLoading,I=et(v,fr),M=I.isDebouncing,K=M||_?null:O,G=c.useMemo(()=>Go(h,n,v,l),[v,n,h,l]),ie=c.useMemo(()=>Wn(h,n,new Set(j.keys()),!1,!0),[n,j,h]),Te=Ie(h.createDistinctSortedColumnTable,[t,n,"asc",...a]),ue=Te.data;zn(ue);var Q=qn({table:ue,itemHeight:f,viewportSize:ey,viewportPadding:ty}),ee=x.length>0&&Q.size===0,z=j.has(x),k=Ke(w,fr),U=c.useCallback(R=>{b(R),k(R)},[k]),B=Ke(A,0),V=c.useCallback(R=>{if(b(""),w(""),A(R),B(null),R!=null){var F=Q.viewportData.findItem(R);if(F!=null){var W=r(F);$(Y=>{var de=new Map(Y);return de.set(W,{value:W}),de})}}},[w,B,Q.viewportData,r]),Z=c.useCallback(R=>{$(F=>{if(R.size===0)return F;var W=new Map(F);for(var Y of R)W.set(Y,{value:Y});return W})},[]),te=c.useCallback(R=>{$(F=>{if(R==="all")return new Map;var W=new Map(F);for(var Y of R)W.delete(Y);return W})},[]),ce=ps(Q.table,G,ie);return hs(Q,ce),c.useMemo(()=>({list:Q,hasSearchTextWithZeroResults:ee,searchText:g,searchTextExists:K,searchTextIsInSelectedValues:z,selectedKey:C,selectedValueMap:j,onSearchTextChange:U,onSelectKey:V,onAddValues:Z,onRemoveValues:te}),[ee,Q,Z,te,U,V,g,K,z,C,j])}function pa(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function qw(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){pa(a,r,i,o,s,"next",l)}function s(l){pa(a,r,i,o,s,"throw",l)}o(void 0)})}}function Xw(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=c.useCallback(qw(function*(){var f;return(f=e==null?void 0:e.selectDistinct(e.findColumns(n)))!==null&&f!==void 0?f:null}),[e,...n]),a=Ie(i,[]),o=a.data,s=a.error,l=a.isError,u=a.isLoading;return c.useEffect(()=>()=>{o==null||o.close()},[o]),{distinctTable:o,error:s,isError:l,isLoading:u}}function Qw(e,t){var n=ge(),r=c.useMemo(()=>Yo(n,e),[e,n]);return c.useMemo(()=>Fn(t,r),[t,r])}function Zw(e,t,n){var r=ge();return c.useMemo(()=>zo(r,e,t,n),[e,n,r,t])}const Jw=Object.freeze(Object.defineProperty({__proto__:null,ComboBox:lw,DEBOUNCE_MS:pl,ListView:mw,MultiSelect:ww,Picker:ny,TableDropdown:Iw,TableInput:BP,makeApiContextWrapper:TP,useBroadcastChannel:tr,useBroadcastLoginListener:nr,useCheckIfExistsValue:Dw,useDebouncedViewportSearch:Nw,useDebouncedViewportSelectionFilter:Fw,useFilterConditionFactories:ps,useFilteredItemsWithDefaultValue:Uw,useFormatter:Yn,useGetItemIndexByValue:ry,useGetItemPosition:Vw,useInitializeViewportData:iy,useNotNullOrEmptyFilter:Bw,usePickerWithSelectedValues:zw,useSearchableViewportData:fs,useSelectDistinctTable:Xw,useSetPaddedViewportCallback:ay,useShowOnlyEmptyFilter:Qw,useTable:dl,useTableClose:oy,useTableColumn:fl,useTableListener:gt,useTableSize:sy,useTableUtils:ge,useValueFilter:Zw,useViewportData:qn,useViewportFilter:hs,useWidgetClose:zn},Symbol.toStringTag,{value:"Module"}));function hl(e){var t=Es(),n=t.isEnabled,r=t.isPending,i=t.themeData;return c.useMemo(()=>n?r?null:i?[i]:[]:e==null?null:xo(e),[n,r,i,e])}function eO(e){var t=e.dashboardProps,n=e.componentName,r=e.component,i=e.supportedTypes,a=e.hydrate,o=e.dehydrate,s=t.id,l=t.layout,u=t.registerComponent,f=c.useCallback(h=>{var p=h.dragEvent,m=h.panelId,g=m===void 0?xn():m,b=h.widget,y=b.name,S=b.type,v=S!=null&&(Array.isArray(i)&&i.includes(S)||S===i);if(v){var T={localDashboardId:s,metadata:b};a!=null&&(T=a(T,s));var w={type:"react-component",component:n,props:T,title:y??void 0,id:g},x=l.root;To.openComponent({root:x,config:w,dragEvent:p})}},[n,a,s,l,i]);qo(u,r,a,o),Co(l.eventHub,f)}function tO(e,t){var n=qu(),r=Xu(a=>Eo(a,e,t)),i=c.useCallback(a=>n(_o(e,t,a)),[e,t,n]);return[r,i]}const nO=Object.freeze(Object.defineProperty({__proto__:null,BasePanel:ur,CLOSE_DASHBOARD:af,CREATE_DASHBOARD:of,DEFAULT_DASHBOARD_ID:sf,DH_ID_PROP:lf,Dashboard:sr,DashboardIdContext:uf,DashboardLayout:cf,DashboardUtils:df,GLPropTypes:ff,LayoutManagerContext:pf,LayoutUtils:To,LazyDashboard:bd,Panel:ur,PanelErrorBoundary:hf,PanelEvent:mf,PanelIdContext:yf,PanelManager:gf,PersistentStateContext:bf,PersistentStateProvider:jo,SET_DASHBOARD_DATA:vf,TabEvent:Sf,assertIsDashboardPluginProps:Sh,canHaveRef:So,default:sr,dehydrate:Pf,emitCloseDashboard:wf,emitCreateDashboard:Of,emitCycleToNextStack:xf,emitCycleToNextTab:Tf,emitCycleToPreviousStack:Cf,emitCycleToPreviousTab:Ef,emitPanelClose:_f,emitPanelOpen:jf,getAllDashboardsData:If,getClosedPanelsForDashboard:Af,getDashboardData:$f,getOpenedPanelMapForDashboard:kf,getPluginDataForDashboard:Eo,getPluginDataMapForDashboard:Rf,hydrate:Lf,isDashboardPluginProps:Ph,isWrappedComponent:Po,listenForCloseDashboard:Df,listenForCreateDashboard:Mf,listenForCycleToNextStack:Nf,listenForCycleToNextTab:Ff,listenForCycleToPreviousStack:Uf,listenForCycleToPreviousTab:Wf,listenForPanelClose:Vf,listenForPanelOpen:Bf,reducers:Hf,setDashboardData:Kf,setDashboardPluginData:_o,updateDashboardData:Gf,useAppDispatch:Yf,useAppSelector:Io,useAppStore:zf,useCloseDashboardListener:qf,useCreateDashboardListener:Xf,useCycleToNextStackListener:Qf,useCycleToNextTabListener:Zf,useCycleToPreviousStackListener:Jf,useCycleToPreviousTabListener:ep,useDashboardId:tp,useDashboardPanel:eO,useDashboardPluginData:tO,useDhId:np,useLayoutManager:wh,useListener:rp,usePanelCloseListener:ip,usePanelId:ap,usePanelOpenListener:Co,usePanelRegistration:qo,usePersistentState:Xo},Symbol.toStringTag,{value:"Module"}));function rO(){var e=Ao(),t=c.useMemo(()=>$o(e),[e]);return t}const iO=Object.freeze(Object.defineProperty({__proto__:null,PersistentStateProvider:jo,PluginType:ko,PluginsContext:Rt,WidgetView:op,createChainedComponent:sp,createChainedPanelComponent:lp,createPanelMiddleware:up,createWidgetMiddleware:cp,getDashboardPlugins:vd,getIconForPlugin:dp,getPluginModuleValue:fp,getPluginsElementMap:$o,getThemeDataFromPlugins:xo,getWidgetDashboardPlugin:pp,groupByDependencyLevel:Ro,isAuthPlugin:Lo,isDashboardPlugin:hp,isElementPlugin:mp,isLegacyAuthPlugin:rn,isLegacyDashboardPlugin:yp,isLegacyPlugin:gp,isLegacyTablePlugin:bp,isMultiPlugin:Do,isPlugin:vp,isTablePlugin:Sp,isThemePlugin:Pp,isWidgetDashboardPlugin:wp,isWidgetMiddlewarePlugin:Op,isWidgetPlugin:xp,pluginSupportsType:Tp,pluginSupportsTypeAsDashboard:Cp,processLoadedModule:Mo,registerPlugin:Ep,useCustomThemes:hl,useDashboardPlugins:Sd,usePersistentState:Xo,usePlugins:Ao,usePluginsElementMap:rO},Symbol.toStringTag,{value:"Module"}));function aO(e){if(e==null)return!1;var t=e;return t.Component!==void 0&&typeof t.isAvailable=="function"}var ml="io.deephaven.auth.AnonymousAuthenticationHandler",oO="io.deephaven.authentication.psk.PskAuthenticationHandler";function ha(e,t,n){return(t=sO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sO(e){var t=lO(e,"string");return typeof t=="symbol"?t:t+""}function lO(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class yl extends Error{constructor(){super(...arguments),ha(this,"name","AuthenticationError"),ha(this,"isAuthenticationError",!0)}}function ma(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function uO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){ma(a,r,i,o,s,"next",l)}function s(l){ma(a,r,i,o,s,"throw",l)}o(void 0)})}}function ya(e,t){return pO(e)||fO(e,t)||dO(e,t)||cO()}function cO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
31
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kw(e,t){if(e){if(typeof e=="string")return fa(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fa(e,t):void 0}}function fa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Gw(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Yw(e){if(Array.isArray(e))return e}function zw(e){var t=e.maybeTable,n=e.columnName,r=e.mapItemToValue,i=e.filterConditionFactories,a=i===void 0?[]:i,o=e.trimSearchText,s=o===void 0?!1:o,l=e.timeZone,u=Gn(),f=u.itemHeight,h=ge(),p=c.useState(""),m=pt(p,2),g=m[0],b=m[1],y=c.useState(""),S=pt(y,2),v=S[0],T=S[1],w=c.useCallback(R=>{T(s?R.trim():R)},[s]),x=c.useMemo(()=>s?g.trim():g,[g,s]),P=c.useState(null),_=pt(P,2),C=_[0],A=_[1],D=c.useState(()=>new Map),L=pt(D,2),j=L[0],$=L[1],N=Ie(h.doesColumnValueExist,[t,n,v,!1]),O=N.data,E=N.isLoading,I=et(v,fr),M=I.isDebouncing,K=M||E?null:O,G=c.useMemo(()=>Go(h,n,v,l),[v,n,h,l]),ie=c.useMemo(()=>Wn(h,n,new Set(j.keys()),!1,!0),[n,j,h]),Te=Ie(h.createDistinctSortedColumnTable,[t,n,"asc",...a]),ue=Te.data;zn(ue);var Q=qn({table:ue,itemHeight:f,viewportSize:ey,viewportPadding:ty}),ee=x.length>0&&Q.size===0,z=j.has(x),k=Ke(w,fr),U=c.useCallback(R=>{b(R),k(R)},[k]),B=Ke(A,0),V=c.useCallback(R=>{if(b(""),w(""),A(R),B(null),R!=null){var F=Q.viewportData.findItem(R);if(F!=null){var W=r(F);$(Y=>{var de=new Map(Y);return de.set(W,{value:W}),de})}}},[w,B,Q.viewportData,r]),Z=c.useCallback(R=>{$(F=>{if(R.size===0)return F;var W=new Map(F);for(var Y of R)W.set(Y,{value:Y});return W})},[]),te=c.useCallback(R=>{$(F=>{if(R==="all")return new Map;var W=new Map(F);for(var Y of R)W.delete(Y);return W})},[]),ce=ps(Q.table,G,ie);return hs(Q,ce),c.useMemo(()=>({list:Q,hasSearchTextWithZeroResults:ee,searchText:g,searchTextExists:K,searchTextIsInSelectedValues:z,selectedKey:C,selectedValueMap:j,onSearchTextChange:U,onSelectKey:V,onAddValues:Z,onRemoveValues:te}),[ee,Q,Z,te,U,V,g,K,z,C,j])}function pa(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function qw(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){pa(a,r,i,o,s,"next",l)}function s(l){pa(a,r,i,o,s,"throw",l)}o(void 0)})}}function Xw(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=c.useCallback(qw(function*(){var f;return(f=e==null?void 0:e.selectDistinct(e.findColumns(n)))!==null&&f!==void 0?f:null}),[e,...n]),a=Ie(i,[]),o=a.data,s=a.error,l=a.isError,u=a.isLoading;return c.useEffect(()=>()=>{o==null||o.close()},[o]),{distinctTable:o,error:s,isError:l,isLoading:u}}function Qw(e,t){var n=ge(),r=c.useMemo(()=>Yo(n,e),[e,n]);return c.useMemo(()=>Fn(t,r),[t,r])}function Zw(e,t,n){var r=ge();return c.useMemo(()=>zo(r,e,t,n),[e,n,r,t])}const Jw=Object.freeze(Object.defineProperty({__proto__:null,ComboBox:lw,DEBOUNCE_MS:pl,ListView:mw,MultiSelect:ww,Picker:ny,TableDropdown:Iw,TableInput:BP,makeApiContextWrapper:TP,useBroadcastChannel:tr,useBroadcastLoginListener:nr,useCheckIfExistsValue:Dw,useDebouncedViewportSearch:Nw,useDebouncedViewportSelectionFilter:Fw,useFilterConditionFactories:ps,useFilteredItemsWithDefaultValue:Uw,useFormatter:Yn,useGetItemIndexByValue:ry,useGetItemPosition:Vw,useInitializeViewportData:iy,useNotNullOrEmptyFilter:Bw,usePickerWithSelectedValues:zw,useSearchableViewportData:fs,useSelectDistinctTable:Xw,useSetPaddedViewportCallback:ay,useShowOnlyEmptyFilter:Qw,useTable:dl,useTableClose:oy,useTableColumn:fl,useTableListener:gt,useTableSize:sy,useTableUtils:ge,useValueFilter:Zw,useViewportData:qn,useViewportFilter:hs,useWidgetClose:zn},Symbol.toStringTag,{value:"Module"}));function hl(e){var t=Es(),n=t.isEnabled,r=t.isPending,i=t.themeData;return c.useMemo(()=>n?r?null:i?[i]:[]:e==null?null:xo(e),[n,r,i,e])}function eO(e){var t=e.dashboardProps,n=e.componentName,r=e.component,i=e.supportedTypes,a=e.hydrate,o=e.dehydrate,s=t.id,l=t.layout,u=t.registerComponent,f=c.useCallback(h=>{var p=h.dragEvent,m=h.panelId,g=m===void 0?xn():m,b=h.widget,y=b.name,S=b.type,v=S!=null&&(Array.isArray(i)&&i.includes(S)||S===i);if(v){var T={localDashboardId:s,metadata:b};a!=null&&(T=a(T,s));var w={type:"react-component",component:n,props:T,title:y??void 0,id:g},x=l.root;To.openComponent({root:x,config:w,dragEvent:p})}},[n,a,s,l,i]);qo(u,r,a,o),Co(l.eventHub,f)}function tO(e,t){var n=qu(),r=Xu(a=>Eo(a,e,t)),i=c.useCallback(a=>n(_o(e,t,a)),[e,t,n]);return[r,i]}const nO=Object.freeze(Object.defineProperty({__proto__:null,BasePanel:ur,CLOSE_DASHBOARD:af,CREATE_DASHBOARD:of,DEFAULT_DASHBOARD_ID:sf,DH_ID_PROP:lf,Dashboard:sr,DashboardIdContext:uf,DashboardLayout:cf,DashboardUtils:df,GLPropTypes:ff,LayoutManagerContext:pf,LayoutUtils:To,LazyDashboard:bd,Panel:ur,PanelErrorBoundary:hf,PanelEvent:mf,PanelIdContext:yf,PanelManager:gf,PersistentStateContext:bf,PersistentStateProvider:jo,SET_DASHBOARD_DATA:vf,TabEvent:Sf,assertIsDashboardPluginProps:Sh,canHaveRef:So,default:sr,dehydrate:Pf,emitCloseDashboard:wf,emitCreateDashboard:Of,emitCycleToNextStack:xf,emitCycleToNextTab:Tf,emitCycleToPreviousStack:Cf,emitCycleToPreviousTab:Ef,emitPanelClose:_f,emitPanelOpen:jf,getAllDashboardsData:If,getClosedPanelsForDashboard:Af,getDashboardData:$f,getOpenedPanelMapForDashboard:kf,getPluginDataForDashboard:Eo,getPluginDataMapForDashboard:Rf,hydrate:Lf,isDashboardPluginProps:Ph,isWrappedComponent:Po,listenForCloseDashboard:Df,listenForCreateDashboard:Mf,listenForCycleToNextStack:Nf,listenForCycleToNextTab:Ff,listenForCycleToPreviousStack:Uf,listenForCycleToPreviousTab:Wf,listenForPanelClose:Vf,listenForPanelOpen:Bf,reducers:Hf,setDashboardData:Kf,setDashboardPluginData:_o,updateDashboardData:Gf,useAppDispatch:Yf,useAppSelector:Io,useAppStore:zf,useCloseDashboardListener:qf,useCreateDashboardListener:Xf,useCycleToNextStackListener:Qf,useCycleToNextTabListener:Zf,useCycleToPreviousStackListener:Jf,useCycleToPreviousTabListener:ep,useDashboardId:tp,useDashboardPanel:eO,useDashboardPluginData:tO,useDhId:np,useLayoutManager:wh,useListener:rp,usePanelCloseListener:ip,usePanelId:ap,usePanelOpenListener:Co,usePanelRegistration:qo,usePersistentState:Xo},Symbol.toStringTag,{value:"Module"}));function rO(){var e=Ao(),t=c.useMemo(()=>$o(e),[e]);return t}const iO=Object.freeze(Object.defineProperty({__proto__:null,PersistentStateProvider:jo,PluginType:ko,PluginsContext:Rt,WidgetView:op,createChainedComponent:sp,createChainedPanelComponent:lp,createPanelMiddleware:up,createWidgetMiddleware:cp,getDashboardPlugins:vd,getIconForPlugin:dp,getPluginModuleValue:fp,getPluginsElementMap:$o,getThemeDataFromPlugins:xo,getWidgetDashboardPlugin:pp,groupByDependencyLevel:Ro,isAuthPlugin:Lo,isDashboardPlugin:hp,isElementPlugin:mp,isLegacyAuthPlugin:rn,isLegacyDashboardPlugin:yp,isLegacyPlugin:gp,isLegacyTablePlugin:bp,isMultiPlugin:Do,isPlugin:vp,isTablePlugin:Sp,isThemePlugin:Pp,isWidgetDashboardPlugin:wp,isWidgetMiddlewarePlugin:Op,isWidgetPlugin:xp,pluginSupportsType:Tp,pluginSupportsTypeAsDashboard:Cp,processLoadedModule:Mo,registerPlugin:Ep,useCustomThemes:hl,useDashboardPlugins:Sd,usePersistentState:Xo,usePlugins:Ao,usePluginsElementMap:rO},Symbol.toStringTag,{value:"Module"}));function aO(e){if(e==null)return!1;var t=e;return t.Component!==void 0&&typeof t.isAvailable=="function"}var ml="io.deephaven.auth.AnonymousAuthenticationHandler",oO="io.deephaven.authentication.psk.PskAuthenticationHandler";function ha(e,t,n){return(t=sO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sO(e){var t=lO(e,"string");return typeof t=="symbol"?t:t+""}function lO(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class yl extends Error{constructor(){super(...arguments),ha(this,"name","AuthenticationError"),ha(this,"isAuthenticationError",!0)}}function ma(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function uO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){ma(a,r,i,o,s,"next",l)}function s(l){ma(a,r,i,o,s,"throw",l)}o(void 0)})}}function ya(e,t){return pO(e)||fO(e,t)||dO(e,t)||cO()}function cO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
32
32
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dO(e,t){if(e){if(typeof e=="string")return ga(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ga(e,t):void 0}}function ga(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function pO(e){if(Array.isArray(e))return e}var ba=J.module("AuthPluginBase");function rr(e){var t=e.children,n=e.getLoginOptions,r=Qe(),i=c.useState(),a=ya(i,2),o=a[0],s=a[1],l=c.useState(!1),u=ya(l,2),f=u[0],h=u[1];return c.useEffect(()=>{var p=!1;function m(){if(p)throw new No("Login canceled.")}function g(){return b.apply(this,arguments)}function b(){return b=uO(function*(){try{var y=yield n();m(),ba.info("Logging in..."),yield r.login(y),m(),h(!0)}catch(T){if(!p){var S;ba.error("Unable to login:",T);var v=(S=Ge(T))!==null&&S!==void 0?S:"Unable to login. Verify credentials.";s(new yl(v)),h(!1)}}}),b.apply(this,arguments)}return g(),()=>{p=!0}},[r,n]),f?d.jsx(d.Fragment,{children:t}):d.jsx(Ae,{"data-testid":"auth-base-loading",isLoading:o==null,isLoaded:!1,errorMessage:Ge(o)})}var hO={canLogout:!1};function mO(e){var t=e.children,n=xe(),r=c.useCallback(()=>({type:n.CoreClient.LOGIN_TYPE_ANONYMOUS}),[n]);return d.jsx(rr,{getLoginOptions:r,children:d.jsx(_t.Provider,{value:hO,children:t})})}var gl={Component:mO,isAvailable:e=>e.includes(ml)};function va(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function yO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){va(a,r,i,o,s,"next",l)}function s(l){va(a,r,i,o,s,"throw",l)}o(void 0)})}}var gO=J.module("AuthPluginParent"),bO={canLogout:!1};function vO(e){return e!=null&&typeof e.type=="string"}function SO(){return yn.apply(this,arguments)}function yn(){return yn=yO(function*(){gO.info("Logging in by delegating to parent window...");var e=yield kn(el);if(!vO(e))throw new Error("Unexpected login options response: ".concat(e));return e}),yn.apply(this,arguments)}function PO(){var e;return(e=new URLSearchParams(window.location.search).get("authProvider"))!==null&&e!==void 0?e:""}function wO(e){var t=e.children;return d.jsx(rr,{getLoginOptions:SO,children:d.jsx(_t.Provider,{value:bO,children:t})})}var bl={Component:wO,isAvailable:()=>_n()!=null&&PO()==="parent"};function vl(e){var t=e.children,n=e.errorMessage,r=e.isLoggingIn,i=r===void 0?!1:r,a=e.onSubmit;return d.jsxs("form",{className:"login-form",onSubmit:o=>{o.preventDefault(),o.stopPropagation(),a==null||a(o)},children:[d.jsx("div",{className:"flex-spacer"}),d.jsxs("div",{className:"flex-wrapper",children:[d.jsx("fieldset",{disabled:i,className:"container-fluid",children:t}),d.jsx("div",{className:"form-group d-flex justify-content-end align-items-center mb-0",children:d.jsxs("button",{type:"submit",className:H("btn btn-primary",{"btn-spinner":i},{"btn-cancelable":i}),"data-testid":"btn-login",children:[i&&d.jsxs("span",{children:[d.jsx(Tt,{className:"mr-2 loading-spinner-vertical-align"}),d.jsx("span",{className:"btn-normal-content",children:"Logging in"}),d.jsx("span",{className:"btn-hover-content",children:"Cancel"})]}),!i&&"Login"]})})]}),d.jsx("div",{className:"flex-spacer",children:n!=null&&d.jsx("p",{className:"error-message mb-0",role:"alert",children:"".concat(n)})})]})}function Sl(e){var t=e.children,n=e.logoPath,r=n===void 0?"./logo.png":n;return d.jsxs("div",{className:"login-container",children:[d.jsx(zs,{}),d.jsxs("div",{className:"login-box",children:[d.jsx("div",{className:"logo",children:d.jsx("img",{src:r,alt:"Deephaven Data Labs"})}),t,d.jsxs("p",{className:"footer",children:["© 2016-",new Date().getFullYear()," Deephaven Data Labs LLC. Patent Pending."]})]})]})}function Sa(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function Gt(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Sa(a,r,i,o,s,"next",l)}function s(l){Sa(a,r,i,o,s,"throw",l)}o(void 0)})}}function Ue(e,t){return CO(e)||TO(e,t)||xO(e,t)||OO()}function OO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
33
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xO(e,t){if(e){if(typeof e=="string")return Pa(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pa(e,t):void 0}}function Pa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function TO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function CO(e){if(Array.isArray(e))return e}var gn="io.deephaven.authentication.psk.PskAuthenticationHandler",Pl="psk",bn="io.deephaven.web.client.auth.psk.token",Le=J.module("AuthPluginPsk");function EO(){return new URLSearchParams(window.location.search).get(Pl)}function _O(){Le.debug2("clearWindowToken");var e=new URL(window.location.href);e.searchParams.delete(Pl),window.history.replaceState(null,"",e.href)}function wa(){var e;return(e=Jt.get(bn))!==null&&e!==void 0?e:null}function Yt(e){Le.debug2("Storing token in cookie",e),e!=null?Jt.set(bn,e,{secure:!0,sameSite:"strict"}):Jt.remove(bn)}function jO(e){var t=e.children,n=e.logoPath,r=Qe(),i=c.useRef(null),a=c.useRef(null),o=c.useState(),s=Ue(o,2),l=s[0],u=s[1],f=c.useState(!1),h=Ue(f,2),p=h[0],m=h[1],g=c.useState(!1),b=Ue(g,2),y=b[0],S=b[1],v=c.useState(!1),T=Ue(v,2),w=T[0],x=T[1],P=c.useState(""),E=Ue(P,2),C=E[0],A=E[1],D=c.useCallback(function(){var O=Gt(function*(_){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Le.info("Logging in..."),x(!0);var M=null;try{if(M=r.login({type:gn,token:_}),a.current=M,yield M,Le.info("Logged in successfully"),a.current!==M)return;Yt(_),S(!0)}catch(ie){if(a.current!==M)return;if(m(!0),I){var K;Le.error("Unable to login",ie);var G=(K=Ge(ie))!==null&&K!==void 0?K:"Unable to login: Verify credentials.";u(new yl(G))}}x(!1)});return function(_){return O.apply(this,arguments)}}(),[r]),L=c.useCallback(()=>{a.current=null,x(!1)},[]),j=c.useCallback(Gt(function*(){Le.debug("onLogin");var O=wa();y||w||O==null||D(O,!1)}),[y,w,D]),$=c.useCallback(()=>{Yt(null)},[]);nr(j,$),c.useEffect(()=>{var O=!1;function _(){return I.apply(this,arguments)}function I(){return I=Gt(function*(){var M,K=(M=EO())!==null&&M!==void 0?M:wa();if(_O(),K==null){m(!0);return}x(!0);try{yield r.login({type:gn,token:K}),O||(Yt(K),S(!0),x(!1))}catch{O||(m(!0),x(!1))}}),I.apply(this,arguments)}return _(),()=>{O=!0}},[r]);var N=c.useCallback(()=>{w?L():D(C)},[L,w,D,C]);return c.useEffect(function(){var _;(_=i.current)===null||_===void 0||_.focus()},[i,p]),d.jsxs(d.Fragment,{children:[y&&t,p&&d.jsx(Dn,{in:!y,mountOnEnter:!0,unmountOnExit:!0,children:d.jsx(Sl,{logoPath:n,children:d.jsx(vl,{errorMessage:Ge(l),isLoggingIn:w,onSubmit:N,children:d.jsxs("div",{className:"form-group",children:[d.jsx("label",{htmlFor:"auth-psk-token-input",children:"Token"}),d.jsx("input",{id:"auth-psk-token-input",name:"token",className:"input-token form-control",type:"text",autoComplete:"username",autoCapitalize:"none",autoCorrect:"off",spellCheck:"false",ref:i,value:C,onChange:O=>{u(void 0),A(O.target.value)}})]})})})}),d.jsx(Ae,{"data-testid":"auth-psk-loading",isLoaded:y||p,isLoading:!y&&!p})]})}var wl={Component:jO,isAvailable:e=>e.includes(gn)};function Oa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oa(Object(n),!0).forEach(function(r){IO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IO(e,t,n){return(t=AO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AO(e){var t=$O(e,"string");return typeof t=="symbol"?t:t+""}function $O(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kO=J.module("UserUtils");function Ol(e,t){return e.get("internal.webClient.appInit.".concat(t))}function xl(e){var t,n,r,i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};function s(y){return Ol(e,y)}function l(y,S){var v=s(y);return v==="true"?!0:v==="false"?!1:(v!==void 0&&kO.warn("Unexpected value for ".concat(y,": ").concat(v)),S)}var u=(t=s("name"))!==null&&t!==void 0?t:"",f=(n=s("operateAs"))!==null&&n!==void 0?n:u,h=(r=(i=s("groups"))===null||i===void 0?void 0:i.split(","))!==null&&r!==void 0?r:[],p=l("canCopy",!0),m=l("canDownloadCsv",!0),g=l("canUsePanels",!0),b=l("canLogout",!0);return zt(zt({name:u,operateAs:f,groups:h},a),{},{permissions:zt({canUsePanels:g,canCopy:p,canDownloadCsv:m,canLogout:b},o)})}const RO=Object.freeze(Object.defineProperty({__proto__:null,AUTH_HANDLER_TYPE_ANONYMOUS:ml,AUTH_HANDLER_TYPE_PSK:oO,AuthPluginAnonymous:gl,AuthPluginBase:rr,AuthPluginParent:bl,AuthPluginPsk:wl,Login:Sl,LoginForm:vl,UserContext:uo,UserOverrideContext:co,UserPermissionsOverrideContext:_t,getAppInitValue:Ol,getUserFromConfig:xl,isAuthPlugin:aO},Symbol.toStringTag,{value:"Module"}));function Me(e,t,n){return(t=LO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LO(e){var t=DO(e,"string");return typeof t=="symbol"?t:t+""}function DO(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class q extends Qo{static get theme(){return q._theme==null&&(q._theme=Fo()),q._theme}static makeRandomSeries(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:100,i=[],a=[],o=[],s=[],l=new Date("2018-06-01"),u=0;u<r;u+=1){var f=new Date(l.getFullYear(),l.getMonth(),l.getDate()+u-r);i.push("".concat(f.getFullYear(),"-").concat(f.getMonth()+1,"-").concat(f.getDate()));var h=(Math.sin(u/r*t)*r/3+Math.cos(u*.2)*r/6+Math.sin(u*.5)*r/10+q.random()*r/5+u*q.smoothing)*n;h=Math.round(h*100)/100,a.push(h),s.push(40+u*q.smoothing),o.push(Math.sin(u/r*t)*r/3+q.random()*r/10+u*q.smoothing)}return{x:i,y:a,s:o,l:s}}static makeScatter(t){return{name:"SCTR",x:t.x,y:t.y,type:"scatter",mode:"markers",hoverinfo:"skip",marker:{size:5}}}static makeArea(t){return{name:"AREA",x:t.x,y:t.s,type:"scatter",mode:"line",fill:"tozeroy",hoverinfo:"all",line:{width:3}}}static makeTrendline(t){return{name:"Trendline <br>R<sup>2</sup> = 0.91",x:t.x,y:t.l,type:"scatter",mode:"line",hoverinfo:"skip",line:{width:3,dash:"dot"}}}static makeErrorBand(t){for(var n=[],r=[],i=0;i<t.y.length;i+=1){var a=t.y[i];n[i]=Math.round((a+18)*100)/100,r[i]=Math.round((a-18)*100)/100}var o=n.concat(r.reverse());return{name:"error",x:t.x.concat(t.x.slice().reverse()),y:o,type:"scatter",mode:"line",hoverinfo:"skip",fill:"toself",line:{width:0,color:q.theme.error_band_line_color,shape:"spline"}}}static makeLine(t){return{name:"LINE",x:t.x,y:t.y,type:"scatter",mode:"line",hoverinfo:"x+y+text+name",line:{width:3}}}static makeRandomData(){var t=q.makeRandomSeries(6),n=q.makeArea(t),r=q.makeTrendline(t),i=q.makeRandomSeries(2),a=q.makeLine(i),o=q.makeErrorBand(i);return[n,r,a,o]}static makeDefaultLayout(t){var n={template:new Zo(t).makeDefaultTemplate(q.theme)};return n.title={text:"Chart"},n.xaxis={title:{text:"Datestamp"}},n.yaxis={title:{text:"Price"}},n}constructor(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.data,i=r===void 0?q.makeRandomData():r,a=n.layout,o=a===void 0?q.makeDefaultLayout(t):a,s=n.filterFields,l=s===void 0?[]:s;super(t),Me(this,"data",void 0),Me(this,"filterFields",void 0),Me(this,"layout",void 0),this.data=i,this.layout=o,this.filterFields=l}getData(){return this.data}getLayout(){return this.layout}getFilterColumnMap(){for(var t=new Map,n=0;n<this.filterFields.length;n+=1){var r=this.filterFields[n],i="java.lang.String";t.set(r,{name:r,type:i})}return t}isFilterRequired(){return this.filterFields.length>0}setFilter(){this.fireUpdate(this.data)}}Me(q,"random",Math.random.bind(Math));Me(q,"smoothing",1.5);Me(q,"_theme",void 0);const MO=Object.freeze(Object.defineProperty({__proto__:null,Chart:Oh,ChartModel:Qo,ChartModelFactory:xh,ChartThemeContext:_p,ChartThemeProvider:Uo,ChartUtils:Zo,DownsamplingError:Jh,FigureChartModel:Th,MockChartModel:q,Plot:jp,defaultChartTheme:Fo,isFigureChartModel:Ch,isWebGLSupported:Eh,useChartTheme:Ip},Symbol.toStringTag,{value:"Module"}));function Tl(e){var t=e.children,n=jt(),r=n.activeThemes;return c.useEffect(function(){r!=null&&Wo.initTheme()},[r]),d.jsx(d.Fragment,{children:t})}var NO={$schema:"http://json-schema.org/draft-07/schema#",title:"Options",type:"object",properties:{"allowed-confusables":{description:'A list of allowed "confusable" Unicode characters to ignore when enforcing `RUF001`, `RUF002`, and `RUF003`.',deprecated:!0,type:["array","null"],items:{type:"string",maxLength:1,minLength:1}},builtins:{description:"A list of builtins to treat as defined references, in addition to the system builtins.",type:["array","null"],items:{type:"string"}},"cache-dir":{description:"A path to the cache directory.\n\nBy default, Ruff stores cache results in a `.ruff_cache` directory in the current project root.\n\nHowever, Ruff will also respect the `RUFF_CACHE_DIR` environment variable, which takes precedence over that default.\n\nThis setting will override even the `RUFF_CACHE_DIR` environment variable, if set.",type:["string","null"]},"dummy-variable-rgx":{description:'A regular expression used to identify "dummy" variables, or those which should be ignored when enforcing (e.g.) unused-variable rules. The default expression matches `_`, `__`, and `_var`, but not `_var_`.',deprecated:!0,type:["string","null"]},exclude:{description:"A list of file patterns to exclude from formatting and linting.\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).\n\nNote that you'll typically want to use [`extend-exclude`](#extend-exclude) to modify the excluded paths.",type:["array","null"],items:{type:"string"}},"explicit-preview-rules":{description:"Whether to require exact codes to select preview rules. When enabled, preview rules will not be selected by prefixes — the full code of each preview rule will be required to enable the rule.",deprecated:!0,type:["boolean","null"]},extend:{description:"A path to a local `pyproject.toml` file to merge into this configuration. User home directory and environment variables will be expanded.\n\nTo resolve the current `pyproject.toml` file, Ruff will first resolve this base configuration file, then merge in any properties defined in the current configuration file.",type:["string","null"]},"extend-exclude":{description:"A list of file patterns to omit from formatting and linting, in addition to those specified by [`exclude`](#exclude).\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"extend-fixable":{description:"A list of rule codes or prefixes to consider fixable, in addition to those specified by [`fixable`](#lint_fixable).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-ignore":{description:"A list of rule codes or prefixes to ignore, in addition to those specified by `ignore`.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-include":{description:"A list of file patterns to include when linting, in addition to those specified by [`include`](#include).\n\nInclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension.\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"extend-per-file-ignores":{description:"A list of mappings from file pattern to rule codes or prefixes to exclude, in addition to any rules excluded by [`per-file-ignores`](#lint_per-file-ignores).",deprecated:!0,type:["object","null"],additionalProperties:{type:"array",items:{$ref:"#/definitions/RuleSelector"}}},"extend-safe-fixes":{description:"A list of rule codes or prefixes for which unsafe fixes should be considered safe.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-select":{description:"A list of rule codes or prefixes to enable, in addition to those specified by [`select`](#lint_select).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unfixable":{description:"A list of rule codes or prefixes to consider non-auto-fixable, in addition to those specified by [`unfixable`](#lint_unfixable).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unsafe-fixes":{description:"A list of rule codes or prefixes for which safe fixes should be considered unsafe.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},external:{description:"A list of rule codes or prefixes that are unsupported by Ruff, but should be preserved when (e.g.) validating `# noqa` directives. Useful for retaining `# noqa` directives that cover plugins not yet implemented by Ruff.",deprecated:!0,type:["array","null"],items:{type:"string"}},fix:{description:"Enable fix behavior by-default when running `ruff` (overridden by the `--fix` and `--no-fix` command-line flags). Only includes automatic fixes unless `--unsafe-fixes` is provided.",type:["boolean","null"]},"fix-only":{description:"Like [`fix`](#fix), but disables reporting on leftover violation. Implies [`fix`](#fix).",type:["boolean","null"]},fixable:{description:"A list of rule codes or prefixes to consider fixable. By default, all rules are considered fixable.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"flake8-annotations":{description:"Options for the `flake8-annotations` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8AnnotationsOptions"},{type:"null"}]},"flake8-bandit":{description:"Options for the `flake8-bandit` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BanditOptions"},{type:"null"}]},"flake8-boolean-trap":{description:"Options for the `flake8-boolean-trap` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BooleanTrapOptions"},{type:"null"}]},"flake8-bugbear":{description:"Options for the `flake8-bugbear` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BugbearOptions"},{type:"null"}]},"flake8-builtins":{description:"Options for the `flake8-builtins` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BuiltinsOptions"},{type:"null"}]},"flake8-comprehensions":{description:"Options for the `flake8-comprehensions` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ComprehensionsOptions"},{type:"null"}]},"flake8-copyright":{description:"Options for the `flake8-copyright` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8CopyrightOptions"},{type:"null"}]},"flake8-errmsg":{description:"Options for the `flake8-errmsg` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ErrMsgOptions"},{type:"null"}]},"flake8-gettext":{description:"Options for the `flake8-gettext` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8GetTextOptions"},{type:"null"}]},"flake8-implicit-str-concat":{description:"Options for the `flake8-implicit-str-concat` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ImplicitStrConcatOptions"},{type:"null"}]},"flake8-import-conventions":{description:"Options for the `flake8-import-conventions` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ImportConventionsOptions"},{type:"null"}]},"flake8-pytest-style":{description:"Options for the `flake8-pytest-style` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8PytestStyleOptions"},{type:"null"}]},"flake8-quotes":{description:"Options for the `flake8-quotes` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8QuotesOptions"},{type:"null"}]},"flake8-self":{description:"Options for the `flake8_self` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8SelfOptions"},{type:"null"}]},"flake8-tidy-imports":{description:"Options for the `flake8-tidy-imports` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8TidyImportsOptions"},{type:"null"}]},"flake8-type-checking":{description:"Options for the `flake8-type-checking` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8TypeCheckingOptions"},{type:"null"}]},"flake8-unused-arguments":{description:"Options for the `flake8-unused-arguments` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8UnusedArgumentsOptions"},{type:"null"}]},"force-exclude":{description:"Whether to enforce [`exclude`](#exclude) and [`extend-exclude`](#extend-exclude) patterns, even for paths that are passed to Ruff explicitly. Typically, Ruff will lint any paths passed in directly, even if they would typically be excluded. Setting `force-exclude = true` will cause Ruff to respect these exclusions unequivocally.\n\nThis is useful for [`pre-commit`](https://pre-commit.com/), which explicitly passes all changed files to the [`ruff-pre-commit`](https://github.com/astral-sh/ruff-pre-commit) plugin, regardless of whether they're marked as excluded by Ruff's own settings.",type:["boolean","null"]},format:{description:"Options to configure code formatting.",anyOf:[{$ref:"#/definitions/FormatOptions"},{type:"null"}]},ignore:{description:"A list of rule codes or prefixes to ignore. Prefixes can specify exact rules (like `F841`), entire categories (like `F`), or anything in between.\n\nWhen breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively), more specific prefixes override less specific prefixes.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"ignore-init-module-imports":{description:"Avoid automatically removing unused imports in `__init__.py` files. Such imports will still be flagged, but with a dedicated message suggesting that the import is either added to the module's `__all__` symbol, or re-exported with a redundant alias (e.g., `import os as os`).\n\nThis option is enabled by default, but you can opt-in to removal of imports via an unsafe fix.",deprecated:!0,type:["boolean","null"]},include:{description:"A list of file patterns to include when linting.\n\nInclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension. `pyproject.toml` is included here not for configuration but because we lint whether e.g. the `[project]` matches the schema.\n\nNotebook files (`.ipynb` extension) are included by default on Ruff 0.6.0+.\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"indent-width":{description:`The number of spaces per indentation level (tab).
33
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xO(e,t){if(e){if(typeof e=="string")return Pa(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pa(e,t):void 0}}function Pa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function TO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function CO(e){if(Array.isArray(e))return e}var gn="io.deephaven.authentication.psk.PskAuthenticationHandler",Pl="psk",bn="io.deephaven.web.client.auth.psk.token",Le=J.module("AuthPluginPsk");function EO(){return new URLSearchParams(window.location.search).get(Pl)}function _O(){Le.debug2("clearWindowToken");var e=new URL(window.location.href);e.searchParams.delete(Pl),window.history.replaceState(null,"",e.href)}function wa(){var e;return(e=Jt.get(bn))!==null&&e!==void 0?e:null}function Yt(e){Le.debug2("Storing token in cookie",e),e!=null?Jt.set(bn,e,{secure:!0,sameSite:"strict"}):Jt.remove(bn)}function jO(e){var t=e.children,n=e.logoPath,r=Qe(),i=c.useRef(null),a=c.useRef(null),o=c.useState(),s=Ue(o,2),l=s[0],u=s[1],f=c.useState(!1),h=Ue(f,2),p=h[0],m=h[1],g=c.useState(!1),b=Ue(g,2),y=b[0],S=b[1],v=c.useState(!1),T=Ue(v,2),w=T[0],x=T[1],P=c.useState(""),_=Ue(P,2),C=_[0],A=_[1],D=c.useCallback(function(){var O=Gt(function*(E){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Le.info("Logging in..."),x(!0);var M=null;try{if(M=r.login({type:gn,token:E}),a.current=M,yield M,Le.info("Logged in successfully"),a.current!==M)return;Yt(E),S(!0)}catch(ie){if(a.current!==M)return;if(m(!0),I){var K;Le.error("Unable to login",ie);var G=(K=Ge(ie))!==null&&K!==void 0?K:"Unable to login: Verify credentials.";u(new yl(G))}}x(!1)});return function(E){return O.apply(this,arguments)}}(),[r]),L=c.useCallback(()=>{a.current=null,x(!1)},[]),j=c.useCallback(Gt(function*(){Le.debug("onLogin");var O=wa();y||w||O==null||D(O,!1)}),[y,w,D]),$=c.useCallback(()=>{Yt(null)},[]);nr(j,$),c.useEffect(()=>{var O=!1;function E(){return I.apply(this,arguments)}function I(){return I=Gt(function*(){var M,K=(M=EO())!==null&&M!==void 0?M:wa();if(_O(),K==null){m(!0);return}x(!0);try{yield r.login({type:gn,token:K}),O||(Yt(K),S(!0),x(!1))}catch{O||(m(!0),x(!1))}}),I.apply(this,arguments)}return E(),()=>{O=!0}},[r]);var N=c.useCallback(()=>{w?L():D(C)},[L,w,D,C]);return c.useEffect(function(){var E;(E=i.current)===null||E===void 0||E.focus()},[i,p]),d.jsxs(d.Fragment,{children:[y&&t,p&&d.jsx(Dn,{in:!y,mountOnEnter:!0,unmountOnExit:!0,children:d.jsx(Sl,{logoPath:n,children:d.jsx(vl,{errorMessage:Ge(l),isLoggingIn:w,onSubmit:N,children:d.jsxs("div",{className:"form-group",children:[d.jsx("label",{htmlFor:"auth-psk-token-input",children:"Token"}),d.jsx("input",{id:"auth-psk-token-input",name:"token",className:"input-token form-control",type:"text",autoComplete:"username",autoCapitalize:"none",autoCorrect:"off",spellCheck:"false",ref:i,value:C,onChange:O=>{u(void 0),A(O.target.value)}})]})})})}),d.jsx(Ae,{"data-testid":"auth-psk-loading",isLoaded:y||p,isLoading:!y&&!p})]})}var wl={Component:jO,isAvailable:e=>e.includes(gn)};function Oa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oa(Object(n),!0).forEach(function(r){IO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IO(e,t,n){return(t=AO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AO(e){var t=$O(e,"string");return typeof t=="symbol"?t:t+""}function $O(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kO=J.module("UserUtils");function Ol(e,t){return e.get("internal.webClient.appInit.".concat(t))}function xl(e){var t,n,r,i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};function s(y){return Ol(e,y)}function l(y,S){var v=s(y);return v==="true"?!0:v==="false"?!1:(v!==void 0&&kO.warn("Unexpected value for ".concat(y,": ").concat(v)),S)}var u=(t=s("name"))!==null&&t!==void 0?t:"",f=(n=s("operateAs"))!==null&&n!==void 0?n:u,h=(r=(i=s("groups"))===null||i===void 0?void 0:i.split(","))!==null&&r!==void 0?r:[],p=l("canCopy",!0),m=l("canDownloadCsv",!0),g=l("canUsePanels",!0),b=l("canLogout",!0);return zt(zt({name:u,operateAs:f,groups:h},a),{},{permissions:zt({canUsePanels:g,canCopy:p,canDownloadCsv:m,canLogout:b},o)})}const RO=Object.freeze(Object.defineProperty({__proto__:null,AUTH_HANDLER_TYPE_ANONYMOUS:ml,AUTH_HANDLER_TYPE_PSK:oO,AuthPluginAnonymous:gl,AuthPluginBase:rr,AuthPluginParent:bl,AuthPluginPsk:wl,Login:Sl,LoginForm:vl,UserContext:uo,UserOverrideContext:co,UserPermissionsOverrideContext:_t,getAppInitValue:Ol,getUserFromConfig:xl,isAuthPlugin:aO},Symbol.toStringTag,{value:"Module"}));function Me(e,t,n){return(t=LO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LO(e){var t=DO(e,"string");return typeof t=="symbol"?t:t+""}function DO(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class q extends Qo{static get theme(){return q._theme==null&&(q._theme=Fo()),q._theme}static makeRandomSeries(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:100,i=[],a=[],o=[],s=[],l=new Date("2018-06-01"),u=0;u<r;u+=1){var f=new Date(l.getFullYear(),l.getMonth(),l.getDate()+u-r);i.push("".concat(f.getFullYear(),"-").concat(f.getMonth()+1,"-").concat(f.getDate()));var h=(Math.sin(u/r*t)*r/3+Math.cos(u*.2)*r/6+Math.sin(u*.5)*r/10+q.random()*r/5+u*q.smoothing)*n;h=Math.round(h*100)/100,a.push(h),s.push(40+u*q.smoothing),o.push(Math.sin(u/r*t)*r/3+q.random()*r/10+u*q.smoothing)}return{x:i,y:a,s:o,l:s}}static makeScatter(t){return{name:"SCTR",x:t.x,y:t.y,type:"scatter",mode:"markers",hoverinfo:"skip",marker:{size:5}}}static makeArea(t){return{name:"AREA",x:t.x,y:t.s,type:"scatter",mode:"line",fill:"tozeroy",hoverinfo:"all",line:{width:3}}}static makeTrendline(t){return{name:"Trendline <br>R<sup>2</sup> = 0.91",x:t.x,y:t.l,type:"scatter",mode:"line",hoverinfo:"skip",line:{width:3,dash:"dot"}}}static makeErrorBand(t){for(var n=[],r=[],i=0;i<t.y.length;i+=1){var a=t.y[i];n[i]=Math.round((a+18)*100)/100,r[i]=Math.round((a-18)*100)/100}var o=n.concat(r.reverse());return{name:"error",x:t.x.concat(t.x.slice().reverse()),y:o,type:"scatter",mode:"line",hoverinfo:"skip",fill:"toself",line:{width:0,color:q.theme.error_band_line_color,shape:"spline"}}}static makeLine(t){return{name:"LINE",x:t.x,y:t.y,type:"scatter",mode:"line",hoverinfo:"x+y+text+name",line:{width:3}}}static makeRandomData(){var t=q.makeRandomSeries(6),n=q.makeArea(t),r=q.makeTrendline(t),i=q.makeRandomSeries(2),a=q.makeLine(i),o=q.makeErrorBand(i);return[n,r,a,o]}static makeDefaultLayout(t){var n={template:new Zo(t).makeDefaultTemplate(q.theme)};return n.title={text:"Chart"},n.xaxis={title:{text:"Datestamp"}},n.yaxis={title:{text:"Price"}},n}constructor(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.data,i=r===void 0?q.makeRandomData():r,a=n.layout,o=a===void 0?q.makeDefaultLayout(t):a,s=n.filterFields,l=s===void 0?[]:s;super(t),Me(this,"data",void 0),Me(this,"filterFields",void 0),Me(this,"layout",void 0),this.data=i,this.layout=o,this.filterFields=l}getData(){return this.data}getLayout(){return this.layout}getFilterColumnMap(){for(var t=new Map,n=0;n<this.filterFields.length;n+=1){var r=this.filterFields[n],i="java.lang.String";t.set(r,{name:r,type:i})}return t}isFilterRequired(){return this.filterFields.length>0}setFilter(){this.fireUpdate(this.data)}}Me(q,"random",Math.random.bind(Math));Me(q,"smoothing",1.5);Me(q,"_theme",void 0);const MO=Object.freeze(Object.defineProperty({__proto__:null,Chart:Oh,ChartModel:Qo,ChartModelFactory:xh,ChartThemeContext:_p,ChartThemeProvider:Uo,ChartUtils:Zo,DownsamplingError:Jh,FigureChartModel:Th,MockChartModel:q,Plot:jp,defaultChartTheme:Fo,isFigureChartModel:Ch,isWebGLSupported:Eh,useChartTheme:Ip},Symbol.toStringTag,{value:"Module"}));function Tl(e){var t=e.children,n=jt(),r=n.activeThemes;return c.useEffect(function(){r!=null&&Wo.initTheme()},[r]),d.jsx(d.Fragment,{children:t})}var NO={$schema:"http://json-schema.org/draft-07/schema#",title:"Options",type:"object",properties:{"allowed-confusables":{description:'A list of allowed "confusable" Unicode characters to ignore when enforcing `RUF001`, `RUF002`, and `RUF003`.',deprecated:!0,type:["array","null"],items:{type:"string",maxLength:1,minLength:1}},builtins:{description:"A list of builtins to treat as defined references, in addition to the system builtins.",type:["array","null"],items:{type:"string"}},"cache-dir":{description:"A path to the cache directory.\n\nBy default, Ruff stores cache results in a `.ruff_cache` directory in the current project root.\n\nHowever, Ruff will also respect the `RUFF_CACHE_DIR` environment variable, which takes precedence over that default.\n\nThis setting will override even the `RUFF_CACHE_DIR` environment variable, if set.",type:["string","null"]},"dummy-variable-rgx":{description:'A regular expression used to identify "dummy" variables, or those which should be ignored when enforcing (e.g.) unused-variable rules. The default expression matches `_`, `__`, and `_var`, but not `_var_`.',deprecated:!0,type:["string","null"]},exclude:{description:"A list of file patterns to exclude from formatting and linting.\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).\n\nNote that you'll typically want to use [`extend-exclude`](#extend-exclude) to modify the excluded paths.",type:["array","null"],items:{type:"string"}},"explicit-preview-rules":{description:"Whether to require exact codes to select preview rules. When enabled, preview rules will not be selected by prefixes — the full code of each preview rule will be required to enable the rule.",deprecated:!0,type:["boolean","null"]},extend:{description:"A path to a local `pyproject.toml` file to merge into this configuration. User home directory and environment variables will be expanded.\n\nTo resolve the current `pyproject.toml` file, Ruff will first resolve this base configuration file, then merge in any properties defined in the current configuration file.",type:["string","null"]},"extend-exclude":{description:"A list of file patterns to omit from formatting and linting, in addition to those specified by [`exclude`](#exclude).\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"extend-fixable":{description:"A list of rule codes or prefixes to consider fixable, in addition to those specified by [`fixable`](#lint_fixable).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-ignore":{description:"A list of rule codes or prefixes to ignore, in addition to those specified by `ignore`.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-include":{description:"A list of file patterns to include when linting, in addition to those specified by [`include`](#include).\n\nInclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension.\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"extend-per-file-ignores":{description:"A list of mappings from file pattern to rule codes or prefixes to exclude, in addition to any rules excluded by [`per-file-ignores`](#lint_per-file-ignores).",deprecated:!0,type:["object","null"],additionalProperties:{type:"array",items:{$ref:"#/definitions/RuleSelector"}}},"extend-safe-fixes":{description:"A list of rule codes or prefixes for which unsafe fixes should be considered safe.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-select":{description:"A list of rule codes or prefixes to enable, in addition to those specified by [`select`](#lint_select).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unfixable":{description:"A list of rule codes or prefixes to consider non-auto-fixable, in addition to those specified by [`unfixable`](#lint_unfixable).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unsafe-fixes":{description:"A list of rule codes or prefixes for which safe fixes should be considered unsafe.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},external:{description:"A list of rule codes or prefixes that are unsupported by Ruff, but should be preserved when (e.g.) validating `# noqa` directives. Useful for retaining `# noqa` directives that cover plugins not yet implemented by Ruff.",deprecated:!0,type:["array","null"],items:{type:"string"}},fix:{description:"Enable fix behavior by-default when running `ruff` (overridden by the `--fix` and `--no-fix` command-line flags). Only includes automatic fixes unless `--unsafe-fixes` is provided.",type:["boolean","null"]},"fix-only":{description:"Like [`fix`](#fix), but disables reporting on leftover violation. Implies [`fix`](#fix).",type:["boolean","null"]},fixable:{description:"A list of rule codes or prefixes to consider fixable. By default, all rules are considered fixable.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"flake8-annotations":{description:"Options for the `flake8-annotations` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8AnnotationsOptions"},{type:"null"}]},"flake8-bandit":{description:"Options for the `flake8-bandit` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BanditOptions"},{type:"null"}]},"flake8-boolean-trap":{description:"Options for the `flake8-boolean-trap` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BooleanTrapOptions"},{type:"null"}]},"flake8-bugbear":{description:"Options for the `flake8-bugbear` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BugbearOptions"},{type:"null"}]},"flake8-builtins":{description:"Options for the `flake8-builtins` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BuiltinsOptions"},{type:"null"}]},"flake8-comprehensions":{description:"Options for the `flake8-comprehensions` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ComprehensionsOptions"},{type:"null"}]},"flake8-copyright":{description:"Options for the `flake8-copyright` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8CopyrightOptions"},{type:"null"}]},"flake8-errmsg":{description:"Options for the `flake8-errmsg` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ErrMsgOptions"},{type:"null"}]},"flake8-gettext":{description:"Options for the `flake8-gettext` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8GetTextOptions"},{type:"null"}]},"flake8-implicit-str-concat":{description:"Options for the `flake8-implicit-str-concat` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ImplicitStrConcatOptions"},{type:"null"}]},"flake8-import-conventions":{description:"Options for the `flake8-import-conventions` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ImportConventionsOptions"},{type:"null"}]},"flake8-pytest-style":{description:"Options for the `flake8-pytest-style` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8PytestStyleOptions"},{type:"null"}]},"flake8-quotes":{description:"Options for the `flake8-quotes` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8QuotesOptions"},{type:"null"}]},"flake8-self":{description:"Options for the `flake8_self` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8SelfOptions"},{type:"null"}]},"flake8-tidy-imports":{description:"Options for the `flake8-tidy-imports` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8TidyImportsOptions"},{type:"null"}]},"flake8-type-checking":{description:"Options for the `flake8-type-checking` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8TypeCheckingOptions"},{type:"null"}]},"flake8-unused-arguments":{description:"Options for the `flake8-unused-arguments` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8UnusedArgumentsOptions"},{type:"null"}]},"force-exclude":{description:"Whether to enforce [`exclude`](#exclude) and [`extend-exclude`](#extend-exclude) patterns, even for paths that are passed to Ruff explicitly. Typically, Ruff will lint any paths passed in directly, even if they would typically be excluded. Setting `force-exclude = true` will cause Ruff to respect these exclusions unequivocally.\n\nThis is useful for [`pre-commit`](https://pre-commit.com/), which explicitly passes all changed files to the [`ruff-pre-commit`](https://github.com/astral-sh/ruff-pre-commit) plugin, regardless of whether they're marked as excluded by Ruff's own settings.",type:["boolean","null"]},format:{description:"Options to configure code formatting.",anyOf:[{$ref:"#/definitions/FormatOptions"},{type:"null"}]},ignore:{description:"A list of rule codes or prefixes to ignore. Prefixes can specify exact rules (like `F841`), entire categories (like `F`), or anything in between.\n\nWhen breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively), more specific prefixes override less specific prefixes.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"ignore-init-module-imports":{description:"Avoid automatically removing unused imports in `__init__.py` files. Such imports will still be flagged, but with a dedicated message suggesting that the import is either added to the module's `__all__` symbol, or re-exported with a redundant alias (e.g., `import os as os`).\n\nThis option is enabled by default, but you can opt-in to removal of imports via an unsafe fix.",deprecated:!0,type:["boolean","null"]},include:{description:"A list of file patterns to include when linting.\n\nInclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension. `pyproject.toml` is included here not for configuration but because we lint whether e.g. the `[project]` matches the schema.\n\nNotebook files (`.ipynb` extension) are included by default on Ruff 0.6.0+.\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"indent-width":{description:`The number of spaces per indentation level (tab).
34
34
 
35
35
  Used by the formatter and when enforcing long-line violations (like \`E501\`) to determine the visual width of a tab.
36
36
 
@@ -111,10 +111,10 @@ foo, bar, quux = this_is_a_long_line(lion, hippo, lemur, bear) ''' pass \`\`\`
111
111
  ( foo, bar, quux, ) = this_is_a_long_line( lion, hippo, lemur, bear, ) """ pass \`\`\``,anyOf:[{$ref:"#/definitions/DocstringCodeLineWidth"},{type:"null"}]},exclude:{description:"A list of file patterns to exclude from formatting in addition to the files excluded globally (see [`exclude`](#exclude), and [`extend-exclude`](#extend-exclude)).\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"indent-style":{description:'Whether to use spaces or tabs for indentation.\n\n`indent-style = "space"` (default):\n\n```python def f(): print("Hello") # Spaces indent the `print` statement. ```\n\n`indent-style = "tab"`:\n\n```python def f(): print("Hello") # A tab `\\t` indents the `print` statement. ```\n\nPEP 8 recommends using spaces for [indentation](https://peps.python.org/pep-0008/#indentation). We care about accessibility; if you do not need tabs for accessibility, we do not recommend you use them.\n\nSee [`indent-width`](#indent-width) to configure the number of spaces per indentation and the tab width.',anyOf:[{$ref:"#/definitions/IndentStyle"},{type:"null"}]},"line-ending":{description:"The character Ruff uses at the end of a line.\n\n* `auto`: The newline style is detected automatically on a file per file basis. Files with mixed line endings will be converted to the first detected line ending. Defaults to `\\n` for files that contain no line endings. * `lf`: Line endings will be converted to `\\n`. The default line ending on Unix. * `cr-lf`: Line endings will be converted to `\\r\\n`. The default line ending on Windows. * `native`: Line endings will be converted to `\\n` on Unix and `\\r\\n` on Windows.",anyOf:[{$ref:"#/definitions/LineEnding"},{type:"null"}]},preview:{description:"Whether to enable the unstable preview style formatting.",type:["boolean","null"]},"quote-style":{description:'Configures the preferred quote character for strings. The recommended options are\n\n* `double` (default): Use double quotes `"` * `single`: Use single quotes `\'`\n\nIn compliance with [PEP 8](https://peps.python.org/pep-0008/) and [PEP 257](https://peps.python.org/pep-0257/), Ruff prefers double quotes for triple quoted strings and docstrings even when using `quote-style = "single"`.\n\nRuff deviates from using the configured quotes if doing so prevents the need for escaping quote characters inside the string:\n\n```python a = "a string without any quotes" b = "It\'s monday morning" ```\n\nRuff will change the quotes of the string assigned to `a` to single quotes when using `quote-style = "single"`. However, Ruff uses double quotes for the string assigned to `b` because using single quotes would require escaping the `\'`, which leads to the less readable code: `\'It\\\'s monday morning\'`.\n\nIn addition, Ruff supports the quote style `preserve` for projects that already use a mixture of single and double quotes and can\'t migrate to the `double` or `single` style. The quote style `preserve` leaves the quotes of all strings unchanged.',anyOf:[{$ref:"#/definitions/QuoteStyle"},{type:"null"}]},"skip-magic-trailing-comma":{description:"Ruff uses existing trailing commas as an indication that short lines should be left separate. If this option is set to `true`, the magic trailing comma is ignored.\n\nFor example, Ruff leaves the arguments separate even though collapsing the arguments to a single line doesn't exceed the line length if `skip-magic-trailing-comma = false`:\n\n```python # The arguments remain on separate lines because of the trailing comma after `b` def test( a, b, ): pass ```\n\nSetting `skip-magic-trailing-comma = true` changes the formatting to:\n\n```python # The arguments remain on separate lines because of the trailing comma after `b` def test(a, b): pass ```",type:["boolean","null"]}},additionalProperties:!1},ImportSection:{anyOf:[{$ref:"#/definitions/ImportType"},{type:"string"}]},ImportType:{type:"string",enum:["future","standard-library","third-party","first-party","local-folder"]},IndentStyle:{oneOf:[{description:"Use tabs to indent code.",type:"string",enum:["tab"]},{description:"Use [`IndentWidth`] spaces to indent code.",type:"string",enum:["space"]}]},IndentWidth:{description:"The size of a tab.",type:"integer",format:"uint8",minimum:1},IsortOptions:{type:"object",properties:{"case-sensitive":{description:"Sort imports taking into account case sensitivity.",type:["boolean","null"]},classes:{description:"An override list of tokens to always recognize as a Class for [`order-by-type`](#lint_isort_order-by-type) regardless of casing.",type:["array","null"],items:{type:"string"}},"combine-as-imports":{description:"Combines as imports on the same line. See isort's [`combine-as-imports`](https://pycqa.github.io/isort/docs/configuration/options.html#combine-as-imports) option.",type:["boolean","null"]},constants:{description:"An override list of tokens to always recognize as a CONSTANT for [`order-by-type`](#lint_isort_order-by-type) regardless of casing.",type:["array","null"],items:{type:"string"}},"default-section":{description:"Define a default section for any imports that don't fit into the specified [`section-order`](#lint_isort_section-order).",anyOf:[{$ref:"#/definitions/ImportSection"},{type:"null"}]},"detect-same-package":{description:"Whether to automatically mark imports from within the same package as first-party. For example, when `detect-same-package = true`, then when analyzing files within the `foo` package, any imports from within the `foo` package will be considered first-party.\n\nThis heuristic is often unnecessary when `src` is configured to detect all first-party sources; however, if `src` is _not_ configured, this heuristic can be useful to detect first-party imports from _within_ (but not _across_) first-party packages.",type:["boolean","null"]},"extra-standard-library":{description:"A list of modules to consider standard-library, in addition to those known to Ruff in advance.\n\nSupports glob patterns. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"force-single-line":{description:"Forces all from imports to appear on their own line.",type:["boolean","null"]},"force-sort-within-sections":{description:"Don't sort straight-style imports (like `import sys`) before from-style imports (like `from itertools import groupby`). Instead, sort the imports by module, independent of import style.",type:["boolean","null"]},"force-to-top":{description:"Force specific imports to the top of their appropriate section.",type:["array","null"],items:{type:"string"}},"force-wrap-aliases":{description:"Force `import from` statements with multiple members and at least one alias (e.g., `import A as B`) to wrap such that every line contains exactly one member. For example, this formatting would be retained, rather than condensing to a single line:\n\n```python from .utils import ( test_directory as test_directory, test_id as test_id ) ```\n\nNote that this setting is only effective when combined with `combine-as-imports = true`. When [`combine-as-imports`](#lint_isort_combine-as-imports) isn't enabled, every aliased `import from` will be given its own line, in which case, wrapping is not necessary.\n\nWhen using the formatter, ensure that [`format.skip-magic-trailing-comma`](#format_skip-magic-trailing-comma) is set to `false` (default) when enabling `force-wrap-aliases` to avoid that the formatter collapses members if they all fit on a single line.",type:["boolean","null"]},"forced-separate":{description:"A list of modules to separate into auxiliary block(s) of imports, in the order specified.",type:["array","null"],items:{type:"string"}},"from-first":{description:"Whether to place `import from` imports before straight imports when sorting.\n\nFor example, by default, imports will be sorted such that straight imports appear before `import from` imports, as in: ```python import os import sys from typing import List ```\n\nSetting `from-first = true` will instead sort such that `import from` imports appear before straight imports, as in: ```python from typing import List import os import sys ```",type:["boolean","null"]},"known-first-party":{description:"A list of modules to consider first-party, regardless of whether they can be identified as such via introspection of the local filesystem.\n\nSupports glob patterns. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"known-local-folder":{description:"A list of modules to consider being a local folder. Generally, this is reserved for relative imports (`from . import module`).\n\nSupports glob patterns. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"known-third-party":{description:"A list of modules to consider third-party, regardless of whether they can be identified as such via introspection of the local filesystem.\n\nSupports glob patterns. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"length-sort":{description:"Sort imports by their string length, such that shorter imports appear before longer imports. For example, by default, imports will be sorted alphabetically, as in: ```python import collections import os ```\n\nSetting `length-sort = true` will instead sort such that shorter imports appear before longer imports, as in: ```python import os import collections ```",type:["boolean","null"]},"length-sort-straight":{description:"Sort straight imports by their string length. Similar to [`length-sort`](#lint_isort_length-sort), but applies only to straight imports and doesn't affect `from` imports.",type:["boolean","null"]},"lines-after-imports":{description:"The number of blank lines to place after imports. Use `-1` for automatic determination.\n\nRuff uses at most one blank line after imports in typing stub files (files with `.pyi` extension) in accordance to the typing style recommendations ([source](https://typing.readthedocs.io/en/latest/source/stubs.html#blank-lines)).\n\nWhen using the formatter, only the values `-1`, `1`, and `2` are compatible because it enforces at least one empty and at most two empty lines after imports.",type:["integer","null"],format:"int"},"lines-between-types":{description:'The number of lines to place between "direct" and `import from` imports.\n\nWhen using the formatter, only the values `0` and `1` are compatible because it preserves up to one empty line after imports in nested blocks.',type:["integer","null"],format:"uint",minimum:0},"no-lines-before":{description:"A list of sections that should _not_ be delineated from the previous section via empty lines.",type:["array","null"],items:{$ref:"#/definitions/ImportSection"}},"no-sections":{description:"Put all imports into the same section bucket.\n\nFor example, rather than separating standard library and third-party imports, as in: ```python import os import sys\n\nimport numpy import pandas ```\n\nSetting `no-sections = true` will instead group all imports into a single section: ```python import numpy import os import pandas import sys ```",type:["boolean","null"]},"order-by-type":{description:"Order imports by type, which is determined by case, in addition to alphabetically.",type:["boolean","null"]},"relative-imports-order":{description:'Whether to place "closer" imports (fewer `.` characters, most local) before "further" imports (more `.` characters, least local), or vice versa.\n\nThe default ("furthest-to-closest") is equivalent to isort\'s [`reverse-relative`](https://pycqa.github.io/isort/docs/configuration/options.html#reverse-relative) default (`reverse-relative = false`); setting this to "closest-to-furthest" is equivalent to isort\'s `reverse-relative = true`.',anyOf:[{$ref:"#/definitions/RelativeImportsOrder"},{type:"null"}]},"required-imports":{description:"Add the specified import line to all files.",type:["array","null"],items:{$ref:"#/definitions/NameImports"}},"section-order":{description:"Override in which order the sections should be output. Can be used to move custom sections.",type:["array","null"],items:{$ref:"#/definitions/ImportSection"}},sections:{description:'A list of mappings from section names to modules.\n\nBy default, imports are categorized according to their type (e.g., `future`, `third-party`, and so on). This setting allows you to group modules into custom sections, to augment or override the built-in sections.\n\nFor example, to group all testing utilities, you could create a `testing` section: ```toml testing = ["pytest", "hypothesis"] ```\n\nThe values in the list are treated as glob patterns. For example, to match all packages in the LangChain ecosystem (`langchain-core`, `langchain-openai`, etc.): ```toml langchain = ["langchain-*"] ```\n\nCustom sections should typically be inserted into the [`section-order`](#lint_isort_section-order) list to ensure that they\'re displayed as a standalone group and in the intended order, as in: ```toml section-order = [ "future", "standard-library", "third-party", "first-party", "local-folder", "testing" ] ```\n\nIf a custom section is omitted from [`section-order`](#lint_isort_section-order), imports in that section will be assigned to the [`default-section`](#lint_isort_default-section) (which defaults to `third-party`).',type:["object","null"],additionalProperties:{type:"array",items:{type:"string"}}},"single-line-exclusions":{description:"One or more modules to exclude from the single line rule.",type:["array","null"],items:{type:"string"}},"split-on-trailing-comma":{description:"If a comma is placed after the last member in a multi-line import, then the imports will never be folded into one line.\n\nSee isort's [`split-on-trailing-comma`](https://pycqa.github.io/isort/docs/configuration/options.html#split-on-trailing-comma) option.\n\nWhen using the formatter, ensure that [`format.skip-magic-trailing-comma`](#format_skip-magic-trailing-comma) is set to `false` (default) when enabling `split-on-trailing-comma` to avoid that the formatter removes the trailing commas.",type:["boolean","null"]},variables:{description:"An override list of tokens to always recognize as a var for [`order-by-type`](#lint_isort_order-by-type) regardless of casing.",type:["array","null"],items:{type:"string"}}},additionalProperties:!1},LineEnding:{oneOf:[{description:"The newline style is detected automatically on a file per file basis. Files with mixed line endings will be converted to the first detected line ending. Defaults to [`LineEnding::Lf`] for a files that contain no line endings.",type:"string",enum:["auto"]},{description:"Line endings will be converted to `\\n` as is common on Unix.",type:"string",enum:["lf"]},{description:"Line endings will be converted to `\\r\\n` as is common on Windows.",type:"string",enum:["cr-lf"]},{description:"Line endings will be converted to `\\n` on Unix and `\\r\\n` on Windows.",type:"string",enum:["native"]}]},LineLength:{description:`The length of a line of text that is considered too long.
112
112
 
113
113
  The allowed range of values is 1..=320`,type:"integer",format:"uint16",maximum:320,minimum:1},LineWidth:{description:"The maximum visual width to which the formatter should try to limit a line.",type:"integer",format:"uint16",minimum:1},LintOptions:{description:"Configures how Ruff checks your code.\n\nOptions specified in the `lint` section take precedence over the deprecated top-level settings.",type:"object",properties:{"allowed-confusables":{description:'A list of allowed "confusable" Unicode characters to ignore when enforcing `RUF001`, `RUF002`, and `RUF003`.',type:["array","null"],items:{type:"string",maxLength:1,minLength:1}},"dummy-variable-rgx":{description:'A regular expression used to identify "dummy" variables, or those which should be ignored when enforcing (e.g.) unused-variable rules. The default expression matches `_`, `__`, and `_var`, but not `_var_`.',type:["string","null"]},exclude:{description:"A list of file patterns to exclude from linting in addition to the files excluded globally (see [`exclude`](#exclude), and [`extend-exclude`](#extend-exclude)).\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"explicit-preview-rules":{description:"Whether to require exact codes to select preview rules. When enabled, preview rules will not be selected by prefixes — the full code of each preview rule will be required to enable the rule.",type:["boolean","null"]},"extend-fixable":{description:"A list of rule codes or prefixes to consider fixable, in addition to those specified by [`fixable`](#lint_fixable).",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-ignore":{description:"A list of rule codes or prefixes to ignore, in addition to those specified by `ignore`.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-per-file-ignores":{description:"A list of mappings from file pattern to rule codes or prefixes to exclude, in addition to any rules excluded by [`per-file-ignores`](#lint_per-file-ignores).",type:["object","null"],additionalProperties:{type:"array",items:{$ref:"#/definitions/RuleSelector"}}},"extend-safe-fixes":{description:"A list of rule codes or prefixes for which unsafe fixes should be considered safe.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-select":{description:"A list of rule codes or prefixes to enable, in addition to those specified by [`select`](#lint_select).",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unfixable":{description:"A list of rule codes or prefixes to consider non-auto-fixable, in addition to those specified by [`unfixable`](#lint_unfixable).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unsafe-fixes":{description:"A list of rule codes or prefixes for which safe fixes should be considered unsafe.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},external:{description:"A list of rule codes or prefixes that are unsupported by Ruff, but should be preserved when (e.g.) validating `# noqa` directives. Useful for retaining `# noqa` directives that cover plugins not yet implemented by Ruff.",type:["array","null"],items:{type:"string"}},fixable:{description:"A list of rule codes or prefixes to consider fixable. By default, all rules are considered fixable.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"flake8-annotations":{description:"Options for the `flake8-annotations` plugin.",anyOf:[{$ref:"#/definitions/Flake8AnnotationsOptions"},{type:"null"}]},"flake8-bandit":{description:"Options for the `flake8-bandit` plugin.",anyOf:[{$ref:"#/definitions/Flake8BanditOptions"},{type:"null"}]},"flake8-boolean-trap":{description:"Options for the `flake8-boolean-trap` plugin.",anyOf:[{$ref:"#/definitions/Flake8BooleanTrapOptions"},{type:"null"}]},"flake8-bugbear":{description:"Options for the `flake8-bugbear` plugin.",anyOf:[{$ref:"#/definitions/Flake8BugbearOptions"},{type:"null"}]},"flake8-builtins":{description:"Options for the `flake8-builtins` plugin.",anyOf:[{$ref:"#/definitions/Flake8BuiltinsOptions"},{type:"null"}]},"flake8-comprehensions":{description:"Options for the `flake8-comprehensions` plugin.",anyOf:[{$ref:"#/definitions/Flake8ComprehensionsOptions"},{type:"null"}]},"flake8-copyright":{description:"Options for the `flake8-copyright` plugin.",anyOf:[{$ref:"#/definitions/Flake8CopyrightOptions"},{type:"null"}]},"flake8-errmsg":{description:"Options for the `flake8-errmsg` plugin.",anyOf:[{$ref:"#/definitions/Flake8ErrMsgOptions"},{type:"null"}]},"flake8-gettext":{description:"Options for the `flake8-gettext` plugin.",anyOf:[{$ref:"#/definitions/Flake8GetTextOptions"},{type:"null"}]},"flake8-implicit-str-concat":{description:"Options for the `flake8-implicit-str-concat` plugin.",anyOf:[{$ref:"#/definitions/Flake8ImplicitStrConcatOptions"},{type:"null"}]},"flake8-import-conventions":{description:"Options for the `flake8-import-conventions` plugin.",anyOf:[{$ref:"#/definitions/Flake8ImportConventionsOptions"},{type:"null"}]},"flake8-pytest-style":{description:"Options for the `flake8-pytest-style` plugin.",anyOf:[{$ref:"#/definitions/Flake8PytestStyleOptions"},{type:"null"}]},"flake8-quotes":{description:"Options for the `flake8-quotes` plugin.",anyOf:[{$ref:"#/definitions/Flake8QuotesOptions"},{type:"null"}]},"flake8-self":{description:"Options for the `flake8_self` plugin.",anyOf:[{$ref:"#/definitions/Flake8SelfOptions"},{type:"null"}]},"flake8-tidy-imports":{description:"Options for the `flake8-tidy-imports` plugin.",anyOf:[{$ref:"#/definitions/Flake8TidyImportsOptions"},{type:"null"}]},"flake8-type-checking":{description:"Options for the `flake8-type-checking` plugin.",anyOf:[{$ref:"#/definitions/Flake8TypeCheckingOptions"},{type:"null"}]},"flake8-unused-arguments":{description:"Options for the `flake8-unused-arguments` plugin.",anyOf:[{$ref:"#/definitions/Flake8UnusedArgumentsOptions"},{type:"null"}]},ignore:{description:"A list of rule codes or prefixes to ignore. Prefixes can specify exact rules (like `F841`), entire categories (like `F`), or anything in between.\n\nWhen breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively), more specific prefixes override less specific prefixes.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"ignore-init-module-imports":{description:"Avoid automatically removing unused imports in `__init__.py` files. Such imports will still be flagged, but with a dedicated message suggesting that the import is either added to the module's `__all__` symbol, or re-exported with a redundant alias (e.g., `import os as os`).\n\nThis option is enabled by default, but you can opt-in to removal of imports via an unsafe fix.",deprecated:!0,type:["boolean","null"]},isort:{description:"Options for the `isort` plugin.",anyOf:[{$ref:"#/definitions/IsortOptions"},{type:"null"}]},"logger-objects":{description:'A list of objects that should be treated equivalently to a `logging.Logger` object.\n\nThis is useful for ensuring proper diagnostics (e.g., to identify `logging` deprecations and other best-practices) for projects that re-export a `logging.Logger` object from a common module.\n\nFor example, if you have a module `logging_setup.py` with the following contents: ```python import logging\n\nlogger = logging.getLogger(__name__) ```\n\nAdding `"logging_setup.logger"` to `logger-objects` will ensure that `logging_setup.logger` is treated as a `logging.Logger` object when imported from other modules (e.g., `from logging_setup import logger`).',type:["array","null"],items:{type:"string"}},mccabe:{description:"Options for the `mccabe` plugin.",anyOf:[{$ref:"#/definitions/McCabeOptions"},{type:"null"}]},"pep8-naming":{description:"Options for the `pep8-naming` plugin.",anyOf:[{$ref:"#/definitions/Pep8NamingOptions"},{type:"null"}]},"per-file-ignores":{description:"A list of mappings from file pattern to rule codes or prefixes to exclude, when considering any matching files. An initial '!' negates the file pattern.",type:["object","null"],additionalProperties:{type:"array",items:{$ref:"#/definitions/RuleSelector"}}},preview:{description:"Whether to enable preview mode. When preview mode is enabled, Ruff will use unstable rules and fixes.",type:["boolean","null"]},pycodestyle:{description:"Options for the `pycodestyle` plugin.",anyOf:[{$ref:"#/definitions/PycodestyleOptions"},{type:"null"}]},pydocstyle:{description:"Options for the `pydocstyle` plugin.",anyOf:[{$ref:"#/definitions/PydocstyleOptions"},{type:"null"}]},pyflakes:{description:"Options for the `pyflakes` plugin.",anyOf:[{$ref:"#/definitions/PyflakesOptions"},{type:"null"}]},pylint:{description:"Options for the `pylint` plugin.",anyOf:[{$ref:"#/definitions/PylintOptions"},{type:"null"}]},pyupgrade:{description:"Options for the `pyupgrade` plugin.",anyOf:[{$ref:"#/definitions/PyUpgradeOptions"},{type:"null"}]},ruff:{description:"Options for the `ruff` plugin",anyOf:[{$ref:"#/definitions/RuffOptions"},{type:"null"}]},select:{description:"A list of rule codes or prefixes to enable. Prefixes can specify exact rules (like `F841`), entire categories (like `F`), or anything in between.\n\nWhen breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively), more specific prefixes override less specific prefixes.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"task-tags":{description:'A list of task tags to recognize (e.g., "TODO", "FIXME", "XXX").\n\nComments starting with these tags will be ignored by commented-out code detection (`ERA`), and skipped by line-length rules (`E501`) if [`ignore-overlong-task-comments`](#lint_pycodestyle_ignore-overlong-task-comments) is set to `true`.',type:["array","null"],items:{type:"string"}},"typing-modules":{description:"A list of modules whose exports should be treated equivalently to members of the `typing` module.\n\nThis is useful for ensuring proper type annotation inference for projects that re-export `typing` and `typing_extensions` members from a compatibility module. If omitted, any members imported from modules apart from `typing` and `typing_extensions` will be treated as ordinary Python objects.",type:["array","null"],items:{type:"string"}},unfixable:{description:"A list of rule codes or prefixes to consider non-fixable.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}}},additionalProperties:!1},McCabeOptions:{type:"object",properties:{"max-complexity":{description:"The maximum McCabe complexity to allow before triggering `C901` errors.",type:["integer","null"],format:"uint",minimum:0}},additionalProperties:!1},NameImports:{type:"string"},OutputFormat:{oneOf:[{type:"string",enum:["concise","full","json","json-lines","junit","grouped","github","gitlab","pylint","rdjson","azure","sarif"]},{deprecated:!0,type:"string",enum:["text"]}]},ParametrizeNameType:{type:"string",enum:["csv","tuple","list"]},ParametrizeValuesRowType:{type:"string",enum:["tuple","list"]},ParametrizeValuesType:{type:"string",enum:["tuple","list"]},Pep8NamingOptions:{type:"object",properties:{"classmethod-decorators":{description:"A list of decorators that, when applied to a method, indicate that the method should be treated as a class method (in addition to the builtin `@classmethod`).\n\nFor example, Ruff will expect that any method decorated by a decorator in this list takes a `cls` argument as its first argument.\n\nExpects to receive a list of fully-qualified names (e.g., `pydantic.validator`, rather than `validator`) or alternatively a plain name which is then matched against the last segment in case the decorator itself consists of a dotted name.",type:["array","null"],items:{type:"string"}},"extend-ignore-names":{description:'Additional names (or patterns) to ignore when considering `pep8-naming` violations, in addition to those included in [`ignore-names`](#lint_pep8-naming_ignore-names).\n\nSupports glob patterns. For example, to ignore all names starting with `test_` or ending with `_test`, you could use `ignore-names = ["test_*", "*_test"]`. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).',type:["array","null"],items:{type:"string"}},"ignore-names":{description:'A list of names (or patterns) to ignore when considering `pep8-naming` violations.\n\nSupports glob patterns. For example, to ignore all names starting with `test_` or ending with `_test`, you could use `ignore-names = ["test_*", "*_test"]`. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).',type:["array","null"],items:{type:"string"}},"staticmethod-decorators":{description:"A list of decorators that, when applied to a method, indicate that the method should be treated as a static method (in addition to the builtin `@staticmethod`).\n\nFor example, Ruff will expect that any method decorated by a decorator in this list has no `self` or `cls` argument.\n\nExpects to receive a list of fully-qualified names (e.g., `belay.Device.teardown`, rather than `teardown`) or alternatively a plain name which is then matched against the last segment in case the decorator itself consists of a dotted name.",type:["array","null"],items:{type:"string"}}},additionalProperties:!1},PyUpgradeOptions:{type:"object",properties:{"keep-runtime-typing":{description:"Whether to avoid [PEP 585](https://peps.python.org/pep-0585/) (`List[int]` -> `list[int]`) and [PEP 604](https://peps.python.org/pep-0604/) (`Union[str, int]` -> `str | int`) rewrites even if a file imports `from __future__ import annotations`.\n\nThis setting is only applicable when the target Python version is below 3.9 and 3.10 respectively, and is most commonly used when working with libraries like Pydantic and FastAPI, which rely on the ability to parse type annotations at runtime. The use of `from __future__ import annotations` causes Python to treat the type annotations as strings, which typically allows for the use of language features that appear in later Python versions but are not yet supported by the current version (e.g., `str | int`). However, libraries that rely on runtime type annotations will break if the annotations are incompatible with the current Python version.\n\nFor example, while the following is valid Python 3.8 code due to the presence of `from __future__ import annotations`, the use of `str | int` prior to Python 3.10 will cause Pydantic to raise a `TypeError` at runtime:\n\n```python from __future__ import annotations\n\nimport pydantic\n\nclass Foo(pydantic.BaseModel): bar: str | int ```",type:["boolean","null"]}},additionalProperties:!1},PycodestyleOptions:{type:"object",properties:{"ignore-overlong-task-comments":{description:'Whether line-length violations (`E501`) should be triggered for comments starting with [`task-tags`](#lint_task-tags) (by default: "TODO", "FIXME", and "XXX").',type:["boolean","null"]},"max-doc-length":{description:"The maximum line length to allow for [`doc-line-too-long`](https://docs.astral.sh/ruff/rules/doc-line-too-long/) violations within documentation (`W505`), including standalone comments. By default, this is set to `null` which disables reporting violations.\n\nThe length is determined by the number of characters per line, except for lines containing Asian characters or emojis. For these lines, the [unicode width](https://unicode.org/reports/tr11/) of each character is added up to determine the length.\n\nSee the [`doc-line-too-long`](https://docs.astral.sh/ruff/rules/doc-line-too-long/) rule for more information.",anyOf:[{$ref:"#/definitions/LineLength"},{type:"null"}]},"max-line-length":{description:"The maximum line length to allow for [`line-too-long`](https://docs.astral.sh/ruff/rules/line-too-long/) violations. By default, this is set to the value of the [`line-length`](#line-length) option.\n\nUse this option when you want to detect extra-long lines that the formatter can't automatically split by setting `pycodestyle.line-length` to a value larger than [`line-length`](#line-length).\n\n```toml # The formatter wraps lines at a length of 88. line-length = 88\n\n[pycodestyle] # E501 reports lines that exceed the length of 100. max-line-length = 100 ```\n\nThe length is determined by the number of characters per line, except for lines containing East Asian characters or emojis. For these lines, the [unicode width](https://unicode.org/reports/tr11/) of each character is added up to determine the length.\n\nSee the [`line-too-long`](https://docs.astral.sh/ruff/rules/line-too-long/) rule for more information.",anyOf:[{$ref:"#/definitions/LineLength"},{type:"null"}]}},additionalProperties:!1},PydocstyleOptions:{type:"object",properties:{convention:{description:'Whether to use Google-style, NumPy-style conventions, or the [PEP 257](https://peps.python.org/pep-0257/) defaults when analyzing docstring sections.\n\nEnabling a convention will disable all rules that are not included in the specified convention. As such, the intended workflow is to enable a convention and then selectively enable or disable any additional rules on top of it.\n\nFor example, to use Google-style conventions but avoid requiring documentation for every function parameter:\n\n```toml [tool.ruff.lint] # Enable all `pydocstyle` rules, limiting to those that adhere to the # Google convention via `convention = "google"`, below. select = ["D"]\n\n# On top of the Google convention, disable `D417`, which requires # documentation for every function parameter. ignore = ["D417"]\n\n[tool.ruff.lint.pydocstyle] convention = "google" ```\n\nTo enable an additional rule that\'s excluded from the convention, select the desired rule via its fully qualified rule code (e.g., `D400` instead of `D4` or `D40`):\n\n```toml [tool.ruff.lint] # Enable D400 on top of the Google convention. extend-select = ["D400"]\n\n[tool.ruff.lint.pydocstyle] convention = "google" ```',anyOf:[{$ref:"#/definitions/Convention"},{type:"null"}]},"ignore-decorators":{description:"Ignore docstrings for functions or methods decorated with the specified fully-qualified decorators.",type:["array","null"],items:{type:"string"}},"property-decorators":{description:"A list of decorators that, when applied to a method, indicate that the method should be treated as a property (in addition to the builtin `@property` and standard-library `@functools.cached_property`).\n\nFor example, Ruff will expect that any method decorated by a decorator in this list can use a non-imperative summary line.",type:["array","null"],items:{type:"string"}}},additionalProperties:!1},PyflakesOptions:{type:"object",properties:{"extend-generics":{description:'Additional functions or classes to consider generic, such that any subscripts should be treated as type annotation (e.g., `ForeignKey` in `django.db.models.ForeignKey["User"]`.\n\nExpects to receive a list of fully-qualified names (e.g., `django.db.models.ForeignKey`, rather than `ForeignKey`).',type:["array","null"],items:{type:"string"}}},additionalProperties:!1},PylintOptions:{type:"object",properties:{"allow-dunder-method-names":{description:"Dunder methods name to allow, in addition to the default set from the Python standard library (see `PLW3201`).",type:["array","null"],items:{type:"string"},uniqueItems:!0},"allow-magic-value-types":{description:'Constant types to ignore when used as "magic values" (see `PLR2004`).',type:["array","null"],items:{$ref:"#/definitions/ConstantType"}},"max-args":{description:"Maximum number of arguments allowed for a function or method definition (see `PLR0913`).",type:["integer","null"],format:"uint",minimum:0},"max-bool-expr":{description:"Maximum number of Boolean expressions allowed within a single `if` statement (see `PLR0916`).",type:["integer","null"],format:"uint",minimum:0},"max-branches":{description:"Maximum number of branches allowed for a function or method body (see `PLR0912`).",type:["integer","null"],format:"uint",minimum:0},"max-locals":{description:"Maximum number of local variables allowed for a function or method body (see `PLR0914`).",type:["integer","null"],format:"uint",minimum:0},"max-nested-blocks":{description:"Maximum number of nested blocks allowed within a function or method body (see `PLR1702`).",type:["integer","null"],format:"uint",minimum:0},"max-positional-args":{description:"Maximum number of positional arguments allowed for a function or method definition (see `PLR0917`).\n\nIf not specified, defaults to the value of `max-args`.",type:["integer","null"],format:"uint",minimum:0},"max-public-methods":{description:"Maximum number of public methods allowed for a class (see `PLR0904`).",type:["integer","null"],format:"uint",minimum:0},"max-returns":{description:"Maximum number of return statements allowed for a function or method body (see `PLR0911`)",type:["integer","null"],format:"uint",minimum:0},"max-statements":{description:"Maximum number of statements allowed for a function or method body (see `PLR0915`).",type:["integer","null"],format:"uint",minimum:0}},additionalProperties:!1},PythonVersion:{type:"string",enum:["py37","py38","py39","py310","py311","py312","py313"]},Quote:{oneOf:[{description:"Use double quotes.",type:"string",enum:["double"]},{description:"Use single quotes.",type:"string",enum:["single"]}]},QuoteStyle:{type:"string",enum:["single","double","preserve"]},RelativeImportsOrder:{oneOf:[{description:'Place "closer" imports (fewer `.` characters, most local) before "further" imports (more `.` characters, least local).',type:"string",enum:["closest-to-furthest"]},{description:'Place "further" imports (more `.` characters, least local) imports before "closer" imports (fewer `.` characters, most local).',type:"string",enum:["furthest-to-closest"]}]},RequiredVersion:{type:"string"},RuffOptions:{type:"object",properties:{"parenthesize-tuple-in-subscript":{description:"Whether to prefer accessing items keyed by tuples with parentheses around the tuple (see `RUF031`).",type:["boolean","null"]}},additionalProperties:!1},RuleSelector:{type:"string",enum:["A","A0","A00","A001","A002","A003","A004","A005","A006","AIR","AIR0","AIR00","AIR001","ALL","ANN","ANN0","ANN00","ANN001","ANN002","ANN003","ANN1","ANN10","ANN101","ANN102","ANN2","ANN20","ANN201","ANN202","ANN204","ANN205","ANN206","ANN4","ANN40","ANN401","ARG","ARG0","ARG00","ARG001","ARG002","ARG003","ARG004","ARG005","ASYNC","ASYNC1","ASYNC10","ASYNC100","ASYNC105","ASYNC109","ASYNC11","ASYNC110","ASYNC115","ASYNC116","ASYNC2","ASYNC21","ASYNC210","ASYNC22","ASYNC220","ASYNC221","ASYNC222","ASYNC23","ASYNC230","ASYNC25","ASYNC251","B","B0","B00","B002","B003","B004","B005","B006","B007","B008","B009","B01","B010","B011","B012","B013","B014","B015","B016","B017","B018","B019","B02","B020","B021","B022","B023","B024","B025","B026","B027","B028","B029","B03","B030","B031","B032","B033","B034","B035","B039","B9","B90","B901","B904","B905","B909","BLE","BLE0","BLE00","BLE001","C","C4","C40","C400","C401","C402","C403","C404","C405","C406","C408","C409","C41","C410","C411","C413","C414","C415","C416","C417","C418","C419","C42","C420","C9","C90","C901","COM","COM8","COM81","COM812","COM818","COM819","CPY","CPY0","CPY00","CPY001","D","D1","D10","D100","D101","D102","D103","D104","D105","D106","D107","D2","D20","D200","D201","D202","D203","D204","D205","D206","D207","D208","D209","D21","D210","D211","D212","D213","D214","D215","D3","D30","D300","D301","D4","D40","D400","D401","D402","D403","D404","D405","D406","D407","D408","D409","D41","D410","D411","D412","D413","D414","D415","D416","D417","D418","D419","DJ","DJ0","DJ00","DJ001","DJ003","DJ006","DJ007","DJ008","DJ01","DJ012","DJ013","DOC","DOC2","DOC20","DOC201","DOC202","DOC4","DOC40","DOC402","DOC403","DOC5","DOC50","DOC501","DOC502","DTZ","DTZ0","DTZ00","DTZ001","DTZ002","DTZ003","DTZ004","DTZ005","DTZ006","DTZ007","DTZ01","DTZ011","DTZ012","E","E1","E10","E101","E11","E111","E112","E113","E114","E115","E116","E117","E2","E20","E201","E202","E203","E204","E21","E211","E22","E221","E222","E223","E224","E225","E226","E227","E228","E23","E231","E24","E241","E242","E25","E251","E252","E26","E261","E262","E265","E266","E27","E271","E272","E273","E274","E275","E3","E30","E301","E302","E303","E304","E305","E306","E4","E40","E401","E402","E5","E50","E501","E502","E7","E70","E701","E702","E703","E71","E711","E712","E713","E714","E72","E721","E722","E73","E731","E74","E741","E742","E743","E9","E90","E902","E99","E999","EM","EM1","EM10","EM101","EM102","EM103","ERA","ERA0","ERA00","ERA001","EXE","EXE0","EXE00","EXE001","EXE002","EXE003","EXE004","EXE005","F","F4","F40","F401","F402","F403","F404","F405","F406","F407","F5","F50","F501","F502","F503","F504","F505","F506","F507","F508","F509","F52","F521","F522","F523","F524","F525","F54","F541","F6","F60","F601","F602","F62","F621","F622","F63","F631","F632","F633","F634","F7","F70","F701","F702","F704","F706","F707","F72","F722","F8","F81","F811","F82","F821","F822","F823","F84","F841","F842","F9","F90","F901","FA","FA1","FA10","FA100","FA102","FAST","FAST0","FAST00","FAST001","FAST002","FAST003","FBT","FBT0","FBT00","FBT001","FBT002","FBT003","FIX","FIX0","FIX00","FIX001","FIX002","FIX003","FIX004","FLY","FLY0","FLY00","FLY002","FURB","FURB1","FURB10","FURB101","FURB103","FURB105","FURB11","FURB110","FURB113","FURB116","FURB118","FURB12","FURB129","FURB13","FURB131","FURB132","FURB136","FURB14","FURB140","FURB142","FURB145","FURB148","FURB15","FURB152","FURB154","FURB157","FURB16","FURB161","FURB163","FURB164","FURB166","FURB167","FURB168","FURB169","FURB17","FURB171","FURB177","FURB18","FURB180","FURB181","FURB187","FURB19","FURB192","G","G0","G00","G001","G002","G003","G004","G01","G010","G1","G10","G101","G2","G20","G201","G202","I","I0","I00","I001","I002","ICN","ICN0","ICN00","ICN001","ICN002","ICN003","INP","INP0","INP00","INP001","INT","INT0","INT00","INT001","INT002","INT003","ISC","ISC0","ISC00","ISC001","ISC002","ISC003","LOG","LOG0","LOG00","LOG001","LOG002","LOG007","LOG009","N","N8","N80","N801","N802","N803","N804","N805","N806","N807","N81","N811","N812","N813","N814","N815","N816","N817","N818","N9","N99","N999","NPY","NPY0","NPY00","NPY001","NPY002","NPY003","NPY2","NPY20","NPY201","PD","PD0","PD00","PD002","PD003","PD004","PD007","PD008","PD009","PD01","PD010","PD011","PD012","PD013","PD015","PD1","PD10","PD101","PD9","PD90","PD901","PERF","PERF1","PERF10","PERF101","PERF102","PERF2","PERF20","PERF203","PERF4","PERF40","PERF401","PERF402","PERF403","PGH","PGH0","PGH00","PGH003","PGH004","PGH005","PIE","PIE7","PIE79","PIE790","PIE794","PIE796","PIE8","PIE80","PIE800","PIE804","PIE807","PIE808","PIE81","PIE810","PL","PLC","PLC0","PLC01","PLC010","PLC0105","PLC013","PLC0131","PLC0132","PLC02","PLC020","PLC0205","PLC0206","PLC0208","PLC04","PLC041","PLC0414","PLC0415","PLC1","PLC19","PLC190","PLC1901","PLC2","PLC24","PLC240","PLC2401","PLC2403","PLC27","PLC270","PLC2701","PLC28","PLC280","PLC2801","PLC3","PLC30","PLC300","PLC3002","PLE","PLE0","PLE01","PLE010","PLE0100","PLE0101","PLE011","PLE0115","PLE0116","PLE0117","PLE0118","PLE02","PLE023","PLE0237","PLE024","PLE0241","PLE03","PLE030","PLE0302","PLE0303","PLE0304","PLE0305","PLE0307","PLE0308","PLE0309","PLE06","PLE060","PLE0604","PLE0605","PLE064","PLE0643","PLE07","PLE070","PLE0704","PLE1","PLE11","PLE113","PLE1132","PLE114","PLE1141","PLE1142","PLE12","PLE120","PLE1205","PLE1206","PLE13","PLE130","PLE1300","PLE1307","PLE131","PLE1310","PLE15","PLE150","PLE1507","PLE151","PLE1519","PLE152","PLE1520","PLE17","PLE170","PLE1700","PLE2","PLE25","PLE250","PLE2502","PLE251","PLE2510","PLE2512","PLE2513","PLE2514","PLE2515","PLE4","PLE47","PLE470","PLE4703","PLR","PLR0","PLR01","PLR012","PLR0124","PLR013","PLR0133","PLR02","PLR020","PLR0202","PLR0203","PLR0206","PLR04","PLR040","PLR0402","PLR09","PLR090","PLR0904","PLR091","PLR0911","PLR0912","PLR0913","PLR0914","PLR0915","PLR0916","PLR0917","PLR1","PLR17","PLR170","PLR1702","PLR1704","PLR171","PLR1711","PLR1714","PLR172","PLR1722","PLR173","PLR1730","PLR1733","PLR1736","PLR2","PLR20","PLR200","PLR2004","PLR204","PLR2044","PLR5","PLR55","PLR550","PLR5501","PLR6","PLR61","PLR610","PLR6104","PLR62","PLR620","PLR6201","PLR63","PLR630","PLR6301","PLW","PLW0","PLW01","PLW010","PLW0108","PLW012","PLW0120","PLW0127","PLW0128","PLW0129","PLW013","PLW0131","PLW0133","PLW017","PLW0177","PLW02","PLW021","PLW0211","PLW024","PLW0245","PLW04","PLW040","PLW0406","PLW06","PLW060","PLW0602","PLW0603","PLW0604","PLW064","PLW0642","PLW07","PLW071","PLW0711","PLW1","PLW15","PLW150","PLW1501","PLW1508","PLW1509","PLW151","PLW1510","PLW1514","PLW16","PLW164","PLW1641","PLW2","PLW21","PLW210","PLW2101","PLW29","PLW290","PLW2901","PLW3","PLW32","PLW320","PLW3201","PLW33","PLW330","PLW3301","PT","PT0","PT00","PT001","PT002","PT003","PT004","PT005","PT006","PT007","PT008","PT009","PT01","PT010","PT011","PT012","PT013","PT014","PT015","PT016","PT017","PT018","PT019","PT02","PT020","PT021","PT022","PT023","PT024","PT025","PT026","PT027","PTH","PTH1","PTH10","PTH100","PTH101","PTH102","PTH103","PTH104","PTH105","PTH106","PTH107","PTH108","PTH109","PTH11","PTH110","PTH111","PTH112","PTH113","PTH114","PTH115","PTH116","PTH117","PTH118","PTH119","PTH12","PTH120","PTH121","PTH122","PTH123","PTH124","PTH2","PTH20","PTH201","PTH202","PTH203","PTH204","PTH205","PTH206","PTH207","PYI","PYI0","PYI00","PYI001","PYI002","PYI003","PYI004","PYI005","PYI006","PYI007","PYI008","PYI009","PYI01","PYI010","PYI011","PYI012","PYI013","PYI014","PYI015","PYI016","PYI017","PYI018","PYI019","PYI02","PYI020","PYI021","PYI024","PYI025","PYI026","PYI029","PYI03","PYI030","PYI032","PYI033","PYI034","PYI035","PYI036","PYI04","PYI041","PYI042","PYI043","PYI044","PYI045","PYI046","PYI047","PYI048","PYI049","PYI05","PYI050","PYI051","PYI052","PYI053","PYI054","PYI055","PYI056","PYI057","PYI058","PYI059","PYI06","PYI062","PYI063","PYI064","PYI066","Q","Q0","Q00","Q000","Q001","Q002","Q003","Q004","RET","RET5","RET50","RET501","RET502","RET503","RET504","RET505","RET506","RET507","RET508","RSE","RSE1","RSE10","RSE102","RUF","RUF0","RUF00","RUF001","RUF002","RUF003","RUF005","RUF006","RUF007","RUF008","RUF009","RUF01","RUF010","RUF012","RUF013","RUF015","RUF016","RUF017","RUF018","RUF019","RUF02","RUF020","RUF021","RUF022","RUF023","RUF024","RUF026","RUF027","RUF028","RUF029","RUF03","RUF030","RUF031","RUF032","RUF033","RUF034","RUF1","RUF10","RUF100","RUF101","RUF2","RUF20","RUF200","S","S1","S10","S101","S102","S103","S104","S105","S106","S107","S108","S11","S110","S112","S113","S2","S20","S201","S202","S3","S30","S301","S302","S303","S304","S305","S306","S307","S308","S31","S310","S311","S312","S313","S314","S315","S316","S317","S318","S319","S32","S320","S321","S323","S324","S4","S40","S401","S402","S403","S404","S405","S406","S407","S408","S409","S41","S411","S412","S413","S415","S5","S50","S501","S502","S503","S504","S505","S506","S507","S508","S509","S6","S60","S601","S602","S603","S604","S605","S606","S607","S608","S609","S61","S610","S611","S612","S7","S70","S701","S702","SIM","SIM1","SIM10","SIM101","SIM102","SIM103","SIM105","SIM107","SIM108","SIM109","SIM11","SIM110","SIM112","SIM113","SIM114","SIM115","SIM116","SIM117","SIM118","SIM2","SIM20","SIM201","SIM202","SIM208","SIM21","SIM210","SIM211","SIM212","SIM22","SIM220","SIM221","SIM222","SIM223","SIM3","SIM30","SIM300","SIM4","SIM40","SIM401","SIM9","SIM91","SIM910","SIM911","SLF","SLF0","SLF00","SLF001","SLOT","SLOT0","SLOT00","SLOT000","SLOT001","SLOT002","T","T1","T10","T100","T2","T20","T201","T203","TCH","TCH0","TCH00","TCH001","TCH002","TCH003","TCH004","TCH005","TCH01","TCH010","TD","TD0","TD00","TD001","TD002","TD003","TD004","TD005","TD006","TD007","TID","TID2","TID25","TID251","TID252","TID253","TRY","TRY0","TRY00","TRY002","TRY003","TRY004","TRY2","TRY20","TRY201","TRY3","TRY30","TRY300","TRY301","TRY302","TRY4","TRY40","TRY400","TRY401","UP","UP0","UP00","UP001","UP003","UP004","UP005","UP006","UP007","UP008","UP009","UP01","UP010","UP011","UP012","UP013","UP014","UP015","UP017","UP018","UP019","UP02","UP020","UP021","UP022","UP023","UP024","UP025","UP026","UP027","UP028","UP029","UP03","UP030","UP031","UP032","UP033","UP034","UP035","UP036","UP037","UP038","UP039","UP04","UP040","UP041","UP042","UP043","W","W1","W19","W191","W2","W29","W291","W292","W293","W3","W39","W391","W5","W50","W505","W6","W60","W605","YTT","YTT1","YTT10","YTT101","YTT102","YTT103","YTT2","YTT20","YTT201","YTT202","YTT203","YTT204","YTT3","YTT30","YTT301","YTT302","YTT303"]},Strictness:{oneOf:[{description:"Ban imports that extend into the parent module or beyond.",type:"string",enum:["parents"]},{description:"Ban all relative imports.",type:"string",enum:["all"]}]}}};function qt(e,t){return VO(e)||WO(e,t)||UO(e,t)||FO()}function FO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
114
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UO(e,t){if(e){if(typeof e=="string")return xa(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xa(e,t):void 0}}function xa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function WO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function VO(e){if(Array.isArray(e))return e}function Ta(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function BO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Ta(a,r,i,o,s,"next",l)}function s(l){Ta(a,r,i,o,s,"throw",l)}o(void 0)})}}var Cl=Zu.parse("inmemory://dh-config/ruff-settings.json");function HO(){var e=or.json.jsonDefaults.diagnosticsOptions.schemas,t=e===void 0?[]:e;t.some(n=>n.uri==="json://ruff-schema")||or.json.jsonDefaults.setDiagnosticsOptions({schemas:[...t,{uri:"json://ruff-schema",fileMatch:[Cl.toString()],schema:NO}]})}function KO(){return vn.apply(this,arguments)}function vn(){return vn=BO(function*(){return yield Bo.initRuff(),"v".concat(Ju.version())}),vn.apply(this,arguments)}function GO(e){var t=e.text,n=e.isOpen,r=e.onClose,i=e.onSave,a=e.readOnly,o=a===void 0?!1:a,s=e.defaultSettings,l=s===void 0?Vo:s,u=c.useState(!1),f=qt(u,2),h=f[0],p=f[1],m=c.useState(!1),g=qt(m,2),b=g[0],y=g[1],S=c.useRef(),v=c.useMemo(()=>JSON.stringify(l,null,2),[l]),T=Ie(KO),w=T.data,x=c.useState(()=>Qu.createModel(t,"json",Cl)),P=qt(x,1),E=P[0],C=c.useCallback(()=>{n&&(r(),S.current=void 0,E.dispose())},[n,r,E]),A=c.useCallback(()=>{if(n){try{var N,O;i(JSON.parse((N=(O=S.current)===null||O===void 0||(O=O.getModel())===null||O===void 0?void 0:O.getValue())!==null&&N!==void 0?N:""))}catch{}C()}},[n,C,i]),D=c.useCallback(()=>{Ct(E),E.setValue(v)},[E,v]),L=c.useCallback(N=>{var O;try{JSON.parse(N),p(!0)}catch{p(!1)}y(((O=S.current)===null||O===void 0||(O=O.getModel())===null||O===void 0?void 0:O.getValue())===v)},[v]),j=Ke(L,500,{leading:!0}),$=c.useCallback(N=>{S.current=N,E.onDidChangeContent(()=>{j(E.getValue())}),HO(),j(E.getValue())},[j,E]);return n?d.jsxs(jn,{isOpen:n,centered:!0,keyboard:!0,clickOutside:!1,toggle:C,size:"lg",className:"ruff-settings-modal",children:[d.jsxs(oo,{closeButton:!1,children:[d.jsxs("span",{className:"settings-modal-title mr-auto",children:["Ruff ",w," Settings"]}),d.jsx(Qa,{href:"https://docs.astral.sh/ruff/settings/",target:"_blank",children:d.jsx(re,{kind:"ghost",onClick:pe,icon:ud,children:"Settings Docs"})}),d.jsxs(xt,{isDisabled:b,onPress:D,children:[d.jsx(Xe,{children:d.jsx(ae,{icon:cd})}),d.jsx(It,{children:"Reset to default"})]})]}),d.jsx(In,{style:{height:"80vh"},children:d.jsx(Jo,{onEditorInitialized:$,settings:{readOnly:o,value:t,language:"json",folding:!0,padding:{bottom:16},lineNumbers:"on",overviewRulerLanes:0,model:E}})}),d.jsx(go,{children:o?d.jsx(re,{kind:"secondary","data-dismiss":"modal",onClick:C,children:"Close"}):d.jsxs(d.Fragment,{children:[d.jsx(re,{kind:"secondary","data-dismiss":"modal",onClick:C,children:"Cancel"}),d.jsx(re,{kind:"primary","data-dismiss":"modal",tooltip:h?void 0:"Cannot save invalid JSON",disabled:!h,onClick:A,children:"Save"})]})})]}):null}const YO=Object.freeze(Object.defineProperty({__proto__:null,Code:Ap,CommandHistory:$p,CommandHistoryActions:kp,CommandHistoryItem:Rp,CommandHistoryItemTooltip:Lp,Console:cr,ConsoleConstants:Dp,ConsoleHistory:Mp,ConsoleHistoryItem:Np,ConsoleHistoryItemResult:Fp,ConsoleHistoryResultErrorMessage:Up,ConsoleHistoryResultInProgress:Wp,ConsoleInput:Vp,ConsoleStatusBar:Bp,ConsoleUtils:Hp,Editor:Jo,HeapUsage:Kp,LogView:Gp,MonacoProviders:Bo,MonacoTheme:Yp,MonacoThemeProvider:Tl,MonacoUtils:Wo,ObjectIcon:zp,RUFF_DEFAULT_SETTINGS:Vo,RuffSettingsModal:GO,SHORTCUTS:qp,ScriptEditor:_h,ScriptEditorUtils:jh,default:cr},Symbol.toStringTag,{value:"Module"}));function Sn(e,t,n){return(t=zO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zO(e){var t=qO(e,"string");return typeof t=="symbol"?t:t+""}function qO(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Ne{static valueForCell(t,n,r){var i="".concat(t,",").concat(n);return r!==void 0&&r&&(i="(".concat(i,")")),i}constructor(t){Sn(this,"dh",void 0),Sn(this,"irisGridUtils",void 0),this.dh=t,this.irisGridUtils=new es(t)}makeColumn(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ne.DEFAULT_TYPE,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return new this.dh.Column({index:r,name:t,type:n})}makeRollupTableConfig(){return new this.dh.RollupTableConfig}makeColumns(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],i=0;i<t;i+=1)r.push(this.makeColumn("".concat(n).concat(i),Ne.DEFAULT_TYPE,i));return r}static makeUserColumnWidths(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,n=new Map,r=0;r<t;r+=1)n.set(r.toString(),100);return n}makeRow(t){var n=new this.dh.Row({index:t,name:"".concat(t)});return n.get=jest.fn(r=>Ne.valueForCell(t,r.index)),n}makeFilter(){return new this.dh.FilterCondition}makeSort(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeColumn();return new this.dh.Sort({column:t})}hydrateSort(t,n){return this.irisGridUtils.hydrateDhSort(n,t)}makeTable(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.columns,r=n===void 0?this.makeColumns():n,i=t.size,a=i===void 0?1e9:i,o=t.sort,s=o===void 0?[]:o,l=t.layoutHints,u=l===void 0?{}:l,f=new this.dh.Table({columns:r,size:a,sort:s});return f.copy=jest.fn(()=>Promise.resolve(f)),f.freeze=jest.fn(()=>Promise.resolve(f)),f.layoutHints=u,f}makeTreeTable(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeColumns(),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1e9,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],o=arguments.length>5?arguments[5]:void 0,s=new this.dh.TreeTable({columns:t,aggregatedColumns:n,groupedColumns:r,size:i,sort:a,layoutHints:o});return s.copy=jest.fn(()=>Promise.resolve(s)),s}static makeInputTable(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[...t,...n].reduce((o,s)=>(t.includes(s)?o.keys.push(s.name):o.values.push(s.name),o),{keys:[],values:[]}),i=r.keys,a=r.values;return{keys:i,values:a}}makeSubscription(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable();return new this.dh.TableViewportSubscription({table:t})}makeModel(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable(),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=this.dh;return new Ih(i,t,n??new Nn(i),r)}}Sn(Ne,"DEFAULT_TYPE","java.lang.String");const XO=Object.freeze(Object.defineProperty({__proto__:null,AdvancedSettings:Ah,AdvancedSettingsType:$h,AggregationEdit:ly,AggregationOperation:kh,AggregationUtils:Rh,Aggregations:uy,BarIcon:cy,CellDropdownField:dy,ChartBuilder:fy,ColumnHeaderGroup:Lh,CustomColumnBuilder:py,DEFAULT_REGISTRY:hy,DndKitCore:ec,DndKitModifiers:tc,DndKitSortable:nc,DndKitUtilities:rc,DownloadServiceWorkerUtils:my,FormatColumnWhereIcon:yy,FormatRowWhereIcon:gy,HistogramIcon:by,InputEditor:vy,IrisGrid:dr,IrisGridCacheUtils:Dh,IrisGridCellOverflowMouseHandler:Sy,IrisGridCellRendererUtils:Py,IrisGridColumnSelectMouseHandler:wy,IrisGridColumnTooltipMouseHandler:Oy,IrisGridContext:pr,IrisGridContextMenuHandler:xy,IrisGridContextProvider:un,IrisGridCopyCellMouseHandler:Ty,IrisGridDataSelectMouseHandler:Cy,IrisGridFilterMouseHandler:Ey,IrisGridMetricCalculator:_y,IrisGridModel:Mh,IrisGridModelFactory:Nh,IrisGridPartitionedTableModel:Fh,IrisGridPartitionedTableMouseHandler:jy,IrisGridRenderer:Iy,IrisGridRowTreeMouseHandler:Ay,IrisGridSortMouseHandler:$y,IrisGridTableModel:Uh,IrisGridTableModelTemplate:Wh,IrisGridTestUtils:Ne,IrisGridThemeContext:pr,IrisGridThemeProvider:un,IrisGridTokenMouseHandler:ky,IrisGridTreeTableModel:Vh,IrisGridUtils:es,LineIcon:Ry,OptionType:Ly,PendingMouseHandler:Dy,PieIcon:My,RollupRows:Ny,SHORTCUTS:Fy,STRING_LIST_RESTRICTION_TYPE:Bh,ScatterIcon:Uy,TableCsvExporter:Wy,TableSaver:Vy,VisibilityOrderingBuilder:By,createDefaultIrisGridTheme:Hy,default:dr,isColumnHeaderGroup:Hh,isIrisGridTableModelTemplate:Kh,isIrisGridTreeTableModel:Gh,isPanelStateV1:Yh,isPanelStateV2:zh,isPartitionedGridModel:qh,isPartitionedGridModelProvider:Xh,isUITreeRow:Qh},Symbol.toStringTag,{value:"Module"}));var ir={react:X,"react-dom":sc,redux:oc,"react-redux":ac,"@adobe/react-spectrum":ic,"@deephaven/auth-plugins":RO,"@deephaven/chart":MO,"@deephaven/components":YS,"@deephaven/console":YO,"@deephaven/dashboard":nO,"@deephaven/dashboard-core-plugins":Zh,"@deephaven/icons":dd,"@deephaven/iris-grid":XO,"@deephaven/jsapi-bootstrap":xP,"@deephaven/jsapi-components":Jw,"@deephaven/jsapi-utils":wP,"@deephaven/log":J,"@deephaven/plugin":iO,"@deephaven/react-hooks":Hg},QO=uc.createRequires(ir),ZO=lc({requires:QO});function Ca(e,t){return nx(e)||tx(e,t)||ex(e,t)||JO()}function JO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
114
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UO(e,t){if(e){if(typeof e=="string")return xa(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xa(e,t):void 0}}function xa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function WO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function VO(e){if(Array.isArray(e))return e}function Ta(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function BO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Ta(a,r,i,o,s,"next",l)}function s(l){Ta(a,r,i,o,s,"throw",l)}o(void 0)})}}var Cl=Zu.parse("inmemory://dh-config/ruff-settings.json");function HO(){var e=or.json.jsonDefaults.diagnosticsOptions.schemas,t=e===void 0?[]:e;t.some(n=>n.uri==="json://ruff-schema")||or.json.jsonDefaults.setDiagnosticsOptions({schemas:[...t,{uri:"json://ruff-schema",fileMatch:[Cl.toString()],schema:NO}]})}function KO(){return vn.apply(this,arguments)}function vn(){return vn=BO(function*(){return yield Bo.initRuff(),"v".concat(Ju.version())}),vn.apply(this,arguments)}function GO(e){var t=e.text,n=e.isOpen,r=e.onClose,i=e.onSave,a=e.readOnly,o=a===void 0?!1:a,s=e.defaultSettings,l=s===void 0?Vo:s,u=c.useState(!1),f=qt(u,2),h=f[0],p=f[1],m=c.useState(!1),g=qt(m,2),b=g[0],y=g[1],S=c.useRef(),v=c.useMemo(()=>JSON.stringify(l,null,2),[l]),T=Ie(KO),w=T.data,x=c.useState(()=>Qu.createModel(t,"json",Cl)),P=qt(x,1),_=P[0],C=c.useCallback(()=>{n&&(r(),S.current=void 0,_.dispose())},[n,r,_]),A=c.useCallback(()=>{if(n){try{var N,O;i(JSON.parse((N=(O=S.current)===null||O===void 0||(O=O.getModel())===null||O===void 0?void 0:O.getValue())!==null&&N!==void 0?N:""))}catch{}C()}},[n,C,i]),D=c.useCallback(()=>{Ct(_),_.setValue(v)},[_,v]),L=c.useCallback(N=>{var O;try{JSON.parse(N),p(!0)}catch{p(!1)}y(((O=S.current)===null||O===void 0||(O=O.getModel())===null||O===void 0?void 0:O.getValue())===v)},[v]),j=Ke(L,500,{leading:!0}),$=c.useCallback(N=>{S.current=N,_.onDidChangeContent(()=>{j(_.getValue())}),HO(),j(_.getValue())},[j,_]);return n?d.jsxs(jn,{isOpen:n,centered:!0,keyboard:!0,clickOutside:!1,toggle:C,size:"lg",className:"ruff-settings-modal",children:[d.jsxs(oo,{closeButton:!1,children:[d.jsxs("span",{className:"settings-modal-title mr-auto",children:["Ruff ",w," Settings"]}),d.jsx(Qa,{href:"https://docs.astral.sh/ruff/settings/",target:"_blank",children:d.jsx(re,{kind:"ghost",onClick:pe,icon:ud,children:"Settings Docs"})}),d.jsxs(xt,{isDisabled:b,onPress:D,children:[d.jsx(Xe,{children:d.jsx(ae,{icon:cd})}),d.jsx(It,{children:"Reset to default"})]})]}),d.jsx(In,{style:{height:"80vh"},children:d.jsx(Jo,{onEditorInitialized:$,settings:{readOnly:o,value:t,language:"json",folding:!0,padding:{bottom:16},lineNumbers:"on",overviewRulerLanes:0,model:_}})}),d.jsx(go,{children:o?d.jsx(re,{kind:"secondary","data-dismiss":"modal",onClick:C,children:"Close"}):d.jsxs(d.Fragment,{children:[d.jsx(re,{kind:"secondary","data-dismiss":"modal",onClick:C,children:"Cancel"}),d.jsx(re,{kind:"primary","data-dismiss":"modal",tooltip:h?void 0:"Cannot save invalid JSON",disabled:!h,onClick:A,children:"Save"})]})})]}):null}const YO=Object.freeze(Object.defineProperty({__proto__:null,Code:Ap,CommandHistory:$p,CommandHistoryActions:kp,CommandHistoryItem:Rp,CommandHistoryItemTooltip:Lp,Console:cr,ConsoleConstants:Dp,ConsoleHistory:Mp,ConsoleHistoryItem:Np,ConsoleHistoryItemResult:Fp,ConsoleHistoryResultErrorMessage:Up,ConsoleHistoryResultInProgress:Wp,ConsoleInput:Vp,ConsoleStatusBar:Bp,ConsoleUtils:Hp,Editor:Jo,HeapUsage:Kp,LogView:Gp,MonacoProviders:Bo,MonacoTheme:Yp,MonacoThemeProvider:Tl,MonacoUtils:Wo,ObjectIcon:zp,RUFF_DEFAULT_SETTINGS:Vo,RuffSettingsModal:GO,SHORTCUTS:qp,ScriptEditor:_h,ScriptEditorUtils:jh,default:cr},Symbol.toStringTag,{value:"Module"}));function Sn(e,t,n){return(t=zO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zO(e){var t=qO(e,"string");return typeof t=="symbol"?t:t+""}function qO(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Ne{static valueForCell(t,n,r){var i="".concat(t,",").concat(n);return r!==void 0&&r&&(i="(".concat(i,")")),i}constructor(t){Sn(this,"dh",void 0),Sn(this,"irisGridUtils",void 0),this.dh=t,this.irisGridUtils=new es(t)}makeColumn(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ne.DEFAULT_TYPE,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return new this.dh.Column({index:r,name:t,type:n})}makeRollupTableConfig(){return new this.dh.RollupTableConfig}makeColumns(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],i=0;i<t;i+=1)r.push(this.makeColumn("".concat(n).concat(i),Ne.DEFAULT_TYPE,i));return r}static makeUserColumnWidths(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,n=new Map,r=0;r<t;r+=1)n.set(r.toString(),100);return n}makeRow(t){var n=new this.dh.Row({index:t,name:"".concat(t)});return n.get=jest.fn(r=>Ne.valueForCell(t,r.index)),n}makeFilter(){return new this.dh.FilterCondition}makeSort(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeColumn();return new this.dh.Sort({column:t})}hydrateSort(t,n){return this.irisGridUtils.hydrateDhSort(n,t)}makeTable(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.columns,r=n===void 0?this.makeColumns():n,i=t.size,a=i===void 0?1e9:i,o=t.sort,s=o===void 0?[]:o,l=t.layoutHints,u=l===void 0?{}:l,f=new this.dh.Table({columns:r,size:a,sort:s});return f.copy=jest.fn(()=>Promise.resolve(f)),f.freeze=jest.fn(()=>Promise.resolve(f)),f.layoutHints=u,f}makeTreeTable(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeColumns(),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1e9,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],o=arguments.length>5?arguments[5]:void 0,s=new this.dh.TreeTable({columns:t,aggregatedColumns:n,groupedColumns:r,size:i,sort:a,layoutHints:o});return s.copy=jest.fn(()=>Promise.resolve(s)),s}static makeInputTable(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[...t,...n].reduce((o,s)=>(t.includes(s)?o.keys.push(s.name):o.values.push(s.name),o),{keys:[],values:[]}),i=r.keys,a=r.values;return{keys:i,values:a}}makeSubscription(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable();return new this.dh.TableViewportSubscription({table:t})}makeModel(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable(),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=this.dh;return new Ih(i,t,n??new Nn(i),r)}}Sn(Ne,"DEFAULT_TYPE","java.lang.String");const XO=Object.freeze(Object.defineProperty({__proto__:null,AdvancedSettings:Ah,AdvancedSettingsType:$h,AggregationEdit:ly,AggregationOperation:kh,AggregationUtils:Rh,Aggregations:uy,BarIcon:cy,CellDropdownField:dy,ChartBuilder:fy,ColumnHeaderGroup:Lh,CustomColumnBuilder:py,DEFAULT_REGISTRY:hy,DndKitCore:ec,DndKitModifiers:tc,DndKitSortable:nc,DndKitUtilities:rc,DownloadServiceWorkerUtils:my,FormatColumnWhereIcon:yy,FormatRowWhereIcon:gy,HistogramIcon:by,InputEditor:vy,IrisGrid:dr,IrisGridCacheUtils:Dh,IrisGridCellOverflowMouseHandler:Sy,IrisGridCellRendererUtils:Py,IrisGridColumnSelectMouseHandler:wy,IrisGridColumnTooltipMouseHandler:Oy,IrisGridContext:pr,IrisGridContextMenuHandler:xy,IrisGridContextProvider:un,IrisGridCopyCellMouseHandler:Ty,IrisGridDataSelectMouseHandler:Cy,IrisGridFilterMouseHandler:Ey,IrisGridMetricCalculator:_y,IrisGridModel:Mh,IrisGridModelFactory:Nh,IrisGridPartitionedTableModel:Fh,IrisGridPartitionedTableMouseHandler:jy,IrisGridRenderer:Iy,IrisGridRowTreeMouseHandler:Ay,IrisGridSortMouseHandler:$y,IrisGridTableModel:Uh,IrisGridTableModelTemplate:Wh,IrisGridTestUtils:Ne,IrisGridThemeContext:pr,IrisGridThemeProvider:un,IrisGridTokenMouseHandler:ky,IrisGridTreeTableModel:Vh,IrisGridUtils:es,LineIcon:Ry,OptionType:Ly,PendingMouseHandler:Dy,PieIcon:My,RollupRows:Ny,SHORTCUTS:Fy,STRING_LIST_RESTRICTION_TYPE:Bh,ScatterIcon:Uy,TableCsvExporter:Wy,TableSaver:Vy,VisibilityOrderingBuilder:By,createDefaultIrisGridTheme:Hy,default:dr,isColumnHeaderGroup:Hh,isIrisGridTableModelTemplate:Kh,isIrisGridTreeTableModel:Gh,isPanelStateV1:Yh,isPanelStateV2:zh,isPartitionedGridModel:qh,isPartitionedGridModelProvider:Xh,isUITreeRow:Qh},Symbol.toStringTag,{value:"Module"}));var ir={react:X,"react-dom":sc,redux:oc,"react-redux":ac,"@adobe/react-spectrum":ic,"@deephaven/auth-plugins":RO,"@deephaven/chart":MO,"@deephaven/components":YS,"@deephaven/console":YO,"@deephaven/dashboard":nO,"@deephaven/dashboard-core-plugins":Zh,"@deephaven/icons":dd,"@deephaven/iris-grid":XO,"@deephaven/jsapi-bootstrap":xP,"@deephaven/jsapi-components":Jw,"@deephaven/jsapi-utils":wP,"@deephaven/log":J,"@deephaven/plugin":iO,"@deephaven/react-hooks":Hg},QO=uc.createRequires(ir),ZO=lc({requires:QO});function Ca(e,t){return nx(e)||tx(e,t)||ex(e,t)||JO()}function JO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
115
115
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ex(e,t){if(e){if(typeof e=="string")return Ea(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ea(e,t):void 0}}function Ea(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tx(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function nx(e){if(Array.isArray(e))return e}function _a(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function wt(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){_a(a,r,i,o,s,"next",l)}function s(l){_a(a,r,i,o,s,"throw",l)}o(void 0)})}}var _e=J.module("@deephaven/app-utils.PluginUtils");function rx(e){return Pn.apply(this,arguments)}function Pn(){return Pn=wt(function*(e){var t=yield ZO(e);return t}),Pn.apply(this,arguments)}function ix(e){return wn.apply(this,arguments)}function wn(){return wn=wt(function*(e){var t=yield fetch(e);if(!t.ok)throw new Error(t.statusText);try{return yield t.json()}catch{throw new Error("Could not be parsed as JSON")}}),wn.apply(this,arguments)}function ax(e){return On.apply(this,arguments)}function On(){return On=wt(function*(e){_e.debug("Loading plugins...");try{var t=yield ix("".concat(e,"/manifest.json"));if(!Array.isArray(t.plugins))throw new Error("Plugin manifest JSON does not contain plugins array");_e.debug("Plugin manifest loaded:",t);for(var n=Ro(t.plugins),r=new Map,i=0;i<n.length;i+=1)for(var a=n[i],o=yield Promise.allSettled(a.map(function(){var g=wt(function*(b){var y=b.name,S=b.main,v=b.version,T=b.loader,w=T==null?void 0:T.package,x="".concat(e,"/").concat(y,"/").concat(S),P=yield rx(x);return{pluginExports:P,name:y,packageName:w,version:v}});return function(b){return g.apply(this,arguments)}}())),s=0;s<o.length;s+=1){var l=o[s];if(l.status==="fulfilled"){var u=l.value,f=u.pluginExports,h=u.name,p=u.packageName,m=u.version;Mo(r,ir,f,h,p,m)}else _e.error("Unable to load plugin '".concat(a[s].name,"'"),l.reason)}return _e.info("Plugins loaded:",r),r}catch(g){return _e.error("Unable to load plugins:",g),new Map}}),On.apply(this,arguments)}function ox(e){var t,n;return(t=(n=e.get("AuthHandlers"))===null||n===void 0?void 0:n.split(","))!==null&&t!==void 0?t:[]}function sx(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,r=ox(t),i=[...e.entries(),...n.entries()].filter(u=>{var f=Ca(u,2),h=f[1];return Lo(h)||rn(h)}).map(u=>{var f=Ca(u,2),h=f[0],p=f[1];return rn(p)?{type:ko.AUTH_PLUGIN,name:h,component:p.AuthPlugin.Component,isAvailable:p.AuthPlugin.isAvailable}:p}),a=i.filter(u=>{var f=u.isAvailable;return f(r,t)});if(a.length===0)throw new Error("No login plugins found, please register a login plugin for auth handlers: ".concat(r));a.length>1&&_e.warn("More than one login plugin available, will use the first one: ",a.map(u=>{var f=u.name;return f}).join(", "));var o=a[0],s=o.name,l=o.component;return _e.info("Using LoginPlugin",s),l}var lx=Za.createRequires(()=>ir),i1=Za.createRemoteComponent({requires:lx});function ja(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function ux(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){ja(a,r,i,o,s,"next",l)}function s(l){ja(a,r,i,o,s,"throw",l)}o(void 0)})}}function cx(e,t){return hx(e)||px(e,t)||fx(e,t)||dx()}function dx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
116
116
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fx(e,t){if(e){if(typeof e=="string")return Ia(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ia(e,t):void 0}}function Ia(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function px(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function hx(e){if(Array.isArray(e))return e}function mx(e){var t=e.pluginsUrl,n=e.getCorePlugins,r=e.children,i=c.useState(null),a=cx(i,2),o=a[0],s=a[1];return c.useEffect(function(){var u=!1;function f(){return h.apply(this,arguments)}function h(){return h=ux(function*(){var p,m=(p=yield n==null?void 0:n())!==null&&p!==void 0?p:[],g=yield ax(t);if(!u){var b=m.flatMap(y=>Do(y)?y.plugins.map(S=>[S.name,S]):[[y.name,y]]);s(new Map([...b,...g]))}}),h.apply(this,arguments)}return f(),()=>{u=!0}},[t,n]),d.jsx(Rt.Provider,{value:o,children:r})}function yx(){var e=tr();return c.useEffect(function(){e.postMessage(so(er))},[e]),null}function Aa(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function gx(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Aa(a,r,i,o,s,"next",l)}function s(l){Aa(a,r,i,o,s,"throw",l)}o(void 0)})}}function $a(e,t){return Px(e)||Sx(e,t)||vx(e,t)||bx()}function bx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
117
117
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vx(e,t){if(e){if(typeof e=="string")return ka(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ka(e,t):void 0}}function ka(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sx(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Px(e){if(Array.isArray(e))return e}var wx=new Map([["@deephaven/auth-plugins.AuthPluginParent",{AuthPlugin:bl}],["@deephaven/auth-plugins.AuthPluginPsk",{AuthPlugin:wl}],["@deephaven/auth-plugins.AuthPluginAnonymous",{AuthPlugin:gl}]]);function Ox(e){var t=e.children,n=Qe(),r=c.useContext(Rt),i=c.useState(),a=$a(i,2),o=a[0],s=a[1],l=c.useState(),u=$a(l,2),f=u[0],h=u[1];c.useEffect(function(){var b=!1;function y(){return S.apply(this,arguments)}function S(){return S=gx(function*(){try{var v=yield n.getAuthConfigValues();b||s(new Map(v))}catch(T){b||h(T)}}),S.apply(this,arguments)}return y(),()=>{b=!0}},[n]);var p=c.useMemo(()=>{if(!(r==null||o==null))try{return sx(r,o,wx)}catch(g){h(g)}},[o,r]),m=p==null||o==null;return m||f!=null?d.jsx(Ae,{isLoading:m&&f==null,errorMessage:Ge(f),"data-testid":"auth-bootstrap-loading-error"}):d.jsx(p,{authConfigValues:o,children:d.jsxs(d.Fragment,{children:[d.jsx(yx,{}),t]})})}function Ra(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function Xt(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Ra(a,r,i,o,s,"next",l)}function s(l){Ra(a,r,i,o,s,"throw",l)}o(void 0)})}}function ht(e,t){return Ex(e)||Cx(e,t)||Tx(e,t)||xx()}function xx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
118
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tx(e,t){if(e){if(typeof e=="string")return La(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?La(e,t):void 0}}function La(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cx(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Ex(e){if(Array.isArray(e))return e}var We=J.module("@deephaven/app-utils.ConnectionBootstrap");function _x(e){var t=e.children,n=xe(),r=Qe(),i=c.useState(),a=ht(i,2),o=a[0],s=a[1],l=c.useState(),u=ht(l,2),f=u[0],h=u[1],p=c.useState("connecting"),m=ht(p,2),g=m[0],b=m[1],y=g==="failed",S=g==="shutdown",v=g==="reconnecting",T=g==="not_connecting";c.useEffect(function(){var j=!1;function $(){return N.apply(this,arguments)}function N(){return N=Xt(function*(){try{var O=yield r.getAsIdeConnection();if(j)return;h(O),b("connected")}catch(_){if(j)return;s(_),b("not_connecting")}}),N.apply(this,arguments)}return $(),()=>{j=!0}},[n,r]),c.useEffect(function(){if(f==null||S)return;function j(N){var O=N.detail;We.info("Disconnect","".concat(JSON.stringify(O))),b("reconnecting")}var $=f.addEventListener(n.IdeConnection.EVENT_DISCONNECT,j);return $},[n,f,S]),c.useEffect(function(){if(f==null||S)return;function j(N){var O=N.detail;We.info("Reconnect","".concat(JSON.stringify(O))),b("connected")}var $=f.addEventListener(n.CoreClient.EVENT_RECONNECT,j);return $},[n,f,S]),c.useEffect(function(){if(f==null)return;function j(N){var O=N.detail;We.info("Shutdown","".concat(JSON.stringify(O))),s("Server shutdown: ".concat(O??"Unknown reason")),b("shutdown")}var $=f.addEventListener(n.IdeConnection.EVENT_SHUTDOWN,j);return $},[n,f]),c.useEffect(function(){if(f==null||S)return;function j(N){var O=N.detail;We.warn("Reconnect authentication failed","".concat(JSON.stringify(O))),s("Reconnect authentication failed: ".concat(O??"Unknown reason")),b("failed")}var $=f.addEventListener(n.CoreClient.EVENT_RECONNECT_AUTH_FAILED,j);return $},[n,f,S]);var w=c.useCallback(function(){var L=Xt(function*(j){if(Ct(f,"No connection available to fetch object with"),typeof j=="string")throw new Error("No URI resolvers available in Core");return f.getObject(Oo(j))});return function(j){return L.apply(this,arguments)}}(),[f]),x=c.useState(null),P=ht(x,2),E=P[0],C=P[1];c.useEffect(function(){if(f==null){C(null);return}var j=cl(Xt(function*(){return f}));return C(j),()=>{j.destroy()}},[f]);var A=c.useMemo(()=>({subscribe:(L,j)=>(j({fetch:()=>w(L),status:"ready"}),()=>{})}),[w]);function D(){We.info("Refreshing application"),window.location.reload()}return S||g==="connecting"||T?d.jsx(Ae,{"data-testid":"connection-bootstrap-loading",isLoading:o==null,errorMessage:o!=null?"".concat(o):void 0}):d.jsx(Pd.Provider,{value:f??null,children:d.jsx(wo.Provider,{value:w,children:d.jsx(Ut.Provider,{value:E,children:d.jsxs(Nt.Provider,{value:A,children:[t,d.jsx(Us,{isOpen:v,debounceMs:1e3,children:d.jsx(Ws,{icon:fd,title:d.jsxs(d.Fragment,{children:[d.jsx(Tt,{})," Attempting to reconnect..."]}),subtitle:"Please check your network connection."})}),d.jsx(yo,{confirmButtonText:"Refresh",onConfirm:D,isOpen:y,headerText:"Authentication failed",bodyText:"Credentials are invalid. Please refresh your browser to try and reconnect."})]})})})})}function a1(e){return new URL(e,"".concat(window.location))}function jx(){var e=new URLSearchParams(window.location.search);return e.get("envoyPrefix")}function Ix(){var e=jx();return e!=null?{headers:{"envoy-prefix":e}}:{headers:{}}}function Da(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Da(Object(n),!0).forEach(function(r){Ax(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Da(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ax(e,t,n){return(t=$x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $x(e){var t=kx(e,"string");return typeof t=="symbol"?t:t+""}function kx(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{action:()=>{sg(pd,Ma(Ma({},e),{},{userAgent:navigator.userAgent}),ts.getState())},shortcut:kt.EXPORT_LOGS,isGlobal:t}}function Lx(e){var t=e.children,n=wd(),r=c.useContext(co),i=c.useContext(_t),a=xl(n,r,i);return d.jsx(uo.Provider,{value:a,children:t})}function Dx(e){var t=e.children,n=Io(Xp),r=c.useContext(Rt),i=hl(r),a=En();return d.jsx(vo,{themes:i,waitForActivation:a,children:d.jsx(Uo,{children:d.jsx(Tl,{children:d.jsx(un,{density:n.gridDensity,children:t})})})})}function Mx(e,t){return Wx(e)||Ux(e,t)||Fx(e,t)||Nx()}function Nx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
118
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tx(e,t){if(e){if(typeof e=="string")return La(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?La(e,t):void 0}}function La(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cx(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Ex(e){if(Array.isArray(e))return e}var We=J.module("@deephaven/app-utils.ConnectionBootstrap");function _x(e){var t=e.children,n=xe(),r=Qe(),i=c.useState(),a=ht(i,2),o=a[0],s=a[1],l=c.useState(),u=ht(l,2),f=u[0],h=u[1],p=c.useState("connecting"),m=ht(p,2),g=m[0],b=m[1],y=g==="failed",S=g==="shutdown",v=g==="reconnecting",T=g==="not_connecting";c.useEffect(function(){var j=!1;function $(){return N.apply(this,arguments)}function N(){return N=Xt(function*(){try{var O=yield r.getAsIdeConnection();if(j)return;h(O),b("connected")}catch(E){if(j)return;s(E),b("not_connecting")}}),N.apply(this,arguments)}return $(),()=>{j=!0}},[n,r]),c.useEffect(function(){if(f==null||S)return;function j(N){var O=N.detail;We.info("Disconnect","".concat(JSON.stringify(O))),b("reconnecting")}var $=f.addEventListener(n.IdeConnection.EVENT_DISCONNECT,j);return $},[n,f,S]),c.useEffect(function(){if(f==null||S)return;function j(N){var O=N.detail;We.info("Reconnect","".concat(JSON.stringify(O))),b("connected")}var $=f.addEventListener(n.CoreClient.EVENT_RECONNECT,j);return $},[n,f,S]),c.useEffect(function(){if(f==null)return;function j(N){var O=N.detail;We.info("Shutdown","".concat(JSON.stringify(O))),s("Server shutdown: ".concat(O??"Unknown reason")),b("shutdown")}var $=f.addEventListener(n.IdeConnection.EVENT_SHUTDOWN,j);return $},[n,f]),c.useEffect(function(){if(f==null||S)return;function j(N){var O=N.detail;We.warn("Reconnect authentication failed","".concat(JSON.stringify(O))),s("Reconnect authentication failed: ".concat(O??"Unknown reason")),b("failed")}var $=f.addEventListener(n.CoreClient.EVENT_RECONNECT_AUTH_FAILED,j);return $},[n,f,S]);var w=c.useCallback(function(){var L=Xt(function*(j){if(Ct(f,"No connection available to fetch object with"),typeof j=="string")throw new Error("No URI resolvers available in Core");return f.getObject(Oo(j))});return function(j){return L.apply(this,arguments)}}(),[f]),x=c.useState(null),P=ht(x,2),_=P[0],C=P[1];c.useEffect(function(){if(f==null){C(null);return}var j=cl(Xt(function*(){return f}));return C(j),()=>{j.destroy()}},[f]);var A=c.useMemo(()=>({subscribe:(L,j)=>(j({fetch:()=>w(L),status:"ready"}),()=>{})}),[w]);function D(){We.info("Refreshing application"),window.location.reload()}return S||g==="connecting"||T?d.jsx(Ae,{"data-testid":"connection-bootstrap-loading",isLoading:o==null,errorMessage:o!=null?"".concat(o):void 0}):d.jsx(Pd.Provider,{value:f??null,children:d.jsx(wo.Provider,{value:w,children:d.jsx(Ut.Provider,{value:_,children:d.jsxs(Nt.Provider,{value:A,children:[t,d.jsx(Us,{isOpen:v,debounceMs:1e3,children:d.jsx(Ws,{icon:fd,title:d.jsxs(d.Fragment,{children:[d.jsx(Tt,{})," Attempting to reconnect..."]}),subtitle:"Please check your network connection."})}),d.jsx(yo,{confirmButtonText:"Refresh",onConfirm:D,isOpen:y,headerText:"Authentication failed",bodyText:"Credentials are invalid. Please refresh your browser to try and reconnect."})]})})})})}function a1(e){return new URL(e,"".concat(window.location))}function jx(){var e=new URLSearchParams(window.location.search);return e.get("envoyPrefix")}function Ix(){var e=jx();return e!=null?{headers:{"envoy-prefix":e}}:{headers:{}}}function Da(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Da(Object(n),!0).forEach(function(r){Ax(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Da(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ax(e,t,n){return(t=$x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $x(e){var t=kx(e,"string");return typeof t=="symbol"?t:t+""}function kx(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{action:()=>{sg(pd,Ma(Ma({},e),{},{userAgent:navigator.userAgent}),ts.getState())},shortcut:kt.EXPORT_LOGS,isGlobal:t}}function Lx(e){var t=e.children,n=wd(),r=c.useContext(co),i=c.useContext(_t),a=xl(n,r,i);return d.jsx(uo.Provider,{value:a,children:t})}function Dx(e){var t=e.children,n=Io(Xp),r=c.useContext(Rt),i=hl(r),a=En();return d.jsx(vo,{themes:i,waitForActivation:a,children:d.jsx(Uo,{children:d.jsx(Tl,{children:d.jsx(un,{density:n.gridDensity,children:t})})})})}function Mx(e,t){return Wx(e)||Ux(e,t)||Fx(e,t)||Nx()}function Nx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
119
119
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fx(e,t){if(e){if(typeof e=="string")return Na(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Na(e,t):void 0}}function Na(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ux(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Wx(e){if(Array.isArray(e))return e}function o1(e){var t=e.fontClassNames,n=e.pluginsUrl,r=e.getCorePlugins,i=e.serverUrl,a=e.logMetadata,o=e.children,s=c.useMemo(()=>Ix(),[]),l=c.useState(0),u=Mx(l,2),f=u[0],h=u[1],p=c.useCallback(()=>{},[]),m=c.useCallback(()=>{requestAnimationFrame(()=>{h(b=>b+1)})},[]);nr(p,m);var g=c.useMemo(()=>[Rx(a,!0)],[a]);return d.jsxs(cc,{store:ts,children:[d.jsx(_s,{fontClassNames:t,children:d.jsx(mx,{getCorePlugins:r,pluginsUrl:n,children:d.jsx(Dx,{children:d.jsxs(lo,{serverUrl:i,options:s,children:[d.jsx(Ox,{children:d.jsx(Od,{children:d.jsx(Lx,{children:d.jsx(_x,{children:d.jsx(js,{children:o})})})})}),d.jsx($t,{actions:g})]},f)})})}),d.jsx(Vs,{})]})}function Fa(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function Vx(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Fa(a,r,i,o,s,"next",l)}function s(l){Fa(a,r,i,o,s,"throw",l)}o(void 0)})}}function he(e,t,n){return(t=Bx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bx(e){var t=Hx(e,"string");return typeof t=="symbol"?t:t+""}function Hx(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ve=J.module("GrpcFileStorageTable");class qe{constructor(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:n;he(this,"storageService",void 0),he(this,"baseRoot",void 0),he(this,"root",void 0),he(this,"currentSize",0),he(this,"currentViewport",void 0),he(this,"listeners",[]),he(this,"viewportUpdatePromise",void 0),he(this,"currentViewportData",void 0),he(this,"childTables",new Map),this.storageService=t,this.baseRoot=n,this.root=r,r===n&&(this.doRefresh=He(this.doRefresh.bind(this),qe.REFRESH_DEBOUNCE))}removeBaseRoot(t){return Ee.removeRoot(this.baseRoot,t)}getViewportData(){var t;return this.viewportUpdatePromise||this.refreshInternal(),(t=this.viewportUpdatePromise)!==null&&t!==void 0?t:Promise.resolve({items:[],offset:0})}getSnapshot(t){throw new Error("Method not implemented.")}get size(){return this.currentSize}setExpanded(t,n){var r=t.split("/"),i=r.shift();if((i===void 0||i==="")&&(i=r.shift()),i===void 0||i==="")throw new Error("Invalid path: ".concat(t));var a=r.join("/");if(n){if(!this.childTables.has(i)){var o=new qe(this.storageService,this.baseRoot,"".concat(this.root,"/").concat(i));this.childTables.set(i,o)}if(a){var s=this.childTables.get(i);s==null||s.setExpanded(a,n)}}else if(this.childTables.has(i))if(a){var l=this.childTables.get(i);l==null||l.setExpanded(a,n)}else this.childTables.delete(i);this.currentViewport&&this.refreshInternal()}collapseAll(){this.childTables.clear(),this.currentViewport&&this.refreshInternal()}setSearch(t){throw new Error("Method not implemented.")}setViewport(t){this.currentViewport=t,this.refreshInternal()}setFilters(){throw new Error("Method not implemented.")}setSorts(){throw new Error("Method not implemented.")}setReversed(){throw new Error("Method not implemented.")}close(){this.listeners=[]}onUpdate(t){return this.listeners=[...this.listeners,t],()=>{this.listeners=this.listeners.filter(n=>n!==t)}}doRefresh(t){Ve.debug2("doRefresh",this.root),t(this.fetchData())}refresh(){var t;Ve.debug2("refresh",this.root),(t=this.viewportUpdatePromise)===null||t===void 0||t.cancel();var n=new Promise(i=>{this.doRefresh(i)}),r=je.makeCancelable(n.then(i=>{if(this.viewportUpdatePromise!==r)throw new No;return this.currentViewportData=i,this.sendUpdate(),i}));r.catch(i=>{je.isCanceled(i)||Ve.error("Error updating viewport",i)}),this.viewportUpdatePromise=r}refreshInternal(){try{this.refresh()}catch(t){je.isCanceled(t)||Ve.error("Unable to refresh data",t)}}fetchData(){var t=this;return Vx(function*(){var n=t.currentViewport;if(!n)throw new Error("No viewport set");for(var r=yield t.storageService.listItems(t.root),i=r.map(h=>({type:h.type,filename:t.removeBaseRoot(h.filename),basename:h.basename,id:t.removeBaseRoot(h.filename),isExpanded:h.type==="directory"?t.childTables.has(h.basename):void 0})).sort((h,p)=>h.type!==p.type?h.type==="directory"?-1:1:h.basename.localeCompare(p.basename)),a=0;a<i.length;a+=1){var o=i[a],s=o.basename,l=o.filename;if(l===t.removeBaseRoot("".concat(t.root,"/").concat(s))&&o.type==="directory"){var u=t.childTables.get(s);if(u!=null){u.setViewport({top:0,bottom:n.bottom-a});var f=yield u.getViewportData();i.splice(a+1,0,...f.items)}}}return t.currentSize=i.length,Ve.debug2(t.root,"items",i,n),i=i.slice(n.top,n.bottom),{items:i,offset:n.top}})()}sendUpdate(){for(var t,n=this.listeners,r=(t=this.currentViewportData)!==null&&t!==void 0?t:{items:[],offset:0},i=0;i<n.length;i+=1)n[i](r)}}he(qe,"REFRESH_DEBOUNCE",50);function Ua(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function ve(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){Ua(a,r,i,o,s,"next",l)}function s(l){Ua(a,r,i,o,s,"throw",l)}o(void 0)})}}function Re(e,t,n){return(t=Kx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kx(e){var t=Gx(e,"string");return typeof t=="symbol"?t:t+""}function Gx(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yx=J.module("GrpcFileStorage");class ar{constructor(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";Re(this,"dh",void 0),Re(this,"storageService",void 0),Re(this,"tables",[]),Re(this,"root",void 0),Re(this,"refreshTables",dc(()=>{this.tables.forEach(i=>i.refresh())},ar.REFRESH_THROTTLE)),this.dh=t,this.storageService=n,this.root=r}removeRoot(t){return Ee.removeRoot(this.root,t)}addRoot(t){return Ee.addRoot(this.root,t)}createDirectory(t){var n=this;return ve(function*(){return yield n.storageService.createDirectory(n.addRoot(t)),n.refreshTables(),{type:"directory",id:t,filename:t,basename:Ee.getBaseName(t)}})()}getTable(){var t=this;return ve(function*(){var n=new qe(t.storageService,t.root);return t.tables.push(n),n})()}saveFile(t){var n=this;return ve(function*(){var r=n.dh.storage.FileContents.text(t.content);return yield n.storageService.saveFile(n.addRoot(t.filename),r,!0),n.refreshTables(),t})()}loadFile(t){var n=this;return ve(function*(){var r=yield n.storageService.loadFile(n.addRoot(t)),i=yield r.text();return{filename:t,basename:Ee.getBaseName(t),content:i}})()}copyFile(t,n){var r=this;return ve(function*(){var i=yield r.storageService.loadFile(r.addRoot(t));yield r.storageService.saveFile(r.addRoot(n),i,!1),r.refreshTables()})()}deleteFile(t){var n=this;return ve(function*(){yield n.storageService.deleteItem(n.addRoot(t)),n.refreshTables()})()}moveFile(t,n){var r=this;return ve(function*(){yield r.storageService.moveItem(r.addRoot(t),r.addRoot(n)),r.refreshTables()})()}info(t){var n=this;return ve(function*(){var r=yield n.storageService.listItems(n.addRoot(Ee.getPath(t)),Ee.getBaseName(t));if(r.length===0)throw new Qp;if(r.length>1)throw Yx.error("More than one matching file found, should never happen.",r),new Error("More than one matching file found");var i=r[0];if(!Zp(i.type))throw new Error("Unexpected file type: ".concat(i.type));return{filename:n.removeRoot(i.filename),basename:i.basename,id:n.removeRoot(i.filename),type:i.type}})()}}Re(ar,"REFRESH_THROTTLE",150);export{o1 as AppBootstrap,u1 as AppDashboards,Ox as AuthBootstrap,_x as ConnectionBootstrap,Pd as ConnectionContext,c1 as DEFAULT_LAYOUT_CONFIG,d1 as DEFAULT_LAYOUT_CONFIG_NO_CONSOLE,ar as GrpcFileStorage,qe as GrpcFileStorageTable,f1 as GrpcLayoutStorage,p1 as LocalWorkspaceStorage,mx as PluginsBootstrap,i1 as RemoteComponent,Dx as ThemeBootstrap,h1 as UserLayoutUtils,Rx as createExportLogsContextAction,m1 as exportLayout,ox as getAuthHandlers,sx as getAuthPluginComponent,a1 as getBaseUrl,Ix as getConnectOptions,y1 as getDefaultLayout,jx as getEnvoyPrefix,fp as getPluginModuleValue,g1 as isLayoutV1,b1 as isLayoutV2,ix as loadJson,rx as loadModulePlugin,ax as loadModulePlugins,v1 as normalizeLayout,S1 as useConnection,wd as useServerConfig,P1 as useUser};
120
- //# sourceMappingURL=index-HU_kftWh.js.map
120
+ //# sourceMappingURL=index-BXgDhGXT.js.map