@deephaven/embed-widget 0.85.27 → 0.85.28-alpha.0

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 (27) hide show
  1. package/build/assets/{App-1b894938.js → App-96876e1c.js} +2 -2
  2. package/build/assets/{App-1b894938.js.map → App-96876e1c.js.map} +1 -1
  3. package/build/assets/{Chart-bf07fa93.js → Chart-2132ea4e.js} +2 -2
  4. package/build/assets/{Chart-bf07fa93.js.map → Chart-2132ea4e.js.map} +1 -1
  5. package/build/assets/IrisGrid-417c8575.js +5 -0
  6. package/build/assets/IrisGrid-417c8575.js.map +1 -0
  7. package/build/assets/{IrisGridThemeProvider-7d419017.js → IrisGridThemeProvider-13774fee.js} +3 -3
  8. package/build/assets/{IrisGridThemeProvider-7d419017.js.map → IrisGridThemeProvider-13774fee.js.map} +1 -1
  9. package/build/assets/{LocalWorkspaceStorage-b1f93301.js → LocalWorkspaceStorage-784838c4.js} +2 -2
  10. package/build/assets/{LocalWorkspaceStorage-b1f93301.js.map → LocalWorkspaceStorage-784838c4.js.map} +1 -1
  11. package/build/assets/{LogPanel-485c9c4f.js → LogPanel-954e7951.js} +2 -2
  12. package/build/assets/{LogPanel-485c9c4f.js.map → LogPanel-954e7951.js.map} +1 -1
  13. package/build/assets/{MarkdownEditor-c639105e.js → MarkdownEditor-5a34c5fc.js} +2 -2
  14. package/build/assets/{MarkdownEditor-c639105e.js.map → MarkdownEditor-5a34c5fc.js.map} +1 -1
  15. package/build/assets/{MarkdownNotebook-de87ac9c.js → MarkdownNotebook-b5659049.js} +2 -2
  16. package/build/assets/{MarkdownNotebook-de87ac9c.js.map → MarkdownNotebook-b5659049.js.map} +1 -1
  17. package/build/assets/{index-0ded6e7f.js → index-0e2eafcb.js} +6 -6
  18. package/build/assets/index-0e2eafcb.js.map +1 -0
  19. package/build/assets/{index-b49d0b43.js → index-1600c236.js} +2 -2
  20. package/build/assets/{index-b49d0b43.js.map → index-1600c236.js.map} +1 -1
  21. package/build/assets/{index-dae68be6.js → index-c232a099.js} +2 -2
  22. package/build/assets/{index-dae68be6.js.map → index-c232a099.js.map} +1 -1
  23. package/build/index.html +1 -1
  24. package/package.json +17 -17
  25. package/build/assets/IrisGrid-6104ac18.js +0 -5
  26. package/build/assets/IrisGrid-6104ac18.js.map +0 -1
  27. package/build/assets/index-0ded6e7f.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{r as u,J as H,N as so,E as c,O as lo,P as Be,Q as uo,S as co,D as je,T as Dn,H as M,U as Nn,V as An,W as fo,X as kn,Y as po,Z as vo,a0 as st,a1 as mo,a2 as Mn,a3 as Dt,a4 as We,I as J,a5 as Rn,a6 as Ln,a7 as Nt,a8 as Fn,a9 as Vn,aa as lt,ab as ho,ac as xe,ad as L,ae as Un,G as Kn,af as Hn,ag as go,ah as bo,ai as yo,aj as Bn,ak as Oo,al as Po,am as So,an as wo,ao as xo,ap as Co,aq as Eo,ar as To,as as jo,at as _o,au as $o,av as Io,aw as Do,ax as No,ay as Ao,az as ko,aA as Mo,aB as Ro,aC as Lo,aD as Fo,aE as Vo,aF as Uo,aG as Ko,aH as Ho,aI as Bo,aJ as Wo,aK as Go,aL as zo,aM as Yo,aN as qo,aO as Xo,aP as Jo,aQ as Zo,aR as Qo,aS as es,aT as ts,aU as rs,aV as ns,aW as as,aX as is,aY as os,aZ as ss,a_ as ls,a$ as us,b0 as cs,b1 as ds,M as fs,b2 as ps,b3 as vs,b4 as ms,b5 as hs,b6 as gs,b7 as bs,b8 as ye,K as ys,L as Os,R as Ps,b9 as Ss,ba as ws,bb as xs,bc as Cs,bd as Es,be as Wn,bf as Ts,bg as js}from"./vendor-9e6eb436.js";import{i as Gn,v as zn,M as Yn,b as qn,L as K,c as _s,d as $s,e as Is,f as Ds,g as Ns,h as Xn,j as As,k as ks,r as Jn,l as At,m as Ms,T as ut,C as Rs,D as Ls,n as Fs,o as Vs,p as Us,a as ce,q as kt,s as Ks,N as Hs,S as Bs,t as Ws,u as Gs,W as zs,w as Ys,x as qs,y as Xs,z as Js,A as Zs,B as Qs,E as el,F as tl,G as rl,H as nl,I as al,J as il,K as ol,O as sl,P as ll,Q as ul,R as cl,U as Ge,V as dl,X as fl,Y as pl}from"./index-b49d0b43.js";import{j as vl,k as ml,l as hl,m as gl,n as bl,o as yl,p as Ol,q as ze,r as Mt,t as Pl,T as Ye,v as Rt,w as Re,D as Zn,R as cr,I as ct,B as re,C as dt,x as Qn,y as ea,z as Sl,A as wl,F as xl,G as Cl,b as El,H as Tl,J as jl,K as _l,M as $l,L as Il,N as ta,O as ra,S as Dl,c as Nl,Q as Al,U as kl,V as na,W as Ml,X as aa,g as Rl,Y as Ll,Z as Fl,_ as Vl,$ as ia,u as de,a0 as Ul,a1 as Kl,a2 as Hl,a3 as Bl,a4 as Wl,a5 as Gl,a6 as we,E as zl,a7 as oa,a8 as sa,a9 as la,aa as qe,ab as Yl,ac as ua,ad as ca,ae as ql,af as ft,ag as Xl,ah as da,ai as Jl,aj as pt,ak as Zl,al as Ql,am as eu,an as fa,ao as pa,ap as tu,aq as va,ar as ru,as as nu,at as ma,au as dr,av as au,aw as iu,ax as ou,ay as su,az as lu,aA as uu,aB as cu,aC as du,aD as fu,aE as pu,aF as vu,aG as mu,aH as hu,aI as gu,aJ as bu,aK as yu,aL as Ou,aM as Pu,aN as Su,aO as wu,aP as ha,aQ as ga,P as ba,aR as ya,aS as Oa,i as Pa,aT as xu,aU as Cu,aV as Eu,aW as Tu,aX as ju,aY as _u,aZ as $u,a_ as Iu,a$ as Du,b0 as Nu,a as Au,b1 as ku,b2 as Mu,b3 as Ru,b4 as Lu,b5 as Fu,b6 as Vu,b7 as Uu,b8 as Ku,b9 as Hu,ba as Bu,bb as Wu,bc as Sa,bd as Gu,be as zu,bf as ue,bg as Yu,bh as qu}from"./LogPanel-485c9c4f.js";import{e as Xe,C as Xu,g as wa,h as Ju,a as Oe,F as Zu,f as Qu,i as ec,d as tc,j as Ce,U as Je,k as xa,m as Ca,D as fr,n as rc,o as nc,p as ac,l as ic,s as oc,q as sc,c as lc,S as uc}from"./LocalWorkspaceStorage-b1f93301.js";import{A as kb,w as Mb,x as Rb,G as Lb,L as Fb,r as Vb,B as Ub,z as Kb,v as Hb,t as Bb,y as Wb,u as Gb,b as zb}from"./LocalWorkspaceStorage-b1f93301.js";import{u as cc,C as Ea,F as Lt,a as dc,S as fc,B as pc,b as vc,D as mc,c as hc,d as Ft,e as vt,I as gc,f as bc,T as yc,g as Oc,h as Vt,i as Pc,j as Ta,k as ja,l as Sc,m as _a,n as Ut,o as $a,p as Ia,q as wc,r as xc,s as Cc,t as Ec,v as Tc,w as Da,x as jc,y as _c,z as $c,A as Na,E as Aa,L as Ic,G as Dc,H as Nc,J as Ac,K as kc,M as Mc,N as Rc,O as ka,P as Lc,Q as pr,R as Fc,U as Vc,V as Uc,W as Kc,X as Hc,Y as Bc,Z as Wc,_ as Gc,$ as zc,a0 as Yc,a1 as qc,a2 as Xc,a3 as Jc,a4 as Zc,a5 as Qc,a6 as ed,a7 as td,a8 as rd,a9 as nd}from"./index-0ded6e7f.js";import{D as ad}from"./DownsamplingError-8e6bdb73.js";import{e as Ve,c as id,d as od,a as sd,f as ld,b as ud,g as cd,h as dd,i as fd,j as Ma,u as pd,k as Ue,l as vd,m as md,n as Ee,o as hd,p as Le,q as mt,r as Ra,s as La,t as Kt,v as Ht,w as Fa,x as Va,y as q,T as Bt,z as Wt,A as Gt,M as zt,D as Ua,B as gd,C as ht,E as bd,F as yd,G as Od,H as Pd,I as Sd,J as wd,K as xd,L as Cd,N as Ed,O as Ka,P as Td,Q as jd,R as _d,S as $d,U as Ha,V as Id,W as Dd,X as Nd,Y as Ad,Z as kd,_ as Ba,$ as Md,a0 as Rd,a1 as Ld,a2 as Fd,a3 as Vd,a4 as Ud,a5 as Kd,a6 as Hd,a7 as Bd,a8 as Wd,a9 as Gd,aa as zd,ab as Yd,ac as qd,ad as Xd,ae as Wa,af as Jd,ag as Zd,ah as Qd,ai as ef,aj as tf,ak as Fe,al as rf,am as Ga,an as nf,ao as Yt,ap as le,aq as vr,ar as za,as as Ya,at as af,au as of,av as sf,aw as lf,ax as uf,ay as cf,az as df,aA as ff,aB as pf,aC as vf,aD as mf,aE as hf,aF as gf,aG as bf,aH as yf,aI as Of,aJ as Pf,aK as Sf,aL as wf,aM as xf,aN as Cf,aO as Ef,aP as Tf,aQ as jf,aR as _f,aS as $f,aT as If,aU as Df,aV as Nf,aW as Af,aX as kf,aY as qa,aZ as Mf,a_ as Rf,a$ as Lf,b0 as Ff,b1 as Vf,b2 as Uf,b3 as Kf,b4 as Hf,b5 as Bf,b6 as Wf,b7 as Gf,b8 as zf}from"./IrisGridThemeProvider-7d419017.js";import{m as Yf,u as Xa}from"./useMergeRef-04ff7062.js";import"./helpers-de833af9.js";var qf=["children","keepMounted"];function mr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mr(Object(r),!0).forEach(function(n){Xf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xf(t,e,r){return e=Jf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jf(t){var e=Zf(t,"string");return typeof e=="symbol"?e:String(e)}function Zf(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qf(t,e){if(t==null)return{};var r=ep(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ep(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function tp(t){var{children:e,keepMounted:r=!1}=t,n=Qf(t,qf),a=r&&typeof e!="function",i=u.useRef(new Map),o=u.useMemo(()=>{var l=[],d=new Map;return a?(H.Children.forEach(e,f=>{if(!(f==null||f.key==null)){var p=i.current.get(f.key);p==null&&(p=so({attributes:{style:"display: contents"}})),d.set(f.key,p),l.push(c.jsx(lo,{node:p,children:f.props.children},f.key))}}),i.current=d,l):(i.current=d,l)},[e,a]),s=u.useMemo(()=>{var l=[];return a&&H.Children.forEach(e,d=>{if(d==null||d.key==null){l.push(d);return}var f=i.current.get(d.key);if(f==null){l.push(d);return}l.push(c.jsx(Be,{children:c.jsx(uo,{node:f})},d.key))}),l},[e,a]);return c.jsxs(c.Fragment,{children:[a&&o,c.jsx(co,hr(hr({},n),{},{children:a?s:e}))]})}function rp(t,e){return t===0?0:e==="all"||t===e.size?"all":e.size}function Ja(t,e){return t===e?!0:t==="all"||e==="all"||t.size!==e.size?!1:[...t.keys()].every(r=>e.has(r))}function Za(t,e){return t.isInverted===e.isInverted&&Ja(t.selection,e.selection)}function Qa(t,e,r){if(t==="all")return"all";var n=[...t.keys()];return new Set(n.map(a=>{var i=e(a);if(i===void 0)throw new Error("Could not find item with key ".concat(a));return r(i)}))}function ei(t,e,r){var n=t==="all"||t.size>e/2,a=t;return n&&(a=t==="all"?new Set:new Set([...vl(0,e-1)].map(r).filter(i=>!t.has(i)))),{selection:a,isInverted:n}}function np(t,e){return u.useCallback(function(){var r=t(...arguments);return e(),r},[e,t])}function qt(t,e){return u.useCallback(r=>{typeof t=="function"?t(e(r)):t.current=e(r)},[e,t])}function ti(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gn,[e,r]=u.useState(0),[n,a]=u.useState(0),[i,o]=u.useState(0),[s,l]=u.useState(0),d=u.useMemo(()=>new DOMRect(e,n,i,s),[s,i,e,n]),[f,p]=u.useState(null),v=qt(p,t),m=u.useCallback(g=>{var w,[h]=g,y=(w=h==null?void 0:h.contentRect)!==null&&w!==void 0?w:{x:0,y:0,width:0,height:0};r(y.x),a(y.y),o(y.width),l(y.height)},[]);return Xe(f,m),{ref:v,contentRect:d}}function ap(t){var[e,r]=u.useState(!0);return u.useEffect(()=>{var n=setTimeout(()=>{r(!1)},t);return()=>{clearTimeout(n)}},[t]),e}function ip(t){var[e,r]=u.useState(t);return u.useEffect(()=>{r(t)},[t]),[e,r]}function op(t,e,r,n){var a=u.useRef(0);u.useEffect(()=>{a.current>=r||n&&(a.current+=1,t())},[r,n,...e])}function ri(t,e){var r=u.useRef(t),n=e(r.current,t)?r.current:t;return r.current=n,n}function sp(t){t.preventDefault()}function ni(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=u.useMemo(()=>"useSubmitButtonRef-".concat(je()),[]),r=u.useCallback(i=>{var o;i==null||(o=i.UNSAFE_getDOMNode())===null||o===void 0||o.setAttribute("form",e)},[e]),n=u.useMemo(()=>({id:e,onSubmit:t?void 0:sp}),[e,t]),a=u.useMemo(()=>({form:e,ref:r}),[e,r]);return{formProps:n,submitButtonProps:a}}function ai(t,e,r){var{getItem:n,selectedKeys:a,items:i}=t;return u.useMemo(()=>{var{selection:o,isInverted:s}=ei(a,i.length,r);return{selection:Qa(o,n,e),isInverted:s}},[a,i.length,r,n,e])}function ii(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gn,r=u.useRef();return u.useEffect(()=>()=>{var n;return(n=r.current)===null||n===void 0?void 0:n.call(r)},[]),u.useCallback(n=>{var a;(a=r.current)===null||a===void 0||a.call(r);var i=e(n);i&&(i.addEventListener("scroll",t),r.current=()=>{i.removeEventListener("scroll",t),r.current=void 0})},[e,t])}function gr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function br(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gr(Object(r),!0).forEach(function(n){lp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function lp(t,e,r){return e=up(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function up(t){var e=cp(t,"string");return typeof e=="symbol"?e:String(e)}function cp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dp(t,e,r,n){var a=arguments.length===4;return u.useCallback(i=>{var o=a?i??n:i;r(br(br({},t),{},{[e]:o}))},[r,t,e,a,n])}function _e(t,e){var[r,n]=u.useState(!0),[a,i]=u.useState(t),[o,s]=u.useState(t),[l,d]=u.useState(e);return(t!==o||e!==l)&&(n(!0),s(t),d(e)),u.useEffect(()=>{var f=!1,p=setTimeout(()=>{f||(n(!1),i(t))},e);return()=>{f=!0,clearTimeout(p)}},[t,e]),{isDebouncing:r,value:a}}function oi(t,e){return u.useCallback(r=>{if(r!=null){var n=e==null?[r]:r.querySelectorAll(e);n.forEach(a=>{Object.entries(t).forEach(i=>{var[o,s]=i;a.setAttribute(o,s)})})}},[t,e])}var si={spellCheck:!1};function fp(t){var e=oi(si,t);return qt(e,Ve)}const pp=Object.freeze(Object.defineProperty({__proto__:null,SPELLCHECK_FALSE_ATTRIBUTE:si,createValidationProps:id,defaultGetKey:od,extractSpectrumHTMLElement:Ve,extractSpectrumLastChildHTMLElement:sd,findSpectrumComboBoxScrollArea:ld,findSpectrumPickerScrollArea:ud,findSpectrumPopoverScrollArea:cd,getPositionOfSelectedItem:dd,getSelectedItemCountOrAll:rp,identityExtractHTMLElement:fd,isElementOfType:Ma,isSelectionEqual:Ja,isSelectionMaybeInvertedEqual:Za,mapSelection:Qa,mergeRefs:Yf,optimizeSelection:ei,useAsyncInterval:ml,useCallbackWithAction:np,useCheckOverflow:pd,useContentRect:ti,useContextOrThrow:hl,useCopyToClipboard:cc,useDebouncedCallback:Ue,useDebouncedValue:_e,useDelay:ap,useDependentState:ip,useEffectNTimesWhen:op,useFormWithDetachedSubmitButton:ni,useForwardedRef:gl,useIsEqualMemo:ri,useIsMountedRef:bl,useMappedRef:qt,useMappedSelection:ai,useMergeRef:Xa,useOnScrollOffsetChangeCallback:vd,useOnScrollRef:ii,usePopoverOnScrollRef:md,usePrevious:yl,usePromiseFactory:Ee,usePropChangeCallback:dp,useResizeObserver:Xe,useSetAttributesCallback:oi,useSpectrumDisableSpellcheckRef:fp,useThrottledCallback:Ol,useWindowedListData:hd},Symbol.toStringTag,{value:"Module"}));var vp=["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 mp(t,e){if(t==null)return{};var r=hp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function hp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function li(t){var{"aria-label":e,"aria-labelledby":r,"aria-describedby":n,"aria-details":a,marginX:i,marginY:o,width:s,height:l,minWidth:d,minHeight:f,maxWidth:p,maxHeight:v,flex:m,flexGrow:g,flexShrink:w,flexBasis:h,justifySelf:y,alignSelf:O,order:j,gridArea:T,gridColumn:b,gridRow:E,gridColumnStart:$,gridColumnEnd:_,gridRowStart:k,gridRowEnd:A,position:B,zIndex:x,top:P,bottom:S,start:I,end:R,left:U,right:W,isHidden:G}=t,C=mp(t,vp);return{ariaLabelProps:{"aria-label":e,"aria-labelledby":r,"aria-describedby":n,"aria-details":a},styleProps:{marginX:i,marginY:o,width:s,height:l,minWidth:d,minHeight:f,maxWidth:p,maxHeight:v,flex:m,flexGrow:g,flexShrink:w,flexBasis:h,justifySelf:y,alignSelf:O,order:j,gridArea:T,gridColumn:b,gridRow:E,gridColumnStart:$,gridColumnEnd:_,gridRowStart:k,gridRowEnd:A,position:B,zIndex:x,top:P,bottom:S,start:I,end:R,left:U,right:W,isHidden:G},componentProps:C}}function ui(t){var{normalizedItems:e,defaultSelectedKeys:r,disabledKeys:n,selectedKeys:a,onChange:i}=t,o=u.useMemo(()=>Le(a),[a]),s=u.useMemo(()=>Le(r),[r]),l=u.useMemo(()=>Le(n),[n]),d=u.useCallback(f=>{if(i!=null){if(f==="all"){i("all");return}var p=new Set;e.forEach(v=>{f.has(String(mt(v)))&&p.add(mt(v))}),i(p)}},[e,i]);return{selectedStringKeys:o,defaultSelectedStringKeys:s,disabledStringKeys:l,onStringSelectionChange:d}}function gp(){var{selectedThemeKey:t,setSelectedThemeKey:e,themes:r}=ze(),n=u.useCallback(a=>{e(a)},[e]);return c.jsx(Dn,{label:"Pick a color scheme",items:r,selectedKey:t,onSelectionChange:n,children:a=>c.jsx(Be,{children:a.name},a.themeKey)})}function bp(t){var{className:e,style:r}=t;return c.jsx("div",{className:M("dh-logo",e),style:r})}var yp=["UNSAFE_className"],Op=["defaultSelectedKey","disabledKeys","selectedKey","ref"];function yr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Or(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yr(Object(r),!0).forEach(function(n){Pp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Pp(t,e,r){return e=Sp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sp(t){var e=wp(t,"string");return typeof e=="symbol"?e:String(e)}function wp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pr(t,e){if(t==null)return{};var r=xp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function xp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var ci=H.forwardRef(function(e,r){var{UNSAFE_className:n}=e,a=Pr(e,yp),i=Ra(a),{defaultSelectedKey:o,disabledKeys:s,selectedKey:l,ref:d}=i,f=Pr(i,Op),p=Xa(r,d);return c.jsx(Dn,Or(Or({},f),{},{ref:p,UNSAFE_className:M("dh-picker",n),defaultSelectedKey:o,disabledKeys:s,selectedKey:l}))});ci.displayName="Picker";var Cp=["UNSAFE_className"],Ep=["forceRerenderKey","ref"];function Sr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function wr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sr(Object(r),!0).forEach(function(n){Tp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Tp(t,e,r){return e=jp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jp(t){var e=_p(t,"string");return typeof e=="symbol"?e:String(e)}function _p(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xr(t,e){if(t==null)return{};var r=$p(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $p(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function di(t){var{UNSAFE_className:e}=t,r=xr(t,Cp),n=La(r),{forceRerenderKey:a,ref:i}=n,o=xr(n,Ep);return u.createElement(Nn,wr(wr({},o),{},{key:a,ref:i,UNSAFE_className:M("dh-combobox","dh-combobox-normalized",e)}))}var Ip=["onScroll"];function Cr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function $e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Cr(Object(r),!0).forEach(function(n){Dp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Dp(t,e,r){return e=Np(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Np(t){var e=Ap(t,"string");return typeof e=="symbol"?e:String(e)}function Ap(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kp(t,e){if(t==null)return{};var r=Mp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Mp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Xt(t){var e,r,{ariaLabelProps:n,componentProps:a,styleProps:i}=li(t),{onScroll:o=Mt}=a,s=kp(a,Ip),{scale:l}=Kt(),d=ii(o,Ve),{ref:f,contentRect:p}=ti(Ve);return c.jsx(An,$e($e({direction:"column",ref:f},i),{},{minHeight:(e=i.minHeight)!==null&&e!==void 0?e:1,UNSAFE_className:M("dh-list-view-wrapper","dh-list-view-wrapper-density-".concat((r=s.density)!==null&&r!==void 0?r:"regular"),"dh-list-view-wrapper-scale-".concat(l),i.UNSAFE_className),children:p.height===0?null:c.jsx(fo,$e($e({ref:d},n),s))}))}var Rp=["children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","UNSAFE_className","onChange","onScroll","onSelectionChange"];function Er(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Tr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Er(Object(r),!0).forEach(function(n){Lp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Er(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Lp(t,e,r){return e=Fp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fp(t){var e=Vp(t,"string");return typeof e=="symbol"?e:String(e)}function Vp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Up(t,e){if(t==null)return{};var r=Kp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Kp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Hp(t){var{children:e,tooltip:r=!0,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,UNSAFE_className:o,onChange:s,onScroll:l=Mt,onSelectionChange:d}=t,f=Up(t,Rp),p=u.useMemo(()=>Ht(r,"bottom"),[r]),v=u.useMemo(()=>Fa(e,p),[e,p]);return c.jsx(Xt,Tr(Tr({},f),{},{UNSAFE_className:M("dh-list-view",o),selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,onScroll:l,onSelectionChange:s??d,children:v}))}var Bp=["normalizedItems","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","showItemIcons","actions","UNSAFE_className","onChange","onSelectionChange"];function jr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function _r(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jr(Object(r),!0).forEach(function(n){Wp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wp(t,e,r){return e=Gp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gp(t){var e=zp(t,"string");return typeof e=="symbol"?e:String(e)}function zp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yp(t,e){if(t==null)return{};var r=qp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function qp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function fi(t){var{normalizedItems:e,tooltip:r=!0,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,showItemIcons:o,actions:s,UNSAFE_className:l,onChange:d,onSelectionChange:f}=t,p=Yp(t,Bp),v=u.useMemo(()=>Ht(r,"bottom"),[r]),m=Va({itemIconSlot:"illustration",showItemDescriptions:!1,showItemIcons:o,tooltipOptions:v,actions:s}),g="".concat(o,"-").concat(v==null?void 0:v.placement),{selectedStringKeys:w,defaultSelectedStringKeys:h,disabledStringKeys:y,onStringSelectionChange:O}=ui({normalizedItems:e,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,onChange:d??f});return u.createElement(Xt,_r(_r({},p),{},{UNSAFE_className:M("dh-list-view-normalized",l),key:g,items:e,selectedKeys:w,defaultSelectedKeys:h,disabledKeys:y,onSelectionChange:O}),m)}var Xp=["color","UNSAFE_style"];function $r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ie(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$r(Object(r),!0).forEach(function(n){Jp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Jp(t,e,r){return e=Zp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zp(t){var e=Qp(t,"string");return typeof e=="symbol"?e:String(e)}function Qp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ev(t,e){if(t==null)return{};var r=tv(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function tv(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var Jt=u.forwardRef((t,e)=>{var{color:r,UNSAFE_style:n}=t,a=ev(t,Xp),i=u.useMemo(()=>Ie(Ie({},n),{},{color:q(r)}),[r,n]);return c.jsx(kn,Ie(Ie({},a),{},{ref:e,UNSAFE_style:i}))});Jt.displayName="Heading";var rv=["backgroundColor","borderColor","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderXColor","borderYColor","UNSAFE_style"];function Ir(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function De(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(r),!0).forEach(function(n){nv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nv(t,e,r){return e=av(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function av(t){var e=iv(t,"string");return typeof e=="symbol"?e:String(e)}function iv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ov(t,e){if(t==null)return{};var r=sv(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function sv(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var pi=u.forwardRef((t,e)=>{var{backgroundColor:r,borderColor:n,borderStartColor:a,borderEndColor:i,borderTopColor:o,borderBottomColor:s,borderXColor:l,borderYColor:d,UNSAFE_style:f}=t,p=ov(t,rv),{direction:v}=po(),m=u.useMemo(()=>{var g={};return n!==void 0&&(g.borderColor=q(n)),l!==void 0&&(g.borderLeftColor=q(l),g.borderRightColor=q(l)),d!==void 0&&(g.borderTopColor=q(d),g.borderBottomColor=q(d)),a!==void 0&&(g[v==="rtl"?"borderRightColor":"borderLeftColor"]=q(a)),i!==void 0&&(g[v==="rtl"?"borderLeftColor":"borderRightColor"]=q(i)),o!==void 0&&(g.borderTopColor=q(o)),s!==void 0&&(g.borderBottomColor=q(s)),De(De({},f),{},{backgroundColor:q(r)},g)},[r,f,n,a,i,o,s,l,d,v]);return c.jsx(vo,De(De({},p),{},{ref:e,UNSAFE_style:m}))});pi.displayName="View";var lv=["children"];function Dr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dr(Object(r),!0).forEach(function(n){uv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function uv(t,e,r){return e=cv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cv(t){var e=dv(t,"string");return typeof e=="symbol"?e:String(e)}function dv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fv(t,e){if(t==null)return{};var r=pv(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function pv(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function vv(t){var{children:e}=t,r=fv(t,lv),n=u.useMemo(()=>Pl(e).map(a=>Ma(a,st)?a:c.jsx(st,{value:String(a),children:String(a)},String(a))),[e]);return c.jsx(mo,Nr(Nr({},r),{},{children:n}))}var mv=["ariaLabel","icon","isQuiet","labelText","children","onOpenChange","tooltip"];function Ar(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ar(Object(r),!0).forEach(function(n){hv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ar(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function hv(t,e,r){return e=gv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gv(t){var e=bv(t,"string");return typeof e=="symbol"?e:String(e)}function bv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yv(t,e){if(t==null)return{};var r=Ov(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ov(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function vi(t){var{ariaLabel:e,icon:r,isQuiet:n,labelText:a,children:i,onOpenChange:o,tooltip:s}=t,l=yv(t,mv),d=a==null&&s!=null?"action-button-icon-with-tooltip":void 0;return c.jsxs(Mn,{type:"popover",onOpenChange:o,children:[c.jsxs(Dt,kr(kr({},l),{},{"aria-label":e??a,isQuiet:n,children:[c.jsx(We,{UNSAFE_className:d,children:c.jsx(J,{icon:r})}),a==null?null:c.jsx(Bt,{children:a}),s==null?null:c.jsx(Ye,{children:s})]})),i]})}function Mr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ne(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mr(Object(r),!0).forEach(function(n){Pv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Pv(t,e,r){return e=Sv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sv(t){var e=wv(t,"string");return typeof e=="symbol"?e:String(e)}function wv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mi(t){var{heading:e,confirmationButtonLabel:r,children:n,onCancel:a,onConfirm:i}=t,{formProps:o,submitButtonProps:s}=ni();return c.jsxs(Rn,{children:[c.jsx(Jt,{level:3,UNSAFE_className:Wt.spectrumDialogComponentHeading,children:e}),c.jsx(Ln,{}),c.jsx(Nt,{children:c.jsx(Fn,Ne(Ne({},o),{},{children:n}))}),c.jsxs(Vn,{children:[c.jsx(lt,{variant:"secondary",onPress:a,children:"Cancel"}),c.jsx(lt,Ne(Ne({},s),{},{style:"fill",variant:"negative",onPress:i,type:"submit",children:r}))]})]})}function xv(t){var{ariaLabel:e,heading:r,confirmationButtonLabel:n,isHidden:a,children:i,tooltip:o,onConfirm:s}=t,l=u.useCallback(d=>c.jsx(mi,{heading:r,confirmationButtonLabel:n,onCancel:d,onConfirm:()=>{d(),s()},children:i}),[i,n,r,s]);return c.jsx(vi,{ariaLabel:e,icon:zn,isHidden:a,isQuiet:!0,height:Gt,tooltip:o,children:l})}var Cv=["icon","label","tooltip"];function Rr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Lr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rr(Object(r),!0).forEach(function(n){Ev(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ev(t,e,r){return e=Tv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tv(t){var e=jv(t,"string");return typeof e=="symbol"?e:String(e)}function jv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _v(t,e){if(t==null)return{};var r=$v(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $v(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function hi(t){var{icon:e,label:r,tooltip:n}=t,a=_v(t,Cv);return c.jsxs(Dt,Lr(Lr({},a),{},{"aria-label":r,isQuiet:!0,height:Gt,children:[c.jsx(We,{UNSAFE_className:n==null?void 0:"action-button-icon-with-tooltip",children:c.jsx(J,{icon:e})}),n==null?null:c.jsx(Ye,{children:n})]}))}hi.displayName="IconActionButton";function Fr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Iv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fr(Object(r),!0).forEach(function(n){te(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function te(t,e,r){return e=Dv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Dv(t){var e=Nv(t,"string");return typeof e=="symbol"?e:String(e)}function Nv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Av=100,gt;(function(t){t.UP="UP",t.DOWN="DOWN"})(gt||(gt={}));class X extends u.Component{constructor(e){super(e),te(this,"popper",void 0),te(this,"cbContainer",void 0),te(this,"menuContainer",void 0),te(this,"input",void 0),te(this,"getCachedFilteredOptions",ho((n,a)=>n.filter(i=>i.title.toLowerCase().indexOf(a.toLowerCase())>=0)));var{popperOptions:r}=this.props;r=Iv({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},r),this.state={title:"",filteredOptions:[],keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,invalid:!1,popperOptions:r},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=xe(this.updateInputValue,Av),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=H.createRef(),this.cbContainer=H.createRef(),this.menuContainer=H.createRef(),this.input=H.createRef()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}getValueAndValidate(e){if(!e)return this.setState({invalid:!1}),{value:e,isValid:!1};var{options:r}=this.props,n=r.filter(a=>a.title.toLowerCase()===e.toLowerCase());return n.length<1?(this.setState({invalid:!0}),{value:e,isValid:!1}):(this.setState({invalid:!1}),{value:n[0].value,isValid:!0})}updateInputValue(e){var{menuIsOpen:r}=this.state,{value:n,isValid:a}=this.getValueAndValidate(e);r&&this.processFilterChange(e),this.fireOnChange(n,a)}fireOnChange(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,{onChange:n}=this.props;n(e,r)}processFilterChange(e){var r,{options:n}=this.props,{menuIsOpen:a}=this.state,i=e?this.getCachedFilteredOptions(n,e):n,o=i.length===1&&i[0].title===e;if(this.setState({filteredOptions:i,keyboardOptionIndex:0}),o&&a){this.closeMenu();return}(r=this.popper.current)===null||r===void 0||r.scheduleUpdate()}resetValue(){this.setState({title:""}),this.fireOnChange("")}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var r,{filteredOptions:n,keyboardOptionIndex:a}=this.state,i=n[a];switch(e.key){case"Enter":case"ArrowRight":e.stopPropagation(),e.preventDefault(),i!=null&&(this.setState({title:i.title,invalid:!1}),this.fireOnChange(i.value)),this.closeMenu(),(r=this.input.current)===null||r===void 0||r.focus();break;case"ArrowUp":e.stopPropagation(),e.preventDefault(),this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.UP);break;case"ArrowDown":e.stopPropagation(),e.preventDefault(),this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Tab":if(e.stopPropagation(),e.preventDefault(),e.shiftKey){this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.UP);break}this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Escape":e.preventDefault(),e.stopPropagation(),this.closeMenu();break}}navigateMenu(e){var{filteredOptions:r,keyboardOptionIndex:n}=this.state,a=n;e===X.MENU_NAVIGATION_DIRECTION.UP?n>0?(a=(a-1)%r.length,this.setState({keyboardOptionIndex:a})):n===0&&(a=r.length-1,this.setState({keyboardOptionIndex:a})):e===X.MENU_NAVIGATION_DIRECTION.DOWN&&n<r.length&&(a=(a+1)%r.length,this.setState({keyboardOptionIndex:a})),this.scrollOptionIntoView(a)}handleInputKeyDown(e){var{onEnter:r}=this.props,{menuIsOpen:n}=this.state;n?this.handleMenuKeyDown(e):e.key==="Enter"?r():e.key==="Escape"?(this.resetValue(),e.preventDefault(),e.stopPropagation()):e.key==="ArrowRight"||e.key==="ArrowLeft"||e.key==="Tab"||e.key==="Shift"||this.openMenu()}handleInputChange(e){this.setState({title:e.target.value}),this.updateInputValue(e.target.value)}handleOptionClick(e){var r;this.setState({title:e.title,invalid:!1}),this.fireOnChange(e.value),this.closeMenu(),(r=this.input.current)===null||r===void 0||r.focus()}handelInputFocus(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputClick(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputBlur(e){var{menuIsOpen:r}=this.state;r&&e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuBlur(e){e.relatedTarget===this.input.current||e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var e;(e=this.input.current)===null||e===void 0||e.focus()}handleMenuExited(){var{menuIsOpen:e}=this.state;e&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}openMenu(){var{title:e}=this.state;this.processFilterChange(e),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var r;(r=this.popper.current)===null||r===void 0||r.show()})}closeMenu(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1,keyboardOptionIndex:0}),r){var n;(n=this.input.current)===null||n===void 0||n.focus()}(e=this.popper.current)===null||e===void 0||e.hide()}scrollOptionIntoView(e){if(this.menuContainer.current){var r;(r=this.menuContainer.current.children.item(e))===null||r===void 0||r.scrollIntoView({behavior:"smooth",block:"nearest"})}}renderMenuElement(){var{inputWidth:e}=this.state;return c.jsx("div",{className:M("aci-options"),ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,style:{width:e},onBlur:this.handleMenuBlur,children:this.renderOptions()})}renderOptions(){var{noMatchText:e}=this.props,{title:r,filteredOptions:n}=this.state;return r&&n.length===0?c.jsx("div",{className:"no-match",children:e}):n.map((a,i)=>this.renderOption(a,i))}renderOption(e,r){var{keyboardOptionIndex:n}=this.state,a="option-".concat(r,"-").concat(e.value);return c.jsx("button",{type:"button",className:M("aci-option-btn",{"keyboard-active":n===r}),onClick:()=>this.handleOptionClick(e),onFocus:()=>this.setState({keyboardOptionIndex:r}),children:e.title},a)}render(){var{options:e,inputPlaceholder:r,disabled:n,className:a,defaultTitle:i,spellCheck:o,"data-testid":s}=this.props,{title:l,menuIsOpen:d,popperOptions:f,invalid:p}=this.state;return c.jsxs("div",{className:"aci-container",ref:this.cbContainer,children:[c.jsx("input",{value:l||i,className:M("form-control",a,"aci-input",{"is-invalid":p&&!d}),ref:this.input,onChange:this.handleInputChange,placeholder:r||e[0].title,disabled:n,onFocus:this.handelInputFocus,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:o,"data-testid":s}),c.jsx(Rt,{ref:this.popper,options:f,className:M("aci-options-popper interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})}}te(X,"propTypes",{options:L.arrayOf(L.shape({title:L.string.isRequired,value:L.string.isRequired})).isRequired,popperOptions:L.shape({}),onChange:L.func,inputPlaceholder:L.string,disabled:L.bool,className:L.string,defaultTitle:L.string,spellCheck:L.bool,onEnter:L.func,noMatchText:L.string,"data-testid":L.string});te(X,"defaultProps",{onChange(){},inputPlaceholder:"",disabled:!1,className:"",defaultTitle:"",popperOptions:null,spellCheck:!0,onEnter(){},noMatchText:"No matching items found","data-testid":void 0});te(X,"MENU_NAVIGATION_DIRECTION",gt);const kv=X;function Zt(t){var{className:e="",value:r,onChange:n,spellCheck:a=!1,placeholder:i="",disabled:o=!1,delimiter:s="",id:l="","data-testid":d}=t,[f,p]=u.useState(r),[v,m]=u.useState(!1),g=u.useRef(null);u.useEffect(function(){p(r)},[r]);function w($){return $.trim().split(s).filter(_=>_).join(`
1
+ import{r as u,J as H,N as so,E as c,O as lo,P as Be,Q as uo,S as co,D as je,T as Dn,H as M,U as Nn,V as An,W as fo,X as kn,Y as po,Z as vo,a0 as st,a1 as mo,a2 as Mn,a3 as Dt,a4 as We,I as J,a5 as Rn,a6 as Ln,a7 as Nt,a8 as Fn,a9 as Vn,aa as lt,ab as ho,ac as xe,ad as L,ae as Un,G as Kn,af as Hn,ag as go,ah as bo,ai as yo,aj as Bn,ak as Oo,al as Po,am as So,an as wo,ao as xo,ap as Co,aq as Eo,ar as To,as as jo,at as _o,au as $o,av as Io,aw as Do,ax as No,ay as Ao,az as ko,aA as Mo,aB as Ro,aC as Lo,aD as Fo,aE as Vo,aF as Uo,aG as Ko,aH as Ho,aI as Bo,aJ as Wo,aK as Go,aL as zo,aM as Yo,aN as qo,aO as Xo,aP as Jo,aQ as Zo,aR as Qo,aS as es,aT as ts,aU as rs,aV as ns,aW as as,aX as is,aY as os,aZ as ss,a_ as ls,a$ as us,b0 as cs,b1 as ds,M as fs,b2 as ps,b3 as vs,b4 as ms,b5 as hs,b6 as gs,b7 as bs,b8 as ye,K as ys,L as Os,R as Ps,b9 as Ss,ba as ws,bb as xs,bc as Cs,bd as Es,be as Wn,bf as Ts,bg as js}from"./vendor-9e6eb436.js";import{i as Gn,v as zn,M as Yn,b as qn,L as K,c as _s,d as $s,e as Is,f as Ds,g as Ns,h as Xn,j as As,k as ks,r as Jn,l as At,m as Ms,T as ut,C as Rs,D as Ls,n as Fs,o as Vs,p as Us,a as ce,q as kt,s as Ks,N as Hs,S as Bs,t as Ws,u as Gs,W as zs,w as Ys,x as qs,y as Xs,z as Js,A as Zs,B as Qs,E as el,F as tl,G as rl,H as nl,I as al,J as il,K as ol,O as sl,P as ll,Q as ul,R as cl,U as Ge,V as dl,X as fl,Y as pl}from"./index-1600c236.js";import{j as vl,k as ml,l as hl,m as gl,n as bl,o as yl,p as Ol,q as ze,r as Mt,t as Pl,T as Ye,v as Rt,w as Re,D as Zn,R as cr,I as ct,B as re,C as dt,x as Qn,y as ea,z as Sl,A as wl,F as xl,G as Cl,b as El,H as Tl,J as jl,K as _l,M as $l,L as Il,N as ta,O as ra,S as Dl,c as Nl,Q as Al,U as kl,V as na,W as Ml,X as aa,g as Rl,Y as Ll,Z as Fl,_ as Vl,$ as ia,u as de,a0 as Ul,a1 as Kl,a2 as Hl,a3 as Bl,a4 as Wl,a5 as Gl,a6 as we,E as zl,a7 as oa,a8 as sa,a9 as la,aa as qe,ab as Yl,ac as ua,ad as ca,ae as ql,af as ft,ag as Xl,ah as da,ai as Jl,aj as pt,ak as Zl,al as Ql,am as eu,an as fa,ao as pa,ap as tu,aq as va,ar as ru,as as nu,at as ma,au as dr,av as au,aw as iu,ax as ou,ay as su,az as lu,aA as uu,aB as cu,aC as du,aD as fu,aE as pu,aF as vu,aG as mu,aH as hu,aI as gu,aJ as bu,aK as yu,aL as Ou,aM as Pu,aN as Su,aO as wu,aP as ha,aQ as ga,P as ba,aR as ya,aS as Oa,i as Pa,aT as xu,aU as Cu,aV as Eu,aW as Tu,aX as ju,aY as _u,aZ as $u,a_ as Iu,a$ as Du,b0 as Nu,a as Au,b1 as ku,b2 as Mu,b3 as Ru,b4 as Lu,b5 as Fu,b6 as Vu,b7 as Uu,b8 as Ku,b9 as Hu,ba as Bu,bb as Wu,bc as Sa,bd as Gu,be as zu,bf as ue,bg as Yu,bh as qu}from"./LogPanel-954e7951.js";import{e as Xe,C as Xu,g as wa,h as Ju,a as Oe,F as Zu,f as Qu,i as ec,d as tc,j as Ce,U as Je,k as xa,m as Ca,D as fr,n as rc,o as nc,p as ac,l as ic,s as oc,q as sc,c as lc,S as uc}from"./LocalWorkspaceStorage-784838c4.js";import{A as kb,w as Mb,x as Rb,G as Lb,L as Fb,r as Vb,B as Ub,z as Kb,v as Hb,t as Bb,y as Wb,u as Gb,b as zb}from"./LocalWorkspaceStorage-784838c4.js";import{u as cc,C as Ea,F as Lt,a as dc,S as fc,B as pc,b as vc,D as mc,c as hc,d as Ft,e as vt,I as gc,f as bc,T as yc,g as Oc,h as Vt,i as Pc,j as Ta,k as ja,l as Sc,m as _a,n as Ut,o as $a,p as Ia,q as wc,r as xc,s as Cc,t as Ec,v as Tc,w as Da,x as jc,y as _c,z as $c,A as Na,E as Aa,L as Ic,G as Dc,H as Nc,J as Ac,K as kc,M as Mc,N as Rc,O as ka,P as Lc,Q as pr,R as Fc,U as Vc,V as Uc,W as Kc,X as Hc,Y as Bc,Z as Wc,_ as Gc,$ as zc,a0 as Yc,a1 as qc,a2 as Xc,a3 as Jc,a4 as Zc,a5 as Qc,a6 as ed,a7 as td,a8 as rd,a9 as nd}from"./index-0e2eafcb.js";import{D as ad}from"./DownsamplingError-8e6bdb73.js";import{e as Ve,c as id,d as od,a as sd,f as ld,b as ud,g as cd,h as dd,i as fd,j as Ma,u as pd,k as Ue,l as vd,m as md,n as Ee,o as hd,p as Le,q as mt,r as Ra,s as La,t as Kt,v as Ht,w as Fa,x as Va,y as q,T as Bt,z as Wt,A as Gt,M as zt,D as Ua,B as gd,C as ht,E as bd,F as yd,G as Od,H as Pd,I as Sd,J as wd,K as xd,L as Cd,N as Ed,O as Ka,P as Td,Q as jd,R as _d,S as $d,U as Ha,V as Id,W as Dd,X as Nd,Y as Ad,Z as kd,_ as Ba,$ as Md,a0 as Rd,a1 as Ld,a2 as Fd,a3 as Vd,a4 as Ud,a5 as Kd,a6 as Hd,a7 as Bd,a8 as Wd,a9 as Gd,aa as zd,ab as Yd,ac as qd,ad as Xd,ae as Wa,af as Jd,ag as Zd,ah as Qd,ai as ef,aj as tf,ak as Fe,al as rf,am as Ga,an as nf,ao as Yt,ap as le,aq as vr,ar as za,as as Ya,at as af,au as of,av as sf,aw as lf,ax as uf,ay as cf,az as df,aA as ff,aB as pf,aC as vf,aD as mf,aE as hf,aF as gf,aG as bf,aH as yf,aI as Of,aJ as Pf,aK as Sf,aL as wf,aM as xf,aN as Cf,aO as Ef,aP as Tf,aQ as jf,aR as _f,aS as $f,aT as If,aU as Df,aV as Nf,aW as Af,aX as kf,aY as qa,aZ as Mf,a_ as Rf,a$ as Lf,b0 as Ff,b1 as Vf,b2 as Uf,b3 as Kf,b4 as Hf,b5 as Bf,b6 as Wf,b7 as Gf,b8 as zf}from"./IrisGridThemeProvider-13774fee.js";import{m as Yf,u as Xa}from"./useMergeRef-04ff7062.js";import"./helpers-de833af9.js";var qf=["children","keepMounted"];function mr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mr(Object(r),!0).forEach(function(n){Xf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xf(t,e,r){return e=Jf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jf(t){var e=Zf(t,"string");return typeof e=="symbol"?e:String(e)}function Zf(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qf(t,e){if(t==null)return{};var r=ep(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ep(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function tp(t){var{children:e,keepMounted:r=!1}=t,n=Qf(t,qf),a=r&&typeof e!="function",i=u.useRef(new Map),o=u.useMemo(()=>{var l=[],d=new Map;return a?(H.Children.forEach(e,f=>{if(!(f==null||f.key==null)){var p=i.current.get(f.key);p==null&&(p=so({attributes:{style:"display: contents"}})),d.set(f.key,p),l.push(c.jsx(lo,{node:p,children:f.props.children},f.key))}}),i.current=d,l):(i.current=d,l)},[e,a]),s=u.useMemo(()=>{var l=[];return a&&H.Children.forEach(e,d=>{if(d==null||d.key==null){l.push(d);return}var f=i.current.get(d.key);if(f==null){l.push(d);return}l.push(c.jsx(Be,{children:c.jsx(uo,{node:f})},d.key))}),l},[e,a]);return c.jsxs(c.Fragment,{children:[a&&o,c.jsx(co,hr(hr({},n),{},{children:a?s:e}))]})}function rp(t,e){return t===0?0:e==="all"||t===e.size?"all":e.size}function Ja(t,e){return t===e?!0:t==="all"||e==="all"||t.size!==e.size?!1:[...t.keys()].every(r=>e.has(r))}function Za(t,e){return t.isInverted===e.isInverted&&Ja(t.selection,e.selection)}function Qa(t,e,r){if(t==="all")return"all";var n=[...t.keys()];return new Set(n.map(a=>{var i=e(a);if(i===void 0)throw new Error("Could not find item with key ".concat(a));return r(i)}))}function ei(t,e,r){var n=t==="all"||t.size>e/2,a=t;return n&&(a=t==="all"?new Set:new Set([...vl(0,e-1)].map(r).filter(i=>!t.has(i)))),{selection:a,isInverted:n}}function np(t,e){return u.useCallback(function(){var r=t(...arguments);return e(),r},[e,t])}function qt(t,e){return u.useCallback(r=>{typeof t=="function"?t(e(r)):t.current=e(r)},[e,t])}function ti(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gn,[e,r]=u.useState(0),[n,a]=u.useState(0),[i,o]=u.useState(0),[s,l]=u.useState(0),d=u.useMemo(()=>new DOMRect(e,n,i,s),[s,i,e,n]),[f,p]=u.useState(null),v=qt(p,t),m=u.useCallback(g=>{var w,[h]=g,y=(w=h==null?void 0:h.contentRect)!==null&&w!==void 0?w:{x:0,y:0,width:0,height:0};r(y.x),a(y.y),o(y.width),l(y.height)},[]);return Xe(f,m),{ref:v,contentRect:d}}function ap(t){var[e,r]=u.useState(!0);return u.useEffect(()=>{var n=setTimeout(()=>{r(!1)},t);return()=>{clearTimeout(n)}},[t]),e}function ip(t){var[e,r]=u.useState(t);return u.useEffect(()=>{r(t)},[t]),[e,r]}function op(t,e,r,n){var a=u.useRef(0);u.useEffect(()=>{a.current>=r||n&&(a.current+=1,t())},[r,n,...e])}function ri(t,e){var r=u.useRef(t),n=e(r.current,t)?r.current:t;return r.current=n,n}function sp(t){t.preventDefault()}function ni(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=u.useMemo(()=>"useSubmitButtonRef-".concat(je()),[]),r=u.useCallback(i=>{var o;i==null||(o=i.UNSAFE_getDOMNode())===null||o===void 0||o.setAttribute("form",e)},[e]),n=u.useMemo(()=>({id:e,onSubmit:t?void 0:sp}),[e,t]),a=u.useMemo(()=>({form:e,ref:r}),[e,r]);return{formProps:n,submitButtonProps:a}}function ai(t,e,r){var{getItem:n,selectedKeys:a,items:i}=t;return u.useMemo(()=>{var{selection:o,isInverted:s}=ei(a,i.length,r);return{selection:Qa(o,n,e),isInverted:s}},[a,i.length,r,n,e])}function ii(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gn,r=u.useRef();return u.useEffect(()=>()=>{var n;return(n=r.current)===null||n===void 0?void 0:n.call(r)},[]),u.useCallback(n=>{var a;(a=r.current)===null||a===void 0||a.call(r);var i=e(n);i&&(i.addEventListener("scroll",t),r.current=()=>{i.removeEventListener("scroll",t),r.current=void 0})},[e,t])}function gr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function br(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gr(Object(r),!0).forEach(function(n){lp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function lp(t,e,r){return e=up(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function up(t){var e=cp(t,"string");return typeof e=="symbol"?e:String(e)}function cp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dp(t,e,r,n){var a=arguments.length===4;return u.useCallback(i=>{var o=a?i??n:i;r(br(br({},t),{},{[e]:o}))},[r,t,e,a,n])}function _e(t,e){var[r,n]=u.useState(!0),[a,i]=u.useState(t),[o,s]=u.useState(t),[l,d]=u.useState(e);return(t!==o||e!==l)&&(n(!0),s(t),d(e)),u.useEffect(()=>{var f=!1,p=setTimeout(()=>{f||(n(!1),i(t))},e);return()=>{f=!0,clearTimeout(p)}},[t,e]),{isDebouncing:r,value:a}}function oi(t,e){return u.useCallback(r=>{if(r!=null){var n=e==null?[r]:r.querySelectorAll(e);n.forEach(a=>{Object.entries(t).forEach(i=>{var[o,s]=i;a.setAttribute(o,s)})})}},[t,e])}var si={spellCheck:!1};function fp(t){var e=oi(si,t);return qt(e,Ve)}const pp=Object.freeze(Object.defineProperty({__proto__:null,SPELLCHECK_FALSE_ATTRIBUTE:si,createValidationProps:id,defaultGetKey:od,extractSpectrumHTMLElement:Ve,extractSpectrumLastChildHTMLElement:sd,findSpectrumComboBoxScrollArea:ld,findSpectrumPickerScrollArea:ud,findSpectrumPopoverScrollArea:cd,getPositionOfSelectedItem:dd,getSelectedItemCountOrAll:rp,identityExtractHTMLElement:fd,isElementOfType:Ma,isSelectionEqual:Ja,isSelectionMaybeInvertedEqual:Za,mapSelection:Qa,mergeRefs:Yf,optimizeSelection:ei,useAsyncInterval:ml,useCallbackWithAction:np,useCheckOverflow:pd,useContentRect:ti,useContextOrThrow:hl,useCopyToClipboard:cc,useDebouncedCallback:Ue,useDebouncedValue:_e,useDelay:ap,useDependentState:ip,useEffectNTimesWhen:op,useFormWithDetachedSubmitButton:ni,useForwardedRef:gl,useIsEqualMemo:ri,useIsMountedRef:bl,useMappedRef:qt,useMappedSelection:ai,useMergeRef:Xa,useOnScrollOffsetChangeCallback:vd,useOnScrollRef:ii,usePopoverOnScrollRef:md,usePrevious:yl,usePromiseFactory:Ee,usePropChangeCallback:dp,useResizeObserver:Xe,useSetAttributesCallback:oi,useSpectrumDisableSpellcheckRef:fp,useThrottledCallback:Ol,useWindowedListData:hd},Symbol.toStringTag,{value:"Module"}));var vp=["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 mp(t,e){if(t==null)return{};var r=hp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function hp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function li(t){var{"aria-label":e,"aria-labelledby":r,"aria-describedby":n,"aria-details":a,marginX:i,marginY:o,width:s,height:l,minWidth:d,minHeight:f,maxWidth:p,maxHeight:v,flex:m,flexGrow:g,flexShrink:w,flexBasis:h,justifySelf:y,alignSelf:O,order:j,gridArea:T,gridColumn:b,gridRow:E,gridColumnStart:$,gridColumnEnd:_,gridRowStart:k,gridRowEnd:A,position:B,zIndex:x,top:P,bottom:S,start:I,end:R,left:U,right:W,isHidden:G}=t,C=mp(t,vp);return{ariaLabelProps:{"aria-label":e,"aria-labelledby":r,"aria-describedby":n,"aria-details":a},styleProps:{marginX:i,marginY:o,width:s,height:l,minWidth:d,minHeight:f,maxWidth:p,maxHeight:v,flex:m,flexGrow:g,flexShrink:w,flexBasis:h,justifySelf:y,alignSelf:O,order:j,gridArea:T,gridColumn:b,gridRow:E,gridColumnStart:$,gridColumnEnd:_,gridRowStart:k,gridRowEnd:A,position:B,zIndex:x,top:P,bottom:S,start:I,end:R,left:U,right:W,isHidden:G},componentProps:C}}function ui(t){var{normalizedItems:e,defaultSelectedKeys:r,disabledKeys:n,selectedKeys:a,onChange:i}=t,o=u.useMemo(()=>Le(a),[a]),s=u.useMemo(()=>Le(r),[r]),l=u.useMemo(()=>Le(n),[n]),d=u.useCallback(f=>{if(i!=null){if(f==="all"){i("all");return}var p=new Set;e.forEach(v=>{f.has(String(mt(v)))&&p.add(mt(v))}),i(p)}},[e,i]);return{selectedStringKeys:o,defaultSelectedStringKeys:s,disabledStringKeys:l,onStringSelectionChange:d}}function gp(){var{selectedThemeKey:t,setSelectedThemeKey:e,themes:r}=ze(),n=u.useCallback(a=>{e(a)},[e]);return c.jsx(Dn,{label:"Pick a color scheme",items:r,selectedKey:t,onSelectionChange:n,children:a=>c.jsx(Be,{children:a.name},a.themeKey)})}function bp(t){var{className:e,style:r}=t;return c.jsx("div",{className:M("dh-logo",e),style:r})}var yp=["UNSAFE_className"],Op=["defaultSelectedKey","disabledKeys","selectedKey","ref"];function yr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Or(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yr(Object(r),!0).forEach(function(n){Pp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Pp(t,e,r){return e=Sp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sp(t){var e=wp(t,"string");return typeof e=="symbol"?e:String(e)}function wp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pr(t,e){if(t==null)return{};var r=xp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function xp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var ci=H.forwardRef(function(e,r){var{UNSAFE_className:n}=e,a=Pr(e,yp),i=Ra(a),{defaultSelectedKey:o,disabledKeys:s,selectedKey:l,ref:d}=i,f=Pr(i,Op),p=Xa(r,d);return c.jsx(Dn,Or(Or({},f),{},{ref:p,UNSAFE_className:M("dh-picker",n),defaultSelectedKey:o,disabledKeys:s,selectedKey:l}))});ci.displayName="Picker";var Cp=["UNSAFE_className"],Ep=["forceRerenderKey","ref"];function Sr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function wr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sr(Object(r),!0).forEach(function(n){Tp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Tp(t,e,r){return e=jp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jp(t){var e=_p(t,"string");return typeof e=="symbol"?e:String(e)}function _p(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xr(t,e){if(t==null)return{};var r=$p(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $p(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function di(t){var{UNSAFE_className:e}=t,r=xr(t,Cp),n=La(r),{forceRerenderKey:a,ref:i}=n,o=xr(n,Ep);return u.createElement(Nn,wr(wr({},o),{},{key:a,ref:i,UNSAFE_className:M("dh-combobox","dh-combobox-normalized",e)}))}var Ip=["onScroll"];function Cr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function $e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Cr(Object(r),!0).forEach(function(n){Dp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Dp(t,e,r){return e=Np(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Np(t){var e=Ap(t,"string");return typeof e=="symbol"?e:String(e)}function Ap(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kp(t,e){if(t==null)return{};var r=Mp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Mp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Xt(t){var e,r,{ariaLabelProps:n,componentProps:a,styleProps:i}=li(t),{onScroll:o=Mt}=a,s=kp(a,Ip),{scale:l}=Kt(),d=ii(o,Ve),{ref:f,contentRect:p}=ti(Ve);return c.jsx(An,$e($e({direction:"column",ref:f},i),{},{minHeight:(e=i.minHeight)!==null&&e!==void 0?e:1,UNSAFE_className:M("dh-list-view-wrapper","dh-list-view-wrapper-density-".concat((r=s.density)!==null&&r!==void 0?r:"regular"),"dh-list-view-wrapper-scale-".concat(l),i.UNSAFE_className),children:p.height===0?null:c.jsx(fo,$e($e({ref:d},n),s))}))}var Rp=["children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","UNSAFE_className","onChange","onScroll","onSelectionChange"];function Er(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Tr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Er(Object(r),!0).forEach(function(n){Lp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Er(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Lp(t,e,r){return e=Fp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fp(t){var e=Vp(t,"string");return typeof e=="symbol"?e:String(e)}function Vp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Up(t,e){if(t==null)return{};var r=Kp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Kp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Hp(t){var{children:e,tooltip:r=!0,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,UNSAFE_className:o,onChange:s,onScroll:l=Mt,onSelectionChange:d}=t,f=Up(t,Rp),p=u.useMemo(()=>Ht(r,"bottom"),[r]),v=u.useMemo(()=>Fa(e,p),[e,p]);return c.jsx(Xt,Tr(Tr({},f),{},{UNSAFE_className:M("dh-list-view",o),selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,onScroll:l,onSelectionChange:s??d,children:v}))}var Bp=["normalizedItems","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","showItemIcons","actions","UNSAFE_className","onChange","onSelectionChange"];function jr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function _r(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jr(Object(r),!0).forEach(function(n){Wp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wp(t,e,r){return e=Gp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gp(t){var e=zp(t,"string");return typeof e=="symbol"?e:String(e)}function zp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yp(t,e){if(t==null)return{};var r=qp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function qp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function fi(t){var{normalizedItems:e,tooltip:r=!0,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,showItemIcons:o,actions:s,UNSAFE_className:l,onChange:d,onSelectionChange:f}=t,p=Yp(t,Bp),v=u.useMemo(()=>Ht(r,"bottom"),[r]),m=Va({itemIconSlot:"illustration",showItemDescriptions:!1,showItemIcons:o,tooltipOptions:v,actions:s}),g="".concat(o,"-").concat(v==null?void 0:v.placement),{selectedStringKeys:w,defaultSelectedStringKeys:h,disabledStringKeys:y,onStringSelectionChange:O}=ui({normalizedItems:e,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,onChange:d??f});return u.createElement(Xt,_r(_r({},p),{},{UNSAFE_className:M("dh-list-view-normalized",l),key:g,items:e,selectedKeys:w,defaultSelectedKeys:h,disabledKeys:y,onSelectionChange:O}),m)}var Xp=["color","UNSAFE_style"];function $r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ie(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$r(Object(r),!0).forEach(function(n){Jp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Jp(t,e,r){return e=Zp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zp(t){var e=Qp(t,"string");return typeof e=="symbol"?e:String(e)}function Qp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ev(t,e){if(t==null)return{};var r=tv(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function tv(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var Jt=u.forwardRef((t,e)=>{var{color:r,UNSAFE_style:n}=t,a=ev(t,Xp),i=u.useMemo(()=>Ie(Ie({},n),{},{color:q(r)}),[r,n]);return c.jsx(kn,Ie(Ie({},a),{},{ref:e,UNSAFE_style:i}))});Jt.displayName="Heading";var rv=["backgroundColor","borderColor","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderXColor","borderYColor","UNSAFE_style"];function Ir(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function De(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(r),!0).forEach(function(n){nv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nv(t,e,r){return e=av(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function av(t){var e=iv(t,"string");return typeof e=="symbol"?e:String(e)}function iv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ov(t,e){if(t==null)return{};var r=sv(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function sv(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var pi=u.forwardRef((t,e)=>{var{backgroundColor:r,borderColor:n,borderStartColor:a,borderEndColor:i,borderTopColor:o,borderBottomColor:s,borderXColor:l,borderYColor:d,UNSAFE_style:f}=t,p=ov(t,rv),{direction:v}=po(),m=u.useMemo(()=>{var g={};return n!==void 0&&(g.borderColor=q(n)),l!==void 0&&(g.borderLeftColor=q(l),g.borderRightColor=q(l)),d!==void 0&&(g.borderTopColor=q(d),g.borderBottomColor=q(d)),a!==void 0&&(g[v==="rtl"?"borderRightColor":"borderLeftColor"]=q(a)),i!==void 0&&(g[v==="rtl"?"borderLeftColor":"borderRightColor"]=q(i)),o!==void 0&&(g.borderTopColor=q(o)),s!==void 0&&(g.borderBottomColor=q(s)),De(De({},f),{},{backgroundColor:q(r)},g)},[r,f,n,a,i,o,s,l,d,v]);return c.jsx(vo,De(De({},p),{},{ref:e,UNSAFE_style:m}))});pi.displayName="View";var lv=["children"];function Dr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dr(Object(r),!0).forEach(function(n){uv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function uv(t,e,r){return e=cv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cv(t){var e=dv(t,"string");return typeof e=="symbol"?e:String(e)}function dv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fv(t,e){if(t==null)return{};var r=pv(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function pv(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function vv(t){var{children:e}=t,r=fv(t,lv),n=u.useMemo(()=>Pl(e).map(a=>Ma(a,st)?a:c.jsx(st,{value:String(a),children:String(a)},String(a))),[e]);return c.jsx(mo,Nr(Nr({},r),{},{children:n}))}var mv=["ariaLabel","icon","isQuiet","labelText","children","onOpenChange","tooltip"];function Ar(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ar(Object(r),!0).forEach(function(n){hv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ar(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function hv(t,e,r){return e=gv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gv(t){var e=bv(t,"string");return typeof e=="symbol"?e:String(e)}function bv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yv(t,e){if(t==null)return{};var r=Ov(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ov(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function vi(t){var{ariaLabel:e,icon:r,isQuiet:n,labelText:a,children:i,onOpenChange:o,tooltip:s}=t,l=yv(t,mv),d=a==null&&s!=null?"action-button-icon-with-tooltip":void 0;return c.jsxs(Mn,{type:"popover",onOpenChange:o,children:[c.jsxs(Dt,kr(kr({},l),{},{"aria-label":e??a,isQuiet:n,children:[c.jsx(We,{UNSAFE_className:d,children:c.jsx(J,{icon:r})}),a==null?null:c.jsx(Bt,{children:a}),s==null?null:c.jsx(Ye,{children:s})]})),i]})}function Mr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ne(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mr(Object(r),!0).forEach(function(n){Pv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Pv(t,e,r){return e=Sv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sv(t){var e=wv(t,"string");return typeof e=="symbol"?e:String(e)}function wv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mi(t){var{heading:e,confirmationButtonLabel:r,children:n,onCancel:a,onConfirm:i}=t,{formProps:o,submitButtonProps:s}=ni();return c.jsxs(Rn,{children:[c.jsx(Jt,{level:3,UNSAFE_className:Wt.spectrumDialogComponentHeading,children:e}),c.jsx(Ln,{}),c.jsx(Nt,{children:c.jsx(Fn,Ne(Ne({},o),{},{children:n}))}),c.jsxs(Vn,{children:[c.jsx(lt,{variant:"secondary",onPress:a,children:"Cancel"}),c.jsx(lt,Ne(Ne({},s),{},{style:"fill",variant:"negative",onPress:i,type:"submit",children:r}))]})]})}function xv(t){var{ariaLabel:e,heading:r,confirmationButtonLabel:n,isHidden:a,children:i,tooltip:o,onConfirm:s}=t,l=u.useCallback(d=>c.jsx(mi,{heading:r,confirmationButtonLabel:n,onCancel:d,onConfirm:()=>{d(),s()},children:i}),[i,n,r,s]);return c.jsx(vi,{ariaLabel:e,icon:zn,isHidden:a,isQuiet:!0,height:Gt,tooltip:o,children:l})}var Cv=["icon","label","tooltip"];function Rr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Lr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rr(Object(r),!0).forEach(function(n){Ev(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ev(t,e,r){return e=Tv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tv(t){var e=jv(t,"string");return typeof e=="symbol"?e:String(e)}function jv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _v(t,e){if(t==null)return{};var r=$v(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $v(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function hi(t){var{icon:e,label:r,tooltip:n}=t,a=_v(t,Cv);return c.jsxs(Dt,Lr(Lr({},a),{},{"aria-label":r,isQuiet:!0,height:Gt,children:[c.jsx(We,{UNSAFE_className:n==null?void 0:"action-button-icon-with-tooltip",children:c.jsx(J,{icon:e})}),n==null?null:c.jsx(Ye,{children:n})]}))}hi.displayName="IconActionButton";function Fr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Iv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fr(Object(r),!0).forEach(function(n){te(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function te(t,e,r){return e=Dv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Dv(t){var e=Nv(t,"string");return typeof e=="symbol"?e:String(e)}function Nv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Av=100,gt;(function(t){t.UP="UP",t.DOWN="DOWN"})(gt||(gt={}));class X extends u.Component{constructor(e){super(e),te(this,"popper",void 0),te(this,"cbContainer",void 0),te(this,"menuContainer",void 0),te(this,"input",void 0),te(this,"getCachedFilteredOptions",ho((n,a)=>n.filter(i=>i.title.toLowerCase().indexOf(a.toLowerCase())>=0)));var{popperOptions:r}=this.props;r=Iv({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},r),this.state={title:"",filteredOptions:[],keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,invalid:!1,popperOptions:r},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=xe(this.updateInputValue,Av),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=H.createRef(),this.cbContainer=H.createRef(),this.menuContainer=H.createRef(),this.input=H.createRef()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}getValueAndValidate(e){if(!e)return this.setState({invalid:!1}),{value:e,isValid:!1};var{options:r}=this.props,n=r.filter(a=>a.title.toLowerCase()===e.toLowerCase());return n.length<1?(this.setState({invalid:!0}),{value:e,isValid:!1}):(this.setState({invalid:!1}),{value:n[0].value,isValid:!0})}updateInputValue(e){var{menuIsOpen:r}=this.state,{value:n,isValid:a}=this.getValueAndValidate(e);r&&this.processFilterChange(e),this.fireOnChange(n,a)}fireOnChange(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,{onChange:n}=this.props;n(e,r)}processFilterChange(e){var r,{options:n}=this.props,{menuIsOpen:a}=this.state,i=e?this.getCachedFilteredOptions(n,e):n,o=i.length===1&&i[0].title===e;if(this.setState({filteredOptions:i,keyboardOptionIndex:0}),o&&a){this.closeMenu();return}(r=this.popper.current)===null||r===void 0||r.scheduleUpdate()}resetValue(){this.setState({title:""}),this.fireOnChange("")}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var r,{filteredOptions:n,keyboardOptionIndex:a}=this.state,i=n[a];switch(e.key){case"Enter":case"ArrowRight":e.stopPropagation(),e.preventDefault(),i!=null&&(this.setState({title:i.title,invalid:!1}),this.fireOnChange(i.value)),this.closeMenu(),(r=this.input.current)===null||r===void 0||r.focus();break;case"ArrowUp":e.stopPropagation(),e.preventDefault(),this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.UP);break;case"ArrowDown":e.stopPropagation(),e.preventDefault(),this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Tab":if(e.stopPropagation(),e.preventDefault(),e.shiftKey){this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.UP);break}this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Escape":e.preventDefault(),e.stopPropagation(),this.closeMenu();break}}navigateMenu(e){var{filteredOptions:r,keyboardOptionIndex:n}=this.state,a=n;e===X.MENU_NAVIGATION_DIRECTION.UP?n>0?(a=(a-1)%r.length,this.setState({keyboardOptionIndex:a})):n===0&&(a=r.length-1,this.setState({keyboardOptionIndex:a})):e===X.MENU_NAVIGATION_DIRECTION.DOWN&&n<r.length&&(a=(a+1)%r.length,this.setState({keyboardOptionIndex:a})),this.scrollOptionIntoView(a)}handleInputKeyDown(e){var{onEnter:r}=this.props,{menuIsOpen:n}=this.state;n?this.handleMenuKeyDown(e):e.key==="Enter"?r():e.key==="Escape"?(this.resetValue(),e.preventDefault(),e.stopPropagation()):e.key==="ArrowRight"||e.key==="ArrowLeft"||e.key==="Tab"||e.key==="Shift"||this.openMenu()}handleInputChange(e){this.setState({title:e.target.value}),this.updateInputValue(e.target.value)}handleOptionClick(e){var r;this.setState({title:e.title,invalid:!1}),this.fireOnChange(e.value),this.closeMenu(),(r=this.input.current)===null||r===void 0||r.focus()}handelInputFocus(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputClick(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputBlur(e){var{menuIsOpen:r}=this.state;r&&e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuBlur(e){e.relatedTarget===this.input.current||e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var e;(e=this.input.current)===null||e===void 0||e.focus()}handleMenuExited(){var{menuIsOpen:e}=this.state;e&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}openMenu(){var{title:e}=this.state;this.processFilterChange(e),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var r;(r=this.popper.current)===null||r===void 0||r.show()})}closeMenu(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1,keyboardOptionIndex:0}),r){var n;(n=this.input.current)===null||n===void 0||n.focus()}(e=this.popper.current)===null||e===void 0||e.hide()}scrollOptionIntoView(e){if(this.menuContainer.current){var r;(r=this.menuContainer.current.children.item(e))===null||r===void 0||r.scrollIntoView({behavior:"smooth",block:"nearest"})}}renderMenuElement(){var{inputWidth:e}=this.state;return c.jsx("div",{className:M("aci-options"),ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,style:{width:e},onBlur:this.handleMenuBlur,children:this.renderOptions()})}renderOptions(){var{noMatchText:e}=this.props,{title:r,filteredOptions:n}=this.state;return r&&n.length===0?c.jsx("div",{className:"no-match",children:e}):n.map((a,i)=>this.renderOption(a,i))}renderOption(e,r){var{keyboardOptionIndex:n}=this.state,a="option-".concat(r,"-").concat(e.value);return c.jsx("button",{type:"button",className:M("aci-option-btn",{"keyboard-active":n===r}),onClick:()=>this.handleOptionClick(e),onFocus:()=>this.setState({keyboardOptionIndex:r}),children:e.title},a)}render(){var{options:e,inputPlaceholder:r,disabled:n,className:a,defaultTitle:i,spellCheck:o,"data-testid":s}=this.props,{title:l,menuIsOpen:d,popperOptions:f,invalid:p}=this.state;return c.jsxs("div",{className:"aci-container",ref:this.cbContainer,children:[c.jsx("input",{value:l||i,className:M("form-control",a,"aci-input",{"is-invalid":p&&!d}),ref:this.input,onChange:this.handleInputChange,placeholder:r||e[0].title,disabled:n,onFocus:this.handelInputFocus,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:o,"data-testid":s}),c.jsx(Rt,{ref:this.popper,options:f,className:M("aci-options-popper interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})}}te(X,"propTypes",{options:L.arrayOf(L.shape({title:L.string.isRequired,value:L.string.isRequired})).isRequired,popperOptions:L.shape({}),onChange:L.func,inputPlaceholder:L.string,disabled:L.bool,className:L.string,defaultTitle:L.string,spellCheck:L.bool,onEnter:L.func,noMatchText:L.string,"data-testid":L.string});te(X,"defaultProps",{onChange(){},inputPlaceholder:"",disabled:!1,className:"",defaultTitle:"",popperOptions:null,spellCheck:!0,onEnter(){},noMatchText:"No matching items found","data-testid":void 0});te(X,"MENU_NAVIGATION_DIRECTION",gt);const kv=X;function Zt(t){var{className:e="",value:r,onChange:n,spellCheck:a=!1,placeholder:i="",disabled:o=!1,delimiter:s="",id:l="","data-testid":d}=t,[f,p]=u.useState(r),[v,m]=u.useState(!1),g=u.useRef(null);u.useEffect(function(){p(r)},[r]);function w($){return $.trim().split(s).filter(_=>_).join(`
2
2
  `.concat(s.trim()))}function h($){return $.split(`
3
3
  `).map(_=>_.trim()).join(" ")}function y(){if(g.current){g.current.style.height="0";var $=g.current.scrollHeight+(g.current.offsetHeight-g.current.clientHeight);$>0&&(g.current.style.height="".concat($,"px"))}}function O($){var _=$.target.value;v&&(s&&(_=w(_)),m(!1)),p(_),n(_)}function j(){g.current&&(s&&(p(w(f)),y()),g.current.scrollLeft=0)}function T(){g.current&&document.activeElement!==g.current&&g.current.focus()}function b(){s&&(p(h(f)),n(h(f)))}function E(){m(!0)}return u.useEffect(function(){y()},[f]),c.jsx("textarea",{ref:g,id:l,className:M(e,"auto-resize-textarea form-control"),placeholder:i,value:f,rows:1,onChange:O,onFocus:j,onMouseDown:T,onBlur:b,onPaste:E,spellCheck:a,disabled:o,"data-testid":d})}Zt.propTypes={value:L.string.isRequired,onChange:L.func.isRequired,className:L.string,placeholder:L.string,spellCheck:L.bool,disabled:L.bool,delimiter:L.string,id:L.string,"data-testid":L.string};Zt.defaultProps={className:"",id:"",placeholder:"",disabled:!1,spellCheck:!1,delimiter:"","data-testid":void 0};function gi(t){var{blockInteraction:e=!0,children:r,debounceMs:n,isOpen:a=!1}=t,{value:i}=_e(a,n);return c.jsxs(c.Fragment,{children:[e&&a&&c.jsx("div",{className:"modal-backdrop",style:{backgroundColor:"transparent"},"data-testid":"debounced-modal-backdrop"}),H.cloneElement(r,{isOpen:a&&i})]})}function bi(t){var{className:e,icon:r,isOpen:n=!1,subtitle:a,title:i}=t;return c.jsx(Yn,{isOpen:n,className:e,children:c.jsx(qn,{children:c.jsxs("div",{className:"info-modal",children:[r!=null&&c.jsx("div",{className:"message-icon",children:c.jsx(J,{icon:r})}),c.jsx("div",{className:"message-header",children:i}),a!=null&&c.jsx("div",{className:"message-content",children:a})]})})})}function Vr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ur(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vr(Object(r),!0).forEach(function(n){Mv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Mv(t,e,r){return e=Rv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rv(t){var e=Lv(t,"string");return typeof e=="symbol"?e:String(e)}function Lv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fv(t){var{styleProps:e,selectedItemCount:r,onClearSelection:n}=t;return c.jsx(Un,Ur(Ur({UNSAFE_className:Wt.spectrumActionBar},e),{},{isEmphasized:!0,selectedItemCount:r,onClearSelection:n}))}function yi(t,e,r){return e=Vv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vv(t){var e=Uv(t,"string");return typeof e=="symbol"?e:String(e)}function Uv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Q extends u.Component{static handleEnter(e){var r=e;r.style.height="0"}static handleEntering(e){var r=e;r.style.height="".concat(Q.getHeight(r),"px")}static handleExiting(e){var r=e;r.style.height="0"}static handleExit(e){var r=e;r.style.height="".concat(Q.getHeight(r),"px")}static getHeight(e){var r=e.scrollWidth-e.clientWidth;return e.scrollHeight-r}constructor(e){super(e),this.handleEntered=this.handleEntered.bind(this)}handleEntered(e){var r=e;r.style.height="";var{autoFocusOnShow:n}=this.props;if(n!==void 0&&n){var a=r.querySelector("input, select, textarea");a!=null&&a.focus()}}render(){var{children:e,className:r,in:n,"data-testid":a}=this.props;return c.jsx(Kn,{in:n,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:Q.handleEnter,onEntering:Q.handleEntering,onEntered:this.handleEntered,onExit:Q.handleExit,onExiting:Q.handleExiting,timeout:350,children:i=>c.jsx("div",{className:M({collapse:i==="exited"},r),"data-testid":a,children:e})})}}yi(Q,"propTypes",{className:L.string,in:L.bool.isRequired,children:L.node.isRequired,autoFocusOnShow:L.bool,"data-testid":L.string});yi(Q,"defaultProps",{className:"",autoFocusOnShow:!1,"data-testid":void 0});const Kv=Q;var Hv=K.module("TimeInput"),Bv="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]",Wv=["00:00:00","12:34:56","23:59:59"];function Kr(t){return t!=null?"".concat(t.substring(0,8).replace(/\u2007/g,"0")).concat("00:00:00".substring(t.length)):t}var Oi=H.forwardRef((t,e)=>{var{allowValueWrapping:r=!0,className:n="",onChange:a=()=>!1,value:i=0,onFocus:o=()=>!1,onBlur:s=()=>!1,onSelect:l=()=>!1,"data-testid":d}=t,[f,p]=u.useState(Re.formatTime(i)),v=u.useRef(i),[m,g]=u.useState(),w=u.useRef(null);u.useImperativeHandle(e,()=>({focus:()=>{var b;(b=w.current)===null||b===void 0||b.focus()},setSelection:b=>{var E;(E=w.current)===null||E===void 0||E.focus(),g(b)}}),[]),u.useEffect(function(){v.current!==i&&(p(Re.formatTime(i)),v.current=i)},[v,i]);function h(b,E,$){var _=b.selectionStart===0?24:60,k=parseInt($,10)-E;return Number.isNaN(k)?k=0:r?k=(k%_+_)%_:k=Math.min(Math.max(0,k),_-1),"".concat(k).padStart(2,"0")}function y(b,E,$,_,k){return _===0&&k===2&&E===1&&parseInt($,10)>1?"0".concat($).concat(b.substring(2)):Ua(b,E,$)}var O=u.useCallback(b=>{Hv.debug("handleChange",b),p(b),v.current=Re.parseTime(Kr(b)),a(v.current)},[a]),j=u.useCallback(()=>{var b=Kr(f);b!==f&&p(b),s()},[f,s]),T=u.useCallback(b=>{g(b),l(b)},[l]);return c.jsx(zt,{ref:w,className:n,example:Wv,getNextSegmentValue:h,getPreferredReplacementString:y,onChange:O,onSelect:T,pattern:Bv,selection:m,value:f,onFocus:o,onBlur:j,"data-testid":d})});Oi.defaultProps={allowValueWrapping:!0,className:"",onChange:()=>!1,onSelect:()=>!1,value:0,onFocus:()=>!1,onBlur:()=>!1,"data-testid":void 0};const Ke=Oi;function Hr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Gv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hr(Object(r),!0).forEach(function(n){se(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function se(t,e,r){return e=zv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zv(t){var e=Yv(t,"string");return typeof e=="symbol"?e:String(e)}function Yv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Br=-1,bt;(function(t){t.UP="UP",t.DOWN="DOWN"})(bt||(bt={}));class z extends u.Component{constructor(e){super(e),se(this,"csContainer",void 0),se(this,"menuContainer",void 0),se(this,"button",void 0),se(this,"input",void 0);var{value:r,valueToTime:n}=e;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=H.createRef(),this.menuContainer=H.createRef(),this.button=H.createRef(),this.input=H.createRef(),this.state={keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,customTime:n(r),inputFocused:!1}}getSelectedText(){var{options:e,value:r,placeholder:n}=this.props,{customTime:a}=this.state;if(r===null)return n;for(var i=0;i<e.length;i+=1){var o=e[i];if(o.value===r)return o.title}return Re.formatTime(a)}setInputWidth(){this.csContainer.current&&this.setState({inputWidth:this.csContainer.current.getBoundingClientRect().width})}focus(){var e;(e=this.button.current)===null||e===void 0||e.focus()}updateInputValue(e){var{onChange:r}=this.props;r(e)}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var r,{keyboardOptionIndex:n,inputFocused:a}=this.state,{options:i}=this.props;switch(e.key){case"Enter":case" ":a?this.updateFromCustom():this.updateInputValue(i[n].value),this.closeMenu(),(r=this.button.current)===null||r===void 0||r.focus(),e.stopPropagation(),e.preventDefault();break;case"Tab":e.shiftKey?this.handleMenuNavigation(z.MENU_NAVIGATION_DIRECTION.UP):this.handleMenuNavigation(z.MENU_NAVIGATION_DIRECTION.DOWN),e.stopPropagation(),e.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(z.MENU_NAVIGATION_DIRECTION.UP),e.stopPropagation(),e.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(z.MENU_NAVIGATION_DIRECTION.DOWN),e.stopPropagation(),e.preventDefault();break;case"Escape":this.closeMenu();break}}handleMenuNavigation(e){var{keyboardOptionIndex:r,inputFocused:n}=this.state,{options:a}=this.props,i=a.length,o=r;switch(e){case z.MENU_NAVIGATION_DIRECTION.UP:if(!n&&r===0){this.focusInput();break}else n&&this.focusOption(r);r>0&&!n?(o=(o-1)%i,this.setState({keyboardOptionIndex:o})):r===0&&(o=i-1,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break;case z.MENU_NAVIGATION_DIRECTION.DOWN:if(!n&&r===i-1){this.focusInput();break}else n&&this.focusOption(r);r<i&&!(n&&r===0)&&(o=(o+1)%i,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break}}handleOptionClick(e){var r=Number(e.currentTarget.value),{options:n,timeToValue:a}=this.props,{customTime:i}=this.state;if(r===Br){var o=a(i);this.updateAndClose(o)}else this.updateAndClose(n[r].value)}updateAndClose(e){var r;this.updateInputValue(e),this.closeMenu(),(r=this.button.current)===null||r===void 0||r.focus()}handleOptionFocus(e){this.setState({keyboardOptionIndex:Number(e.target.value)})}handleMenuOpened(){var e,{options:r,value:n}=this.props,{keyboardOptionIndex:a}=this.state;this.scrollOptionIntoView(a);var i=(e=this.menuContainer.current)===null||e===void 0?void 0:e.querySelector(".cs-option-btn.keyboard-active");if(i instanceof HTMLElement&&i.focus(),n!==null){var o=r.map(s=>s.value).indexOf(n);o<0&&this.focusInput()}}focusInput(){var e;(e=this.input.current)===null||e===void 0||e.focus()}focusOption(e){var r,n=(r=this.menuContainer.current)===null||r===void 0?void 0:r.querySelector(".cs-options");if(n&&n.children!=null){var a=n.children.item(e);a instanceof HTMLElement&&a.focus()}}handleMenuExited(){var{menuIsOpen:e}=this.state;e&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}handleCustomInput(e){var{timeToValue:r}=this.props,n=r(e);this.updateInputValue(n),this.setState({customTime:e})}updateFromCustom(){var{timeToValue:e}=this.props,{customTime:r}=this.state,n=e(r);this.updateInputValue(n)}toggleMenu(e){var{menuIsOpen:r}=this.state;r?this.closeMenu():this.openMenu(),e.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1}),e){var r;(r=this.button.current)===null||r===void 0||r.focus()}}updateKeyboardIndex(){var{options:e,value:r}=this.props;if(r!==null){var n=e.map(a=>a.value).indexOf(r);n>0&&this.setState({keyboardOptionIndex:n})}}scrollOptionIntoView(e){var r,n=(r=this.menuContainer.current)===null||r===void 0?void 0:r.querySelector(".cs-options");if(n&&n.children!=null){var a=n.children.item(e);a instanceof HTMLElement&&a.offsetTop>z.DROP_DOWN_MENU_HEIGHT?n.scrollTop=a.offsetTop-z.DROP_DOWN_MENU_HEIGHT:(a instanceof HTMLElement&&a.offsetTop<0||e===0)&&(n.scrollTop=0)}}renderMenuElement(){var{inputWidth:e}=this.state;return c.jsx("div",{className:"cs-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:r=>{r.stopPropagation()},style:{width:e},children:c.jsx("div",{className:"cs-options-container",children:c.jsx("div",{className:"cs-options",children:this.renderOptions()})})})}renderOptions(){for(var{options:e,value:r,icon:n,customText:a}=this.props,{keyboardOptionIndex:i,customTime:o,inputFocused:s}=this.state,l=!1,d=[],f=0;f<e.length;f+=1){var p=e[f],v="option-".concat(f,"-").concat(p.value);l=l||p.value===r,d.push(c.jsxs("button",{type:"button",value:f,className:M("cs-option-btn",{"keyboard-active":i===f&&!s}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[p.value===r&&c.jsx(J,{icon:n,className:"mr-2"}),p.value!==r&&c.jsx("span",{className:"mr-4"}),p.title]},v))}return d.push(c.jsx("hr",{className:"cs-divider"},"option-divider")),d.push(c.jsxs("button",{type:"button",value:Br,className:M("cs-option-btn",{"keyboard-active":s}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[!l&&r!==null?c.jsx(J,{icon:n,className:"mr-2"}):c.jsx("span",{className:"mr-4"}),a]},"option-custom-label")),d.push(c.jsxs("div",{className:"cs-custom-container",children:[c.jsx("span",{className:"mr-2"}),c.jsx(Ke,{ref:this.input,onChange:this.handleCustomInput,value:o,onFocus:()=>this.setState({inputFocused:!0}),onBlur:()=>this.setState({inputFocused:!1})},"option-input"),c.jsx("span",{className:"ml-2"})]},"cs-custom-container")),d.push(c.jsx("hr",{className:"mb-2"},"option-end")),d}render(){var{disabled:e,invalid:r,value:n,"data-testid":a}=this.props,{menuIsOpen:i}=this.state,{popperOptions:o}=this.props;return o=Gv({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},o),c.jsx("div",{className:"input-group cs-container context-menu",ref:this.csContainer,"data-testid":a,children:c.jsx("div",{className:M("input-group-append cs-dropdown",{"cs-dropdown-invalid":r}),children:c.jsxs("button",{type:"button",className:M("btn cs-btn form-control",{"cs-btn-invalid":r}),ref:this.button,onClick:this.toggleMenu,disabled:e,children:[c.jsx("span",{className:M({"text-muted":n===null}),children:this.getSelectedText()}),c.jsx("span",{className:"cs-caret"}),c.jsx(Zn,{isShown:i,actions:{menuElement:this.renderMenuElement()},popperOptions:o,popperClassName:"CustomTimeSelect",onMenuOpened:this.handleMenuOpened,onMenuClosed:this.handleMenuExited,menuStyle:{maxWidth:"100rem"}})]})})})}}se(z,"MENU_NAVIGATION_DIRECTION",bt);se(z,"DROP_DOWN_MENU_HEIGHT",125);se(z,"defaultProps",{onChange(){},value:null,disabled:!1,popperOptions:{},icon:_s,customText:"Custom",placeholder:"Select a time",valueToTime:t=>t===null?0:Math.round(t/1e3),timeToValue:t=>t*1e3,invalid:!1,"data-testid":void 0});const qv=z;var Xv=K.module("DateInput"),Jv="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",Zv=["2000-01-01","2022-12-31"],Qv="YYYY-MM-DD",Pi=H.forwardRef((t,e)=>{var{className:r="",onChange:n=()=>{},defaultValue:a="",onFocus:i=()=>{},onBlur:o=()=>{},"data-testid":s}=t,[l,d]=u.useState(a),[f,p]=u.useState(),v=u.useCallback(m=>{Xv.debug("handleChange",m),d(m),n(m)},[n]);return c.jsx("div",{className:"d-flex flex-row align-items-center",children:c.jsx(zt,{ref:e,className:M(r),example:Zv,getNextSegmentValue:gd,onChange:v,onSelect:p,pattern:Jv,placeholder:Qv,selection:f,value:l,onFocus:i,onBlur:o,"data-testid":s})})});Pi.displayName="DateInput";const em=Pi;function tm(t){var{isInvalid:e=!1,items:r,onAdd:n=()=>{},onDelete:a=()=>{},validate:i=()=>null}=t,[o,s]=u.useState(null),[l,d]=u.useState([]),[f,p]=u.useState(""),v=u.useCallback(j=>{d(j)},[]),m=u.useCallback(()=>{a(cr.getItemsInRanges(r,l)),d([])},[r,l,a]),g=u.useCallback(()=>{if(f!==""){var j=i(f);j==null?(n(f),p("")):s(j)}},[f,n,i]),w=u.useCallback(j=>{var{value:T}=j.target;p(T),s(T===""?null:i(T))},[i]),h=u.useCallback(()=>{d([])},[]),y=u.useCallback(j=>{j.key==="Enter"&&g()},[g]),O=u.useMemo(()=>14+Hn(r.length,1,6)*ct.DEFAULT_ROW_HEIGHT,[r.length]);return c.jsxs("div",{className:M("editable-item-list-container",{"is-invalid":e}),children:[c.jsx("div",{style:{height:O},children:c.jsx(ct,{itemCount:r.length,items:r.map((j,T)=>({value:j,isSelected:cr.isSelected(l,T)})),offset:0,selectedRanges:l,onSelectionChange:v,isMultiSelect:!0})}),c.jsxs("div",{className:"d-flex flex-row pt-2",children:[c.jsx("div",{className:"d-flex flex-grow-1",children:c.jsx("input",{className:M("form-control",{"is-invalid":o!=null}),placeholder:"Enter value",type:"text",value:f,onChange:w,onFocus:h,onKeyDown:y})}),c.jsxs("div",{className:"d-flex align-items-start mt-1 ml-2",children:[c.jsx(re,{kind:"ghost",onClick:g,disabled:o!=null||f==="",icon:$s,tooltip:"Add new item","data-testid":"add-item-button"}),c.jsx(re,{kind:"ghost",onClick:m,disabled:l.length===0,icon:zn,tooltip:"Delete selected items","data-testid":"delete-item-button"})]})]})]})}function rm(t){var{message:e,isExpanded:r=!1,type:n="Error"}=t,[a,i]=u.useState(!1),[o,s]=u.useState(!1),l=u.useRef(null),d=u.useRef(null),f=u.useCallback(()=>{if(!(o||r||d.current==null)){var v=d.current.scrollHeight>d.current.clientHeight;i(v)}},[o,r]),p=Ue(f,100);return Xe(l.current,p),u.useLayoutEffect(p,[p]),c.jsxs("div",{className:M("error-view",{expanded:o||r}),ref:l,children:[c.jsxs("div",{className:"error-view-header",children:[c.jsxs("div",{className:"error-view-header-text",children:[c.jsx(J,{icon:Is}),c.jsx("span",{children:n})]}),c.jsxs("div",{className:"error-view-buttons",children:[c.jsx(Ea,{kind:"danger",className:"error-view-copy-button",tooltip:"Copy exception contents",copy:"".concat(n,": ").concat(e).trim()}),(a||o)&&!r&&c.jsx(re,{kind:"danger",className:"error-view-expand-button",onClick:()=>{s(!o)},icon:o?Ds:Ns,children:o?"Show Less":"Show More"})]})]}),c.jsx("pre",{className:"error-view-text",ref:d,children:e})]})}function nm(t,e,r){return e=am(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function am(t){var e=im(t,"string");return typeof e=="symbol"?e:String(e)}function im(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class he extends u.Component{static isParentSelected(e,r){var n=r.get(e);if(n===void 0)return!1;if(typeof n=="boolean")return n;var a=Array.from(n.values()).includes(!0),i=Array.from(n.values()).includes(!1);return a&&i?null:a}constructor(e){super(e),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(e){e.stopPropagation(),e.preventDefault(),this.setState(r=>{var{menuIsOpen:n}=r;return{menuIsOpen:!n}})}toggleValueFor(e,r){var{valueMap:n,onUpdateValueMap:a}=this.props,i=new Map(n),o=i.get(e);if(o instanceof Map){var s=new Map(o);if(r!=null)s.set(r,o.get(r)!==!0);else{var l=he.isParentSelected(e,i),d=l==null||!l;o.forEach((v,m)=>s.set(m,d))}i.set(e,s)}else i.set(e,o==null||!o);var f=i.get(e);if(r===void 0&&f!==void 0&&typeof f!="boolean"){var p=he.isParentSelected(e,n);p!=null&&p?f.forEach((v,m)=>f.set(m,!1)):f.forEach((v,m)=>f.set(m,!0))}a(i)}setAllValues(e){var{valueMap:r,onUpdateValueMap:n}=this.props,a=new Map;r.forEach((i,o)=>{if(typeof i=="boolean")a.set(o,e);else{var s=new Map;i.forEach((l,d)=>s.set(d,e)),a.set(o,s)}}),n(a)}selectAll(){this.setAllValues(!0)}clear(){this.setAllValues(!1)}renderMenuElement(){var{valueMap:e,"data-testid":r}=this.props;return c.jsxs("div",{className:"hcm-menu-container",children:[Array.from(e.entries()).map(n=>{var[a,i]=n;return c.jsxs("div",{children:[c.jsx(dt,{className:"hcm-parent",checked:he.isParentSelected(a,e),onChange:()=>this.toggleValueFor(a),children:a}),i!==void 0&&typeof i!="boolean"&&Array.from(i.entries()).map(o=>{var[s,l]=o;return c.jsx(dt,{className:"hcm-child",checked:l,onChange:()=>this.toggleValueFor(a,s),children:s},s)})]},a)}),c.jsx(re,{kind:"ghost",onClick:this.selectAll,"data-testid":r!==void 0?"".concat(r,"-btn-select-all"):void 0,children:"Select All"}),c.jsx(re,{kind:"ghost",onClick:this.clear,"data-testid":r!==void 0?"".concat(r,"-btn-clear"):void 0,children:"Clear"})]})}render(){var{menuText:e,className:r,icon:n,id:a,"data-testid":i}=this.props,{menuIsOpen:o}=this.state;return c.jsxs("button",{type:"button",className:M("btn hcm-btn",r),onClick:this.toggleMenu,id:a,"data-testid":i,children:[c.jsxs("span",{children:[n&&c.jsx(J,{icon:n,className:"hcm-icon mr-1"}),e]}),c.jsx("span",{className:"cs-caret"}),c.jsx(Rt,{options:{placement:"bottom"},isShown:o,onExited:()=>{this.setState({menuIsOpen:!1})},closeOnBlur:!0,interactive:!0,children:this.renderMenuElement()})]})}}nm(he,"defaultProps",{className:"",icon:null,id:"","data-testid":void 0});const om=he;function Wr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function tt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wr(Object(r),!0).forEach(function(n){sm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function sm(t,e,r){return e=lm(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lm(t){var e=um(t,"string");return typeof e=="symbol"?e:String(e)}function um(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Si=u.memo(t=>{var{tab:e,onClose:r,onSelect:n,isActive:a,activeRef:i,index:o,isDraggable:s,contextActions:l}=t,{key:d,isClosable:f=r!=null,title:p,icon:v}=e,m;return v!=null&&(m=H.isValidElement(v)?v:c.jsx(J,{icon:v})),c.jsx(go,{draggableId:d,index:o,isDragDisabled:!s,children:(g,w)=>c.jsxs("div",{className:"context-menu-wrapper",ref:a?i:null,children:[c.jsxs("div",tt(tt(tt({ref:g.innerRef},g.draggableProps),g.dragHandleProps),{},{className:M("btn btn-link btn-nav-tab",{active:a},{dragging:w.isDragging}),"data-testid":"btn-nav-tab-".concat(p),role:"tab",tabIndex:0,onAuxClick:h=>{f&&h.button===1&&h.buttons===0&&(r==null||r(d))},onClick:h=>{if(f&&h.button===1&&h.buttons===0){r==null||r(d);return}h.button===0&&h.buttons===0&&(h.target.focus(),n(d))},onKeyPress:h=>{h.key==="Enter"&&n(d)},children:[m,p,f&&c.jsx(re,{kind:"ghost",className:"btn-nav-tab-close",onClick:h=>{r==null||r(d),h.stopPropagation(),h.preventDefault()},icon:Xn,tooltip:"Close"})]})),c.jsx(Qn,{actions:l})]})},d)});Si.displayName="NavTab";const cm=Si;function Gr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function zr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gr(Object(r),!0).forEach(function(n){dm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function dm(t,e,r){return e=fm(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fm(t){var e=pm(t,"string");return typeof e=="symbol"?e:String(e)}function pm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var vm=500,mm=.01,hm=5e-4;function Yr(t){return t.scrollLeft===0}function qr(t){return t.scrollLeft+t.clientWidth===t.scrollWidth||t.scrollWidth===0}function gm(t,e,r){var{isClosable:n=!1,key:a}=t,i=[];if(n&&r!=null){i.push({title:"Close",order:10,group:20,action:()=>{r(a)}});for(var o=!0,s=e.length-1;s>0&&e[s].key!==t.key;s-=1)if(e[s].isClosable===!0){o=!1;break}i.push({title:"Close to the Right",order:20,group:20,action:()=>{for(var l=e.length-1;l>0&&e[l].key!==a;l-=1)e[l].isClosable===!0&&r(e[l].key)},disabled:o}),i.push({title:"Close All",order:30,group:20,action:()=>{e.forEach(l=>{l.isClosable===!0&&r(l.key)})}})}return i}function bm(t){var{activeKey:e,tabs:r,onSelect:n,onReorder:a,onClose:i,makeContextActions:o}=t,s=u.useRef(),[l,d]=u.useState(!0),[f,p]=u.useState(!0),[v,m]=u.useState(!0),g=u.useCallback(()=>{s.current!=null&&(s.current.clientWidth<s.current.scrollWidth&&r.length>0?d(!0):d(!1),p(Yr(s.current)),m(qr(s.current)))},[r]);Xe(s.current,g);var w=u.useCallback(P=>{ht.stopDragging(),P.destination&&(a==null||a(P.source.index,P.destination.index))},[a]),h=u.useCallback(()=>{if(s.current!=null){var P=Yr(s.current);P!==f&&p(P);var S=qr(s.current);S!==v&&m(S)}},[f,v]),y=u.useRef({cancelClick:!1}),O=u.useCallback(()=>{if(!(s.current==null||y.current.cancelClick))for(var{children:P}=s.current,S=P.length-1;S>=0;S-=1){var I=P[S];if(I.offsetLeft<s.current.scrollLeft-5){I.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});return}}},[]),j=u.useCallback(()=>{if(!(s.current==null||y.current.cancelClick))for(var{children:P}=s.current,S=0;S<P.length;S+=1){var I=P[S];if(I.offsetLeft+5>s.current.scrollLeft+s.current.offsetWidth){I.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"});return}}},[]),T=u.useCallback(function(P,S){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,R=arguments.length>3?arguments[3]:void 0,U=s.current;U!=null&&(y.current.cancelClick=!0,P==="left"?U.scrollLeft=S-I:P==="right"&&(U.scrollLeft=S+I),y.current.rAF=requestAnimationFrame(W=>{var G=R??W,C=W-G,D=mm*C+.5*hm*C**2;D=Math.min(D,U.scrollWidth),T(P,S,D,G)}))},[]),b=u.useCallback(()=>{var{holdTimer:P,rAF:S}=y.current;P!=null&&(clearTimeout(P),y.current.holdTimer=void 0),S!=null&&(cancelAnimationFrame(S),y.current.rAF=void 0),window.removeEventListener("mouseup",b)},[]);u.useEffect(()=>()=>window.removeEventListener("mouseup",b),[b]);var E=u.useCallback(P=>{s.current!=null&&(y.current.holdTimer=window.setTimeout(T,vm,P,s.current.scrollLeft)),y.current.cancelClick=!1,window.addEventListener("mouseup",b)},[b,T]),$=u.useCallback(()=>{E("left")},[E]),_=u.useCallback(()=>{E("right")},[E]);u.useEffect(function(){var S,I=R=>{R.stopPropagation(),R.preventDefault();var U=R.currentTarget,W=Math.abs(R.deltaY)>Math.abs(R.deltaX)?R.deltaY:R.deltaX;U.scrollLeft+=Hn(W,-30,30)};return(S=s.current)===null||S===void 0||S.addEventListener("wheel",I),()=>{var R;(R=s.current)===null||R===void 0||R.removeEventListener("wheel",I)}},[]);var k=u.useMemo(()=>{var P=new Map;return r.forEach(S=>{var{key:I}=S,R=[()=>gm(S,r,i),()=>{var U;return(U=o==null?void 0:o(S))!==null&&U!==void 0?U:[]}];P.set(I,R)}),P},[o,r,i]),A=u.useRef(null),B=r.find(P=>P.key===e),x=r.map((P,S)=>{var{key:I}=P,R=P===B;return c.jsx(cm,{tab:P,index:S,isActive:R,activeRef:A,onSelect:n,onClose:i,isDraggable:a!=null,contextActions:k.get(I)},I)});return u.useEffect(function(){A.current!=null&&A.current.scrollIntoView({block:"nearest",inline:"nearest"})},[e]),c.jsxs("nav",{className:"nav-container",children:[l&&c.jsx(re,{kind:"ghost",icon:c.jsx(J,{icon:As,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-left",tooltip:"Scroll left",onClick:O,onMouseDown:$,disabled:f}),c.jsx(bo,{onDragStart:ht.startDragging,onDragEnd:w,children:c.jsx(yo,{droppableId:"droppable-tab-navigation",direction:"horizontal",children:(P,S)=>c.jsxs("div",zr(zr({ref:I=>{I!=null&&(s.current=I,P.innerRef(I))}},P.droppableProps),{},{className:M("nav nav-tabs",{dragging:S.draggingFromThisWith}),role:"tablist",onScroll:h,children:[x,P.placeholder]}))})}),l&&c.jsx(re,{kind:"ghost",icon:c.jsx(J,{icon:ks,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-right",tooltip:"Scroll right",onClick:j,onMouseDown:_,disabled:v})]})}var ym=.025,Om=.9,Pm=.1,Sm=.618,Xr=80,fe={SIZE:8,DOT_SIZE:2},ae=18,wm=250,xm=60*1e3,Cm={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 Em(){return Jn(Cm)}var Tm=H.memo(()=>{var{activeThemes:t}=ze(),e=u.useMemo(Em,[t]),r=u.useRef(null),n=u.useRef(null),[a,i]=u.useState(!1),o=window.devicePixelRatio,s,l,d,f,p,v=null,m=[];function g(){var x;n.current!=null&&(d=n.current.offsetWidth,f=n.current.offsetHeight),r.current!=null&&(r.current.style.width="".concat(d,"px"),r.current.style.height="".concat(f,"px"),r.current.width=d*o,r.current.height=f*o),(x=s)===null||x===void 0||x.scale(o,o)}function w(){var{foregroundFill:x,foregroundStroke:P}=e,S=document.createElement("canvas");S.width=fe.SIZE,S.height=fe.SIZE;var I=S.getContext("2d");return I!=null&&(I.fillStyle=P,I.fillRect(0,0,fe.DOT_SIZE,fe.DOT_SIZE),I.fillStyle=x,I.fillRect(0,0,fe.SIZE,fe.SIZE)),I==null?void 0:I.createPattern(S,"repeat")}function h(x){var P=Math.random()-.5,S=ym*P;return x<Pm?S=Math.abs(S):x>Om&&(S=-Math.abs(S)),x+S}function y(){for(var x=[],P=Sm,S=0;S<d+ae;S+=1)P=h(P),x.push(P);return x}function O(){for(;m.length>=d+ae;)m.pop();for(;m.length<d+ae;)m.push(h(m[m.length-1]))}function j(x,P){P.beginPath(),P.moveTo(-1,f+1),P.lineTo(-1,f*x[0]);for(var S=0;S<x.length;S+=1)P.lineTo(S,f*x[S]);P.lineTo(d+ae,f*x[x.length-1]),P.lineTo(d+ae,f+1),P.closePath()}function T(x){x.beginPath();for(var P=1;P<d;P+=Xr)x.moveTo(P,0),x.lineTo(P,f);for(var S=1;S<f;S+=Xr)x.moveTo(0,S),x.lineTo(d,S)}function b(x){var P,S,I;v=(P=v)!==null&&P!==void 0?P:x;var{background:R,foregroundStroke:U,gridColor:W}=e;At(s),s.fillStyle=R,s.fillRect(0,0,d,f),T(s),s.lineWidth=1,s.strokeStyle=W,s.stroke();var G=(((S=v)!==null&&S!==void 0?S:0)-(x??0))/(1e3/ae);if(s.translate(G,0),j(m,s),s.lineWidth=2,s.strokeStyle=U,s.stroke(),s.translate(-G,0),l!=null&&(s.fillStyle=l),s.fill(),s.setTransform(o,0,0,o,0,0),(x??0)-((I=v)!==null&&I!==void 0?I:0)>1e3/ae){for(var C,D=Math.floor(((x??0)-((C=v)!==null&&C!==void 0?C:0))/(1e3/ae)),N=0;N<D;N+=1)m.shift(),m.push(h(m[m.length-1]));v=x}p!=null&&cancelAnimationFrame(p),p=requestAnimationFrame(b)}var E=xe(()=>{p=requestAnimationFrame(x=>{g(),O(),i(!1),b(x)})},wm,{leading:!0});function $(){i(!0),p!=null&&cancelAnimationFrame(p),p=null,v=null}var _=xe(()=>{$()},xm);function k(){p==null&&(i(!1),g(),O(),p=requestAnimationFrame(b)),_()}function A(){document.hasFocus()&&k()}function B(){p!=null&&cancelAnimationFrame(p),_(),E()}return u.useEffect(()=>{var x;return s=(x=r.current)===null||x===void 0?void 0:x.getContext("2d",{alpha:!1}),g(),m=y(),l=w(),b(),_(),window.addEventListener("resize",B),window.addEventListener("focus",k),window.addEventListener("blur",$),window.addEventListener("mousemove",A),window.addEventListener("keydown",A),()=>{p!=null&&cancelAnimationFrame(p),window.removeEventListener("resize",B),window.removeEventListener("focus",k),window.removeEventListener("blur",$),window.removeEventListener("mousemove",A),window.removeEventListener("keydown",A),_.cancel(),E.cancel()}},[e]),c.jsx("div",{className:"random-area-plot-animation-container",ref:n,children:c.jsx("canvas",{ref:r,className:a?"shade":""})})});const wi=Tm;function xi(t){var{text:e,placement:r="top-start"}=t,n=u.useMemo(()=>({placement:r}),[r]);return c.jsxs(c.Fragment,{children:[c.jsx(Bt,{UNSAFE_className:Wt.spectrumEllipsis,children:e??c.jsx(c.Fragment,{children:" "})}),e==null||e===""?null:c.jsx(Ye,{options:n,children:e})]})}var jm=["scrollRef","getItemDisplayText","getKey"];function Jr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Zr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jr(Object(r),!0).forEach(function(n){_m(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _m(t,e,r){return e=$m(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $m(t){var e=Im(t,"string");return typeof e=="symbol"?e:String(e)}function Im(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Dm(t,e){if(t==null)return{};var r=Nm(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Nm(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Am(t){var{scrollRef:e,getItemDisplayText:r,getKey:n}=t,a=Dm(t,jm),i=u.useCallback(o=>{var s=n(o),l=r(o);return c.jsx(Be,{textValue:l??String(s),children:c.jsx(xi,{text:l})},s)},[r,n]);return c.jsx(Nn,Zr(Zr({},a),{},{ref:e,menuTrigger:"focus",onSelectionChange:a.onSelectionChange,children:i}))}var km=500;function Mm(t){var{heading:e,content:r,delayMs:n=km}=t,[a,i]=u.useState(!1);return u.useEffect(()=>{window.setTimeout(()=>{i(!0)},n)},[n]),a?c.jsxs(Bn,{children:[c.jsx(We,{size:"XXL",children:c.jsx(J,{icon:Ms})}),c.jsx(kn,{children:e}),r==null?null:c.jsx(Nt,{children:r})]}):null}const Rm="_modified_5rbci_24",Lm="_track_5rbci_35",Fm="_handle_5rbci_15",Vm="_ticks_5rbci_103",Ci={"handle-size":"15px","popover-width":"90px","time-slider":"_time-slider_5rbci_5","time-slider-popovers":"_time-slider-popovers_5rbci_10","handle-popper":"_handle-popper_5rbci_15",modified:Rm,"flex-spacer":"_flex-spacer_5rbci_31",track:Lm,"track-fills":"_track-fills_5rbci_42","track-fill":"_track-fill_5rbci_42","track-fill-start":"_track-fill-start_5rbci_60","track-fill-middle":"_track-fill-middle_5rbci_61","track-fill-end":"_track-fill-end_5rbci_64","handle-track":"_handle-track_5rbci_67",handle:Fm,ticks:Vm,"tick-labels":"_tick-labels_5rbci_121","tick-label":"_tick-label_5rbci_121","tick-label-wrapper":"_tick-label-wrapper_5rbci_137"};var Ae=parseInt(Ci["handle-size"],10),Qr=parseInt(Ci["popover-width"],10),Y=24*60*60-1,en=5*60;function Um(t){var{startTime:e,endTime:r,onChange:n,isStartModified:a=!1,isEndModified:i=!1,"data-testid":o}=t,[s,l]=u.useState(e),[d,f]=u.useState(r),p=u.useRef(null);u.useEffect(function(){l(e),f(r)},[e,r]);var v=u.useCallback((w,h)=>{var y=w,O=h;y===O&&(O<Y?O+=1:y-=1),l(y),f(O),n({startTime:y,endTime:O})},[l,f,n]),m=u.useCallback(w=>{v(w,d)},[v,d]),g=u.useCallback(w=>{v(s,w)},[v,s]);return c.jsxs("div",{className:"time-slider","data-testid":o,children:[c.jsx(Km,{startTime:s,endTime:d,onStartTimeChange:m,onEndTimeChange:g,isStartModified:a,isEndModified:i}),c.jsxs("div",{className:"track",ref:p,children:[c.jsx(Hm,{startTime:s,endTime:d}),c.jsx("div",{className:"ticks",children:Array(24).fill(null).map((w,h)=>c.jsx("div",{className:"tick"},h))}),c.jsx(tn,{track:p,time:s,setTime:m}),c.jsx(tn,{track:p,time:d,setTime:g})]}),c.jsxs("div",{className:"tick-labels",children:[c.jsx("div",{className:"tick-label",children:"0:00"}),c.jsx("div",{className:"tick-label-wrapper",children:Array(24).fill(null).map((w,h)=>c.jsx("div",{className:"tick-label",children:"".concat(h+1,":00")},h))})]})]})}function Km(t){var{startTime:e,endTime:r,onStartTimeChange:n,onEndTimeChange:a,isStartModified:i,isEndModified:o,"data-testid":s}=t,l=e>r,[d,f]=u.useState(l?r:e),[p,v]=u.useState(l?e:r),m=u.useRef(null),g=u.useRef(null),w=u.useRef(null),h=u.useRef(null);u.useEffect(function(){f(e>r?r:e),v(e>r?e:r)},[e,r]),u.useEffect(function(){if(w.current!==null){var E;(E=g.current)===null||E===void 0||E.setSelection(w.current)}if(h.current!==null){var $;($=m.current)===null||$===void 0||$.setSelection(h.current)}},[l]);function y(b){e<=r?n(b):a(b)}function O(b){e<=r?a(b):n(b)}var j=u.useCallback(b=>{w.current=b,h.current=null},[]),T=u.useCallback(b=>{w.current=null,h.current=b},[]);return c.jsxs("div",{className:"time-slider-popovers",children:[c.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat(d/Y*100,"% - ").concat(Qr/2,"px)")}}),c.jsxs("div",{className:"handle-popper",children:[c.jsx("label",{className:M({modified:l?o:i}),children:l?"End Time":"Start Time"}),c.jsx(Ke,{ref:m,allowValueWrapping:!1,value:d,onChange:y,onSelect:j,"data-testid":s!==void 0?"".concat(s,"-input-1"):void 0})]}),c.jsx("div",{className:"flex-spacer"}),c.jsxs("div",{className:"handle-popper",children:[c.jsx("label",{className:M({modified:l?i:o}),children:l?"Start Time":"End Time"}),c.jsx(Ke,{ref:g,allowValueWrapping:!1,value:p,onChange:O,onSelect:T,"data-testid":s!==void 0?"".concat(s,"-input-2"):void 0})]}),c.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat((Y-p)/Y*100,"% - ").concat(Qr/2,"px)")}})]})}function Hm(t){var{startTime:e,endTime:r,"data-testid":n}=t;return c.jsxs("div",{className:"track-fills","data-testid":n,children:[e>r&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"track-fill track-fill-start",style:{transform:"scaleX(".concat(r/Y,")")}}),c.jsx("div",{className:"track-fill track-fill-end",style:{transform:"scaleX(".concat((Y-e)/Y,")")}})]}),e<r&&c.jsx("div",{className:"track-fill track-fill-middle",style:{transform:"translateX(".concat(e/Y*100,"%) scaleX(").concat((r-e)/Y,")")}})]})}function tn(t){var{track:e,time:r,setTime:n,"data-testid":a}=t,i=u.useMemo(()=>{var v=3600,m=Ae/2;return r<v?m=r/v*(Ae/2):r>23*v&&(m=Ae/2+1/(Y-23*v)*(r-23*v)*(Ae/2)),"translateX(calc(".concat(r/Y*100,"% - ").concat(m,"px))")},[r]),o=u.useCallback(v=>{if(!e.current)return 0;var m=e.current.getBoundingClientRect(),g=Math.max(v-m.left,0),w=Y*Math.min(1,g/m.width),h=en*Math.round(w/en),y=Math.min(Y,h);return y},[e]),s=u.useCallback(v=>{var{clientX:m}=v;n(o(m))},[n,o]),l=u.useCallback(v=>{var{clientX:m}=v;n(o(m)),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[n,o,s]),d=u.useCallback(()=>{window.addEventListener("mousemove",s),window.addEventListener("mouseup",l),document.documentElement.classList.add("drag-pointer-events-none")},[s,l]),f=u.useCallback(()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[s,l]),p=u.useCallback(()=>{d()},[d]);return u.useEffect(function(){return()=>{f()}},[f]),c.jsx("div",{className:"handle-track",style:{transform:i},children:c.jsx("button",{className:"handle",type:"button","aria-label":"Change time",onMouseDown:p,"data-testid":a})})}function Ei(t){var{buttons:e,isShown:r=!1,classNames:n,message:a,type:i,onClick:o,onDismiss:s,"data-testid":l}=t,d=e&&e.length!==0;return c.jsx(Kn,{in:r,timeout:ut.transitionMs,classNames:"toast-notification-slide-up",mountOnEnter:!0,unmountOnExit:!0,children:c.jsxs("div",{className:M("toast-notification",n,i),role:"presentation",onClick:o,onKeyPress:o,"data-testid":l,children:[c.jsx("div",{className:"message-container",children:c.jsx("span",{className:"message",children:a})}),c.jsx(Lt,{in:d,timeout:ut.transitionSlowMs,mountOnEnter:!0,unmountOnExit:!0,children:c.jsx("div",{className:"buttons-container",children:e})}),s&&c.jsx(re,{kind:"ghost",icon:Xn,tooltip:"Close notification",className:"my-2",onClick:s})]})})}Ei.TYPE=Object.freeze({ERROR:"error"});function Bm(t){return t}const Wm=Object.freeze(Object.defineProperty({__proto__:null,ACTION_ICON_HEIGHT:Gt,Accordion:Oo,ActionBar:Un,ActionButton:Dt,ActionButtonDialogTrigger:vi,ActionGroup:bd,ActionMenu:yd,AlertDialog:Po,AutoCompleteInput:kv,AutoResizeTextarea:Zt,Avatar:So,Badge:wo,BasicModal:ea,Breadcrumbs:xo,BulkActionBar:Fv,Button:Sl,ButtonGroup:Vn,CSS_VAR_EXPRESSION_PREFIX:Rs,Calendar:Co,CardFlip:dc,Checkbox:dt,CheckboxGroup:vv,Collapse:Kv,ColorEditor:Eo,ColorPicker:To,ColorValues:Od,ComboBox:Pd,ComboBoxNormalized:di,ConfirmActionButton:xv,ConfirmationDialog:mi,Content:Nt,ContextActionUtils:wl,ContextActions:Qn,ContextMenuItem:xl,ContextMenuRoot:Xu,ContextualHelp:jo,ContextualHelpTrigger:_o,CopyButton:Ea,CustomTimeSelect:qv,DEFAULT_DARK_THEME_KEY:Ls,DEFAULT_DARK_THEME_PALETTE:Fs,DEFAULT_GET_PREFERRED_REPLACEMENT_STRING:Ua,DEFAULT_LIGHT_THEME_KEY:Vs,DEFAULT_PRELOAD_DATA_VARIABLES:Us,DateField:$o,DateInput:em,DatePicker:Io,DateRangePicker:Do,DateTimeInput:Sd,DebouncedModal:gi,DebouncedSearchInput:Cl,Dialog:Rn,DialogContainer:No,DialogTrigger:Mn,Disclosure:Ao,DisclosurePanel:ko,DisclosureTitle:Mo,Divider:Ln,DragUtils:ht,DraggableItemList:wd,DropdownMenu:Zn,EditableItemList:tm,ErrorBoundary:El,ErrorView:rm,FadeTransition:Lt,Flex:An,Footer:Ro,Form:Fn,GLOBAL_SHORTCUTS:Tl,Grid:Lo,Heading:Jt,HierarchicalCheckboxMenu:om,ITEM_EMPTY_STRING_TEXT_VALUE:xd,Icon:We,IconActionButton:hi,IllustratedMessage:Bn,Image:Fo,InfoModal:bi,InlineAlert:Vo,Item:Be,ItemContent:Cd,ItemList:ct,ItemListItem:jl,ItemTooltip:Ed,get KEY(){return _l},Keyboard:Uo,LIST_VIEW_ROW_HEIGHTS:Ka,LabeledValue:Ko,Link:Ho,ListActionGroup:Td,ListActionMenu:jd,ListView:Hp,ListViewNormalized:fi,ListViewWrapper:Xt,LoadingOverlay:ce,LoadingSpinner:kt,LogicButton:Bo,Logo:bp,get MODIFIER(){return $l},MaskedInput:zt,Menu:_d,MenuItem:$d,MenuTrigger:Wo,Meter:Go,Modal:Yn,ModalBody:qn,ModalFooter:Il,ModalHeader:Ks,NON_WHITESPACE_REGEX:Hs,NavTabList:bm,NumberField:zo,Option:Ha,PICKER_ITEM_HEIGHTS:Id,PICKER_TOP_OFFSET:Dd,Page:Nd,Picker:ci,PickerNormalized:Ad,Popper:Rt,ProgressBar:Yo,ProgressCircle:qo,Radio:Xo,RadioGroup:Jo,RandomAreaPlotAnimation:wi,RangeCalendar:Zo,RangeSlider:Qo,SVG_ICON_MANUAL_COLOR_MAP:Bs,SearchField:es,SearchInput:ta,SearchableCombobox:Am,Section:kd,Select:ra,SelectValueList:Ba,Shortcut:Dl,ShortcutRegistry:Nl,SlideTransition:Md,Slider:ts,SocketedButton:fc,SpectrumButton:lt,SpectrumCheckbox:st,SpectrumMenu:rs,SplitButtonGroup:Al,Stack:Rd,StatusLight:ns,SubmenuTrigger:as,Switch:is,TABLE_ROW_HEIGHT:Ld,THEME_CACHE_LOCAL_STORAGE_KEY:Ws,TMP_CSS_PROP_PREFIX:Gs,TabList:os,TabPanels:tp,TableViewEmptyState:Mm,Tabs:ss,TagGroup:ls,Text:Bt,TextArea:us,TextField:cs,TextWithTooltip:xi,ThemeContext:kl,ThemeExport:ut,ThemePicker:gp,ThemeProvider:na,TimeField:ds,TimeInput:Ke,TimeSlider:Um,ToastContainer:fs,ToastNotification:Ei,ToastQueue:ps,ToggleButton:vs,Tooltip:Ye,UISwitch:Ml,View:pi,WHITESPACE_REGEX:zs,Well:ms,baseStyleProps:hs,calculatePreloadStyleContent:Ys,colorValueStyle:q,createCssVariableResolver:qs,createPreloadStyleElement:Xs,createXComponent:Bm,extractDistinctCssVariableExpressions:Js,fillToLength:Fd,getActiveThemes:Zs,getDefaultBaseThemes:Qs,getExpressionRanges:el,getItemKey:mt,getItemTextValue:Vd,getPositionOfSelectedItemElement:Ud,getThemeKey:tl,getThemePreloadData:rl,isDHColorValue:Kd,isItemElement:Hd,isItemElementWithDescription:Bd,isItemOrSection:Wd,isNormalizedItemsWithKeysList:Gd,isNormalizedSection:zd,isSectionElement:Yd,itemSelectionToStringSet:Le,normalizeTooltipOptions:Ht,overrideSVGFillColors:nl,preloadTheme:al,replaceSVGFillColor:il,resolveCssVariablesInRecord:Jn,resolveCssVariablesInString:ol,separateSpectrumProps:li,setThemePreloadData:sl,themeDHDefault:ll,themeDark:ul,themeLight:cl,trimTrailingMask:qd,useOnChangeTrackUncontrolled:Xd,usePickerItemScale:Wa,usePickerNormalizedProps:La,usePickerProps:Ra,usePickerScrollOnOpen:Jd,useRenderNormalizedItem:Va,useSpectrumThemeProvider:Kt,useStaticItemInitialScrollPosition:Zd,useStringifiedMultiSelection:ui,useStringifiedSelection:Qd,useStyleProps:gs,useTheme:ze,viewStyleProps:bs,wrapIcon:ef,wrapItemChildren:Fa,wrapPrimitiveWithText:tf},Symbol.toStringTag,{value:"Module"}));function rn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function Gm(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){rn(i,n,a,o,s,"next",l)}function s(l){rn(i,n,a,o,s,"throw",l)}o(void 0)})}}var Ti=u.createContext(null);function ji(t){var[e,r]=u.useState(null),[n,a]=u.useState(null),i=u.useContext(Ti),o=u.useContext(Ge);return u.useEffect(()=>{if(i==null){if(o!=null){r(o),a(null);return}r(null),a(new Error("No API available in useDeferredApi. Was code wrapped in ApiBootstrap or DeferredApiContext.Provider?"));return}var s=!1;function l(){return d.apply(this,arguments)}function d(){return d=Gm(function*(){if(typeof i=="function")try{var f=yield i(t);s||(r(f),a(null))}catch(p){s||(r(null),a(p))}else r(i)}),d.apply(this,arguments)}return l(),()=>{s=!0}},[o,i,t]),[e,n]}var _i=H.memo(t=>{var{children:e,onError:r,widget:n}=t,[a,i]=ji(n);return i!=null?(r==null||r(i),null):a==null?null:c.jsx(Ge.Provider,{value:a,children:e})});_i.displayName="DeferredApiBootstrap";var Qt=u.createContext(null);function $i(t){var[e,r]=u.useState({status:"loading"}),n=u.useContext(Qt);return u.useEffect(()=>{if(n==null){r({error:new Error("No ObjectFetchManager available in context"),status:"error"});return}return r(a=>a.status==="loading"?a:{status:"loading"}),n.subscribe(t,r)},[t,n]),e}function nn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function zm(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){nn(i,n,a,o,s,"next",l)}function s(l){nn(i,n,a,o,s,"throw",l)}o(void 0)})}}var ke=K.module("useWidget");function Ym(t){var[e,r]=u.useState(()=>({widget:null,error:null})),n=$i(t);return u.useEffect(function(){ke.debug("loadWidget",t);var{status:i}=n;if(i==="error"){r({widget:null,error:n.error});return}if(i==="loading"){r({widget:null,error:null});return}var{fetch:o}=n,s=!1;function l(){return d.apply(this,arguments)}function d(){return d=zm(function*(){try{At(o);var f=yield o();if(s){ke.debug2("loadWidgetInternal cancelled",t,f),f.close(),"exportedObjects"in f&&f.exportedObjects.forEach(p=>{p.close()});return}ke.debug("loadWidgetInternal done",t,f),r({widget:f,error:null})}catch(p){if(s)return;ke.error("loadWidgetInternal error",t,p),r({widget:null,error:p??new Error("Null error")})}}),d.apply(this,arguments)}return l(),()=>{s=!0}},[t,n]),e}const qm=Object.freeze(Object.defineProperty({__proto__:null,ApiBootstrap:dl,ApiContext:Ge,ClientBootstrap:wa,ClientContext:Ju,DeferredApiBootstrap:_i,DeferredApiContext:Ti,ObjectFetchManagerContext:Qt,ObjectFetcherContext:aa,getVariableDescriptor:Rl,isIdVariableDescriptor:Ll,isNameVariableDescriptor:Fl,isVariableDescriptor:Vl,sanitizeVariableDescriptor:ia,useApi:de,useClient:Oe,useDeferredApi:ji,useObjectFetch:$i,useObjectFetcher:Ul,useWidget:Ym},Symbol.toStringTag,{value:"Module"}));function Xm(t){return function(r){var{children:n}=r;return c.jsx(Ge.Provider,{value:t,children:n})}}function an(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function Jm(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){an(i,n,a,o,s,"next",l)}function s(l){an(i,n,a,o,s,"throw",l)}o(void 0)})}}var rt=K.module("MessageUtils"),Ii="io.deephaven.message.LoginOptions.request",Di="io.deephaven.message.SessionDetails.request",Ni="io.deephaven.broadcast",er="io.deephaven.broadcast.Login",Ai="io.deephaven.broadcast.Logout";function Ze(t){var e=t;return e!=null&&typeof e.id=="string"&&typeof e.message=="string"}function ki(t){return Ze(t)&&t.message===er}function Mi(t){return Ze(t)&&t.message===Ai}function Ri(t){var e=t;return e!=null&&typeof e.id=="string"}function tr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:je(),r=arguments.length>2?arguments[2]:void 0;return{message:t,id:e,payload:r}}function Zm(t,e){return{id:t,payload:e}}function rr(){return window.opener!=null?window.opener:window.parent!=null&&window.parent!==window?window.parent:null}function nr(t){return yt.apply(this,arguments)}function yt(){return yt=Jm(function*(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e4,r=rr();if(r==null)throw new Error("window parent is null, unable to send request.");return new Promise((n,a)=>{var i,o=je(),s=l=>{var{data:d}=l;if(!Ri(d)){rt.debug("Ignoring non-deephaven response",d);return}if(rt.debug("Received message",d),(d==null?void 0:d.id)!==o){rt.debug("Ignore message, id doesn't match",d);return}window.clearTimeout(i),window.removeEventListener("message",s),n(d.payload)};window.addEventListener("message",s),i=window.setTimeout(()=>{window.removeEventListener("message",s),a(new Kl("Request timed out"))},e),r.postMessage(tr(t,o),"*")})}),yt.apply(this,arguments)}function Qm(t,e,r){return e=eh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eh(t){var e=th(t,"string");return typeof e=="symbol"?e:String(e)}function th(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Li extends Error{constructor(){super(...arguments),Qm(this,"isNoConsolesError",!0)}}function Fi(t){return t.isNoConsolesError}function on(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function Qe(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){on(i,n,a,o,s,"next",l)}function s(l){on(i,n,a,o,s,"throw",l)}o(void 0)})}}var ve=K.module("SessionUtils");function rh(t,e){return ve.info("Starting connection to '".concat(e,"'...")),new t.IdeConnection(e)}function Vi(t,e,r){return Ot.apply(this,arguments)}function Ot(){return Ot=Qe(function*(t,e,r){ve.info("Getting console types...");var n=yield e.getConsoleTypes();if(n.length===0)throw new Li("No console types available");ve.info("Available types:",n);var a=n[0];ve.info("Starting session with type",a);var i=yield e.startSession(a),o={type:a,id:je()};return ve.info("Console session established",o),{session:i,config:o,connection:e,details:r,dh:t}}),Ot.apply(this,arguments)}function nh(t,e,r){return ve.info("createCoreClient",e),new t.CoreClient(e,r)}function ah(t){return t!=null&&typeof t=="object"}function ih(){return Pt.apply(this,arguments)}function Pt(){return Pt=Qe(function*(){var t=yield nr(Di);if(!ah(t))throw new Error("Unexpected session details response: ".concat(t));return t}),Pt.apply(this,arguments)}function oh(){return St.apply(this,arguments)}function St(){return St=Qe(function*(){var t=new URLSearchParams(window.location.search);switch(t.get("authProvider")){case"parent":return ih()}return{}}),St.apply(this,arguments)}function sh(t,e,r){return wt.apply(this,arguments)}function wt(){return wt=Qe(function*(t,e,r){var n;try{n=yield Vi(t,e,r)}catch(a){if(!Fi(a))throw a}return n}),wt.apply(this,arguments)}const lh=Object.freeze(Object.defineProperty({__proto__:null,BROADCAST_CHANNEL_NAME:Ni,BROADCAST_LOGIN_MESSAGE:er,BROADCAST_LOGOUT_MESSAGE:Ai,BooleanColumnFormatter:pc,CharColumnFormatter:vc,DateTimeColumnFormatter:Hl,DateUtils:mc,DecimalColumnFormatter:Bl,DefaultColumnFormatter:hc,FETCH_TIMEOUT:Zu,Formatter:Ft,FormatterUtils:vt,ITEM_KEY_PREFIX:gc,IntegerColumnFormatter:Wl,LOGIN_OPTIONS_REQUEST:Ii,NoConsolesError:Li,SESSION_DETAILS_REQUEST:Di,StringColumnFormatter:bc,TableColumnFormatter:Gl,TableUtils:yc,createComboboxFilterArgs:Oc,createConnection:rh,createCoreClient:nh,createFilterConditionFactory:Vt,createFormatterFromSettings:Pc,createKeyedItemKey:Ta,createNotNullOrEmptyFilterCondition:ja,createOnTableUpdatedHandler:Sc,createSearchTextFilter:_a,createSelectedValuesFilter:Ut,createSessionWrapper:Vi,createShowOnlyEmptyFilterCondition:$a,createValueFilter:Ia,defaultRowDeserializer:wc,fetchVariableDefinition:Qu,generateEmptyKeyedItems:xc,getColumnFormats:Cc,getDateTimeFormatterOptions:Ec,getSessionDetails:oh,getSize:Tc,getWindowParent:rr,isBroadcastLoginMessage:ki,isBroadcastLogoutMessage:Mi,isClosed:Da,isCustomColumnFormatDefined:jc,isMessage:Ze,isNoConsolesError:Fi,isResponse:Ri,isSortDirection:_c,loadSessionWrapper:sh,makeMessage:tr,makeResponse:Zm,padFirstAndLastRow:$c,requestParentResponse:nr},Symbol.toStringTag,{value:"Module"}));function uh(t,e,r){return e=ch(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ch(t){var e=dh(t,"string");return typeof e=="symbol"?e:String(e)}function dh(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class fh extends Error{constructor(){super(...arguments),uh(this,"isColumnNameError",!0)}}const ph=fh;function vh(t,e,r){return e=mh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mh(t){var e=hh(t,"string");return typeof e=="symbol"?e:String(e)}function hh(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class gh extends Error{constructor(){super(...arguments),vh(this,"isTableDisconnectError",!0)}}const bh=gh;var Me=K.module("useTable"),yh=(t,e,r,n)=>{var a=de(),[i,o]=u.useState(void 0),[s,l]=u.useState([]),[d,f]=u.useState(null),[p,v]=u.useState(null);u.useEffect(()=>{if(n===void 0){o(t==null?void 0:t.columns),f(null);return}try{o(t==null?void 0:t.findColumns(n)),f(null)}catch(h){Me.error("Column not found",h,n),f(new ph("Invalid columnNames argument"))}},[t,n]),u.useEffect(()=>{if(!i||!t){Me.debug2("Table or column not initialized, skip viewport update.");return}Me.debug2("Setting viewport",e,r),t.setViewport(e,r,i)},[i,t,e,r]);var m=u.useCallback(h=>{var{detail:y}=h;if(!i){Me.error("Columns not initialized.");return}var O=i.map(j=>y.rows.map(T=>T.get(j)));l(O)},[i]),g=u.useCallback(()=>{v(new bh("Table disconnected"))},[]),w=u.useCallback(()=>{v(null)},[]);return Fe(t,a.Table.EVENT_UPDATED,m),Fe(t,a.Table.EVENT_DISCONNECT,g),Fe(t,a.Table.EVENT_RECONNECT,w),{columns:i,data:s,error:p??d}};const Ui=yh;var Oh=(t,e,r,n)=>{var a=u.useMemo(()=>[n],[n]),{columns:i=[],data:o=[],error:s}=Ui(t,e,r,a);return{column:i[0],data:o[0],error:s}};const Ki=Oh;function sn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function Ph(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){sn(i,n,a,o,s,"next",l)}function s(l){sn(i,n,a,o,s,"throw",l)}o(void 0)})}}var ee=K.module("TableInput"),nt=250;function ar(t){var e,r,{className:n=void 0,columnName:a,settings:i,defaultValue:o=[],isInvalid:s=!1,onChange:l=()=>!1,onBlur:d=()=>!1,table:f}=t,p=u.useRef(null),v=de(),m=u.useMemo(()=>{var C=vt.getColumnFormats(i),D=vt.getDateTimeFormatterOptions(i),{defaultDecimalFormatOptions:N={},defaultIntegerFormatOptions:V={}}=i;return new Ft(v,C,D,N,V)},[v,i]),[g,w]=u.useState(""),[h,y]=u.useState(new Set(o)),[O,j]=u.useState(),T=u.useRef(null),b=Math.min((e=O==null?void 0:O.size)!==null&&e!==void 0?e:0,nt),{column:E,data:$,error:_}=Ki(O,0,nt-1,a),k=u.useCallback(C=>E?m.getFormattedString(C,E.type,E.name):"".concat(C),[E,m]),[A,B]=u.useMemo(()=>{var C=new Set(h),D=[];if($==null)return[D,null];if($.forEach(V=>{var ne="".concat(V),ur=h.has(ne);ur&&C.delete(ne),D.push({value:ne,displayValue:k(V),isSelected:ur})}),C.size>0){ee.debug2("Selection has items that are missing from the viewport");var N=new Set(h);return Array.from(C).forEach(V=>{N.delete(V)}),[D,N]}return[D,null]},[$,h,k]);u.useEffect(()=>{B!==null&&(y(B),l(Array.from(B)))},[l,B]);var x=u.useCallback(function(){var C=Ph(function*(D){try{var N=yield D;ee.debug("Table resolved",N),j(N)}catch(V){if(we.isCanceled(V))return;ee.error(V)}});return function(D){return C.apply(this,arguments)}}(),[]);u.useEffect(()=>{var C=we.makeCancelable(f);return x(C),()=>{ee.debug2("Cancel table promise"),C.cancel()}},[f,x]);var P=u.useCallback(C=>{var{value:D}=C.target;w(D);var N=A.findIndex(ne=>ne.displayValue.includes(D));if(N>-1){var V;ee.debug2("Found ".concat(D," at index ").concat(N)),(V=T.current)===null||V===void 0||V.scrollIntoView(N)}else ee.debug2("".concat(D," not found"))},[A,T]),S=u.useCallback(C=>{if(ee.debug("handleSelect",C),C>=A.length){ee.error("Invalid index",C);return}var D=A[C].value,N=new Set(h);A[C].isSelected?N.delete(D):N.add(D),y(N),l(Array.from(N))},[l,A,h]),I=u.useCallback(()=>{var C=A.map(N=>N.value),D=new Set(C);y(D),l(C)},[A,l]),R=u.useCallback(()=>{y(new Set),l([])},[l]),U=u.useCallback(()=>{},[]),W=u.useCallback(C=>{var D,{relatedTarget:N}=C;ee.debug("handleChildBlur",N,N instanceof HTMLElement,p.current,(D=p.current)===null||D===void 0?void 0:D.contains(N)),(!N||p.current&&N instanceof HTMLElement&&!p.current.contains(N))&&d()},[d]),G=A.length===0;return c.jsxs("div",{ref:p,className:M("table-input-container d-flex flex-column position-relative",n),children:[c.jsx(ta,{disabled:!!_||G,value:g,placeholder:"Search",onChange:P,className:"mb-2 d-flex",onBlur:W}),c.jsx(Ba,{className:"table-input-list",disabled:O===void 0||G,isInvalid:s,items:G?[{value:"Empty",isSelected:!1}]:A,itemCount:b,offset:0,onSelect:S,onViewportChange:U,ref:T,onBlur:W}),O&&c.jsxs("div",{className:"meta-row",children:[c.jsx("div",{className:"d-flex align-items-center text-muted small",children:O!=null&&O.size>b&&c.jsxs(c.Fragment,{children:["Table is too large, showing the first ",nt," items."]})}),c.jsxs("div",{children:[c.jsx("button",{type:"button",className:"btn btn-link",onBlur:W,onClick:I,children:"Select All"}),c.jsx("button",{type:"button",className:"btn btn-link mr-a",onBlur:W,onClick:R,children:"Clear"})]})]}),O==null||_&&c.jsx("div",{className:"h-100 w-100 position-absolute",children:c.jsx(ce,{isLoaded:O!=null,isLoading:O==null&&_==null,errorMessage:(r=_==null?void 0:_.message)!==null&&r!==void 0?r:null})})]})}ar.displayName="TableInput";ar.defaultProps={isInvalid:!1,className:void 0};var ln=K.module("useBroadcastChannel");function ir(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Mt,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ni,r=u.useMemo(()=>new BroadcastChannel(e),[e]);return u.useEffect(()=>()=>{r.close()},[r]),u.useEffect(()=>{function n(a){var{data:i}=a;if(!Ze(i)){ln.debug("Ignoring non-deephaven message",i);return}ln.debug("event received",i),t(a)}return r.addEventListener("message",n),()=>{r.removeEventListener("message",n)}},[r,t]),r}function et(t,e){var r=u.useCallback(n=>{ki(n.data)?t==null||t(n.data):Mi(n.data)&&(e==null||e(n.data))},[t,e]);ir(r)}var He="io.deephaven.web.client.auth.refreshToken",Hi=u.createContext(null),Sh=K.module("RefreshTokenUtils");function xt(){var t=ye.get(He);try{if(t!=null)return JSON.parse(t)}catch(e){Sh.error("Error parsing refresh token",t,e)}return null}function Ct(t){if(t==null){ye.remove(He);return}var e=JSON.stringify({bytes:t.bytes,expiry:t.expiry}),r=new Date(t.expiry);ye.set(He,e,{secure:!0,sameSite:"strict",expires:r})}function Bi(t){var{children:e}=t,r=de(),n=Oe(),[a,i]=u.useState(xt());u.useEffect(function(){var d=n.addEventListener(r.CoreClient.EVENT_REFRESH_TOKEN_UPDATED,f=>{var{detail:p}=f;Ct(p),i(p)});return d},[r,n,a]);var o=u.useCallback(()=>{i(xt())},[]),s=u.useCallback(()=>{Ct(null),i(null)},[]);return et(o,s),c.jsx(Hi.Provider,{value:a,children:e})}var wh=["onInputChange","onSearchTextChange"];function un(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function cn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?un(Object(r),!0).forEach(function(n){xh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):un(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xh(t,e,r){return e=Ch(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ch(t){var e=Eh(t,"string");return typeof e=="symbol"?e:String(e)}function Eh(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Th(t,e){if(t==null)return{};var r=jh(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function jh(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function _h(t){var e=rf(t),{onInputChange:r,onSearchTextChange:n}=e,a=Th(e,wh),i=u.useCallback(o=>{r==null||r(o),n(o)},[r,n]);return c.jsx(di,cn(cn({},a),{},{onInputChange:i}))}var $h=["table","keyColumn","labelColumn","iconColumn","settings"];function dn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function fn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dn(Object(r),!0).forEach(function(n){Ih(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dn(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ih(t,e,r){return e=Dh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Dh(t){var e=Nh(t,"string");return typeof e=="symbol"?e:String(e)}function Nh(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ah(t,e){if(t==null)return{};var r=kh(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function kh(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Mh(t){var e,{table:r,keyColumn:n,labelColumn:a,iconColumn:i,settings:o}=t,s=Ah(t,$h),{scale:l}=Kt(),d=Ka[(e=s.density)!==null&&e!==void 0?e:"regular"][l],{getFormattedString:f}=Ga(o),p=nf({table:r,iconColumnName:i,keyColumnName:n,labelColumnName:a,formatValue:f}),{viewportData:v,onScroll:m}=Yt({reuseItemsOnTableResize:!0,table:r,itemHeight:d,deserializeRow:p});return c.jsx(fi,fn(fn({},s),{},{normalizedItems:v.items,showItemIcons:i!=null,onScroll:m}))}function Rh(t){return typeof t=="object"&&t!=null&&"equals"in t&&typeof t.equals=="function"}function Lh(t){return"".concat(t)}function Fh(t){var{column:e,table:r,filter:n=zl,onChange:a,selectedValue:i,disabled:o,className:s,formatValue:l=Lh,maxSize:d=1e3}=t,f=de(),[p,v]=u.useState([]);u.useEffect(()=>{if(r==null){v([]);return}var h=e??r.columns[0];r.applyFilter(n);var y=r.setViewport(0,d,[h]);return y.addEventListener(f.Table.EVENT_UPDATED,O=>{var{detail:j}=O,T=j.rows.map(b=>{var E;return(E=b.get(h))!==null&&E!==void 0?E:null});v(T)}),()=>{y.close()}},[e,f,n,d,r]);var m=u.useMemo(()=>i===void 0?[void 0,...p]:p,[i,p]),g=u.useMemo(()=>m.findIndex(h=>h===i||Rh(h)&&h.equals(i)),[i,m]),w=u.useCallback(h=>{a(m[h])},[a,m]);return c.jsx(ra,{className:s,value:g,onChange:w,disabled:o,children:m.map((h,y)=>c.jsx(Ha,{value:y,children:l(h)},"".concat(y)))})}function Vh(t,e,r,n){var a=le(),[i,o]=u.useState(""),{value:s}=_e(i,r),l=u.useCallback(v=>{o(v.trim())},[]),{data:d,isLoading:f}=Ee(a.doesColumnValueExist,[t,e,s,n]),p=f||i!==s?null:d;return{valueTrimmed:i,valueTrimmedDebounced:s,valueExists:p,trimAndUpdateValue:l}}var pn=K.module("useDebouncedViewportSearch"),Uh=200;function Kh(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Uh,n=le(),{table:a,applyFiltersAndRefresh:i}=t,o=u.useMemo(()=>xe(s=>{if(pn.debug("Applying debounced searchText '".concat(s,"'")),a!=null){var l=s.trim();if(l===""){i([]);return}var d=a.findColumn(e),f=n.makeFilterValue(d.type,l),p=[d.filter().contains(f)];i(p)}},r),[i,e,r,a,n]);return u.useEffect(()=>()=>{pn.debug("Cancelling debounced search function"),o.cancel()},[o]),o}var Wi=300;function Hh(t){var{viewportData:e,columnName:r,shouldSelectAllOnNoSelection:n,mapItemToValue:a}=t,i=le(),o=ai(e,a,Ta),{value:s}=_e(o,Wi),l=ri(s,Za);return u.useMemo(()=>Ut(i,r,l.selection,n,l.isInverted),[r,l,n,i])}function Bh(t,e,r,n){var a=u.useRef("");return a.current=r,u.useMemo(()=>{var i=t.length>0&&t[0].item==null;return!i&&n!=null&&(a.current===""||n.toLowerCase().includes(a.current.toLowerCase()))?[{key:n,item:{[e]:n}},...t]:t},[n,e,t])}function vn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function Wh(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){vn(i,n,a,o,s,"next",l)}function s(l){vn(i,n,a,o,s,"throw",l)}o(void 0)})}}function Gh(t){var{table:e,columnName:r,defaultValue:n,itemHeight:a,topOffset:i=0,value:o}=t;return u.useCallback(Wh(function*(){if(e==null||o===""||o===n)return i;var s=e.findColumn(r),l=yield e.seekRow(0,s,"String",o),d=n==null?0:1;return(l+d)*a+i}),[r,n,a,e,i,o])}function zh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"or",r=le(),n=u.useMemo(()=>ja(r),[r]);return u.useMemo(()=>Vt(t,n,e),[t,e,n])}function Gi(t){u.useEffect(()=>()=>{t!=null&&(Da(t)||t.close())},[t])}function Yh(t){var{maybeTable:e,columnName:r,mapItemToValue:n,filterConditionFactories:a=[],trimSearchText:i=!1,timeZone:o}=t,{itemHeight:s}=Wa(),l=le(),[d,f]=u.useState(""),[p,v]=u.useState(""),m=u.useCallback(C=>{v(i?C.trim():C)},[i]),g=u.useMemo(()=>i?d.trim():d,[d,i]),[w,h]=u.useState(null),[y,O]=u.useState(()=>new Map),{data:j,isLoading:T}=Ee(l.doesColumnValueExist,[e,r,p,!1]),{isDebouncing:b}=_e(p,vr),E=b||T?null:j,$=u.useMemo(()=>_a(l,r,p,o),[p,r,l,o]),_=u.useMemo(()=>Ut(l,r,new Set(y.keys()),!1,!0),[r,y,l]),{data:k}=Ee(l.createDistinctSortedColumnTable,[e,r,"asc",...a]);Gi(k);var A=Yt({table:k,itemHeight:s,viewportSize:af,viewportPadding:of}),B=g.length>0&&A.size===0,x=y.has(g),P=Ue(m,vr),S=u.useCallback(C=>{f(C),P(C)},[P]),I=Ue(h,0),R=u.useCallback(C=>{if(f(""),m(""),h(C),I(null),C!=null){var D=A.viewportData.findItem(C);if(D!=null){var N=n(D);O(V=>{var ne=new Map(V);return ne.set(N,{value:N}),ne})}}},[m,I,A.viewportData,n]),U=u.useCallback(C=>{O(D=>{if(C.size===0)return D;var N=new Map(D);for(var V of C)N.set(V,{value:V});return N})},[]),W=u.useCallback(C=>{O(D=>{if(C==="all")return new Map;var N=new Map(D);for(var V of C)N.delete(V);return N})},[]),G=za(A.table,$,_);return Ya(A,G),u.useMemo(()=>({list:A,hasSearchTextWithZeroResults:B,searchText:d,searchTextExists:E,searchTextIsInSelectedValues:x,selectedKey:w,selectedValueMap:y,onSearchTextChange:S,onSelectKey:R,onAddValues:U,onRemoveValues:W}),[B,A,U,W,S,R,d,E,x,w,y])}function mn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function qh(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){mn(i,n,a,o,s,"next",l)}function s(l){mn(i,n,a,o,s,"throw",l)}o(void 0)})}}function Xh(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var a=u.useCallback(qh(function*(){var d;return(d=t==null?void 0:t.selectDistinct(t.findColumns(r)))!==null&&d!==void 0?d:null}),[t,...r]),{data:i,error:o,isError:s,isLoading:l}=Ee(a,[]);return u.useEffect(()=>()=>{i==null||i.close()},[i]),{distinctTable:i,error:o,isError:s,isLoading:l}}function Jh(t,e){var r=le(),n=u.useMemo(()=>$a(r,t),[t,r]);return u.useMemo(()=>Vt(e,n),[e,n])}function Zh(t,e,r){var n=le();return u.useMemo(()=>Ia(n,t,e,r),[t,r,n,e])}const Qh=Object.freeze(Object.defineProperty({__proto__:null,ComboBox:_h,DEBOUNCE_MS:Wi,ListView:Mh,Picker:sf,REFRESH_TOKEN_KEY:He,RefreshTokenBootstrap:Bi,RefreshTokenContext:Hi,TableDropdown:Fh,TableInput:ar,makeApiContextWrapper:Xm,readRefreshToken:xt,storeRefreshToken:Ct,useBroadcastChannel:ir,useBroadcastLoginListener:et,useCheckIfExistsValue:Vh,useDebouncedViewportSearch:Kh,useDebouncedViewportSelectionFilter:Hh,useFilterConditionFactories:za,useFilteredItemsWithDefaultValue:Bh,useFormatter:Ga,useGetItemIndexByValue:lf,useGetItemPosition:Gh,useInitializeViewportData:uf,useNotNullOrEmptyFilter:zh,usePickerWithSelectedValues:Yh,useSearchableViewportData:cf,useSelectDistinctTable:Xh,useSetPaddedViewportCallback:df,useShowOnlyEmptyFilter:Jh,useTable:Ui,useTableClose:Gi,useTableColumn:Ki,useTableListener:Fe,useTableSize:ff,useTableUtils:le,useValueFilter:Zh,useViewportData:Yt,useViewportFilter:Ya},Symbol.toStringTag,{value:"Module"}));var zi=u.createContext(!1);function eg(t){var{fontClassNames:e=["fira-sans-regular","fira-sans-semibold","fira-mono"],children:r}=t,[n,a]=u.useState(!1);return u.useEffect(function(){document.fonts.ready.then(()=>{a(!0)})},[]),c.jsxs(c.Fragment,{children:[c.jsx(zi.Provider,{value:n,children:r}),c.jsx("div",{id:"preload-fonts",style:{visibility:"hidden",position:"absolute",top:-1e4},children:e.map(i=>c.jsx("p",{className:i,children:"preload"},i))})]})}function tg(t){var{fetch:e,type:r}=t,n=oa(),a=u.useMemo(()=>[...n.values()].filter(sa).find(o=>[o.supportedTypes].flat().includes(r)),[n,r]);if(a!=null){var i=a.component;return c.jsx(i,{fetch:e})}throw new Error("Unknown widget type '".concat(r,"'"))}const rg=Object.freeze(Object.defineProperty({__proto__:null,PluginType:la,PluginsContext:qe,WidgetView:tg,getDashboardPlugins:ec,getIconForPlugin:Yl,getThemeDataFromPlugins:ua,isAuthPlugin:ca,isDashboardPlugin:ql,isLegacyAuthPlugin:ft,isLegacyDashboardPlugin:Xl,isLegacyPlugin:da,isLegacyTablePlugin:Jl,isPlugin:pt,isTablePlugin:Zl,isThemePlugin:Ql,isWidgetPlugin:sa,pluginSupportsType:eu,useDashboardPlugins:tc,usePlugins:oa},Symbol.toStringTag,{value:"Module"}));function ng(t){if(t==null)return!1;var e=t;return e.Component!==void 0&&typeof e.isAvailable=="function"}var Yi="io.deephaven.auth.AnonymousAuthenticationHandler",ag="io.deephaven.authentication.psk.PskAuthenticationHandler";function hn(t,e,r){return e=ig(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ig(t){var e=og(t,"string");return typeof e=="symbol"?e:String(e)}function og(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class sg extends Error{constructor(){super(...arguments),hn(this,"name","AuthenticationError"),hn(this,"isAuthenticationError",!0)}}const qi=sg;function gn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function lg(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){gn(i,n,a,o,s,"next",l)}function s(l){gn(i,n,a,o,s,"throw",l)}o(void 0)})}}var bn=K.module("AuthPluginBase");function or(t){var{children:e,getLoginOptions:r}=t,n=Oe(),[a,i]=u.useState(),[o,s]=u.useState(!1);return u.useEffect(()=>{var l=!1;function d(){if(l)throw new fa("Login canceled.")}function f(){return p.apply(this,arguments)}function p(){return p=lg(function*(){try{var v=yield r();d(),bn.info("Logging in..."),yield n.login(v),d(),s(!0)}catch(w){if(!l){var m;bn.error("Unable to login:",w);var g=(m=Ce(w))!==null&&m!==void 0?m:"Unable to login. Verify credentials.";i(new qi(g)),s(!1)}}}),p.apply(this,arguments)}return f(),()=>{l=!0}},[n,r]),o?c.jsx(c.Fragment,{children:e}):c.jsx(ce,{"data-testid":"auth-base-loading",isLoading:a==null,isLoaded:!1,errorMessage:Ce(a)})}var ug={canLogout:!1};function cg(t){var{children:e}=t,r=de(),n=u.useCallback(()=>({type:r.CoreClient.LOGIN_TYPE_ANONYMOUS}),[r]);return c.jsx(or,{getLoginOptions:n,children:c.jsx(Je.Provider,{value:ug,children:e})})}var dg={Component:cg,isAvailable:t=>t.includes(Yi)};const Xi=dg;function yn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function fg(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){yn(i,n,a,o,s,"next",l)}function s(l){yn(i,n,a,o,s,"throw",l)}o(void 0)})}}var pg=K.module("AuthPluginParent"),vg={canLogout:!1};function mg(t){return t!=null&&typeof t.type=="string"}function hg(){return Et.apply(this,arguments)}function Et(){return Et=fg(function*(){pg.info("Logging in by delegating to parent window...");var t=yield nr(Ii);if(!mg(t))throw new Error("Unexpected login options response: ".concat(t));return t}),Et.apply(this,arguments)}function gg(){var t;return(t=new URLSearchParams(window.location.search).get("authProvider"))!==null&&t!==void 0?t:""}function bg(t){var{children:e}=t;return c.jsx(or,{getLoginOptions:hg,children:c.jsx(Je.Provider,{value:vg,children:e})})}var yg={Component:bg,isAvailable:()=>rr()!=null&&gg()==="parent"};const Ji=yg;function Zi(t){var{children:e,errorMessage:r,isLoggingIn:n=!1,onSubmit:a}=t;return c.jsxs("form",{className:"login-form",onSubmit:i=>{i.preventDefault(),i.stopPropagation(),a==null||a(i)},children:[c.jsx("div",{className:"flex-spacer"}),c.jsxs("div",{className:"flex-wrapper",children:[c.jsx("fieldset",{disabled:n,className:"container-fluid",children:e}),c.jsx("div",{className:"form-group d-flex justify-content-end align-items-center mb-0",children:c.jsxs("button",{type:"submit",className:M("btn btn-primary",{"btn-spinner":n},{"btn-cancelable":n}),"data-testid":"btn-login",children:[n&&c.jsxs("span",{children:[c.jsx(kt,{className:"mr-2 loading-spinner-vertical-align"}),c.jsx("span",{className:"btn-normal-content",children:"Logging in"}),c.jsx("span",{className:"btn-hover-content",children:"Cancel"})]}),!n&&"Login"]})})]}),c.jsx("div",{className:"flex-spacer",children:r!=null&&c.jsx("p",{className:"error-message mb-0",role:"alert",children:"".concat(r)})})]})}function Qi(t){var{children:e,logoPath:r="./logo.png"}=t;return c.jsxs("div",{className:"login-container",children:[c.jsx(wi,{}),c.jsxs("div",{className:"login-box",children:[c.jsx("div",{className:"logo",children:c.jsx("img",{src:r,alt:"Deephaven Data Labs"})}),e,c.jsxs("p",{className:"footer",children:["© 2016-",new Date().getFullYear()," Deephaven Data Labs LLC. Patent Pending."]})]})]})}function On(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function at(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){On(i,n,a,o,s,"next",l)}function s(l){On(i,n,a,o,s,"throw",l)}o(void 0)})}}var Tt="io.deephaven.authentication.psk.PskAuthenticationHandler",eo="psk",jt="io.deephaven.web.client.auth.psk.token",me=K.module("AuthPluginPsk");function Og(){return new URLSearchParams(window.location.search).get(eo)}function Pg(){me.debug2("clearWindowToken");var t=new URL(window.location.href);t.searchParams.delete(eo),window.history.replaceState(null,"",t.href)}function Pn(){var t;return(t=ye.get(jt))!==null&&t!==void 0?t:null}function it(t){me.debug2("Storing token in cookie",t),t!=null?ye.set(jt,t,{secure:!0,sameSite:"strict"}):ye.remove(jt)}function Sg(t){var{children:e,logoPath:r}=t,n=Oe(),a=u.useRef(null),i=u.useRef(null),[o,s]=u.useState(),[l,d]=u.useState(!1),[f,p]=u.useState(!1),[v,m]=u.useState(!1),[g,w]=u.useState(""),h=u.useCallback(function(){var b=at(function*(E){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;me.info("Logging in..."),m(!0);var _=null;try{if(_=n.login({type:Tt,token:E}),i.current=_,yield _,me.info("Logged in successfully"),i.current!==_)return;it(E),p(!0)}catch(B){if(i.current!==_)return;if(d(!0),$){var k;me.error("Unable to login",B);var A=(k=Ce(B))!==null&&k!==void 0?k:"Unable to login: Verify credentials.";s(new qi(A))}}m(!1)});return function(E){return b.apply(this,arguments)}}(),[n]),y=u.useCallback(()=>{i.current=null,m(!1)},[]),O=u.useCallback(at(function*(){me.debug("onLogin");var b=Pn();f||v||b==null||h(b,!1)}),[f,v,h]),j=u.useCallback(()=>{it(null)},[]);et(O,j),u.useEffect(()=>{var b=!1;function E(){return $.apply(this,arguments)}function $(){return $=at(function*(){var _,k=(_=Og())!==null&&_!==void 0?_:Pn();if(Pg(),k==null){d(!0);return}m(!0);try{yield n.login({type:Tt,token:k}),b||(it(k),p(!0),m(!1))}catch{b||(d(!0),m(!1))}}),$.apply(this,arguments)}return E(),()=>{b=!0}},[n]);var T=u.useCallback(()=>{v?y():h(g)},[y,v,h,g]);return u.useEffect(function(){var E;(E=a.current)===null||E===void 0||E.focus()},[a,l]),c.jsxs(c.Fragment,{children:[f&&e,l&&c.jsx(Lt,{in:!f,mountOnEnter:!0,unmountOnExit:!0,children:c.jsx(Qi,{logoPath:r,children:c.jsx(Zi,{errorMessage:Ce(o),isLoggingIn:v,onSubmit:T,children:c.jsxs("div",{className:"form-group",children:[c.jsx("label",{htmlFor:"auth-psk-token-input",children:"Token"}),c.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:a,value:g,onChange:b=>{s(void 0),w(b.target.value)}})]})})})}),c.jsx(ce,{"data-testid":"auth-psk-loading",isLoaded:f||l,isLoading:!f&&!l})]})}var wg={Component:Sg,isAvailable:t=>t.includes(Tt)};const to=wg;function Sn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ot(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sn(Object(r),!0).forEach(function(n){xg(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sn(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xg(t,e,r){return e=Cg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cg(t){var e=Eg(t,"string");return typeof e=="symbol"?e:String(e)}function Eg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Tg=K.module("UserUtils");function ro(t,e){return t.get("internal.webClient.appInit.".concat(e))}function no(t){var e,r,n,a,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};function s(h){return ro(t,h)}function l(h,y){var O=s(h);return O==="true"?!0:O==="false"?!1:(O!==void 0&&Tg.warn("Unexpected value for ".concat(h,": ").concat(O)),y)}var d=(e=s("name"))!==null&&e!==void 0?e:"",f=(r=s("operateAs"))!==null&&r!==void 0?r:d,p=(n=(a=s("groups"))===null||a===void 0?void 0:a.split(","))!==null&&n!==void 0?n:[],v=l("canCopy",!0),m=l("canDownloadCsv",!0),g=l("canUsePanels",!0),w=l("canLogout",!0);return ot(ot({name:d,operateAs:f,groups:p},i),{},{permissions:ot({canUsePanels:g,canCopy:v,canDownloadCsv:m,canLogout:w},o)})}const jg=Object.freeze(Object.defineProperty({__proto__:null,AUTH_HANDLER_TYPE_ANONYMOUS:Yi,AUTH_HANDLER_TYPE_PSK:ag,AuthPluginAnonymous:Xi,AuthPluginBase:or,AuthPluginParent:Ji,AuthPluginPsk:to,Login:Qi,LoginForm:Zi,UserContext:xa,UserOverrideContext:Ca,UserPermissionsOverrideContext:Je,getAppInitValue:ro,getUserFromConfig:no,isAuthPlugin:ng},Symbol.toStringTag,{value:"Module"}));function ge(t,e,r){return e=_g(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _g(t){var e=$g(t,"string");return typeof e=="symbol"?e:String(e)}function $g(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class F extends Na{static get theme(){return F._theme==null&&(F._theme=pa()),F._theme}static makeRandomSeries(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:100,a=[],i=[],o=[],s=[],l=new Date("2018-06-01"),d=0;d<n;d+=1){var f=new Date(l.getFullYear(),l.getMonth(),l.getDate()+d-n);a.push("".concat(f.getFullYear(),"-").concat(f.getMonth()+1,"-").concat(f.getDate()));var p=(Math.sin(d/n*e)*n/3+Math.cos(d*.2)*n/6+Math.sin(d*.5)*n/10+F.random()*n/5+d*F.smoothing)*r;p=Math.round(p*100)/100,i.push(p),s.push(40+d*F.smoothing),o.push(Math.sin(d/n*e)*n/3+F.random()*n/10+d*F.smoothing)}return{x:a,y:i,s:o,l:s}}static makeScatter(e){return{name:"SCTR",x:e.x,y:e.y,type:"scatter",mode:"markers",hoverinfo:"skip",marker:{size:5}}}static makeArea(e){return{name:"AREA",x:e.x,y:e.s,type:"scatter",mode:"line",fill:"tozeroy",hoverinfo:"all",line:{width:3}}}static makeTrendline(e){return{name:"Trendline <br>R<sup>2</sup> = 0.91",x:e.x,y:e.l,type:"scatter",mode:"line",hoverinfo:"skip",line:{width:3,dash:"dot"}}}static makeErrorBand(e){for(var r=[],n=[],a=0;a<e.y.length;a+=1){var i=e.y[a];r[a]=Math.round((i+18)*100)/100,n[a]=Math.round((i-18)*100)/100}var o=r.concat(n.reverse());return{name:"error",x:e.x.concat(e.x.slice().reverse()),y:o,type:"scatter",mode:"line",hoverinfo:"skip",fill:"toself",line:{width:0,color:F.theme.error_band_line_color,shape:"spline"}}}static makeLine(e){return{name:"LINE",x:e.x,y:e.y,type:"scatter",mode:"line",hoverinfo:"x+y+text+name",line:{width:3}}}static makeRandomData(){var e=F.makeRandomSeries(6),r=F.makeArea(e),n=F.makeTrendline(e),a=F.makeRandomSeries(2),i=F.makeLine(a),o=F.makeErrorBand(a);return[r,n,i,o]}static makeDefaultLayout(e){var r={template:new Aa(e).makeDefaultTemplate(F.theme)};return r.title="Chart",r.xaxis={title:"Datestamp"},r.yaxis={title:"Price"},r}constructor(e){var{data:r=F.makeRandomData(),layout:n=F.makeDefaultLayout(e),filterFields:a=[]}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(e),ge(this,"data",void 0),ge(this,"filterFields",void 0),ge(this,"layout",void 0),this.data=r,this.layout=n,this.filterFields=a}getData(){return this.data}getLayout(){return this.layout}getFilterColumnMap(){for(var e=new Map,r=0;r<this.filterFields.length;r+=1){var n=this.filterFields[r],a="java.lang.String";e.set(n,{name:n,type:a})}return e}isFilterRequired(){return this.filterFields.length>0}setFilter(){this.fireUpdate(this.data)}}ge(F,"random",Math.random.bind(Math));ge(F,"smoothing",1.5);ge(F,"_theme",void 0);const Ig=F,Dg=Object.freeze(Object.defineProperty({__proto__:null,Chart:Ic,ChartModel:Na,ChartModelFactory:Dc,ChartThemeContext:tu,ChartThemeProvider:va,ChartUtils:Aa,DownsamplingError:ad,FigureChartModel:Nc,MockChartModel:Ig,Plot:ru,defaultChartTheme:pa,isFigureChartModel:Ac,useChartTheme:nu},Symbol.toStringTag,{value:"Module"}));function ao(t){var{children:e}=t,{activeThemes:r}=ze();return u.useEffect(function(){r!=null&&ma.initTheme()},[r]),c.jsx(c.Fragment,{children:e})}const Ng=Object.freeze(Object.defineProperty({__proto__:null,Code:au,CommandHistory:iu,CommandHistoryActions:ou,CommandHistoryItem:su,CommandHistoryItemTooltip:lu,Console:dr,ConsoleConstants:uu,ConsoleHistory:cu,ConsoleHistoryItem:du,ConsoleHistoryItemResult:fu,ConsoleHistoryResultErrorMessage:pu,ConsoleHistoryResultInProgress:vu,ConsoleInput:mu,ConsoleMenu:hu,ConsoleStatusBar:gu,ConsoleUtils:bu,Editor:kc,HeapUsage:yu,LogView:Ou,MonacoThemeProvider:ao,MonacoUtils:ma,NewTableColumnTypes:Pu,ObjectIcon:Su,SHORTCUTS:wu,ScriptEditor:Mc,ScriptEditorUtils:Rc,default:dr},Symbol.toStringTag,{value:"Module"}));function Ag(t){var{dashboardProps:e,componentName:r,component:n,supportedTypes:a,hydrate:i,dehydrate:o}=t,{id:s,layout:l,registerComponent:d}=e,f=u.useCallback(p=>{var{dragEvent:v,panelId:m=je(),widget:g}=p,{name:w,type:h}=g,y=h!=null&&(Array.isArray(a)&&a.includes(h)||h===a);if(y){var O={localDashboardId:s,metadata:g};i!=null&&(O=i(O,s));var j={type:"react-component",component:r,props:O,title:w??void 0,id:m},{root:T}=l;ha.openComponent({root:T,config:j,dragEvent:v})}},[r,i,s,l,a]);ka(d,n,i,o),ga(l.eventHub,ba.OPEN,f)}function kg(){var t=u.useContext(ya);if(t==null)throw new Error("LayoutManager not available, did you add a LayoutManagerContext.Provider to the tree?");return t}function Mg(t,e){var r=ys(),n=Os(i=>Oa(i,t,e)),a=u.useCallback(i=>r(Pa(t,e,i)),[t,e,r]);return[n,a]}const Rg=Object.freeze(Object.defineProperty({__proto__:null,CREATE_DASHBOARD:rc,DEFAULT_DASHBOARD_ID:xu,Dashboard:fr,DashboardLayout:Cu,DashboardUtils:Eu,GLPropTypes:Tu,LayoutManagerContext:ya,LayoutUtils:ha,LazyDashboard:nc,PanelErrorBoundary:ju,PanelEvent:ba,PanelManager:_u,SET_DASHBOARD_DATA:$u,assertIsDashboardPluginProps:Iu,canHaveRef:Du,default:fr,dehydrate:Nu,emitCreateDashboard:ac,getAllDashboardsData:Au,getClosedPanelsForDashboard:ku,getDashboardData:Mu,getOpenedPanelMapForDashboard:Ru,getPluginDataForDashboard:Oa,getPluginDataMapForDashboard:Lu,hydrate:Fu,isDashboardPluginProps:Vu,isWrappedComponent:Uu,listenForCreateDashboard:ic,reducers:Ku,setDashboardData:Hu,setDashboardPluginData:Pa,stopListenForCreateDashboard:oc,updateDashboardData:Bu,useAppDispatch:Wu,useAppSelector:Sa,useAppStore:Gu,useDashboardPanel:Ag,useDashboardPluginData:Mg,useLayoutManager:kg,useListener:ga,usePanelRegistration:ka},Symbol.toStringTag,{value:"Module"}));function io(t,e,r){return e=Lg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Lg(t){var e=Fg(t,"string");return typeof e=="symbol"?e:String(e)}function Fg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class be{static valueForCell(e,r,n){var a="".concat(e,",").concat(r);return n!==void 0&&n&&(a="(".concat(a,")")),a}constructor(e){io(this,"dh",void 0),this.dh=e}makeColumn(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:be.DEFAULT_TYPE,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return new this.dh.Column({index:n,name:e,type:r})}makeRollupTableConfig(){return new this.dh.RollupTableConfig}makeColumns(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=[],a=0;a<e;a+=1)n.push(this.makeColumn("".concat(r).concat(a),be.DEFAULT_TYPE,a));return n}static makeUserColumnWidths(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,r=new Map,n=0;n<e;n+=1)r.set(n.toString(),100);return r}makeRow(e){var r=new this.dh.Row({index:e,name:"".concat(e)});return r.get=jest.fn(n=>be.valueForCell(e,n.index)),r}makeFilter(){return new this.dh.FilterCondition}makeSort(){return new this.dh.Sort}makeTable(){var{columns:e=this.makeColumns(),size:r=1e9,sort:n=[],layoutHints:a={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new this.dh.Table({columns:e,size:r,sort:n});return i.copy=jest.fn(()=>Promise.resolve(i)),i.freeze=jest.fn(()=>Promise.resolve(i)),i.layoutHints=a,i}makeTreeTable(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeColumns(),r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e9,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=new this.dh.TreeTable({columns:e,groupedColumns:r,size:n,sort:a,layoutHints:i});return o.copy=jest.fn(()=>Promise.resolve(o)),o}makeInputTable(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return new this.dh.InputTable(e)}makeSubscription(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable();return new this.dh.TableViewportSubscription({table:e})}makeModel(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable(),r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,{dh:a}=this;return new Lc(a,e,r??new Ft(a),n)}}io(be,"DEFAULT_TYPE","java.lang.String");const Vg=be,Ug=Object.freeze(Object.defineProperty({__proto__:null,AdvancedSettings:Fc,AdvancedSettingsType:Vc,AggregationEdit:pf,AggregationOperation:Uc,AggregationUtils:Kc,Aggregations:vf,BarIcon:mf,ChartBuilder:hf,ColumnHeaderGroup:Hc,CustomColumnBuilder:gf,DownloadServiceWorkerUtils:bf,FormatColumnWhereIcon:yf,FormatRowWhereIcon:Of,HistogramIcon:Pf,InputEditor:Sf,IrisGrid:pr,IrisGridCellOverflowMouseHandler:wf,IrisGridColumnSelectMouseHandler:xf,IrisGridColumnTooltipMouseHandler:Cf,IrisGridContextMenuHandler:Ef,IrisGridCopyCellMouseHandler:Tf,IrisGridDataSelectMouseHandler:jf,IrisGridFilterMouseHandler:_f,IrisGridMetricCalculator:$f,IrisGridModel:Bc,IrisGridModelFactory:Wc,IrisGridPartitionedTableModel:Gc,IrisGridPartitionedTableMouseHandler:If,IrisGridRenderer:Df,IrisGridRowTreeMouseHandler:Nf,IrisGridSortMouseHandler:Af,IrisGridTableModel:zc,IrisGridTableModelTemplate:Yc,IrisGridTestUtils:Vg,IrisGridThemeContext:kf,IrisGridThemeProvider:qa,IrisGridTokenMouseHandler:Mf,IrisGridTreeTableModel:qc,IrisGridUtils:Xc,LineIcon:Rf,OptionType:Lf,PendingMouseHandler:Ff,PieIcon:Vf,RollupRows:Uf,SHORTCUTS:Kf,ScatterIcon:Hf,TableCsvExporter:Bf,TableSaver:Wf,VisibilityOrderingBuilder:Gf,createDefaultIrisGridTheme:zf,default:pr,isIrisGridTableModelTemplate:Jc,isPanelStateV1:Zc,isPanelStateV2:Qc,isPartitionedGridModel:ed,isPartitionedGridModelProvider:td},Symbol.toStringTag,{value:"Module"}));var oo={react:H,"react-dom":Ps,redux:Ss,"react-redux":ws,"@adobe/react-spectrum":xs,"@deephaven/auth-plugins":jg,"@deephaven/chart":Dg,"@deephaven/components":Wm,"@deephaven/console":Ng,"@deephaven/dashboard":Rg,"@deephaven/dashboard-core-plugins":rd,"@deephaven/icons":fl,"@deephaven/iris-grid":Ug,"@deephaven/jsapi-bootstrap":qm,"@deephaven/jsapi-components":Qh,"@deephaven/jsapi-utils":lh,"@deephaven/log":K,"@deephaven/plugin":rg,"@deephaven/react-hooks":pp},Kg=Cs.createRequires(oo),Hg=Es({requires:Kg});const Bg=Hg;function wn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function xn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wn(Object(r),!0).forEach(function(n){Wg(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wn(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wg(t,e,r){return e=Gg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gg(t){var e=zg(t,"string");return typeof e=="symbol"?e:String(e)}function zg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Cn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function sr(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){Cn(i,n,a,o,s,"next",l)}function s(l){Cn(i,n,a,o,s,"throw",l)}o(void 0)})}}var oe=K.module("@deephaven/app-utils.PluginUtils");function Yg(t){return _t.apply(this,arguments)}function _t(){return _t=sr(function*(t){var e=yield Bg(t);return e}),_t.apply(this,arguments)}function qg(t){return $t.apply(this,arguments)}function $t(){return $t=sr(function*(t){var e=yield fetch(t);if(!e.ok)throw new Error(e.statusText);try{return yield e.json()}catch{throw new Error("Could not be parsed as JSON")}}),$t.apply(this,arguments)}function Xg(t){return typeof t=="object"&&t!=null&&typeof t.default=="object"}function Jg(t){return pt(t)?t:Xg(t)&&pt(t.default)?t.default:da(t)?t:null}function Zg(t){return It.apply(this,arguments)}function It(){return It=sr(function*(t){oe.debug("Loading plugins...");try{var e=yield qg("".concat(t,"/manifest.json"));if(!Array.isArray(e.plugins))throw new Error("Plugin manifest JSON does not contain plugins array");oe.debug("Plugin manifest loaded:",e);for(var r=[],n=0;n<e.plugins.length;n+=1){var{name:a,main:i}=e.plugins[n],o="".concat(t,"/").concat(a,"/").concat(i);r.push(Yg(o))}for(var s=yield Promise.allSettled(r),l=new Map,d=0;d<s.length;d+=1){var f=s[d],{name:p,version:v}=e.plugins[d];if(f.status==="fulfilled"){var m=Jg(f.value);m==null?oe.error("Plugin '".concat(p,"' is missing an exported value.")):l.set(p,xn(xn({},m),{},{version:v}))}else oe.error("Unable to load plugin '".concat(p,"'"),f.reason)}return oe.info("Plugins loaded:",l),l}catch(g){return oe.error("Unable to load plugins:",g),new Map}}),It.apply(this,arguments)}function Qg(t){var e,r;return(e=(r=t.get("AuthHandlers"))===null||r===void 0?void 0:r.split(","))!==null&&e!==void 0?e:[]}function eb(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,n=Qg(e),a=[...t.entries(),...r.entries()].filter(l=>{var[,d]=l;return ca(d)||ft(d)}).map(l=>{var[d,f]=l;return ft(f)?{type:la.AUTH_PLUGIN,name:d,component:f.AuthPlugin.Component,isAvailable:f.AuthPlugin.isAvailable}:f}),i=a.filter(l=>{var{isAvailable:d}=l;return d(n,e)});if(i.length===0)throw new Error("No login plugins found, please register a login plugin for auth handlers: ".concat(n));i.length>1&&oe.warn("More than one login plugin available, will use the first one: ",i.map(l=>{var{name:d}=l;return d}).join(", "));var{name:o,component:s}=i[0];return oe.info("Using LoginPlugin",o),s}var tb=Wn.createRequires(()=>oo),rb=Wn.createRemoteComponent({requires:tb});const $b=rb;function En(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function nb(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){En(i,n,a,o,s,"next",l)}function s(l){En(i,n,a,o,s,"throw",l)}o(void 0)})}}function ab(t){var{pluginsUrl:e,getCorePlugins:r,children:n}=t,[a,i]=u.useState(null);return u.useEffect(function(){var s=!1;function l(){return d.apply(this,arguments)}function d(){return d=nb(function*(){var f,p=(f=yield r==null?void 0:r())!==null&&f!==void 0?f:[],v=yield Zg(e);if(!s){var m=p.map(g=>[g.name,g]);i(new Map([...m,...v]))}}),d.apply(this,arguments)}return l(),()=>{s=!0}},[e,r]),c.jsx(qe.Provider,{value:a,children:n})}function ib(){var t=ir();return u.useEffect(function(){t.postMessage(tr(er))},[t]),null}function Tn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function ob(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){Tn(i,n,a,o,s,"next",l)}function s(l){Tn(i,n,a,o,s,"throw",l)}o(void 0)})}}var sb=new Map([["@deephaven/auth-plugins.AuthPluginParent",{AuthPlugin:Ji}],["@deephaven/auth-plugins.AuthPluginPsk",{AuthPlugin:to}],["@deephaven/auth-plugins.AuthPluginAnonymous",{AuthPlugin:Xi}]]);function lb(t){var{children:e}=t,r=Oe(),n=u.useContext(qe),[a,i]=u.useState(),[o,s]=u.useState();u.useEffect(function(){var p=!1;function v(){return m.apply(this,arguments)}function m(){return m=ob(function*(){try{var g=yield r.getAuthConfigValues();p||i(new Map(g))}catch(w){p||s(w)}}),m.apply(this,arguments)}return v(),()=>{p=!0}},[r]);var l=u.useMemo(()=>{if(!(n==null||a==null))try{return eb(n,a,sb)}catch(f){s(f)}},[a,n]),d=l==null||a==null;return d||o!=null?c.jsx(ce,{isLoading:d&&o==null,errorMessage:Ce(o)}):c.jsx(l,{authConfigValues:a,children:c.jsxs(c.Fragment,{children:[c.jsx(ib,{}),e]})})}function jn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function _n(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){jn(i,n,a,o,s,"next",l)}function s(l){jn(i,n,a,o,s,"throw",l)}o(void 0)})}}var Pe=K.module("@deephaven/app-utils.ConnectionBootstrap");function ub(t){var{children:e}=t,r=de(),n=Oe(),[a,i]=u.useState(),[o,s]=u.useState(),[l,d]=u.useState("connecting"),f=l==="failed",p=l==="shutdown",v=l==="reconnecting",m=l==="not_connecting";u.useEffect(function(){var O=!1;function j(){return T.apply(this,arguments)}function T(){return T=_n(function*(){try{var b=yield n.getAsIdeConnection();if(O)return;s(b),d("connected")}catch(E){if(O)return;i(E),d("not_connecting")}}),T.apply(this,arguments)}return j(),()=>{O=!0}},[r,n]),u.useEffect(function(){if(o==null||p)return;function O(T){var{detail:b}=T;Pe.info("Disconnect","".concat(JSON.stringify(b))),d("reconnecting")}var j=o.addEventListener(r.IdeConnection.EVENT_DISCONNECT,O);return j},[r,o,p]),u.useEffect(function(){if(o==null||p)return;function O(T){var{detail:b}=T;Pe.info("Reconnect","".concat(JSON.stringify(b))),d("connected")}var j=o.addEventListener(r.CoreClient.EVENT_RECONNECT,O);return j},[r,o,p]),u.useEffect(function(){if(o==null)return;function O(T){var{detail:b}=T;Pe.info("Shutdown","".concat(JSON.stringify(b))),i("Server shutdown: ".concat(b??"Unknown reason")),d("shutdown")}var j=o.addEventListener(r.IdeConnection.EVENT_SHUTDOWN,O);return j},[r,o]),u.useEffect(function(){if(o==null||p)return;function O(T){var{detail:b}=T;Pe.warn("Reconnect authentication failed","".concat(JSON.stringify(b))),i("Reconnect authentication failed: ".concat(b??"Unknown reason")),d("failed")}var j=o.addEventListener(r.CoreClient.EVENT_RECONNECT_AUTH_FAILED,O);return j},[r,o,p]);var g=u.useCallback(function(){var y=_n(function*(O){return At(o,"No connection available to fetch object with"),o.getObject(ia(O))});return function(O){return y.apply(this,arguments)}}(),[o]),w=u.useMemo(()=>({subscribe:(y,O)=>(O({fetch:()=>g(y),status:"ready"}),()=>{})}),[g]);function h(){Pe.info("Refreshing application"),window.location.reload()}return p||l==="connecting"||m?c.jsx(ce,{"data-testid":"connection-bootstrap-loading",isLoading:!1,errorMessage:a!=null?"".concat(a):void 0}):c.jsx(sc.Provider,{value:o??null,children:c.jsx(aa.Provider,{value:g,children:c.jsxs(Qt.Provider,{value:w,children:[e,c.jsx(gi,{isOpen:v,debounceMs:1e3,children:c.jsx(bi,{icon:pl,title:c.jsxs(c.Fragment,{children:[c.jsx(kt,{})," Attempting to reconnect..."]}),subtitle:"Please check your network connection."})}),c.jsx(ea,{confirmButtonText:"Refresh",onConfirm:h,isOpen:f,headerText:"Authentication failed",bodyText:"Credentials are invalid. Please refresh your browser to try and reconnect."})]})})})}function Ib(t){return new URL(t,"".concat(window.location))}function cb(){var t=new URLSearchParams(window.location.search);return t.get("envoyPrefix")}function db(){var t=cb();return t!=null?{headers:{"envoy-prefix":t}}:{headers:{}}}function fb(t){var{children:e}=t,r=u.useContext(zi);return r?c.jsx(c.Fragment,{children:e}):c.jsx(ce,{"data-testid":"fonts-loaded-loading"})}function pb(t){var{children:e}=t,r=lc(),n=u.useContext(Ca),a=u.useContext(Je),i=no(r,n,a);return c.jsx(xa.Provider,{value:i,children:e})}function vb(t){var{children:e}=t,r=u.useContext(qe),n=u.useMemo(()=>r==null?null:ua(r),[r]),a=Sa(zu);return c.jsx(na,{themes:n,children:c.jsx(va,{children:c.jsx(ao,{children:c.jsx(qa,{density:a.gridDensity,children:e})})})})}function Db(t){var{fontClassNames:e,pluginsUrl:r,getCorePlugins:n,serverUrl:a,children:i}=t,o=u.useMemo(()=>db(),[]),[s,l]=u.useState(0),d=u.useCallback(()=>{},[]),f=u.useCallback(()=>{l(p=>p+1)},[]);return et(d,f),c.jsx(Ts,{store:nd,children:c.jsx(eg,{fontClassNames:e,children:c.jsx(ab,{getCorePlugins:n,pluginsUrl:r,children:c.jsx(vb,{children:c.jsx(wa,{serverUrl:a,options:o,children:c.jsx(Bi,{children:c.jsx(lb,{children:c.jsx(uc,{children:c.jsx(pb,{children:c.jsx(ub,{children:c.jsx(fb,{children:i})})})})})})},s)})})})})}function $n(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function mb(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){$n(i,n,a,o,s,"next",l)}function s(l){$n(i,n,a,o,s,"throw",l)}o(void 0)})}}function Z(t,e,r){return e=hb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hb(t){var e=gb(t,"string");return typeof e=="symbol"?e:String(e)}function gb(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Se=K.module("GrpcFileStorageTable");class Te{constructor(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r;Z(this,"storageService",void 0),Z(this,"baseRoot",void 0),Z(this,"root",void 0),Z(this,"currentSize",0),Z(this,"currentViewport",void 0),Z(this,"listeners",[]),Z(this,"viewportUpdatePromise",void 0),Z(this,"currentViewportData",void 0),Z(this,"childTables",new Map),this.storageService=e,this.baseRoot=r,this.root=n,n===r&&(this.doRefresh=xe(this.doRefresh.bind(this),Te.REFRESH_DEBOUNCE))}removeBaseRoot(e){return ue.removeRoot(this.baseRoot,e)}getViewportData(){var e;return this.viewportUpdatePromise||this.refreshInternal(),(e=this.viewportUpdatePromise)!==null&&e!==void 0?e:Promise.resolve({items:[],offset:0})}getSnapshot(e){throw new Error("Method not implemented.")}get size(){return this.currentSize}setExpanded(e,r){var n=e.split("/"),a=n.shift();if((a===void 0||a==="")&&(a=n.shift()),a===void 0||a==="")throw new Error("Invalid path: ".concat(e));var i=n.join("/");if(r){if(!this.childTables.has(a)){var o=new Te(this.storageService,this.baseRoot,"".concat(this.root,"/").concat(a));this.childTables.set(a,o)}if(i){var s=this.childTables.get(a);s==null||s.setExpanded(i,r)}}else if(this.childTables.has(a))if(i){var l=this.childTables.get(a);l==null||l.setExpanded(i,r)}else this.childTables.delete(a);this.currentViewport&&this.refreshInternal()}collapseAll(){this.childTables.clear(),this.currentViewport&&this.refreshInternal()}setSearch(e){throw new Error("Method not implemented.")}setViewport(e){this.currentViewport=e,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(e){return this.listeners=[...this.listeners,e],()=>{this.listeners=this.listeners.filter(r=>r!==e)}}doRefresh(e){Se.debug2("doRefresh",this.root),e(this.fetchData())}refresh(){var e;Se.debug2("refresh",this.root),(e=this.viewportUpdatePromise)===null||e===void 0||e.cancel();var r=new Promise(a=>{this.doRefresh(a)}),n=we.makeCancelable(r.then(a=>{if(this.viewportUpdatePromise!==n)throw new fa;return this.currentViewportData=a,this.sendUpdate(),a}));n.catch(a=>{we.isCanceled(a)||Se.error("Error updating viewport",a)}),this.viewportUpdatePromise=n}refreshInternal(){try{this.refresh()}catch(e){we.isCanceled(e)||Se.error("Unable to refresh data",e)}}fetchData(){var e=this;return mb(function*(){var{currentViewport:r}=e;if(!r)throw new Error("No viewport set");for(var n=yield e.storageService.listItems(e.root),a=n.map(p=>({type:p.type,filename:e.removeBaseRoot(p.filename),basename:p.basename,id:e.removeBaseRoot(p.filename),isExpanded:p.type==="directory"?e.childTables.has(p.basename):void 0})).sort((p,v)=>p.type!==v.type?p.type==="directory"?-1:1:p.basename.localeCompare(v.basename)),i=0;i<a.length;i+=1){var o=a[i],{basename:s,filename:l}=o;if(l===e.removeBaseRoot("".concat(e.root,"/").concat(s))&&o.type==="directory"){var d=e.childTables.get(s);if(d!=null){d.setViewport({top:0,bottom:r.bottom-i});var f=yield d.getViewportData();a.splice(i+1,0,...f.items)}}}return e.currentSize=a.length,Se.debug2(e.root,"items",a,r),a=a.slice(r.top,r.bottom),{items:a,offset:r.top}})()}sendUpdate(){for(var e,{listeners:r}=this,n=(e=this.currentViewportData)!==null&&e!==void 0?e:{items:[],offset:0},a=0;a<r.length;a+=1)r[a](n)}}Z(Te,"REFRESH_DEBOUNCE",50);function In(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function ie(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){In(i,n,a,o,s,"next",l)}function s(l){In(i,n,a,o,s,"throw",l)}o(void 0)})}}function pe(t,e,r){return e=bb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bb(t){var e=yb(t,"string");return typeof e=="symbol"?e:String(e)}function yb(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ob=K.module("GrpcFileStorage");class lr{constructor(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";pe(this,"dh",void 0),pe(this,"storageService",void 0),pe(this,"tables",[]),pe(this,"root",void 0),pe(this,"refreshTables",js(()=>{this.tables.forEach(a=>a.refresh())},lr.REFRESH_THROTTLE)),this.dh=e,this.storageService=r,this.root=n}removeRoot(e){return ue.removeRoot(this.root,e)}addRoot(e){return ue.addRoot(this.root,e)}createDirectory(e){var r=this;return ie(function*(){return yield r.storageService.createDirectory(r.addRoot(e)),r.refreshTables(),{type:"directory",id:e,filename:e,basename:ue.getBaseName(e)}})()}getTable(){var e=this;return ie(function*(){var r=new Te(e.storageService,e.root);return e.tables.push(r),r})()}saveFile(e){var r=this;return ie(function*(){var n=r.dh.storage.FileContents.text(e.content);return yield r.storageService.saveFile(r.addRoot(e.filename),n,!0),r.refreshTables(),e})()}loadFile(e){var r=this;return ie(function*(){var n=yield r.storageService.loadFile(r.addRoot(e)),a=yield n.text();return{filename:e,basename:ue.getBaseName(e),content:a}})()}copyFile(e,r){var n=this;return ie(function*(){var a=yield n.storageService.loadFile(n.addRoot(e));yield n.storageService.saveFile(n.addRoot(r),a,!1),n.refreshTables()})()}deleteFile(e){var r=this;return ie(function*(){yield r.storageService.deleteItem(r.addRoot(e)),r.refreshTables()})()}moveFile(e,r){var n=this;return ie(function*(){yield n.storageService.moveItem(n.addRoot(e),n.addRoot(r)),n.refreshTables()})()}info(e){var r=this;return ie(function*(){var n=yield r.storageService.listItems(r.addRoot(ue.getPath(e)),ue.getBaseName(e));if(n.length===0)throw new Yu;if(n.length>1)throw Ob.error("More than one matching file found, should never happen.",n),new Error("More than one matching file found");var a=n[0];if(!qu(a.type))throw new Error("Unexpected file type: ".concat(a.type));return{filename:r.removeRoot(a.filename),basename:a.basename,id:r.removeRoot(a.filename),type:a.type}})()}}pe(lr,"REFRESH_THROTTLE",150);export{Db as AppBootstrap,kb as AppDashboards,lb as AuthBootstrap,ub as ConnectionBootstrap,sc as ConnectionContext,Mb as DEFAULT_LAYOUT_CONFIG,Rb as DEFAULT_LAYOUT_CONFIG_NO_CONSOLE,eg as FontBootstrap,fb as FontsLoaded,zi as FontsLoadedContext,lr as GrpcFileStorage,Te as GrpcFileStorageTable,Lb as GrpcLayoutStorage,Fb as LocalWorkspaceStorage,ab as PluginsBootstrap,$b as RemoteComponent,vb as ThemeBootstrap,Vb as UserLayoutUtils,Ub as exportLayout,Qg as getAuthHandlers,eb as getAuthPluginComponent,Ib as getBaseUrl,db as getConnectOptions,Kb as getDefaultLayout,cb as getEnvoyPrefix,Jg as getPluginModuleValue,Hb as isLayoutV1,Bb as isLayoutV2,qg as loadJson,Yg as loadModulePlugin,Zg as loadModulePlugins,Wb as normalizeLayout,Gb as useConnection,lc as useServerConfig,zb as useUser};
4
- //# sourceMappingURL=index-dae68be6.js.map
4
+ //# sourceMappingURL=index-c232a099.js.map