@deephaven/embed-grid 0.46.2-beta.0 → 0.46.2-dynamic-import.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.
- package/build/assets/{App-02140032.js → App-6128060e.js} +2 -2
- package/build/assets/{App-02140032.js.map → App-6128060e.js.map} +1 -1
- package/build/assets/{index-e1e4878c.js → index-c3aac745.js} +2 -2
- package/build/assets/index-c3aac745.js.map +1 -0
- package/build/assets/{index-24fbcecb.js → index-f4215617.js} +2 -2
- package/build/assets/{index-24fbcecb.js.map → index-f4215617.js.map} +1 -1
- package/build/assets/{useUser-ae983298.js → useUser-4f192587.js} +2 -2
- package/build/assets/{useUser-ae983298.js.map → useUser-4f192587.js.map} +1 -1
- package/build/index.html +1 -1
- package/package.json +13 -13
- package/build/assets/index-e1e4878c.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as g,a as E,V as Sn,j as d,C as Qe,c as P,R as Mn,P as M,F as fe,s as nt,m as J,W as Cn,X as wn,i as Tn,k as En,Y as In,E as zt}from"./vendor-a75bc0d2.js";import{T as Ze,L as V,ah as Qt,a as On,a8 as Pn,i as Nn,ai as xn,aj as Dn,B as Fn,ak as An,U as Rn,ag as jn,ab as Ln}from"./index-e1e4878c.js";function gt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function kn(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?gt(Object(t),!0).forEach(function(n){Ie(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):gt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Ie(r,e,t){return e=$n(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function $n(r){var e=Kn(r,"string");return typeof e=="symbol"?e:String(e)}function Kn(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class rt extends g.Component{constructor(e){super(e),Ie(this,"element",void 0),Ie(this,"container",void 0),Ie(this,"rAF",void 0),this.handleEnter=this.handleEnter.bind(this),this.handleExit=this.handleExit.bind(this),this.handleBlur=this.handleBlur.bind(this),this.element=document.createElement("div"),this.element.className="popper-container",this.container=E.createRef(),this.rAF=0;var{isShown:t}=this.props;this.state={show:t,popper:null}}componentDidUpdate(e){var{isShown:t}=this.props;e.isShown!==t&&(t?(cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{this.show()})):this.hide())}componentWillUnmount(){this.destroyPopper(!1)}getVisibleElement(e){return e==null||e.clientHeight>0||e.clientWidth>0?e:this.getVisibleElement(e.parentElement)}initPopper(){var{popper:e}=this.state,{closeOnBlur:t,referenceObject:n}=this.props;if(!e&&this.container.current!==null){var{options:a}=this.props;a=kn({placement:"auto",modifiers:{preventOverflow:{boundariesElement:"viewport"}}},a),document.body.appendChild(this.element);var i=this.getVisibleElement(this.container.current);i==null&&(i=this.container.current),e=new Sn(n||i,this.element,a),e.scheduleUpdate(),cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{if(t&&!this.element.contains(document.activeElement)){var s=this.element.firstElementChild;s instanceof HTMLElement&&s.focus()}}),this.setState({popper:e})}}destroyPopper(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;cancelAnimationFrame(this.rAF);var{popper:t}=this.state;t&&(t.destroy(),document.body.contains(this.element)&&document.body.removeChild(this.element),e&&this.setState({popper:null}))}show(){this.initPopper(),this.setState({show:!0})}hide(){this.setState({show:!1})}scheduleUpdate(){var{popper:e}=this.state;e&&e.scheduleUpdate()}handleBlur(e){e.relatedTarget instanceof HTMLElement&&(this.element.contains(e.relatedTarget)||this.hide())}handleEnter(){var{onEntered:e}=this.props;e()}handleExit(){var{onExited:e}=this.props,{show:t}=this.state;t||this.destroyPopper(),e()}renderContent(){var{className:e,children:t,timeout:n,interactive:a,closeOnBlur:i}=this.props,{show:s}=this.state;return d.jsx(Qe,{in:s,timeout:n,classNames:"popper-transition",onEntered:this.handleEnter,onExited:this.handleExit,children:d.jsx("div",{onClick:o=>{o.stopPropagation()},onKeyDown:o=>{o.key==="Escape"&&this.hide()},className:P("popper",{interactive:a},e),onBlur:i?this.handleBlur:void 0,tabIndex:i?-1:void 0,role:"presentation",children:d.jsxs("div",{className:"popper-content",children:[t,d.jsx("div",{className:"popper-arrow","x-arrow":""})]})})})}render(){var{popper:e}=this.state,{"data-testid":t}=this.props;return d.jsx("div",{className:"popper-parent-container",ref:this.container,style:{display:"none"},"data-testid":t,children:e&&Mn.createPortal(this.renderContent(),this.element)})}}Ie(rt,"propTypes",{children:M.node.isRequired,options:M.shape({}),className:M.string,timeout:M.number,onEntered:M.func,onExited:M.func,isShown:M.bool,closeOnBlur:M.bool,interactive:M.bool,referenceObject:M.shape({}),"data-testid":M.string});Ie(rt,"defaultProps",{options:{},className:"",timeout:Ze.transitionMs,onEntered(){},onExited(){},isShown:!1,interactive:!1,closeOnBlur:!1,referenceObject:null,"data-testid":void 0});const at=rt;function yt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function Bn(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?yt(Object(t),!0).forEach(function(n){Y(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):yt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Y(r,e,t){return e=Vn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Vn(r){var e=_n(r,"string");return typeof e=="symbol"?e:String(e)}function _n(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Hn=V.module("Tooltip");class R extends g.Component{static handleHidden(){R.shownTooltipCount-=1,R.shownTooltipCount===0&&(R.lastHiddenTime=Date.now())}static handleShown(){R.shownTooltipCount+=1}constructor(e){super(e),Y(this,"container",void 0),Y(this,"popper",void 0),Y(this,"parent",void 0),Y(this,"timer",void 0),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowMouseMove=this.handleWindowMouseMove.bind(this),this.handleWheel=this.handleWheel.bind(this),this.handleTimeout=this.handleTimeout.bind(this),this.handleExited=this.handleExited.bind(this),this.stopShowingTooltip=this.stopShowingTooltip.bind(this),this.container=E.createRef(),this.popper=E.createRef(),this.parent=null,this.timer=null,this.state={isShown:!1}}componentDidMount(){this.startListening();var{timeout:e}=this.props;e===0&&this.show()}componentDidUpdate(e,t){var{isShown:n}=t,{isShown:a}=this.state;a!==n&&(a?R.handleShown():R.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();var{isShown:e}=this.state;e&&R.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Hn.error("Tooltip doesn't have a container or a parent set!");return}this.parent=this.container.current.parentElement,this.parent.addEventListener("mousemove",this.handleMouseMove),this.parent.addEventListener("mouseleave",this.handleMouseLeave),this.parent.addEventListener("mousedown",this.stopShowingTooltip)}stopListening(){this.parent&&(this.parent.removeEventListener("mousemove",this.handleMouseMove),this.parent.removeEventListener("mouseleave",this.handleMouseLeave),this.parent.removeEventListener("mousedown",this.stopShowingTooltip))}startListeningWindow(){window.addEventListener("mousemove",this.handleWindowMouseMove,!0),window.addEventListener("contextmenu",this.stopShowingTooltip,!0),window.addEventListener("wheel",this.handleWheel)}stopListeningWindow(){window.removeEventListener("mousemove",this.handleWindowMouseMove,!0),window.removeEventListener("contextmenu",this.stopShowingTooltip,!0),window.removeEventListener("wheel",this.handleWheel)}handleMouseMove(){this.startTimer()}handleWheel(){var{isShown:e}=this.state;this.popper.current&&this.parent&&e&&!this.popper.current.element.matches(":hover")&&!this.parent.matches(":hover")&&(this.stopTimer(),this.hide())}handleMouseLeave(){var{isShown:e}=this.state;this.stopTimer();var{interactive:t}=this.props;!t&&e&&this.hide()}handleTimeout(){this.show()}handleWindowMouseMove(e){var t=e.clientX,n=e.clientY,{isShown:a}=this.state;if(!(!this.popper.current||!this.parent)){var i=this.popper.current.element.getBoundingClientRect(),s=this.parent.getBoundingClientRect();t>=i.left&&t<=i.left+i.width&&n>=i.top&&n<=i.top+i.height?this.handleMouseMove():t>=s.left&&t<=s.left+s.width&&n>=s.top&&n<=s.top+s.height?this.handleMouseMove():a&&(this.stopTimer(),this.hide())}}startTimer(){this.stopTimer();var{timeout:e,reshowTimeout:t}=this.props,n=e;(R.shownTooltipCount>0||Date.now()-R.lastHiddenTime<R.triggerReshowThreshold)&&(n=t),this.timer=window.setTimeout(this.handleTimeout,n)}stopTimer(){this.timer!=null&&(clearTimeout(this.timer),this.timer=null)}show(){var{isShown:e}=this.state;if(this.stopTimer(),!e){var t;(t=this.popper.current)===null||t===void 0||t.show(),this.setState({isShown:!0});var{interactive:n}=this.props;n&&this.startListeningWindow()}}hide(){var e;(e=this.popper.current)===null||e===void 0||e.hide(),this.stopListeningWindow()}update(){var e;(e=this.popper.current)===null||e===void 0||e.scheduleUpdate()}handleExited(){this.setState({isShown:!1});var{onExited:e}=this.props;e()}stopShowingTooltip(){var{isShown:e}=this.state;this.stopTimer(),e&&this.hide()}render(){var{interactive:e,children:t,referenceObject:n,popperClassName:a,"data-testid":i,onEntered:s}=this.props,{isShown:o}=this.state,{options:l}=this.props;return l=Bn({placement:"bottom"},l),d.jsx("div",{ref:this.container,style:{display:"none"},"data-testid":i,children:d.jsx(at,{className:P(a),options:l,ref:this.popper,onEntered:s,onExited:this.handleExited,interactive:e,referenceObject:n,children:d.jsxs("div",{className:"tooltip-content",children:[" ",o&&t]})})})}}Y(R,"defaultTimeout",500);Y(R,"defaultReshowTimeout",100);Y(R,"triggerReshowThreshold",300);Y(R,"shownTooltipCount",0);Y(R,"lastHiddenTime",Date.now());Y(R,"defaultProps",{interactive:!1,options:{},popperClassName:"",reshowTimeout:R.defaultReshowTimeout,timeout:R.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0});const Zt=R;var Wn=["kind","variant","type","tooltip","icon","disabled","active","onClick","onContextMenu","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","onKeyDown","className","style","children","tabIndex","data-testid","aria-label"];function bt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function St(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?bt(Object(t),!0).forEach(function(n){Un(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):bt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Un(r,e,t){return e=qn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function qn(r){var e=Gn(r,"string");return typeof e=="symbol"?e:String(e)}function Gn(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function zn(r,e){if(r==null)return{};var t=Qn(r,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function Qn(r,e){if(r==null)return{};var t={},n=Object.keys(r),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(t[a]=r[a]);return t}var Zn=["primary","secondary","tertiary","success","danger","inline","ghost"],Xn=["group-end"];function Jn(r,e){switch(r){case"primary":return"btn-primary";case"secondary":return"btn-outline-primary";case"tertiary":return"btn-secondary";case"success":return"btn-success";case"danger":return"btn-danger";case"inline":return"btn-inline";case"ghost":return P("btn-link",{"btn-link-icon":e,"btn-link-icon-only":e})}}function Yn(r){switch(r){case"group-end":return P("pl-2","pr-3")}}var Ke=E.forwardRef((r,e)=>{var{kind:t,variant:n,type:a,tooltip:i,icon:s,disabled:o=!1,active:l,onClick:u,onContextMenu:c,onMouseDown:h,onMouseUp:m,onMouseEnter:b,onMouseLeave:y,onKeyDown:w,className:T,style:N,children:_,tabIndex:k,"data-testid":H,"aria-label":W}=r,A=zn(r,Wn),U=!!(s&&_==null),q=Jn(t,U),ge;n&&(ge=Yn(n));var ye;s&&(ye=E.isValidElement(s)?s:d.jsx(fe,{icon:s}));var me;i!==void 0&&(me=typeof i=="string"?d.jsx(Zt,{children:i}):i);var be=W;W===void 0&&U&&i!=null&&typeof i=="string"&&(be=i);var C=d.jsxs("button",St(St({"data-testid":H,ref:e,type:a,className:P("btn",q,ge,{active:l},T),onClick:u,onContextMenu:c,onMouseUp:m,onMouseDown:h,onMouseEnter:b,onMouseLeave:y,onKeyDown:w,style:N,disabled:o,tabIndex:k,"aria-label":be},A),{},{children:[s&&ye,_,i!=null&&!o&&me]}));return o?d.jsxs("span",{className:"btn-disabled-wrapper",children:[C,i!==void 0&&me]}):C});Ke.displayName="Button";Ke.propTypes={kind:M.oneOf(Zn).isRequired,variant:M.oneOf(Xn),type:M.oneOf(["submit","reset","button"]),tooltip(r){var{tooltip:e,icon:t,children:n}=r;return e===void 0&&t!=null&&n==null?new Error("Tooltip is required for icon only buttons"):null},icon(r){var{children:e,icon:t}=r;return t==null&&e==null?new Error("Icon is required if no children are provided"):e==null&&!E.isValidElement(t)&&(t==null||t.iconName===""||t.iconName==null)?new Error("Icon must be react element or fontawesome IconDefinition"):null},disabled:M.bool,active:M.bool,onClick(r){var{onClick:e,type:t}=r;return t==="button"&&typeof e!="function"?new Error("type button requires an onClick function"):e!==void 0&&typeof e!="function"?new Error("onClick must be a function"):null},onContextMenu:M.func,onMouseUp:M.func,onMouseDown:M.func,onMouseEnter:M.func,onMouseLeave:M.func,onKeyDown:M.func,tabIndex:M.number,children:M.node,className:M.string,style:M.object,"data-testid":M.string};Ke.defaultProps={type:"button",onClick:void 0,onContextMenu:void 0,onMouseUp:void 0,onMouseDown:void 0,onMouseEnter:void 0,onMouseLeave:void 0,onKeyDown:void 0,variant:void 0,tooltip:void 0,icon:void 0,disabled:!1,active:void 0,tabIndex:void 0,children:void 0,className:void 0,style:{},"data-testid":void 0};const Xe=Ke;function Be(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"No value available in context. Was code wrapped in a provider?",t=g.useContext(r);if(t==null)throw new Error(e);return t}function er(r){var e=g.useRef();return g.useEffect(function(){e.current=r}),e.current}function Xt(r){var e=g.useRef(null);return g.useEffect(function(){r&&(typeof r=="function"?r(e.current):r.current=e.current)}),e}var ci=Object.freeze([]),di=new Map,hi=()=>{};function tr(r,e,t){return e=nr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function nr(r){var e=rr(r,"string");return typeof e=="symbol"?e:String(e)}function rr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class ar extends Error{constructor(){super(...arguments),tr(this,"isCanceled",!0)}}const Mt=ar;function Ct(r,e,t,n,a,i,s){try{var o=r[i](s),l=o.value}catch(u){t(u);return}o.done?e(l):Promise.resolve(l).then(n,a)}function ir(r){return function(){var e=this,t=arguments;return new Promise(function(n,a){var i=r.apply(e,t);function s(l){Ct(i,n,a,s,o,"next",l)}function o(l){Ct(i,n,a,s,o,"throw",l)}s(void 0)})}}function sr(r){return Je.apply(this,arguments)}function Je(){return Je=ir(function*(r){var{clipboard:e}=navigator;if(e!==void 0)try{return navigator.clipboard.writeText(r)}catch{return wt(r)}wt(r)}),Je.apply(this,arguments)}function wt(r){var e=document.activeElement,t=document.createElement("textarea");t.value=r,document.body.appendChild(t),t.focus(),t.select();var n=document.execCommand("copy");if(document.body.removeChild(t),e instanceof HTMLElement&&e.focus(),!n)throw new Error("Unable to execute copy command")}class Jt extends CustomEvent{constructor(e,t){super(e,t)}}function or(r,e,t){return e=lr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function lr(r){var e=ur(r,"string");return typeof e=="symbol"?e:String(e)}function ur(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class cr extends Error{constructor(){super(...arguments),or(this,"isTimeout",!0)}}const it=cr;class Ye{static makeCancelable(e,t){var n=!1,a,i,s=new Promise((o,l)=>{i=l,Promise.resolve(e).then(u=>{n?t&&t(u):(a=u,o(u))}).catch(u=>l(u))});return s.cancel=()=>{n=!0,i(new Mt),a!=null&&t&&t(a)},s}static isCanceled(e){return e instanceof Mt}static isTimedOut(e){return e instanceof it}static withTimeout(e,t){return new Promise((n,a)=>{setTimeout(()=>{try{n(t())}catch(i){a(i)}},e)})}}function fi(r){if(r==null)throw new Error("Value is null or undefined")}function mi(r,e){var t,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=(t=r.get(e))!==null&&t!==void 0?t:n;if(a!==void 0)return a;throw new Error("Missing value for key ".concat(e))}class st{static isValidRange(e){return e!=null&&e.length===2&&Number.isInteger(e[0])&&Number.isInteger(e[1])&&e[0]<=e[1]}static validateRange(e){if(!st.isValidRange(e))throw new Error("Invalid range! ".concat(e))}static isSelected(e,t){for(var n=0;n<e.length;n+=1){var a=e[n],i=a[0],s=a[1];if(i<=t&&t<=s)return!0}return!1}static selectRange(e,t){for(var[n,a]=t,i=[...e],s=i.length-1;s>=0;s-=1){var o=i[s],l=o[0],u=o[1];if(l<=n&&a<=u)return i;n<=u&&l<=a&&(n=Math.min(n,l),a=Math.max(a,u),i.splice(s,1))}return i.push([n,a]),i}static deselectRange(e,t){for(var[n,a]=t,i=[...e],s=i.length-1;s>=0;s-=1){var o=i[s],l=o[0],u=o[1];if(!(a<l||u<n))if(l<n&&a<u){i[s]=[l,n-1],i.splice(s+1,0,[a+1,u]);break}else n<=l&&u<=a?i.splice(s,1):l<n?i[s]=[l,n-1]:i[s]=[a+1,u]}return i}static count(e){return e.reduce((t,n)=>t+(n[1]-n[0]+1),0)}static getItemsInRanges(e,t){return t.reduce((n,a)=>{for(var i=[...n],s=a[0];s<=a[1];s+=1)i.push(e[s]);return i},[])}}const le=st;class dr{static join(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"and";if(e==null||e.length===0)return"";if(e.length===1)return e[0];if(e.length===2)return"".concat(e[0]," ").concat(t," ").concat(e[1]);var n=e.slice(0,e.length-1).join(", "),a=e[e.length-1];return"".concat(n,", ").concat(t," ").concat(a)}static toLower(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e==null){if(t)return"";throw new Error("Null string passed in to TextUtils.toLower")}return e.toLowerCase()}static sort(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e<t?n?-1:1:e>t?n?1:-1:0}}const hr=dr;function Yt(r,e,t){return e=fr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function fr(r){var e=mr(r,"string");return typeof e=="symbol"?e:String(e)}function mr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Fe{static formatElapsedTime(e){if(typeof e!="number"||!Number.isInteger(e))throw new Error("".concat(e," is not a number that can be expressed as a formatted time"));var t=Math.floor(e/3600),n=Math.floor(e%3600/60),a=e%60;return"".concat(t>0?"".concat(t,"h "):"")+"".concat(n>0||t>0?"".concat(n,"m "):"")+"".concat(e>=60?"".concat(a,"s").padStart(3,"0"):"".concat(a,"s"))}static formatTime(e){if(typeof e!="number"||!Number.isInteger(e)||e<0)throw new Error("".concat(e," is not a number that can be expressed as a formatted time"));var t=String(Math.floor(e/(60*60))).padStart(2,"0"),n=e%(60*60),a=String(Math.floor(n/60)).padStart(2,"0"),i=n%60,s=String(Math.ceil(i)).padStart(2,"0");return"".concat(t,":").concat(a,":").concat(s)}static isTimeString(e){return new RegExp(Fe.TIME_PATTERN).test(e)}static parseTime(e){if(e==null||typeof e!="string")throw new Error("".concat(e," is not a valid string"));var t=e.split(":");if(t.length!==3)throw new Error("".concat(e," is not a time string that can be parsed"));return Number(t[0])*60*60+Number(t[1])*60+Number(t[2])}}Yt(Fe,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Yt(Fe,"TIME_ZONES",Object.freeze([{label:"Tokyo UTC+9 No DST",value:"Asia/Tokyo"},{label:"Seoul UTC+9 No DST",value:"Asia/Seoul"},{label:"Hong Kong UTC+8 No DST",value:"Asia/Hong_Kong"},{label:"Singapore UTC+8 No DST",value:"Asia/Singapore"},{label:"Kolkata UTC+5:30 No DST",value:"Asia/Kolkata"},{label:"Berlin UTC+1",value:"Europe/Berlin"},{label:"UTC UTC±0 No DST",value:"UTC"},{label:"London UTC±0",value:"Europe/London"},{label:"Sao Paulo UTC-2",value:"America/Sao_Paulo"},{label:"Newfoundland UTC-3:30",value:"America/St_Johns"},{label:"Halifax UTC-4",value:"America/Halifax"},{label:"New York UTC−5",value:"America/New_York"},{label:"Chicago UTC-6",value:"America/Chicago"},{label:"Denver UTC-7",value:"America/Denver"},{label:"Los Angeles UTC-8",value:"America/Los_Angeles"},{label:"Anchorage UTC-9",value:"America/Anchorage"},{label:"Honolulu UTC-10 No DST",value:"Pacific/Honolulu"},{label:"Zurich UTC+1",value:"Europe/Zurich"},{label:"Amsterdam UTC+1",value:"Europe/Amsterdam"},{label:"Taipei UTC+8 No DST",value:"Asia/Taipei"},{label:"Sydney UTC+10",value:"Australia/Sydney"}]));const pi=Fe;var pr=3500,vr=V.module("useCopyToClipboard");function gr(){var[r,e]=g.useState(!1),t=g.useRef(null),n=g.useCallback(a=>{sr(a).then(()=>{e(!0)}).catch(i=>vr.error("Unable to copy ".concat(a),`
|
|
1
|
+
import{r as g,a as E,V as Sn,j as d,C as Qe,c as P,R as Mn,P as M,F as fe,s as nt,m as J,W as Cn,X as wn,i as Tn,k as En,Y as In,E as zt}from"./vendor-a75bc0d2.js";import{T as Ze,L as V,ah as Qt,a as On,a8 as Pn,i as Nn,ai as xn,aj as Dn,B as Fn,ak as An,U as Rn,ag as jn,ab as Ln}from"./index-c3aac745.js";function gt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function kn(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?gt(Object(t),!0).forEach(function(n){Ie(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):gt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Ie(r,e,t){return e=$n(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function $n(r){var e=Kn(r,"string");return typeof e=="symbol"?e:String(e)}function Kn(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class rt extends g.Component{constructor(e){super(e),Ie(this,"element",void 0),Ie(this,"container",void 0),Ie(this,"rAF",void 0),this.handleEnter=this.handleEnter.bind(this),this.handleExit=this.handleExit.bind(this),this.handleBlur=this.handleBlur.bind(this),this.element=document.createElement("div"),this.element.className="popper-container",this.container=E.createRef(),this.rAF=0;var{isShown:t}=this.props;this.state={show:t,popper:null}}componentDidUpdate(e){var{isShown:t}=this.props;e.isShown!==t&&(t?(cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{this.show()})):this.hide())}componentWillUnmount(){this.destroyPopper(!1)}getVisibleElement(e){return e==null||e.clientHeight>0||e.clientWidth>0?e:this.getVisibleElement(e.parentElement)}initPopper(){var{popper:e}=this.state,{closeOnBlur:t,referenceObject:n}=this.props;if(!e&&this.container.current!==null){var{options:a}=this.props;a=kn({placement:"auto",modifiers:{preventOverflow:{boundariesElement:"viewport"}}},a),document.body.appendChild(this.element);var i=this.getVisibleElement(this.container.current);i==null&&(i=this.container.current),e=new Sn(n||i,this.element,a),e.scheduleUpdate(),cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{if(t&&!this.element.contains(document.activeElement)){var s=this.element.firstElementChild;s instanceof HTMLElement&&s.focus()}}),this.setState({popper:e})}}destroyPopper(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;cancelAnimationFrame(this.rAF);var{popper:t}=this.state;t&&(t.destroy(),document.body.contains(this.element)&&document.body.removeChild(this.element),e&&this.setState({popper:null}))}show(){this.initPopper(),this.setState({show:!0})}hide(){this.setState({show:!1})}scheduleUpdate(){var{popper:e}=this.state;e&&e.scheduleUpdate()}handleBlur(e){e.relatedTarget instanceof HTMLElement&&(this.element.contains(e.relatedTarget)||this.hide())}handleEnter(){var{onEntered:e}=this.props;e()}handleExit(){var{onExited:e}=this.props,{show:t}=this.state;t||this.destroyPopper(),e()}renderContent(){var{className:e,children:t,timeout:n,interactive:a,closeOnBlur:i}=this.props,{show:s}=this.state;return d.jsx(Qe,{in:s,timeout:n,classNames:"popper-transition",onEntered:this.handleEnter,onExited:this.handleExit,children:d.jsx("div",{onClick:o=>{o.stopPropagation()},onKeyDown:o=>{o.key==="Escape"&&this.hide()},className:P("popper",{interactive:a},e),onBlur:i?this.handleBlur:void 0,tabIndex:i?-1:void 0,role:"presentation",children:d.jsxs("div",{className:"popper-content",children:[t,d.jsx("div",{className:"popper-arrow","x-arrow":""})]})})})}render(){var{popper:e}=this.state,{"data-testid":t}=this.props;return d.jsx("div",{className:"popper-parent-container",ref:this.container,style:{display:"none"},"data-testid":t,children:e&&Mn.createPortal(this.renderContent(),this.element)})}}Ie(rt,"propTypes",{children:M.node.isRequired,options:M.shape({}),className:M.string,timeout:M.number,onEntered:M.func,onExited:M.func,isShown:M.bool,closeOnBlur:M.bool,interactive:M.bool,referenceObject:M.shape({}),"data-testid":M.string});Ie(rt,"defaultProps",{options:{},className:"",timeout:Ze.transitionMs,onEntered(){},onExited(){},isShown:!1,interactive:!1,closeOnBlur:!1,referenceObject:null,"data-testid":void 0});const at=rt;function yt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function Bn(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?yt(Object(t),!0).forEach(function(n){Y(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):yt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Y(r,e,t){return e=Vn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Vn(r){var e=_n(r,"string");return typeof e=="symbol"?e:String(e)}function _n(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Hn=V.module("Tooltip");class R extends g.Component{static handleHidden(){R.shownTooltipCount-=1,R.shownTooltipCount===0&&(R.lastHiddenTime=Date.now())}static handleShown(){R.shownTooltipCount+=1}constructor(e){super(e),Y(this,"container",void 0),Y(this,"popper",void 0),Y(this,"parent",void 0),Y(this,"timer",void 0),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowMouseMove=this.handleWindowMouseMove.bind(this),this.handleWheel=this.handleWheel.bind(this),this.handleTimeout=this.handleTimeout.bind(this),this.handleExited=this.handleExited.bind(this),this.stopShowingTooltip=this.stopShowingTooltip.bind(this),this.container=E.createRef(),this.popper=E.createRef(),this.parent=null,this.timer=null,this.state={isShown:!1}}componentDidMount(){this.startListening();var{timeout:e}=this.props;e===0&&this.show()}componentDidUpdate(e,t){var{isShown:n}=t,{isShown:a}=this.state;a!==n&&(a?R.handleShown():R.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();var{isShown:e}=this.state;e&&R.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Hn.error("Tooltip doesn't have a container or a parent set!");return}this.parent=this.container.current.parentElement,this.parent.addEventListener("mousemove",this.handleMouseMove),this.parent.addEventListener("mouseleave",this.handleMouseLeave),this.parent.addEventListener("mousedown",this.stopShowingTooltip)}stopListening(){this.parent&&(this.parent.removeEventListener("mousemove",this.handleMouseMove),this.parent.removeEventListener("mouseleave",this.handleMouseLeave),this.parent.removeEventListener("mousedown",this.stopShowingTooltip))}startListeningWindow(){window.addEventListener("mousemove",this.handleWindowMouseMove,!0),window.addEventListener("contextmenu",this.stopShowingTooltip,!0),window.addEventListener("wheel",this.handleWheel)}stopListeningWindow(){window.removeEventListener("mousemove",this.handleWindowMouseMove,!0),window.removeEventListener("contextmenu",this.stopShowingTooltip,!0),window.removeEventListener("wheel",this.handleWheel)}handleMouseMove(){this.startTimer()}handleWheel(){var{isShown:e}=this.state;this.popper.current&&this.parent&&e&&!this.popper.current.element.matches(":hover")&&!this.parent.matches(":hover")&&(this.stopTimer(),this.hide())}handleMouseLeave(){var{isShown:e}=this.state;this.stopTimer();var{interactive:t}=this.props;!t&&e&&this.hide()}handleTimeout(){this.show()}handleWindowMouseMove(e){var t=e.clientX,n=e.clientY,{isShown:a}=this.state;if(!(!this.popper.current||!this.parent)){var i=this.popper.current.element.getBoundingClientRect(),s=this.parent.getBoundingClientRect();t>=i.left&&t<=i.left+i.width&&n>=i.top&&n<=i.top+i.height?this.handleMouseMove():t>=s.left&&t<=s.left+s.width&&n>=s.top&&n<=s.top+s.height?this.handleMouseMove():a&&(this.stopTimer(),this.hide())}}startTimer(){this.stopTimer();var{timeout:e,reshowTimeout:t}=this.props,n=e;(R.shownTooltipCount>0||Date.now()-R.lastHiddenTime<R.triggerReshowThreshold)&&(n=t),this.timer=window.setTimeout(this.handleTimeout,n)}stopTimer(){this.timer!=null&&(clearTimeout(this.timer),this.timer=null)}show(){var{isShown:e}=this.state;if(this.stopTimer(),!e){var t;(t=this.popper.current)===null||t===void 0||t.show(),this.setState({isShown:!0});var{interactive:n}=this.props;n&&this.startListeningWindow()}}hide(){var e;(e=this.popper.current)===null||e===void 0||e.hide(),this.stopListeningWindow()}update(){var e;(e=this.popper.current)===null||e===void 0||e.scheduleUpdate()}handleExited(){this.setState({isShown:!1});var{onExited:e}=this.props;e()}stopShowingTooltip(){var{isShown:e}=this.state;this.stopTimer(),e&&this.hide()}render(){var{interactive:e,children:t,referenceObject:n,popperClassName:a,"data-testid":i,onEntered:s}=this.props,{isShown:o}=this.state,{options:l}=this.props;return l=Bn({placement:"bottom"},l),d.jsx("div",{ref:this.container,style:{display:"none"},"data-testid":i,children:d.jsx(at,{className:P(a),options:l,ref:this.popper,onEntered:s,onExited:this.handleExited,interactive:e,referenceObject:n,children:d.jsxs("div",{className:"tooltip-content",children:[" ",o&&t]})})})}}Y(R,"defaultTimeout",500);Y(R,"defaultReshowTimeout",100);Y(R,"triggerReshowThreshold",300);Y(R,"shownTooltipCount",0);Y(R,"lastHiddenTime",Date.now());Y(R,"defaultProps",{interactive:!1,options:{},popperClassName:"",reshowTimeout:R.defaultReshowTimeout,timeout:R.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0});const Zt=R;var Wn=["kind","variant","type","tooltip","icon","disabled","active","onClick","onContextMenu","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","onKeyDown","className","style","children","tabIndex","data-testid","aria-label"];function bt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function St(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?bt(Object(t),!0).forEach(function(n){Un(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):bt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Un(r,e,t){return e=qn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function qn(r){var e=Gn(r,"string");return typeof e=="symbol"?e:String(e)}function Gn(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function zn(r,e){if(r==null)return{};var t=Qn(r,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function Qn(r,e){if(r==null)return{};var t={},n=Object.keys(r),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(t[a]=r[a]);return t}var Zn=["primary","secondary","tertiary","success","danger","inline","ghost"],Xn=["group-end"];function Jn(r,e){switch(r){case"primary":return"btn-primary";case"secondary":return"btn-outline-primary";case"tertiary":return"btn-secondary";case"success":return"btn-success";case"danger":return"btn-danger";case"inline":return"btn-inline";case"ghost":return P("btn-link",{"btn-link-icon":e,"btn-link-icon-only":e})}}function Yn(r){switch(r){case"group-end":return P("pl-2","pr-3")}}var Ke=E.forwardRef((r,e)=>{var{kind:t,variant:n,type:a,tooltip:i,icon:s,disabled:o=!1,active:l,onClick:u,onContextMenu:c,onMouseDown:h,onMouseUp:m,onMouseEnter:b,onMouseLeave:y,onKeyDown:w,className:T,style:N,children:_,tabIndex:k,"data-testid":H,"aria-label":W}=r,A=zn(r,Wn),U=!!(s&&_==null),q=Jn(t,U),ge;n&&(ge=Yn(n));var ye;s&&(ye=E.isValidElement(s)?s:d.jsx(fe,{icon:s}));var me;i!==void 0&&(me=typeof i=="string"?d.jsx(Zt,{children:i}):i);var be=W;W===void 0&&U&&i!=null&&typeof i=="string"&&(be=i);var C=d.jsxs("button",St(St({"data-testid":H,ref:e,type:a,className:P("btn",q,ge,{active:l},T),onClick:u,onContextMenu:c,onMouseUp:m,onMouseDown:h,onMouseEnter:b,onMouseLeave:y,onKeyDown:w,style:N,disabled:o,tabIndex:k,"aria-label":be},A),{},{children:[s&&ye,_,i!=null&&!o&&me]}));return o?d.jsxs("span",{className:"btn-disabled-wrapper",children:[C,i!==void 0&&me]}):C});Ke.displayName="Button";Ke.propTypes={kind:M.oneOf(Zn).isRequired,variant:M.oneOf(Xn),type:M.oneOf(["submit","reset","button"]),tooltip(r){var{tooltip:e,icon:t,children:n}=r;return e===void 0&&t!=null&&n==null?new Error("Tooltip is required for icon only buttons"):null},icon(r){var{children:e,icon:t}=r;return t==null&&e==null?new Error("Icon is required if no children are provided"):e==null&&!E.isValidElement(t)&&(t==null||t.iconName===""||t.iconName==null)?new Error("Icon must be react element or fontawesome IconDefinition"):null},disabled:M.bool,active:M.bool,onClick(r){var{onClick:e,type:t}=r;return t==="button"&&typeof e!="function"?new Error("type button requires an onClick function"):e!==void 0&&typeof e!="function"?new Error("onClick must be a function"):null},onContextMenu:M.func,onMouseUp:M.func,onMouseDown:M.func,onMouseEnter:M.func,onMouseLeave:M.func,onKeyDown:M.func,tabIndex:M.number,children:M.node,className:M.string,style:M.object,"data-testid":M.string};Ke.defaultProps={type:"button",onClick:void 0,onContextMenu:void 0,onMouseUp:void 0,onMouseDown:void 0,onMouseEnter:void 0,onMouseLeave:void 0,onKeyDown:void 0,variant:void 0,tooltip:void 0,icon:void 0,disabled:!1,active:void 0,tabIndex:void 0,children:void 0,className:void 0,style:{},"data-testid":void 0};const Xe=Ke;function Be(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"No value available in context. Was code wrapped in a provider?",t=g.useContext(r);if(t==null)throw new Error(e);return t}function er(r){var e=g.useRef();return g.useEffect(function(){e.current=r}),e.current}function Xt(r){var e=g.useRef(null);return g.useEffect(function(){r&&(typeof r=="function"?r(e.current):r.current=e.current)}),e}var ci=Object.freeze([]),di=new Map,hi=()=>{};function tr(r,e,t){return e=nr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function nr(r){var e=rr(r,"string");return typeof e=="symbol"?e:String(e)}function rr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class ar extends Error{constructor(){super(...arguments),tr(this,"isCanceled",!0)}}const Mt=ar;function Ct(r,e,t,n,a,i,s){try{var o=r[i](s),l=o.value}catch(u){t(u);return}o.done?e(l):Promise.resolve(l).then(n,a)}function ir(r){return function(){var e=this,t=arguments;return new Promise(function(n,a){var i=r.apply(e,t);function s(l){Ct(i,n,a,s,o,"next",l)}function o(l){Ct(i,n,a,s,o,"throw",l)}s(void 0)})}}function sr(r){return Je.apply(this,arguments)}function Je(){return Je=ir(function*(r){var{clipboard:e}=navigator;if(e!==void 0)try{return navigator.clipboard.writeText(r)}catch{return wt(r)}wt(r)}),Je.apply(this,arguments)}function wt(r){var e=document.activeElement,t=document.createElement("textarea");t.value=r,document.body.appendChild(t),t.focus(),t.select();var n=document.execCommand("copy");if(document.body.removeChild(t),e instanceof HTMLElement&&e.focus(),!n)throw new Error("Unable to execute copy command")}class Jt extends CustomEvent{constructor(e,t){super(e,t)}}function or(r,e,t){return e=lr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function lr(r){var e=ur(r,"string");return typeof e=="symbol"?e:String(e)}function ur(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class cr extends Error{constructor(){super(...arguments),or(this,"isTimeout",!0)}}const it=cr;class Ye{static makeCancelable(e,t){var n=!1,a,i,s=new Promise((o,l)=>{i=l,Promise.resolve(e).then(u=>{n?t&&t(u):(a=u,o(u))}).catch(u=>l(u))});return s.cancel=()=>{n=!0,i(new Mt),a!=null&&t&&t(a)},s}static isCanceled(e){return e instanceof Mt}static isTimedOut(e){return e instanceof it}static withTimeout(e,t){return new Promise((n,a)=>{setTimeout(()=>{try{n(t())}catch(i){a(i)}},e)})}}function fi(r){if(r==null)throw new Error("Value is null or undefined")}function mi(r,e){var t,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=(t=r.get(e))!==null&&t!==void 0?t:n;if(a!==void 0)return a;throw new Error("Missing value for key ".concat(e))}class st{static isValidRange(e){return e!=null&&e.length===2&&Number.isInteger(e[0])&&Number.isInteger(e[1])&&e[0]<=e[1]}static validateRange(e){if(!st.isValidRange(e))throw new Error("Invalid range! ".concat(e))}static isSelected(e,t){for(var n=0;n<e.length;n+=1){var a=e[n],i=a[0],s=a[1];if(i<=t&&t<=s)return!0}return!1}static selectRange(e,t){for(var[n,a]=t,i=[...e],s=i.length-1;s>=0;s-=1){var o=i[s],l=o[0],u=o[1];if(l<=n&&a<=u)return i;n<=u&&l<=a&&(n=Math.min(n,l),a=Math.max(a,u),i.splice(s,1))}return i.push([n,a]),i}static deselectRange(e,t){for(var[n,a]=t,i=[...e],s=i.length-1;s>=0;s-=1){var o=i[s],l=o[0],u=o[1];if(!(a<l||u<n))if(l<n&&a<u){i[s]=[l,n-1],i.splice(s+1,0,[a+1,u]);break}else n<=l&&u<=a?i.splice(s,1):l<n?i[s]=[l,n-1]:i[s]=[a+1,u]}return i}static count(e){return e.reduce((t,n)=>t+(n[1]-n[0]+1),0)}static getItemsInRanges(e,t){return t.reduce((n,a)=>{for(var i=[...n],s=a[0];s<=a[1];s+=1)i.push(e[s]);return i},[])}}const le=st;class dr{static join(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"and";if(e==null||e.length===0)return"";if(e.length===1)return e[0];if(e.length===2)return"".concat(e[0]," ").concat(t," ").concat(e[1]);var n=e.slice(0,e.length-1).join(", "),a=e[e.length-1];return"".concat(n,", ").concat(t," ").concat(a)}static toLower(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e==null){if(t)return"";throw new Error("Null string passed in to TextUtils.toLower")}return e.toLowerCase()}static sort(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e<t?n?-1:1:e>t?n?1:-1:0}}const hr=dr;function Yt(r,e,t){return e=fr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function fr(r){var e=mr(r,"string");return typeof e=="symbol"?e:String(e)}function mr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Fe{static formatElapsedTime(e){if(typeof e!="number"||!Number.isInteger(e))throw new Error("".concat(e," is not a number that can be expressed as a formatted time"));var t=Math.floor(e/3600),n=Math.floor(e%3600/60),a=e%60;return"".concat(t>0?"".concat(t,"h "):"")+"".concat(n>0||t>0?"".concat(n,"m "):"")+"".concat(e>=60?"".concat(a,"s").padStart(3,"0"):"".concat(a,"s"))}static formatTime(e){if(typeof e!="number"||!Number.isInteger(e)||e<0)throw new Error("".concat(e," is not a number that can be expressed as a formatted time"));var t=String(Math.floor(e/(60*60))).padStart(2,"0"),n=e%(60*60),a=String(Math.floor(n/60)).padStart(2,"0"),i=n%60,s=String(Math.ceil(i)).padStart(2,"0");return"".concat(t,":").concat(a,":").concat(s)}static isTimeString(e){return new RegExp(Fe.TIME_PATTERN).test(e)}static parseTime(e){if(e==null||typeof e!="string")throw new Error("".concat(e," is not a valid string"));var t=e.split(":");if(t.length!==3)throw new Error("".concat(e," is not a time string that can be parsed"));return Number(t[0])*60*60+Number(t[1])*60+Number(t[2])}}Yt(Fe,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Yt(Fe,"TIME_ZONES",Object.freeze([{label:"Tokyo UTC+9 No DST",value:"Asia/Tokyo"},{label:"Seoul UTC+9 No DST",value:"Asia/Seoul"},{label:"Hong Kong UTC+8 No DST",value:"Asia/Hong_Kong"},{label:"Singapore UTC+8 No DST",value:"Asia/Singapore"},{label:"Kolkata UTC+5:30 No DST",value:"Asia/Kolkata"},{label:"Berlin UTC+1",value:"Europe/Berlin"},{label:"UTC UTC±0 No DST",value:"UTC"},{label:"London UTC±0",value:"Europe/London"},{label:"Sao Paulo UTC-2",value:"America/Sao_Paulo"},{label:"Newfoundland UTC-3:30",value:"America/St_Johns"},{label:"Halifax UTC-4",value:"America/Halifax"},{label:"New York UTC−5",value:"America/New_York"},{label:"Chicago UTC-6",value:"America/Chicago"},{label:"Denver UTC-7",value:"America/Denver"},{label:"Los Angeles UTC-8",value:"America/Los_Angeles"},{label:"Anchorage UTC-9",value:"America/Anchorage"},{label:"Honolulu UTC-10 No DST",value:"Pacific/Honolulu"},{label:"Zurich UTC+1",value:"Europe/Zurich"},{label:"Amsterdam UTC+1",value:"Europe/Amsterdam"},{label:"Taipei UTC+8 No DST",value:"Asia/Taipei"},{label:"Sydney UTC+10",value:"Australia/Sydney"}]));const pi=Fe;var pr=3500,vr=V.module("useCopyToClipboard");function gr(){var[r,e]=g.useState(!1),t=g.useRef(null),n=g.useCallback(a=>{sr(a).then(()=>{e(!0)}).catch(i=>vr.error("Unable to copy ".concat(a),`
|
|
2
2
|
`,i))},[]);return g.useEffect(()=>(t.current&&clearTimeout(t.current),r&&(t.current=setTimeout(()=>{e(!1)},pr)),()=>{t.current&&clearTimeout(t.current)}),[r]),[r,n]}function yr(r,e,t){return e=br(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function br(r){var e=Sr(r,"string");return typeof e=="symbol"?e:String(e)}function Sr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function ze(r){return r.then!==void 0}class he{static disableAllActions(){he.actionsDisabled=!0}static enableAllActions(){he.actionsDisabled=!1}static isContextActionEvent(e){return Array.isArray(e.contextActions)}static compareActions(e,t){if(e.group!==t.group){var n,a;return((n=e.group)!==null&&n!==void 0?n:0)>((a=t.group)!==null&&a!==void 0?a:0)?1:-1}if(e.order!==t.order){var i,s;return((i=e.order)!==null&&i!==void 0?i:0)>((s=t.order)!==null&&s!==void 0?s:0)?1:-1}if(e.title!==t.title){var o,l;return((o=e.title)!==null&&o!==void 0?o:"")>((l=t.title)!==null&&l!==void 0?l:"")?1:-1}return e!==t?e>t?1:-1:0}static sortActions(e){if(e==null||!Array.isArray(e))return[];var t=e.slice();return t.sort(he.compareActions),t}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static getModifierKey(){return he.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=he.getModifierKey();return e[t]}static getMenuItems(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=[],a=e;Array.isArray(a)||(a=[a]);for(var i=0;i<a.length;i+=1){var s=a[i],o=void 0;typeof s=="function"?o=s():o=s,o!=null&&(o instanceof Promise?t&&n.push(o):Array.isArray(o)?n=n.concat(o):n.push(o))}return n=n.filter(l=>l.title!==void 0||l.then!=null||l.menuElement),n}static getNextMenuItem(e,t,n){var a=e;a<0&&t<0&&(a=n.length);for(var i=1;i<n.length+1;i+=1){var s=(a+t*i+n.length)%n.length,o=n[s];if(!(o instanceof Promise)&&o.disabled!==!0)return s}return e}}yr(he,"actionsDisabled",!1);const j=he;var Tt=V.module("GlobalContextAction");class Mr extends g.Component{constructor(e){super(e),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}componentDidMount(){document.body.addEventListener("contextmenu",this.handleContextMenu),document.body.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.body.removeEventListener("contextmenu",this.handleContextMenu),document.body.removeEventListener("keydown",this.handleKeyDown)}handleContextMenu(e){var t=e;t.contextActions==null&&(t.contextActions=[]);var{action:n}=this.props;n.title==null&&!n.menuElement||(t.contextActions==null&&(t.contextActions=[]),t.contextActions.push(n),Tt.debug("Received context menu event at global action! Menu items are now: ",t.contextActions))}handleKeyDown(e){var{action:t}=this.props;if(!j.actionsDisabled&&t.shortcut!==void 0&&t.shortcut.matchesEvent(e)){var n;Tt.debug("Global hotkey matched!",e),(n=t.action)===null||n===void 0||n.call(t,e),e.preventDefault(),e.stopPropagation()}}render(){return null}}const Cr=Mr;class wr extends g.Component{render(){for(var{actions:e,"data-testid":t}=this.props,n=[],a=0;a<e.length;a+=1){var i=e[a],{shortcut:s}=i;if(i.title!=null||i.menuElement||s){var o=d.jsx(Cr,{action:i,"data-testid":t},"".concat(i.title,".").concat(s==null?void 0:s.id));n.push(o)}}return n}}const Tr=wr;function en(r,e,t){return e=Er(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Er(r){var e=Ir(r,"string");return typeof e=="symbol"?e:String(e)}function Ir(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Re=V.module("ContextActions");class tn extends g.Component{static triggerMenu(e,t,n,a){if(a.length!==0){var i=new MouseEvent("contextmenu",{clientX:t,clientY:n,bubbles:!0,cancelable:!0});i.contextActions=a,e.dispatchEvent(i)}}constructor(e){super(e),en(this,"container",void 0),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.container=E.createRef(),this.state={globalActions:[],keyboardActions:[]}}static getDerivedStateFromProps(e){if(e.actions==null||!Array.isArray(e.actions))return{globalActions:[],keyboardActions:[]};var t=e.actions.filter(a=>!ze(a)&&typeof a!="function"&&a.isGlobal),n=e.actions.filter(a=>!ze(a)&&typeof a!="function"&&(a.isGlobal===void 0||!a.isGlobal)&&a.shortcut!=null);return{globalActions:t,keyboardActions:n}}componentDidMount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&(this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu),this.container.current.parentElement.addEventListener("keydown",this.handleKeyDown))}componentWillUnmount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&(this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu),this.container.current.parentElement.removeEventListener("keydown",this.handleKeyDown))}handleContextMenu(e){var{ignoreClassNames:t=[]}=this.props;if(t.length>0)for(var n=e.target,a=function(){var{classList:u}=n,c=t.find(h=>u.contains(h));if(c!==void 0)return Re.debug2('Contextmenu event ignored based on the target className "'.concat(c,'"')),{v:void 0};n=n.parentElement};n!=null;){var i=a();if(typeof i=="object")return i.v}if(j.isContextActionEvent(e)||(e.contextActions=[]),!!j.isContextActionEvent(e)){var{actions:s}=this.props;if(s!=null){var o=s;Array.isArray(o)&&(o=o.filter(l=>ze(l)||typeof l=="function"||l.isGlobal===void 0||!l.isGlobal)),e.contextActions=e.contextActions.concat(o)}Re.debug("Received context menu event! Menu items are now: ",e.contextActions)}}handleKeyDown(e){for(var{keyboardActions:t}=this.state,n=0;n<t.length;n+=1){var a=t[n];if(!j.actionsDisabled&&a.shortcut!=null&&a.shortcut.matchesEvent(e)){var i;Re.debug("Context hotkey matched!",e),(i=a.action)===null||i===void 0||i.call(a,e),e.stopPropagation(),e.preventDefault(),Re.debug2("Matched hotkey returned false, key event not consumed")}}}render(){var{"data-testid":e}=this.props,{globalActions:t}=this.state;return d.jsx("div",{className:"context-actions-listener",ref:this.container,"data-testid":e,children:d.jsx(Tr,{actions:t})})}}en(tn,"groups",{default:void 0,high:100,medium:5e3,low:1e4,global:1e5,edit:100});const vi=tn;var ot=E.forwardRef((r,e)=>{var t;function n(A){var{menuItem:U,onMenuItemClick:q}=r;q(U,A)}function a(A){var{menuItem:U,onMenuItemMouseMove:q}=r;q(U,A)}function i(A){var{menuItem:U,onMenuItemContextMenu:q}=r;q(U,A)}function s(A,U,q){if(typeof A.type=="string")return A;var{closeMenu:ge,menuItem:ye,isKeyboardSelected:me,isMouseSelected:be,"data-testid":C}=r,S={menuItem:ye,closeMenu:ge,isKeyboardSelected:me,isMouseSelected:be,iconElement:U,displayShortcut:q,"data-testid":C};return E.cloneElement(A,{forwardedProps:S})}var{children:o,menuItem:l,isKeyboardSelected:u=!1,isMouseSelected:c=!1,"data-testid":h}=r,m=(t=l.shortcut)===null||t===void 0?void 0:t.getDisplayText(),b=null;if(l.icon){var y=l.icon;if(E.isValidElement(y))b=y;else{var w;l.iconColor!=null&&(l.disabled===void 0||!l.disabled)&&(w={color:l.iconColor}),b=d.jsx(fe,{icon:y,style:w})}}var T=null,N=!!o;l.actions&&(T=d.jsx(fe,{icon:Qt}));var _=null;if(l.menuElement)_=d.jsx("div",{className:"custom-menu-item",onMouseMove:a,children:s(l.menuElement,b,m)});else{var k,H=l.disabled,W=l.iconOutline;_=d.jsx("button",{type:"button",className:P("btn-context-menu",{disabled:H},{active:(N||c)&&(H===void 0||!H)},{"keyboard-active":u&&(H===void 0||!H)}),onClick:n,onMouseMove:a,onContextMenu:i,title:(k=l.description)!==null&&k!==void 0?k:"",children:d.jsxs("div",{className:"btn-context-menu-wrapper",children:[d.jsx("span",{className:P("icon",{outline:W}),children:b}),d.jsx("span",{className:"title",children:l.title}),m!==void 0&&d.jsx("span",{className:"shortcut",children:m}),T&&d.jsx("span",{className:P("submenu-indicator",{disabled:H}),children:T})]})})}return d.jsxs("div",{className:"context-menu-item",ref:e,"data-testid":h,children:[o,_]})});ot.displayName="ContextMenuItem";ot.defaultProps={children:null,isKeyboardSelected:!1,isMouseSelected:!1,"data-testid":void 0};const nn=ot;function Et(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function Or(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Et(Object(t),!0).forEach(function(n){ue(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Et(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ue(r,e,t){return e=Pr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Pr(r){var e=Nr(r,"string");return typeof e=="symbol"?e:String(e)}function Nr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var It=V.module("ContextMenu");class Ne extends g.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),ue(this,"container",void 0),ue(this,"oldFocus",void 0),ue(this,"activeSubMenuRef",void 0),ue(this,"subMenuTimer",void 0),ue(this,"rAF",void 0),ue(this,"initialPosition",void 0),this.handleBlur=this.handleBlur.bind(this),this.handleCloseSubMenu=this.handleCloseSubMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemContextMenu=this.handleMenuItemContextMenu.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.container=E.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=E.createRef(),this.subMenuTimer=0,this.rAF=0,this.initialPosition={top:e.top,left:e.left},this.state={menuItems:[],pendingItems:[],activeSubMenu:null,hasOverflow:!1,subMenuTop:null,subMenuLeft:null,subMenuParentWidth:0,subMenuParentHeight:0,keyboardIndex:-1,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.verifyPosition(),window.addEventListener("resize",this.handleWindowResize),this.rAF=window.requestAnimationFrame(()=>{var e;(e=this.container.current)===null||e===void 0||e.focus();var{onMenuOpened:t}=this.props;t(this)})}componentDidUpdate(e,t){var{actions:n}=this.props,{activeSubMenu:a}=this.state;if(a!==t.activeSubMenu)if(a==null){var i;(i=this.container.current)===null||i===void 0||i.focus()}else this.setActiveSubMenuPosition();if(e.actions!==n&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var s;(s=this.container.current)===null||s===void 0||s.focus()}this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var{options:e}=this.props;if(e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse){var{keyboardIndex:t}=this.state;return t}return this.getMouseIndex()}setKeyboardIndex(e){var{options:t}=this.props;t.separateKeyboardMouse!==void 0&&t.separateKeyboardMouse?this.setState({keyboardIndex:e}):this.setMouseIndex(e)}getMouseIndex(){var{mouseIndex:e}=this.state;return e}setMouseIndex(e){this.setState({mouseIndex:e})}initMenu(){this.cancelPromises(),cancelAnimationFrame(this.rAF);var{options:e}=this.props,t=e.initialKeyboardIndex;t===void 0&&(t=-1);for(var{actions:n}=this.props,a=j.getMenuItems(n),i=[],s=a.length-1;s>=0;s-=1){var o=a[s];o instanceof Promise?this.initMenuPromise(o):i.push(o)}this.setState({mouseIndex:-1,keyboardIndex:t,activeSubMenu:null,menuItems:j.sortActions(i)})}initMenuPromise(e){var t=Ye.makeCancelable(e);this.setState(n=>({pendingItems:n.pendingItems.concat(t)})),t.then(n=>{this.setState(a=>{var i=a.pendingItems.indexOf(t);if(i>=0){var s=a.pendingItems.slice();return s.splice(i,1),{menuItems:j.sortActions(a.menuItems.concat(n)),pendingItems:s}}return null})},n=>{Ye.isCanceled(n)||(this.setState(a=>{var i=a.pendingItems.indexOf(t);if(i>=0){var s=a.pendingItems.slice();return s.splice(i,1),{pendingItems:s}}return null}),It.error(n))})}cancelPromises(){var{pendingItems:e}=this.state;e.map(t=>t.cancel())}setActiveSubMenuPosition(){if(this.activeSubMenuRef.current!==null){var e=this.activeSubMenuRef.current.getBoundingClientRect();this.setState({subMenuTop:e.top,subMenuLeft:e.right,subMenuParentHeight:e.height,subMenuParentWidth:e.width})}}verifyPosition(){var e,t,n,a,{options:i,updatePosition:s,subMenuParentWidth:o,subMenuParentHeight:l,top:u,left:c}=this.props;if(!(!this.container.current||i.doNotVerifyPosition!=null&&i.doNotVerifyPosition)){var{top:h,left:m}=this.initialPosition,{width:b,height:y}=(e=(t=this.container.current)===null||t===void 0?void 0:t.getBoundingClientRect())!==null&&e!==void 0?e:{width:0,height:0},w=((n=(a=this.container.current)===null||a===void 0?void 0:a.scrollHeight)!==null&&n!==void 0?n:0)>window.innerHeight;y===0||b===0||(h+y>window.innerHeight&&(h-y-l>0?h-=y-l:h=window.innerHeight-y),m+b>window.innerWidth&&(m=m-b-o),(c!==m||u!==h)&&(this.setState({hasOverflow:w}),s(h,m)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){It.warn("Container is null!");return}if(!this.container.current.contains(e.relatedTarget)){for(var t=e.relatedTarget,n=!1;t&&!n;)n=t.hasAttribute("data-dh-context-menu"),t=t.parentElement;n||this.closeMenu(!0)}}isEscapeKey(e){var{left:t}=this.props;return e==="Escape"||t<0&&e==="ArrowRight"||e==="ArrowLeft"}handleKeyDown(e){var{menuItems:t}=this.state,n=this.getKeyboardIndex(),a=n,i=!1;if(e.key==="Enter"||e.key===" "){n>=0&&n<t.length&&this.handleMenuItemClick(t[n],e);return}if(e.key==="ArrowRight"?n>=0&&n<=t.length?i=!0:a=0:this.isEscapeKey(e.key)?a=null:e.key==="ArrowUp"||e.shiftKey&&e.key==="Tab"?a=j.getNextMenuItem(a,-1,t):(e.key==="ArrowDown"||e.key==="Tab")&&(a=j.getNextMenuItem(a,1,t)),i){this.openSubMenu(n),e.preventDefault(),e.stopPropagation();return}n!==a&&(a!==null?this.setKeyboardIndex(a):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}openSubMenu(e){var{menuItems:t,activeSubMenu:n}=this.state,a=t[e].actions?e:null;n!==a&&this.setState({activeSubMenu:a,subMenuTop:null,subMenuLeft:null})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,{closeMenu:t,onMenuClosed:n}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{t(e),n(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(e){e?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(e,t){t.preventDefault(),t.stopPropagation();var{menuItems:n}=this.state;e!=null&&(e.disabled===void 0||!e.disabled)&&(e.actions!=null?this.openSubMenu(n.indexOf(e)):e.action!=null&&(e.action(),this.closeMenu(!0)))}handleMenuItemContextMenu(e,t){t.metaKey||this.handleMenuItemClick(e,t)}handleMenuItemMouseMove(e){var{menuItems:t}=this.state,n=t.indexOf(e);this.setMouseIndex(n),n>=0&&n<t.length&&(e.disabled===void 0||!e.disabled)&&this.openSubMenu(n)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var e=[],{top:t,left:n}=this.props,{activeSubMenu:a,hasOverflow:i,keyboardIndex:s,menuItems:o,mouseIndex:l,pendingItems:u,subMenuTop:c,subMenuLeft:h,subMenuParentWidth:m,subMenuParentHeight:b}=this.state,y=0;y<o.length;y+=1){var w=o[y];y>0&&w.group!==o[y-1].group&&e.push(d.jsx("hr",{},"".concat(y,".separator")));var T=d.jsx(nn,{ref:a===y?this.activeSubMenuRef:null,isKeyboardSelected:s===y,isMouseSelected:l===y,menuItem:w,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},y);e.push(T)}var N=null;u.length>0&&(N=d.jsx("div",{className:"loading",children:d.jsx(On,{})}));var{menuStyle:_,"data-testid":k}=this.props,H=a!==null&&c!==null&&h!==null;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:P({"has-overflow":i},"context-menu-container"),style:Or({top:t,left:n},_),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:Ne.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":k,children:[e,N]}),H&&a!==null&&c!==null&&h!==null&&d.jsx(Ne,{actions:o[a].actions||[],closeMenu:this.handleCloseSubMenu,top:c,left:h,updatePosition:(W,A)=>{this.setState({subMenuTop:W,subMenuLeft:A})},subMenuParentWidth:m,subMenuParentHeight:b},"sub-".concat(a))]})}}ue(Ne,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const xr=Ne;function Ot(r,e,t){return e=Dr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Dr(r){var e=Fr(r,"string");return typeof e=="symbol"?e:String(e)}function Fr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Ar extends g.Component{constructor(e){super(e),Ot(this,"container",void 0),Ot(this,"openMenu",void 0),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=E.createRef(),this.openMenu=E.createRef(),this.state={actions:null,left:0,top:0}}componentDidMount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu)}componentWillUnmount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu)}handleContextMenu(e){if(j.isContextActionEvent(e)&&this.container.current&&!(e.metaKey||e.ctrlKey)){var t=j.getMenuItems(e.contextActions),n=this.container.current.getBoundingClientRect(),a=e.clientY-n.top,i=e.clientX-n.left;if(t.length===0){if(e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{var s=document.elementFromPoint(i,a),o=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});s==null||s.dispatchEvent(o)});return}return}e.preventDefault(),this.setState({actions:t,top:a,left:i})}}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){var e=null,{"data-testid":t}=this.props,{actions:n,top:a,left:i}=this.state;return n&&(e=d.jsx(xr,{ref:this.openMenu,actions:n,onMenuClosed:this.handleMenuClose,top:a,left:i,updatePosition:(s,o)=>{this.setState({top:s,left:o})},"data-testid":t})),d.jsx("div",{className:P("context-menu-root",{active:n}),ref:this.container,children:e})}}const gi=Ar;var Ve=E.forwardRef((r,e)=>{var{checked:t=!1,children:n,className:a,disabled:i,inputClassName:s,isInvalid:o,labelClassName:l,name:u,onChange:c,"data-testid":h}=r,[m]=g.useState(nt()),b=Xt(e);g.useEffect(function(){b.current&&(b.current.indeterminate=t===null)},[b,t]);var y=g.useCallback(w=>{b.current&&(b.current.indeterminate=t===null),c&&c(w)},[b,t,c]);return d.jsxs("div",{className:P("custom-control custom-checkbox",a),children:[d.jsx("input",{type:"checkbox",ref:b,checked:t??!1,className:P("custom-control-input",s,{"is-invalid":o}),disabled:i,id:m,name:u,onChange:y,"data-testid":h}),d.jsx("label",{className:P("custom-control-label",l),htmlFor:m,children:n})]})});Ve.displayName="Checkbox";Ve.propTypes={checked:(r,e)=>{var{[e]:t}=r;return t!==null&&typeof t!="boolean"?new Error("Checked must be a boolean or null for indeterminate"):null},children:M.node.isRequired,className:M.string,disabled:M.bool,inputClassName:M.string,isInvalid:M.bool,labelClassName:M.string,name:M.string,onChange:M.func,"data-testid":M.string};Ve.defaultProps={checked:!1,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};const Rr=Ve;function rn(r,e,t){return e=jr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function jr(r){var e=Lr(r,"string");return typeof e=="symbol"?e:String(e)}function Lr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class an extends g.PureComponent{constructor(e){super(e),rn(this,"inputField",void 0),this.inputField=E.createRef()}focus(){var e;(e=this.inputField.current)===null||e===void 0||e.focus()}render(){var{value:e,placeholder:t,onBlur:n,onChange:a,className:i,disabled:s,matchCount:o,id:l,onKeyDown:u,"data-testid":c}=this.props;return d.jsxs("div",{className:P("search-group",i),children:[d.jsx("input",{type:"search",value:e,onBlur:n,onChange:a,onKeyDown:u,className:"form-control",disabled:s,placeholder:t,ref:this.inputField,id:l,"data-testid":c}),o!=null&&d.jsx("span",{className:"search-match",children:o}),d.jsx("span",{className:"search-icon",children:d.jsx(fe,{icon:Pn})})]})}}rn(an,"defaultProps",{placeholder:"Search",className:"",matchCount:null,onKeyDown(){},id:"","data-testid":void 0});const kr=an;function Pt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function $r(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Pt(Object(t),!0).forEach(function(n){z(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Pt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function z(r,e,t){return e=Kr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Kr(r){var e=Br(r,"string");return typeof e=="symbol"?e:String(e)}function Br(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var et;(function(r){r.UP="UP",r.DOWN="DOWN"})(et||(et={}));class te extends g.Component{constructor(e){super(e),z(this,"popper",void 0),z(this,"cbContainer",void 0),z(this,"toggleButton",void 0),z(this,"menuContainer",void 0),z(this,"input",void 0),z(this,"searchInput",void 0),z(this,"getCachedFilteredOptions",J((t,n)=>t.filter(a=>a.title.toLowerCase().indexOf(n.toLowerCase())>=0||a.value.toLowerCase().indexOf(n.toLowerCase())>=0))),this.state={value:"",filter:"",filteredOptions:e.options,keyboardOptionIndex:-1,menuIsOpen:!1,inputWidth:100},this.toggleMenu=this.toggleMenu.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.closeMenu=this.closeMenu.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handleFilterChange=this.handleFilterChange.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.popper=E.createRef(),this.cbContainer=E.createRef(),this.toggleButton=E.createRef(),this.menuContainer=E.createRef(),this.input=E.createRef(),this.searchInput=E.createRef()}componentDidUpdate(){var{menuIsOpen:e,keyboardOptionIndex:t}=this.state;e&&t>=0&&this.scrollOptionIntoView()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}focus(){var e;(e=this.input.current)===null||e===void 0||e.focus()}resetValue(){this.setState({value:""})}updateInputValue(e){var{onChange:t}=this.props;this.setState({value:e}),t(e)}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var t,n,{filter:a,filteredOptions:i,keyboardOptionIndex:s}=this.state,{options:o}=this.props,l=a?i:o;switch(e.key){case"Enter":((t=l[s])===null||t===void 0?void 0:t.value)!=null&&this.updateInputValue(l[s].value),this.closeMenu(),(n=this.input.current)===null||n===void 0||n.focus(),e.stopPropagation(),e.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(te.MENU_NAVIGATION_DIRECTION.UP),e.stopPropagation(),e.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(te.MENU_NAVIGATION_DIRECTION.DOWN),e.stopPropagation(),e.preventDefault();break;case"Escape":a!==""?(this.setState({filter:""}),e.stopPropagation()):this.closeMenu();break;case"Tab":!e.shiftKey&&s===l.length-1&&this.closeMenu();break}}handleMenuNavigation(e){var{filter:t,filteredOptions:n,keyboardOptionIndex:a}=this.state,{options:i}=this.props,s=t?n:i,o=s.length,l=0;switch(e){case te.MENU_NAVIGATION_DIRECTION.UP:l=-1;break;case te.MENU_NAVIGATION_DIRECTION.DOWN:l=1;break}l!==0&&this.setState({keyboardOptionIndex:(a+l+o)%o})}handleInputKeyDown(e){var{onEnter:t}=this.props,{menuIsOpen:n}=this.state;e.key==="ArrowDown"||e.key==="ArrowUp"?n||this.openMenu():e.key==="Enter"&&t()}handleInputChange(e){this.updateInputValue(e.target.value)}handleOptionClick(e){var t,n=Number(e.currentTarget.value),{filter:a,filteredOptions:i}=this.state,{options:s}=this.props,o=a?i:s;this.updateInputValue(o[n].value),this.closeMenu(),(t=this.input.current)===null||t===void 0||t.focus()}handleOptionFocus(e){this.setState({keyboardOptionIndex:Number(e.target.value)})}handleFilterChange(e){var t,{options:n}=this.props,a=e.target.value,i=this.getCachedFilteredOptions(n,a);this.setState({filter:a,filteredOptions:i,keyboardOptionIndex:0}),(t=this.popper.current)===null||t===void 0||t.scheduleUpdate()}handleMenuBlur(e){e.relatedTarget instanceof Element&&this.popper.current!=null&&this.popper.current.element.contains(e.relatedTarget)||e.relatedTarget===this.toggleButton.current||this.closeMenu(!1)}handleInputBlur(e){var{menuIsOpen:t}=this.state;t&&e.relatedTarget instanceof Element&&this.popper.current!=null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var e;this.scrollOptionIntoView(),(e=this.searchInput.current)===null||e===void 0||e.focus()}handleMenuExited(){var{menuIsOpen:e}=this.state;if(e){var t;this.setState({menuIsOpen:!1}),(t=this.popper.current)===null||t===void 0||t.hide()}this.setState({filter:""})}toggleMenu(e){var{menuIsOpen:t}=this.state;t?this.closeMenu():this.openMenu(),e.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var e;(e=this.popper.current)===null||e===void 0||e.show()})}closeMenu(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1}),t){var n;(n=this.input.current)===null||n===void 0||n.focus()}(e=this.popper.current)===null||e===void 0||e.hide()}updateKeyboardIndex(){var{value:e,filter:t,filteredOptions:n}=this.state,{options:a}=this.props,i=t?n:a,s=i.findIndex(o=>o.value===e);this.setState({keyboardOptionIndex:s})}scrollOptionIntoView(){var e,t=(e=this.menuContainer.current)===null||e===void 0?void 0:e.querySelector(".cb-option-btn.keyboard-active");t instanceof HTMLElement&&t.scrollIntoView({block:"nearest",inline:"nearest"})}renderMenuElement(){var{searchPlaceholder:e}=this.props,{filter:t,inputWidth:n}=this.state;return d.jsxs("div",{className:"cb-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:a=>{a.stopPropagation()},style:{width:n},onBlur:this.handleMenuBlur,children:[d.jsx("div",{className:"cb-search-input-container",children:d.jsx(kr,{value:t,ref:this.searchInput,onChange:this.handleFilterChange,className:"cb-search-input",placeholder:e})}),d.jsx("div",{className:"cb-options-container",children:d.jsx("div",{className:"cb-options",children:this.renderOptions()})})]})}renderOptions(){var{options:e}=this.props,{keyboardOptionIndex:t,filter:n,filteredOptions:a}=this.state,i=n?a:e;return i.map((s,o)=>{var l="option-".concat(o,"-").concat(s.value);return d.jsx("button",{type:"button",value:o,className:P("cb-option-btn",{"keyboard-active":t===o}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:s.title},l)})}render(){var{options:e,inputPlaceholder:t,disabled:n,className:a,defaultValue:i,spellCheck:s,"data-testid":o}=this.props,{value:l}=this.state,{popperOptions:u}=this.props;return u=$r({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},u),d.jsxs("div",{className:"input-group cb-container",ref:this.cbContainer,children:[d.jsx("input",{value:l||i,className:P("form-control",a,"cb-input"),ref:this.input,onChange:this.handleInputChange,placeholder:t||(e[0]!=null?e[0].title:void 0),disabled:n,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:s,"data-testid":o!==void 0?"".concat(o,"-input"):void 0}),d.jsx("div",{className:"input-group-append cb-dropdown",children:d.jsxs("button",{type:"button",className:"btn cb-btn form-control",ref:this.toggleButton,onClick:this.toggleMenu,onKeyDown:this.handleInputKeyDown,disabled:n,"data-testid":o!==void 0?"".concat(o,"-btn"):void 0,children:[d.jsx(fe,{icon:Nn}),d.jsx(at,{ref:this.popper,options:u,className:P("combobox interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})})]})}}z(te,"MENU_NAVIGATION_DIRECTION",et);z(te,"DROP_DOWN_MENU_HEIGHT",200);z(te,"propTypes",{options:M.arrayOf(M.shape({title:M.string.isRequired,value:M.string.isRequired})).isRequired,popperOptions:M.shape({title:M.string.isRequired,value:M.string.isRequired}),onChange:M.func,inputPlaceholder:M.string,searchPlaceholder:M.string,disabled:M.bool,className:M.string,defaultValue:M.string,spellCheck:M.bool,onEnter:M.func,"data-testid":M.string});z(te,"defaultProps",{onChange(){},inputPlaceholder:"",searchPlaceholder:"Search",disabled:!1,className:"",defaultValue:"",popperOptions:null,spellCheck:!0,onEnter(){},"data-testid":void 0});const yi=te;function bi(r){var{copy:e,kind:t="ghost",tooltip:n="Copy",className:a,"data-testid":i,children:s}=r,[o,l]=gr();return d.jsx(Xe,{kind:t,className:a,"data-testid":i,icon:o?xn:Dn,tooltip:o?"Copied":n,onClick:()=>{l(typeof e=="function"?e():e)},children:s})}function sn(r,e,t){return r.substring(0,e)+t+r.substring(e+1)}function Vr(r,e,t){return r.length<t?"".concat(r).concat(e.substring(r.length,t)):r}function Nt(r,e){for(var{length:t}=r,n=r.length-1;n>=0&&e[n]===r[n];n-=1)t=n;return r.substring(0,t)}function xt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function _r(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?xt(Object(t),!0).forEach(function(n){Hr(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):xt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Hr(r,e,t){return e=Wr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Wr(r){var e=Ur(r,"string");return typeof e=="symbol"?e:String(e)}function Ur(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var X=V.module("MaskedInput"),Me={FORWARD:"forward",BACKWARD:"backward",NONE:"none"},je=" ",on=E.forwardRef((r,e)=>{var{className:t,example:n,getNextSegmentValue:a=(C,S,v)=>v,getPreferredReplacementString:i=sn,onChange:s=()=>!1,onSelect:o=()=>!1,onSubmit:l,pattern:u,placeholder:c,selection:h,value:m,onFocus:b=()=>!1,onBlur:y=()=>!1,"data-testid":w}=r,T=Xt(e),N=g.useMemo(()=>Array.isArray(n)?n:[n],[n]),_=g.useMemo(()=>N[0].replace(/[a-zA-Z0-9]/g,je),[N]);g.useEffect(function(){if(h!=null){var S;X.debug("setting selection...",h);var{selectionStart:v,selectionEnd:I,selectionDirection:D}=h;(S=T.current)===null||S===void 0||S.setSelectionRange(v,I,D),X.debug("selection set!")}},[h,T]);var k=g.useCallback(C=>{for(var S=C,v=C,I=N.length>0?N[0]:m,D=S-1;D>=0&&/[a-zA-Z0-9]/g.test(I.charAt(D));D-=1)S=D;for(var G=v;G<I.length&&/[a-zA-Z0-9]/g.test(I.charAt(G));G+=1)v=G+1;var Ae=S===v?Me.NONE:Me.BACKWARD;return{selectionStart:S,selectionEnd:v,selectionDirection:Ae}},[N,m]);function H(C,S){for(var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C.length,I="",D=0;D<v;D+=1)C.charAt(D)!==je?I=I.concat(C[D]):I=I.concat(S[D]);return I=I.concat(S.substring(v)),I}function W(C){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C.length,v=new RegExp("^".concat(u,"$"));if(v.test(C))return!0;for(var I=0;I<N.length;I+=1){var D=H(C,N[I],S);if(v.test(D))return!0}return!1}function A(C){var S=k(C),v=S.selectionEnd+1;return v>=m.length?S:k(v)}function U(C){var S=k(C),v=S.selectionStart-1;return v<=0?S:k(v)}function q(C,S){var v=k(C),I=m.substring(v.selectionStart,v.selectionEnd),D=a(v,S,I,m),G=m.substring(0,v.selectionStart)+D+m.substring(v.selectionEnd);W(G,v.selectionEnd)&&(s(G),o(v))}var ge=g.useCallback(C=>{var{selectionStart:S=0,selectionEnd:v=0,selectionDirection:I="none"}=C.target;if(S===null||v===null||I===null){X.error("Selection attempted on non-text input element",C.target);return}if(X.debug2("handleSelect",S,v,I),!(h!=null&&S===h.selectionStart&&v===h.selectionEnd)){if(h!=null&&S===m.length&&v===m.length&&C.nativeEvent.type!=="mouseup"){o(_r({},h));return}if(S===v){var D=k(S);X.debug("Selection segment from ",S,v,"=>",D),o(D)}else o({selectionStart:S,selectionEnd:v,selectionDirection:I})}},[k,o,h,m]),ye=g.useCallback(C=>{var S;if(T.current){X.debug("handleSelectCapture",C);var v=(S=T.current.selectionStart)!==null&&S!==void 0?S:0;v===m.length&&h!=null&&v!==h.selectionStart&&(C.preventDefault(),C.stopPropagation())}},[T,h,m]);function me(C){if(C.preventDefault(),C.stopPropagation(),!!T.current){var{key:S}=C,{selectionStart:v=0,selectionEnd:I=0}=T.current;if(v===null||I===null){X.error("Selection arrow nvaigation attempted on non-text input element",C.target);return}S==="ArrowLeft"?o(U(v)):S==="ArrowRight"?o(A(I)):S==="ArrowUp"?q(v,-1):S==="ArrowDown"&&q(v,1)}}function be(C){if(T.current){X.debug("handleKeyDown",C);var{key:S}=C,{selectionStart:v=0,selectionEnd:I=0}=T.current;if(v===null||I===null){X.error("Selection key event on non-text input element",C.target);return}if(S==="Enter"){l==null||l(C);return}if(S.startsWith("Arrow")){me(C);return}if(S==="Delete"||S==="Backspace"){if(C.preventDefault(),C.stopPropagation(),I>=Nt(m,_).length){var D=m.substring(0,v===I?v-1:v),G=Nt(D,_);G!==m&&(s(G),o({selectionStart:G.length,selectionEnd:G.length,selectionDirection:Me.NONE}));return}if(v!==I){var Ae=m.substring(0,v)+m.substring(v,I).replace(/[a-zA-Z0-9]/g,je)+m.substring(I);X.debug("Range ",v,I,"deleted, setting value",Ae),s(Ae),o({selectionStart:v,selectionEnd:v,selectionDirection:Me.NONE})}else if(v>0)for(var Se=v-1;Se>=0;Se-=1){var ht=m.substring(0,Se)+m.substring(Se,v).replace(/[a-zA-Z0-9]/g,je)+m.substring(v);if(ht!==m){s(ht),o({selectionStart:Se,selectionEnd:Se,selectionDirection:Me.NONE});return}}return}if(!(C.altKey||C.metaKey||C.ctrlKey||S.length>1)){C.preventDefault(),C.stopPropagation();for(var ft=Array.from(new Set([S,S.toUpperCase(),S.toLowerCase()])),We=0;We<ft.length;We+=1)for(var mt=ft[We],yn=/[a-zA-Z0-9]/g.test(mt)?N[0].length-1:v,se=v;se<=yn;se+=1){var bn=Vr(m,N[0],se+1),Ue=i(bn,se,mt,v,I);if(W(Ue,se+1)){var pt=k(se),qe=se+1,Ge={selectionStart:qe,selectionEnd:qe,selectionDirection:Me.NONE};if(qe>=pt.selectionEnd){var vt=A(se);vt.selectionStart!==pt.selectionStart&&(Ge=vt)}X.debug("handleKeyDown",S,"=>",Ue,Ge),s(Ue),o(Ge);return}}}}}return d.jsx("input",{ref:T,className:P("form-control masked-input",t),type:"text",pattern:u,placeholder:c,value:m,onChange:()=>{},onKeyDown:be,onSelect:ge,onSelectCapture:ye,onFocus:b,onBlur:y,"data-testid":w})});on.defaultProps={className:"",placeholder:void 0,onChange(){},onSelect(){},getNextSegmentValue:(r,e,t)=>t,getPreferredReplacementString:sn,selection:void 0,onFocus(){},onBlur(){},"data-testid":void 0};const qr=on;function Dt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function Gr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Dt(Object(t),!0).forEach(function(n){Pe(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Dt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Pe(r,e,t){return e=zr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function zr(r){var e=Qr(r,"string");return typeof e=="symbol"?e:String(e)}function Qr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}let ln=class extends g.PureComponent{constructor(e){var t;super(e),Pe(this,"container",void 0),Pe(this,"oldFocus",void 0),Pe(this,"rAF",void 0),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.container=E.createRef(),this.oldFocus=document.activeElement,this.rAF=0;var{options:n}=e,a=(t=n.initialKeyboardIndex)!==null&&t!==void 0?t:-1;this.state={menuItems:[],keyboardIndex:a,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.rAF=window.requestAnimationFrame(()=>{var e;(e=this.container.current)===null||e===void 0||e.focus();var{onMenuOpened:t}=this.props;t(this)})}componentDidUpdate(e){var{actions:t}=this.props;e.actions!==t&&this.initMenu()}componentWillUnmount(){cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var{options:e}=this.props;if(e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse){var{keyboardIndex:t}=this.state;return t}return this.getMouseIndex()}setKeyboardIndex(e){var{options:t}=this.props;t.separateKeyboardMouse!==void 0&&t.separateKeyboardMouse?this.setState({keyboardIndex:e}):this.setMouseIndex(e)}getMouseIndex(){var{mouseIndex:e}=this.state;return e}setMouseIndex(e){this.setState({mouseIndex:e})}initMenu(){cancelAnimationFrame(this.rAF),this.setState({menuItems:[]});var{actions:e}=this.props,t=j.getMenuItems(e,!1);t.length>0&&this.setState(n=>({menuItems:j.sortActions(n.menuItems.concat(t))}))}handleKeyDown(e){var{menuItems:t}=this.state,n=this.getKeyboardIndex(),a=n;if(e.key==="Enter"||e.key===" "){n!=null&&n>=0&&n<t.length&&this.handleMenuItemClick(t[n],e);return}if(e.key==="Escape")a=null;else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey===!0){var i;a=j.getNextMenuItem((i=a)!==null&&i!==void 0?i:0,-1,t)}else if(e.key==="ArrowDown"||e.key==="Tab"&&e.shiftKey===!1){var s;a=j.getNextMenuItem((s=a)!==null&&s!==void 0?s:0,1,t)}n!==a&&(a!==null?this.setKeyboardIndex(a):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,{closeMenu:t,onMenuClosed:n}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{t(e),n(this)})}handleCloseMenu(){this.closeMenu()}handleMenuItemClick(e,t){t.preventDefault(),t.stopPropagation(),e!=null&&(e.disabled===void 0||!e.disabled)&&e.action!=null&&(e.action(),this.closeMenu(!0))}handleMenuItemMouseMove(e){var{menuItems:t}=this.state,n=t.indexOf(e);this.setMouseIndex(n)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var e=[],{"data-testid":t}=this.props,{keyboardIndex:n,menuItems:a,mouseIndex:i}=this.state,s=0;s<a.length;s+=1){var o=a[s];s>0&&o.group!==a[s-1].group&&e.push(d.jsx("hr",{},"".concat(s,".separator")));var l=d.jsx(nn,{isKeyboardSelected:n===s,isMouseSelected:i===s,menuItem:o,closeMenu:this.handleCloseMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:()=>!1},s);e.push(l)}var{menuStyle:u}=this.props;return d.jsx("div",{className:"context-menu-container",style:Gr({},u),ref:this.container,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,role:"menuitem",tabIndex:0,"data-testid":t,children:e})}};Pe(ln,"defaultProps",{closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const Zr=ln;function Ft(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function At(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ft(Object(t),!0).forEach(function(n){Ee(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ft(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Ee(r,e,t){return e=Xr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Xr(r){var e=Jr(r,"string");return typeof e=="symbol"?e:String(e)}function Jr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class un extends g.PureComponent{constructor(e){super(e),Ee(this,"container",void 0),Ee(this,"parent",void 0),Ee(this,"popper",void 0),Ee(this,"isOpen",void 0),this.handleClick=this.handleClick.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.handleExited=this.handleExited.bind(this),this.container=E.createRef(),this.parent=null,this.popper=E.createRef(),this.isOpen=!1}componentDidMount(){var{isShown:e}=this.props;if(e===null){var t;(t=this.container.current)!==null&&t!==void 0&&t.parentElement&&(this.parent=this.container.current.parentElement,this.parent.addEventListener("click",this.handleClick))}else e&&this.openMenu()}componentDidUpdate(e){var{isShown:t}=this.props;e.isShown!==t&&(t!==null&&t?window.requestAnimationFrame(()=>{this.openMenu()}):this.closeMenu())}componentWillUnmount(){this.parent&&this.parent.removeEventListener("click",this.handleClick)}closeMenu(){var e;(e=this.popper.current)===null||e===void 0||e.hide()}openMenu(){this.popper.current&&!this.isOpen&&(this.popper.current.show(),this.isOpen=!0)}scheduleUpdate(){var e;(e=this.popper.current)===null||e===void 0||e.scheduleUpdate()}handleClick(e){e.preventDefault(),e.stopPropagation(),this.openMenu()}handleCloseMenu(){this.closeMenu()}handleExited(){this.isOpen=!1;var{onMenuClosed:e}=this.props;e()}render(){var{actions:e,onMenuOpened:t,popperClassName:n,"data-testid":a}=this.props,{menuStyle:i}=this.props,{options:s,popperOptions:o}=this.props;return o=At({placement:"bottom"},o),s=At({separateKeyboardMouse:!0},s),d.jsx("div",{className:"menu-actions-listener",ref:this.container,"data-testid":a,children:d.jsx(at,{ref:this.popper,options:o,className:P("menu-popper",n),onExited:this.handleExited,closeOnBlur:!0,interactive:!0,children:d.jsx(Zr,{actions:e,closeMenu:this.handleCloseMenu,onMenuOpened:t,options:s,menuStyle:i})})})}}Ee(un,"defaultProps",{isShown:null,onMenuClosed(){},onMenuOpened(){},options:{},popperOptions:{},popperClassName:"",menuStyle:{},"data-testid":void 0});const Mi=un;function Ce(r,e,t,n,a){var i=n-t+1,s=((parseInt(e,10)-r-t)%i+i)%i+t;return"".concat(s).padStart(a,"0")}function Yr(r,e,t){var{selectionStart:n}=r;return n===0?Ce(e,t,1900,2099,4):n===5?Ce(e,t,1,12,2):n===8?Ce(e,t,1,31,2):n===11?Ce(e,t,0,23,2):n===17||n===14?Ce(e,t,0,59,2):n===20||n===24||n===28?Ce(e,t,0,999,3):t}function tt(r){var e=r.substring(0,23),t=r.substring(23,26),n=r.substring(26);return[e,t,n].filter(a=>a!=="").join("")}var ea=V.module("DateTimeInput"),ta="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",na="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{3}[0-9]{3}[0-9]{3}",ra="".concat(ta," ").concat(na),ke="2022-01-01",cn="".concat(ke," 00:00:00.000000000"),aa="YYYY-MM-DD HH:MM:SS.SSSSSSSSS";function Rt(r){return r!=null&&r.length>=ke.length?"".concat(r.substring(0,ke.length)).concat(r.substring(ke.length).replace(/\u2007/g,"0")).concat(cn.substring(r.length)):r}function jt(r){return r.replace(/\u200B/g,"")}var ia=[tt(cn)],lt=E.forwardRef((r,e)=>{var{className:t="",onChange:n=()=>{},defaultValue:a="",onFocus:i=()=>{},onBlur:s=()=>{},onSubmit:o,"data-testid":l}=r,[u,c]=g.useState(a.length>0?tt(a):""),[h,m]=g.useState(),b=g.useCallback(w=>{ea.debug("handleChange",w),c(w),n(Rt(jt(w)))},[n]),y=g.useCallback(()=>{var w=jt(u),T=Rt(w);T!==w&&c(tt(T)),s()},[u,s]);return d.jsx("div",{className:"d-flex flex-row align-items-center",children:d.jsx(qr,{ref:e,className:P(t),example:ia,getNextSegmentValue:Yr,onChange:b,onSelect:m,onSubmit:o,pattern:ra,placeholder:aa,selection:h,value:u,onFocus:i,onBlur:y,"data-testid":l})})});lt.displayName="DateTimeInput";lt.defaultProps={className:"",onChange:()=>{},defaultValue:"",onFocus:()=>{},onBlur:()=>{},"data-testid":void 0};const Ci=lt;function dn(r,e,t){return e=sa(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function sa(r){var e=oa(r,"string");return typeof e=="symbol"?e:String(e)}function oa(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var la=V.module("ItemListItem");class _e extends g.Component{static handleKeyDown(){return la.log("ItemListItem.handleKeyDown false"),!1}constructor(e){super(e),dn(this,"itemRef",void 0),this.handleBlur=this.handleBlur.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleClick=this.handleClick.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleDragStart=this.handleDragStart.bind(this),this.handleDrag=this.handleDrag.bind(this),this.handleDragOver=this.handleDragOver.bind(this),this.handleDragEnd=this.handleDragEnd.bind(this),this.handleDrop=this.handleDrop.bind(this),this.handleDoubleClick=this.handleDoubleClick.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.itemRef=E.createRef()}handleBlur(e){var{itemIndex:t,onBlur:n}=this.props;n(t,e)}handleFocus(e){var{itemIndex:t,onFocus:n}=this.props;n(t,e)}handleClick(e){var{itemIndex:t,onClick:n}=this.props;n(t,e)}handleContextMenu(e){var{itemIndex:t,onContextMenu:n}=this.props;n(t,e)}handleDragStart(e){var{itemIndex:t,onDragStart:n}=this.props;n(t,e)}handleDrag(e){var{itemIndex:t,onDrag:n}=this.props;n(t,e)}handleDragOver(e){e.preventDefault();var{itemIndex:t,onDragOver:n}=this.props;n(t,e)}handleDragEnd(e){var{itemIndex:t,onDragEnd:n}=this.props;n(t,e)}handleDrop(e){var{itemIndex:t,onDrop:n}=this.props;n(t,e)}handleDoubleClick(e){var{itemIndex:t,onDoubleClick:n}=this.props;n(t,e)}handleMouseMove(e){var{itemIndex:t,onMouseMove:n}=this.props;n(t,e)}handleMouseDown(e){var{itemIndex:t,onMouseDown:n}=this.props;n(t,e)}handleMouseUp(e){var{itemIndex:t,onMouseUp:n}=this.props;n(t,e)}render(){var{isDraggable:e,isFocused:t,isSelected:n,style:a,children:i,"data-testid":s}=this.props;return d.jsx("div",{className:P("item-list-item",{active:n},{"is-focused":t},{"is-draggable":e}),onKeyDown:_e.handleKeyDown,onContextMenuCapture:this.handleContextMenu,onClick:this.handleClick,onDrag:this.handleDrag,onDragStart:this.handleDragStart,onDragOver:this.handleDragOver,onDragEnd:this.handleDragEnd,onDrop:this.handleDrop,onDoubleClick:this.handleDoubleClick,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,tabIndex:-1,ref:this.itemRef,role:"listitem",style:a,onFocus:this.handleFocus,onBlur:this.handleBlur,draggable:e,"data-testid":s,children:i})}}dn(_e,"defaultProps",{children:null,isDraggable:!1,isFocused:!1,isSelected:!1,itemIndex:0,"data-testid":void 0,onBlur(){},onClick(){},onContextMenu(){},onDragStart(){},onDrag(){},onDragOver(){},onDragEnd(){},onDrop(){},onDoubleClick(){},onFocus(){},onMouseDown(){},onMouseMove(){},onMouseUp(){},style:{}});const ua=_e;function Lt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function kt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Lt(Object(t),!0).forEach(function(n){Q(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Lt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Q(r,e,t){return e=ca(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ca(r){var e=da(r,"string");return typeof e=="symbol"?e:String(e)}function da(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var $t=V.module("ItemList"),Kt=5;class Z extends g.PureComponent{static renderItem(e){var t,n,{item:a}=e;return d.jsx("div",{className:"item-list-item-content",children:a!=null&&((t=(n=a.displayValue)!==null&&n!==void 0?n:a.value)!==null&&t!==void 0?t:"".concat(a))})}constructor(e){super(e),Q(this,"list",void 0),Q(this,"listContainer",void 0),Q(this,"getItemSelected",J((a,i)=>le.isSelected(i,a),{max:Z.CACHE_SIZE})),Q(this,"getCachedItem",J((a,i,s,o,l,u,c,h)=>{var m=u({item:s,itemIndex:a,isFocused:o,isSelected:l,style:c});return d.jsx(ua,{onContextMenu:this.handleItemContextMenu,onDoubleClick:this.handleItemDoubleClick,onMouseDown:this.handleItemMouseDown,onFocus:this.handleItemFocus,onBlur:this.handleItemBlur,disableSelect:h,onMouseMove:this.handleItemMouseMove,onMouseUp:this.handleItemMouseUp,isFocused:o,isSelected:l,itemIndex:a,style:c,children:m},i)},{max:Z.CACHE_SIZE})),Q(this,"getOuterElement",J(a=>{var i=E.forwardRef((s,o)=>d.jsx("div",kt({ref:o,tabIndex:-1,onKeyDown:a,role:"presentation"},s)));return i.displayName="ItemListOuterElement",i})),Q(this,"getInnerElement",J(()=>{var a=E.forwardRef((i,s)=>d.jsx("div",kt({className:"item-list-inner-element",ref:s},i)));return a.displayName="ItemListInnerElement",a})),Q(this,"getItemData",J((a,i,s)=>({items:a,selectedRanges:i,renderItem:s}))),this.handleItemBlur=this.handleItemBlur.bind(this),this.handleItemContextMenu=this.handleItemContextMenu.bind(this),this.handleItemFocus=this.handleItemFocus.bind(this),this.handleItemDoubleClick=this.handleItemDoubleClick.bind(this),this.handleItemMouseDown=this.handleItemMouseDown.bind(this),this.handleItemMouseMove=this.handleItemMouseMove.bind(this),this.handleItemMouseUp=this.handleItemMouseUp.bind(this),this.handleItemsRendered=this.handleItemsRendered.bind(this),this.handleWindowMouseUp=this.handleWindowMouseUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleResize=this.handleResize.bind(this),this.renderInnerElement=this.renderInnerElement.bind(this),this.list=E.createRef(),this.listContainer=E.createRef();var{isStickyBottom:t,selectedRanges:n}=e;this.state={focusIndex:null,mouseDownIndex:null,selectedRanges:n,overscanStartIndex:0,height:null,isDragging:!1,isStuckToBottom:t,scrollOffset:null,mouseX:null,mouseY:null}}componentDidUpdate(e,t){var{selectedRanges:n,itemCount:a}=this.props,{focusIndex:i,isStuckToBottom:s,scrollOffset:o,height:l,selectedRanges:u}=this.state;if(s&&!this.isListAtBottom()&&a>0&&this.scrollToBottom(),(o!==t.scrollOffset||l!==t.height)&&this.sendViewportUpdate(),n!==e.selectedRanges&&n!==u)this.setSelectedRanges(n);else if(u!==t.selectedRanges){var{onSelectionChange:c}=this.props;c(u)}if(i!==t.focusIndex){var{onFocusChange:h}=this.props;h(i)}}componentWillUnmount(){window.removeEventListener("mouseup",this.handleWindowMouseUp)}focus(){var e;(e=this.listContainer.current)===null||e===void 0||e.focus()}restoreScrollPosition(){var{scrollOffset:e}=this.state;if(e!=null){var t;(t=this.listContainer.current)===null||t===void 0||t.scrollTo(0,e)}}getElement(e){if(this.listContainer.current==null)return null;var{focusSelector:t}=this.props,{overscanStartIndex:n}=this.state,a=this.listContainer.current.querySelectorAll(t),i=e-n;return a[i]}focusItem(e){var{disableSelect:t}=this.props;if(!t){this.setState({focusIndex:e});var n=this.getElement(e);n instanceof HTMLElement&&n.focus()}}scrollToItem(e){var t=this.getElement(e);t!=null&&t.scrollIntoView({block:"center"})}handleItemContextMenu(e,t){var{selectedRanges:n}=this.state,a=le.isSelected(n,e),i=a||j.isModifierKeyDown(t);this.toggleSelect(e,t.shiftKey,i,!1)}handleItemDoubleClick(e,t){var{isDoubleClickSelect:n,onSelect:a}=this.props;n&&this.setState(i=>{var{selectedRanges:s}=i;return{selectedRanges:le.selectRange(s,[e,e])}},()=>{a(e,t)})}handleItemMouseDown(e,t){var{selectedRanges:n}=this.state;if(!(t.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(t.target.tagName.toLowerCase())!==-1)){if(t.button===2&&n.length===0){this.focusItem(e),this.selectItem(e);return}t.button!=null&&t.button!==0||(this.setState({mouseDownIndex:e,mouseX:t.clientX,mouseY:t.clientY}),window.addEventListener("mouseup",this.handleWindowMouseUp))}}handleItemBlur(e,t){$t.debug2("item blur",e,t.currentTarget,t.relatedTarget),(!t.relatedTarget||this.listContainer.current&&t.relatedTarget instanceof HTMLElement&&!this.listContainer.current.contains(t.relatedTarget))&&this.setState({focusIndex:null})}handleItemFocus(e,t){$t.debug2("item focus",e,t.target),this.setState(n=>{var{focusIndex:a}=n;return a!==e?{focusIndex:e}:null})}handleItemMouseMove(e,t){var{isDragSelect:n,isMultiSelect:a,disableSelect:i}=this.props,{mouseDownIndex:s,selectedRanges:o,mouseX:l,mouseY:u}=this.state;if(!(s==null||i)){var c=Math.abs(t.clientX-(l??0)),h=Math.abs(t.clientY-(u??0));c>Kt&&h>Kt&&this.setState({isDragging:!0}),(n||s===e)&&(this.focusItem(e),a?(!n&&!this.getItemSelected(e,o)&&!j.isModifierKeyDown(t)&&this.deselectAll(),this.selectRange([Math.min(s,e),Math.max(s,e)])):this.toggleSelect(e,t.shiftKey,j.isModifierKeyDown(t),!1))}}handleItemMouseUp(e,t){var{isDeselectOnClick:n,isDoubleClickSelect:a,onSelect:i}=this.props,{mouseDownIndex:s,isDragging:o}=this.state;if(!(t.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(t.target.tagName.toLowerCase())!==-1)){if(s===e&&!o){var l=t.shiftKey,u=j.isModifierKeyDown(t);this.focusItem(e),this.toggleSelect(e,l,u,n),!a&&!l&&!u&&i(e,t)}this.resetMouseState()}}handleItemsRendered(e){var{overscanStartIndex:t}=e;this.setState({overscanStartIndex:t})}handleResize(e){var{height:t}=e;this.setState({height:t})}handleMouseLeave(){this.setState({mouseDownIndex:null})}handleWindowMouseUp(){this.resetMouseState(),window.removeEventListener("mouseup",this.handleWindowMouseUp)}handleKeyDown(e){var{isMultiSelect:t,itemCount:n,onSelect:a}=this.props,{focusIndex:i}=this.state,s=i;if(e.key==="Enter"||e.key===" "){!t&&s!=null&&this.setState({selectedRanges:[[s,s]]},()=>{s!=null&&a(s,e)});return}if(e.key==="ArrowUp")s!=null&&s>=0?s=Math.max(0,s-1):s=n-1;else if(e.key==="ArrowDown")s!=null&&s>=0?s=Math.min(s+1,n-1):s=0;else return;if(i!==s){e.stopPropagation(),e.preventDefault(),this.focusItem(s);var{selectedRanges:o}=this.state;if(e.shiftKey&&o.length>0){var l=o[o.length-1];this.selectRange([Math.min(s,l[0]),Math.max(s,l[1])])}else if(this.deselectAll(),s!==null)this.selectItem(s);else{var u;(u=this.listContainer.current)===null||u===void 0||u.focus()}this.scrollIntoView(s)}}handleScroll(e){var{scrollUpdateWasRequested:t,scrollOffset:n}=e;this.setState(a=>{if(t)return{scrollOffset:n};var{isStickyBottom:i}=this.props,{height:s}=a,o=i&&this.isListAtBottom({scrollOffset:n,height:s});return{isStuckToBottom:o,scrollOffset:n}})}resetMouseState(){this.setState({mouseDownIndex:null,isDragging:!1})}scrollToBottom(){var{itemCount:e}=this.props;this.list.current&&this.list.current.scrollToItem(e)}scrollIntoView(e){this.list.current&&this.list.current.scrollToItem(e)}toggleSelect(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,{isMultiSelect:i}=this.props,{selectedRanges:s}=this.state;if(i&&t&&s.length>0){var o=s[s.length-1];this.selectRange([Math.min(o[0],e),Math.max(e,o[1])])}else i&&s.length===1&&s[0][0]===e&&s[0][1]===e?a&&this.deselectItem(e):i&&n?this.getItemSelected(e,s)?a&&this.deselectItem(e):this.selectItem(e):(this.deselectAll(),this.selectItem(e))}deselectAll(){var{itemCount:e}=this.props;this.deselectRange([0,e])}deselectItem(e){this.deselectRange([e,e])}deselectRange(e){le.validateRange(e),this.setState(t=>{var{selectedRanges:n}=t;return{selectedRanges:le.deselectRange(n,e)}})}selectItem(e){var{disableSelect:t}=this.props;t||this.selectRange([e,e])}selectRange(e){le.validateRange(e),this.setState(t=>{var{selectedRanges:n}=t;return{selectedRanges:le.selectRange(n,e)}})}setSelectedRanges(e){this.setState({selectedRanges:e})}sendViewportUpdate(){var{scrollOffset:e,height:t}=this.state;if(e!=null&&t!=null){var{onViewportChange:n,rowHeight:a}=this.props,i=Math.floor(e/a),s=i+Math.ceil(t/a);n(i,s)}}isListAtBottom(){var{scrollOffset:e,height:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.state;if(t==null||e==null)return!1;var{itemCount:n,rowHeight:a}=this.props;return e+t>=n*a}renderInnerElement(e){var{index:t,style:n}=e,{items:a,offset:i,renderItem:s,disableSelect:o}=this.props,{focusIndex:l,selectedRanges:u}=this.state;if(t<i||t>=i+a.length)return null;var c=a[t-i];return this.getCachedItem(t,t,c,t===l&&!o,this.getItemSelected(t,u),s,n,o)}render(){var{items:e,itemCount:t,overscanCount:n,renderItem:a,rowHeight:i,"data-testid":s}=this.props,{selectedRanges:o,isStuckToBottom:l}=this.state;return d.jsx(Cn,{className:"item-list-auto-sizer",onResize:this.handleResize,children:u=>{var{width:c,height:h}=u;return d.jsx(wn,{className:"item-list-scroll-pane",height:h,width:c,initialScrollOffset:l?t*i:0,itemCount:t,itemSize:i,itemData:this.getItemData(e,o,a),onScroll:this.handleScroll,onItemsRendered:this.handleItemsRendered,ref:this.list,outerElementType:this.getOuterElement(this.handleKeyDown),outerRef:this.listContainer,innerElementType:this.getInnerElement(),overscanCount:n,"data-testid":s,children:this.renderInnerElement})}})}}Q(Z,"CACHE_SIZE",1e3);Q(Z,"DEFAULT_ROW_HEIGHT",20);Q(Z,"DEFAULT_OVERSCAN",10);Q(Z,"defaultProps",{offset:0,items:[],rowHeight:Z.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!1,isDragSelect:!0,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},overscanCount:Z.DEFAULT_OVERSCAN,renderItem:Z.renderItem,selectedRanges:[],focusSelector:".item-list-item","data-testid":void 0});function Bt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function oe(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Bt(Object(t),!0).forEach(function(n){pe(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Bt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function pe(r,e,t){return e=ha(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ha(r){var e=fa(r,"string");return typeof e=="symbol"?e:String(e)}function fa(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class ne extends g.PureComponent{static renderHandle(){return d.jsxs("div",{children:[d.jsx(Zt,{children:"Drag to re-order"}),d.jsx(fe,{icon:Fn})]})}static renderBadge(e){var{text:t}=e;return t!=null&&t.length>0?d.jsx("span",{className:"number-badge",children:t}):null}static renderTextItem(e){var{text:t,badgeText:n="",className:a=""}=e;return d.jsxs("div",{className:P("item-list-item-content","draggable-item-list-item-content",a),children:[d.jsx("span",{className:"title",children:t}),ne.renderBadge({text:n}),ne.renderHandle()]})}static renderItem(e){var t,n,{item:a,isClone:i,selectedCount:s}=e,o=a!=null?(t=(n=a.displayValue)!==null&&n!==void 0?n:a.value)!==null&&t!==void 0?t:"".concat(a):"",l=i!==void 0&&i?"".concat(s):"",u=i!==void 0&&i?"item-list-item-clone":"";return ne.renderTextItem({text:o,badgeText:l,className:u})}static getDraggableId(e,t){return"".concat(e,"/").concat(t)}static getDraggableIndex(e){var t=e.split("/").pop();return parseInt(t!==void 0?t:"",10)}constructor(e){super(e),pe(this,"itemList",void 0),pe(this,"getCachedDraggableItem",J((t,n,a,i,s,o,l,u)=>d.jsx(Tn,{draggableId:ne.getDraggableId(t,i),index:i,isDragDisabled:l,children:c=>d.jsx("div",oe(oe(oe({role:"menuitem",className:"draggable-item-list-item",ref:c.innerRef,tabIndex:-1},c.draggableProps),c.dragHandleProps),{},{children:n({item:a,itemIndex:i,isFocused:s,isSelected:o,style:u,isClone:!1})}))},i),{max:Z.CACHE_SIZE})),pe(this,"getCachedRenderDraggableItem",J((t,n,a)=>i=>{var{item:s,itemIndex:o,isFocused:l,isSelected:u,style:c}=i;return this.getCachedDraggableItem(t,a,s,o,l,u,n,c)},{max:1})),pe(this,"getCachedRenderClone",J((t,n,a,i)=>(s,o,l)=>{var{selectedCount:u}=this.state,{draggableProps:c,dragHandleProps:h,innerRef:m}=s,{index:b}=l.source,y=n[b-a];return d.jsx("div",oe(oe(oe({className:P("draggable-item-list-dragging-item-container",t)},c),h),{},{ref:m,children:d.jsx("div",{className:P("draggable-item-list-dragging-item",{"two-dragged":u===2},{"multiple-dragged":u>2}),children:i({item:y,itemIndex:b,isFocused:!1,isSelected:!0,style:{},isClone:!0,selectedCount:u})})}))},{max:1})),this.handleSelectionChange=this.handleSelectionChange.bind(this),this.itemList=E.createRef(),this.state={selectedCount:0}}selectItem(e){var t;(t=this.itemList.current)===null||t===void 0||t.selectItem(e)}focusItem(e){var t;(t=this.itemList.current)===null||t===void 0||t.focusItem(e)}scrollToItem(e){var t;(t=this.itemList.current)===null||t===void 0||t.scrollToItem(e)}handleSelectionChange(e){this.setState({selectedCount:le.count(e)});var{onSelectionChange:t}=this.props;t(e)}render(){var{className:e,draggablePrefix:t,draggingItemClassName:n,droppableId:a,isDoubleClickSelect:i,isDragDisabled:s,isDropDisabled:o,isMultiSelect:l,isStickyBottom:u,itemCount:c,items:h,offset:m,onFocusChange:b,onSelect:y,onViewportChange:w,renderItem:T,rowHeight:N,selectedRanges:_,style:k,"data-testid":H}=this.props;return d.jsx(En,{isDropDisabled:o,droppableId:a,mode:"virtual",renderClone:this.getCachedRenderClone(n,h,m,T),"data-testid":H,children:(W,A)=>d.jsx("div",oe(oe({role:"menu",className:P("draggable-item-list",e,{"is-drop-disabled":o,"is-drag-disabled":s,"is-dragging-from-this":A.draggingFromThisWith,"is-dragging-over":A.isDraggingOver,"is-dropping":A.draggingOverWith}),style:k,ref:W.innerRef},W.droppableProps),{},{children:d.jsx(Z,{focusSelector:".draggable-item-list-item",isDoubleClickSelect:i,isDragSelect:!1,isMultiSelect:l,isStickyBottom:u,itemCount:c,items:h,onFocusChange:b,onSelect:y,onSelectionChange:this.handleSelectionChange,onViewportChange:w,offset:m,ref:this.itemList,renderItem:this.getCachedRenderDraggableItem(t,s,T),rowHeight:N,selectedRanges:_})}))})}}pe(ne,"DEFAULT_ROW_HEIGHT",30);pe(ne,"defaultProps",{className:"",draggingItemClassName:"",offset:0,items:[],rowHeight:ne.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!0,isDropDisabled:!1,isDragDisabled:!1,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,style:null,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},renderItem:ne.renderItem,selectedRanges:[],draggablePrefix:"draggable-item",droppableId:"droppable-item-list","data-testid":void 0});const wi=ne;class $e{static reorder(e,t,n,a){var i=e===n?$e.adjustDestinationIndex(a,t):a,s=$e.removeItems(e,t);return n.splice(i,0,...s),s}static removeItems(e,t){for(var n=[],a=t.map((c,h)=>({range:c,index:h})).sort((c,h)=>h.range[0]-c.range[0]),i=0;i<a.length;i+=1){var{range:s,index:o}=a[i],[l,u]=s;n[o]=e.splice(l,u-l+1)}return In(n)}static adjustDestinationIndex(e,t){for(var n=e,a=0;a<t.length;a+=1){var[i,s]=t[a];if(i>e)break;n-=Math.min(s,e-1)-i+1}return n}static startDragging(){document.documentElement.classList.add("drag-pointer-events-none")}static stopDragging(){document.documentElement.classList.remove("drag-pointer-events-none")}}const Ti=$e;function ma(r){var{on:e,id:t,className:n,isInvalid:a,disabled:i=!1,onClick:s,"data-testid":o}=r;return d.jsx("button",{type:"button",className:P("btn","btn-switch",n,{active:e},{"is-invalid":a}),id:t,onClick:s,disabled:i,"data-testid":o,children:d.jsx("div",{className:"handle"})})}function Vt(r){return r.isOn!==void 0}function pa(r){var{item:e,onSelect:t=()=>{},"data-testid":n}=r,{icon:a,subtitle:i,title:s}=e,o=g.useMemo(()=>Vt(e)?()=>{e.onChange(!e.isOn)}:t,[e,t]);return d.jsxs("div",{className:"btn btn-navigation-menu-item","data-testid":"menu-item-".concat(s),onClick:o,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&o()},tabIndex:0,role:"menuitem",children:[a!==void 0&&d.jsx("div",{className:"icon",children:d.jsx(fe,{icon:a})}),d.jsx("div",{className:"title",children:s}),i!==void 0&&d.jsx("div",{className:"shortcut",children:i}),d.jsx("div",{className:"accessory","data-testid":n,children:Vt(e)?d.jsx(ma,{on:e.isOn,onClick:l=>{l.stopPropagation(),o()}}):d.jsx(fe,{icon:Qt})})]})}function Ei(r){var{items:e,onSelect:t=()=>{},"data-testid":n}=r;return d.jsx("div",{className:"navigation-menu-view","data-testid":n,children:d.jsx("ul",{className:"navigation-menu-list",children:e.map((a,i)=>d.jsx("li",{children:d.jsx(pa,{item:a,onSelect:()=>{t(i)}})},a.title))})})}function Ii(r){var{children:e,onBack:t,onClose:n,title:a,"data-testid":i}=r;return d.jsxs("div",{className:"navigation-page","data-testid":i,children:[d.jsxs("div",{className:"navigation-title-bar",children:[d.jsx("div",{className:"navigation-left-buttons",children:t!==void 0&&d.jsx(Xe,{kind:"ghost",className:"btn-back","data-testid":"btn-page-back",onClick:t,icon:An,children:"Back"})}),d.jsx("div",{className:"navigation-title",children:a}),d.jsx("div",{className:"navigation-right-buttons",children:n!==void 0&&d.jsx(Xe,{kind:"ghost",className:"btn-close px-2 m-1","data-testid":"btn-page-close",onClick:n,icon:Rn,tooltip:"Close"})})]}),d.jsx("div",{className:"navigation-content",children:e})]})}function Oi(r){var{children:e,"data-testid":t}=r,n=g.useMemo(()=>E.Children.toArray(e),[e]),a=er(n),[i,s]=g.useState(n[n.length-1]),[o,l]=g.useState(null),[u,c]=g.useState(null);g.useEffect(function(){if(!(a===void 0||n===a)){var y=n[n.length-1];n.length===a.length||a.length===0||o!==null||u!==null?o!==null&&y!==o?l(y):y!==u&&y!==i&&s(y):n.length>a.length?l(y):n.length<a.length&&(s(y),c(a[a.length-1]))}},[n,a,o,u,i]);var h=g.useCallback(()=>{s(o),l(null)},[o]),m=g.useCallback(()=>{c(null)},[]);return d.jsxs("div",{className:"navigation-stack",children:[d.jsx("div",{className:"main-view","data-testid":t,children:i}),d.jsx(Qe,{in:u!=null,timeout:Ze.transitionMidMs,classNames:"slide-right",onEntered:m,children:d.jsx(d.Fragment,{children:u!=null&&d.jsx("div",{className:"popping-view",children:u})})}),d.jsx(Qe,{in:o!=null,timeout:Ze.transitionMidMs,classNames:"slide-left",onEntered:h,children:d.jsx(d.Fragment,{children:o!=null&&d.jsx("div",{className:"pushing-view",children:o})})})]})}function Pi(r){var{children:e,disabled:t,value:n,"data-testid":a}=r;return d.jsx("option",{value:n,disabled:t,"data-testid":a,children:e})}function Ni(r){var{children:e,disabled:t=!1,name:n,onChange:a,value:i="","data-testid":s}=r,[o]=g.useState(n??nt());return d.jsx(d.Fragment,{children:E.Children.map(e,l=>{var u,c;return l?E.cloneElement(l,{name:o,onChange:(u=l.props.onChange)!==null&&u!==void 0?u:a,checked:i===l.props.value,disabled:(c=l.props.disabled)!==null&&c!==void 0?c:t,"data-testid":s}):null})})}var ut=E.forwardRef((r,e)=>{var{checked:t,children:n,className:a="",disabled:i=!1,inputClassName:s="",isInvalid:o=!1,labelClassName:l="",name:u,onChange:c,value:h,"data-testid":m}=r,[b]=g.useState(nt());return d.jsxs("div",{className:P("custom-control custom-radio",a),children:[d.jsx("input",{type:"radio",id:b,"data-testid":m,name:u,ref:e,className:P("custom-control-input",s,{"is-invalid":o}),checked:t,disabled:i,value:h,onChange:c}),d.jsx("label",{className:P("custom-control-label",l),htmlFor:b,children:n})]})});ut.displayName="RadioItem";ut.defaultProps={checked:void 0,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};const xi=ut;function Di(r){var{children:e,onBlur:t,onChange:n,className:a,defaultValue:i,name:s,value:o,disabled:l,"data-testid":u}=r,c=g.useCallback(h=>{n(h.target.value)},[n]);return d.jsx("select",{className:P("custom-select",a),onBlur:t,onChange:c,defaultValue:i,value:o,name:s,disabled:l,"data-testid":u,children:e})}function Te(r,e,t){return e=va(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function va(r){var e=ga(r,"string");return typeof e=="symbol"?e:String(e)}function ga(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class hn extends g.PureComponent{constructor(e){super(e),Te(this,"list",void 0),Te(this,"topRow",void 0),Te(this,"bottomRow",void 0),Te(this,"getCachedItem",J((t,n,a,i,s,o,l)=>{var u={height:s},c=i??a;return d.jsx("li",{className:"value-list-item",style:u,tabIndex:-1,children:d.jsx(Rr,{checked:o,disabled:l,onChange:()=>this.handleSelect(t),children:c})},n)},{max:1e3})),Te(this,"getCachedItems",J((t,n,a,i)=>{for(var s=[],o=0;o<t.length;o+=1){var l=t[o],{value:u,displayValue:c,isSelected:h}=l,m=a+o,b=m,y=this.getCachedItem(m,b,u,c,n,h,i);s.push(y)}return s},{max:1})),this.handleBlur=this.handleBlur.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleSelect=this.handleSelect.bind(this),this.list=E.createRef(),this.topRow=null,this.bottomRow=null}componentDidMount(){this.sendViewportUpdate()}componentDidUpdate(){this.sendViewportUpdate()}handleBlur(e){if(!e.relatedTarget||this.list.current&&e.relatedTarget instanceof HTMLElement&&!this.list.current.contains(e.relatedTarget)){var{onBlur:t}=this.props;t==null||t(e)}}handleScroll(){this.sendViewportUpdate()}handleSelect(e){var{items:t,offset:n,onSelect:a}=this.props,i=e-n;if(i>=0&&i<t.length){var s=t[i],{value:o}=s;a(e,o)}else a(e,null)}sendViewportUpdate(){if(!(!this.list.current||this.list.current.clientHeight===0)){var{onViewportChange:e,rowHeight:t}=this.props,n=this.list.current.scrollTop,a=n+this.list.current.clientHeight,i=Math.floor(n/t),s=Math.ceil(a/t);(this.topRow!==i||this.bottomRow!==s)&&(this.topRow=i,this.bottomRow=s,e(i,s))}}getElement(e){if(this.list.current==null)return null;var t=this.list.current.querySelectorAll(".value-list-item");return t[e]}scrollIntoView(e){var t=this.getElement(e);t==null||t.scrollIntoView({block:"center"})}render(){var{className:e,disabled:t,isInvalid:n,items:a,itemCount:i,offset:s,rowHeight:o,"data-testid":l}=this.props,u=this.getCachedItems(a,o,s,t);return d.jsx("div",{className:P("select-value-list-scroll-pane h-100 w-100",{"is-invalid":n},e),onBlur:this.handleBlur,onScroll:this.handleScroll,ref:this.list,"data-testid":l,children:d.jsx("div",{className:"select-value-list",style:{height:i*o},children:d.jsx("ol",{className:"select-value-list-content",style:{position:"absolute",height:a.length*o,top:s*o,left:0},children:u})})})}}Te(hn,"defaultProps",{disabled:!1,rowHeight:21,onBlur:()=>{},"data-testid":void 0});const Fi=hn;function ce(r,e,t){return e=ya(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ya(r){var e=ba(r,"string");return typeof e=="symbol"?e:String(e)}function ba(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var _t=V.module("Shortcut"),K;(function(r){r.CTRL="MODIFIER_CTRL",r.CMD="MODIFIER_CMD",r.ALT="MODIFIER_ALT",r.OPTION="MODIFIER_OPTION",r.SHIFT="MODIFIER_SHIFT"})(K||(K={}));var O;(function(r){r.A="A",r.B="B",r.C="C",r.D="D",r.E="E",r.F="F",r.G="G",r.H="H",r.I="I",r.J="J",r.K="K",r.L="L",r.M="M",r.N="N",r.O="O",r.P="P",r.Q="Q",r.R="R",r.S="S",r.T="T",r.U="U",r.V="V",r.W="W",r.X="X",r.Y="Y",r.Z="Z",r.ZERO="0",r.ONE="1",r.TWO="2",r.THREE="3",r.FOUR="4",r.FIVE="5",r.SIX="6",r.SEVEN="7",r.EIGHT="8",r.NINE="9",r.BACKSPACE="Backspace",r.ESCAPE="Escape",r.ENTER="Enter",r.DELETE="Delete",r.SLASH="/",r.QUESTION_MARK="?",r.BACKSLASH="\\",r.PIPE="|",r.MINUS="-",r.UNDERSCORE="_",r.EQUALS="=",r.PLUS="+",r.BACKTICK="`",r.TILDE="~",r.COMMA=",",r.LEFT_CHEVRON="<",r.PERIOD=".",r.RIGHT_CHEVRON=">",r.SEMICOLON=";",r.COLON=":",r.SINGLE_QUOTE="'",r.DOUBLE_QUOTE='"',r.LEFT_BRACKET="[",r.RIGHT_BRACKET="]",r.LEFT_CURLY="{",r.RIGHT_CURLY="}",r.F1="F1",r.F2="F2",r.F3="F3",r.F4="F4",r.F5="F5",r.F6="F6",r.F7="F7",r.F8="F8",r.F9="F9",r.F10="F10",r.F11="F11",r.F12="F12"})(O||(O={}));var Sa=new Set([O.ENTER,O.DELETE,O.F1,O.F2,O.F3,O.F4,O.F5,O.F6,O.F7,O.F8,O.F9,O.F10,O.F11,O.F12]);class F extends zt{static isAllowedKey(e){return Object.values(O).includes(e)}static isValidKeyState(e){var{keyValue:t}=e;if(t===null)return!0;if(!F.isMacPlatform&&e.metaKey||!F.isAllowedKey(t))return!1;var n=!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey;return!n||Sa.has(t)}static createKeyState(e){var t={altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,keyValue:e[e.length-1]};return e.forEach(n=>{switch(n){case K.CTRL:t.ctrlKey=!0;break;case K.ALT:case K.OPTION:t.altKey=!0;break;case K.CMD:t.metaKey=!0;break;case K.SHIFT:t.shiftKey=!0;break}}),t}static getKeyStateFromEvent(e){var{key:t,keyCode:n}=e,a="";return t==="Shift"||t==="Meta"||t==="Control"||t==="Alt"?a="":!F.isAllowedKey(t)&&F.isAllowedKey(String.fromCharCode(n))?a=String.fromCharCode(n):a=t,{keyValue:a,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}}static getWindowsDisplayText(e){var t="";return e.ctrlKey&&(t+="Ctrl+"),e.altKey&&(t+="Alt+"),e.shiftKey&&(t+="Shift+"),e.keyValue===O.ESCAPE?t+="Esc":e.keyValue!==null&&(t+=e.keyValue),t}static getMacDisplayText(e){var t="";switch(e.ctrlKey&&(t+="⌃"),e.altKey&&(t+="⌥"),e.shiftKey&&(t+="⇧"),e.metaKey&&(t+="⌘"),e.keyValue){case O.ENTER:t+="⏎";break;case O.ESCAPE:t+="⎋";break;case O.BACKSPACE:t+="⌫";break;case O.DELETE:t+="⌦";break;case null:break;default:t+=e.keyValue}return t}static doKeyStatesMatch(e,t){var n,a;return((n=e.keyValue)===null||n===void 0?void 0:n.toUpperCase())===((a=t.keyValue)===null||a===void 0?void 0:a.toUpperCase())&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey&&e.shiftKey===t.shiftKey}static getDisplayText(e){return e.keyValue===null?"":F.isMacPlatform?F.getMacDisplayText(e):F.getWindowsDisplayText(e)}constructor(e){var{id:t,shortcut:n,macShortcut:a,isEditable:i=!0,name:s,tooltip:o}=e;super(),ce(this,"id",void 0),ce(this,"name",void 0),ce(this,"tooltip",void 0),ce(this,"isEditable",void 0),ce(this,"defaultKeyState",void 0),ce(this,"keyState",void 0),this.id=t,this.name=s,this.tooltip=o,this.isEditable=i;var l=F.isMacPlatform,u=l?a:n;this.defaultKeyState=F.createKeyState(u),this.keyState=this.defaultKeyState}getDisplayText(){return F.getDisplayText(this.keyState)}getKeyState(){return this.keyState}setKeyState(e){F.isValidKeyState(e)?(_t.debug2("Shortcut ".concat(this.id," updated to ").concat(JSON.stringify(e))),this.keyState=e,this.dispatchEvent(new Jt("onUpdate",{detail:this}))):_t.debug2("Shortcut ".concat(this.id," tried to update to invalid keyState ").concat(JSON.stringify(e)))}getDefaultKeyState(){return this.defaultKeyState}isDefault(){return F.doKeyStatesMatch(this.getDefaultKeyState(),this.getKeyState())}setToNull(){this.setKeyState(F.NULL_KEY_STATE)}isNull(){return F.doKeyStatesMatch(this.keyState,F.NULL_KEY_STATE)}setToDefault(){this.setKeyState(this.defaultKeyState)}matchesKeyState(e){return F.doKeyStatesMatch(e,this.keyState)}matchesEvent(e){return this.matchesKeyState(F.getKeyStateFromEvent(e))}}ce(F,"NULL_KEY_STATE",{metaKey:!1,shiftKey:!1,altKey:!1,ctrlKey:!1,keyValue:null});ce(F,"isMacPlatform",j.isMacPlatform());function Ht(r,e,t){return e=Ma(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ma(r){var e=Ca(r,"string");return typeof e=="symbol"?e:String(e)}function Ca(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Wt=V.module("ShortcutRegistry");class wa extends zt{constructor(){super(...arguments),Ht(this,"shortcutMap",new Map),Ht(this,"shortcutsByCategory",new Map)}createAndAdd(e){var t=new F(e);return this.add(t)}add(e){var t=this.shortcutMap.get(e.id);if(t)return Wt.warn("Skipping attempt to add duplicate shortcut ID to registry: ".concat(e.id)),t;Wt.debug2("Adding shortcut to registry: ".concat(e.id)),e.addEventListener("onUpdate",i=>{var{detail:s}=i;return this.dispatchEvent(new Jt("onUpdate",{detail:s}))});var n=e.id.split(".")[0];if(this.shortcutMap.set(e.id,e),this.shortcutsByCategory.has(n)){var a;(a=this.shortcutsByCategory.get(n))===null||a===void 0||a.push(e)}else this.shortcutsByCategory.set(n,[e]);return e}get(e){return this.shortcutMap.get(e)}getConflictingShortcuts(e){return Array.from(this.shortcutMap.values()).filter(t=>!t.isNull()&&t.matchesKeyState(e))}}var Ta=Object.freeze(new wa);const we=Ta;var Ea={COPY:we.createAndAdd({id:"GLOBAL.COPY",name:"Copy",shortcut:[K.CTRL,O.C],macShortcut:[K.CMD,O.C],isEditable:!1}),PASTE:we.createAndAdd({id:"GLOBAL.PASTE",name:"Paste",shortcut:[K.CTRL,O.V],macShortcut:[K.CMD,O.V],isEditable:!1}),SAVE:we.createAndAdd({id:"GLOBAL.SAVE",name:"Save",shortcut:[K.CTRL,O.S],macShortcut:[K.CMD,O.S],isEditable:!1}),SELECT_ALL:we.createAndAdd({id:"GLOBAL.SELECT_ALL",name:"Select All",shortcut:[K.CTRL,O.A],macShortcut:[K.CMD,O.A],isEditable:!1}),LINKER:we.createAndAdd({id:"GLOBAL.LINKER",name:"Linker",shortcut:[K.CTRL,O.L],macShortcut:[K.CMD,O.L]}),LINKER_CLOSE:we.createAndAdd({id:"GLOBAL.LINKER_CLOSE",name:"Close Linker Overlay",shortcut:[O.ESCAPE],macShortcut:[O.ESCAPE],isEditable:!1})};const Ai=Ea;function fn(){return Be(jn,"No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?")}function Ia(r,e){var t=fn(),n=g.useMemo(()=>new t.CoreClient(r,e),[t,r,e]);return g.useEffect(()=>()=>{n.disconnect()},[n]),n}var mn=g.createContext(null);function Ri(r){var{serverUrl:e,options:t,children:n}=r,a=Ia(e,t);return d.jsx(mn.Provider,{value:a,children:n})}function Oa(){return Be(mn,"No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?")}var Pa=1e4;function ji(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Pa;return new Promise((n,a)=>{var i,s=setTimeout(()=>{var l;(l=i)===null||l===void 0||l(),a(new it("Variable ".concat(e," not found")))},t);function o(l){var u=l.created.find(h=>h.title===e);if(u!=null){var c;clearTimeout(s),(c=i)===null||c===void 0||c(),n(u)}}i=r.subscribeToFieldUpdates(o)})}function ct(r,e,t){return e=Na(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Na(r){var e=xa(r,"string");return typeof e=="symbol"?e:String(e)}function xa(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class He{static isValid(e,t){return!0}static isSameFormat(e,t){throw new Error("isSameFormat not implemented")}static makeFormat(e,t,n){return{label:e,formatString:t,type:n}}format(e,t){return""}}ct(He,"TYPE_GLOBAL","type-global");ct(He,"TYPE_CONTEXT_PRESET","type-context-preset");ct(He,"TYPE_CONTEXT_CUSTOM","type-context-custom");const B=He;class Da extends B{format(e){switch(e){case 1:case!0:return"true";case 0:case!1:return"false";default:return""}}}const Fa=Da;class Aa extends B{format(e){return String.fromCharCode(e)}}const Ra=Aa;function de(r,e,t){return e=ja(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ja(r){var e=La(r,"string");return typeof e=="symbol"?e:String(e)}function La(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Ut=V.module("DateTimeColumnFormatter");class ee extends B{static isValid(e,t){try{return e.i18n.DateTimeFormat.format(t.formatString,new Date),!0}catch{return!1}}static makeFormat(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:B.TYPE_CONTEXT_PRESET;return{label:e,formatString:t,type:n}}static isSameFormat(e,t){return e===t||e!==null&&t!==null&&e.type===t.type&&e.formatString===t.formatString}static makeGlobalFormatStringMap(e,t){var n=t?"'T'":" ",a=e?" z":"";return new Map([["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd".concat(n,"HH:mm:ss").concat(a)],["yyyy-MM-dd HH:mm:ss.SSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSS").concat(a)],["yyyy-MM-dd HH:mm:ss.SSSSSSSSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSSSSSSSS").concat(a)]])}static getGlobalFormats(e,t){var n=ee.makeGlobalFormatStringMap(e,t);return[...n.keys()]}static makeFormatStringMap(e,t){var n=t!==void 0&&t?"'T'":" ",a=e!==void 0&&e?" z":"";return new Map([["yyyy-MM-dd","yyyy-MM-dd".concat(a)],["MM-dd-yyyy","MM-dd-yyyy".concat(a)],["HH:mm:ss","HH:mm:ss".concat(a)],["HH:mm:ss.SSS","HH:mm:ss.SSS".concat(a)],["HH:mm:ss.SSSSSSSSS","HH:mm:ss.SSSSSSSSS".concat(a)],["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd".concat(n,"HH:mm:ss").concat(a)],["yyyy-MM-dd HH:mm:ss.SSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSS").concat(a)],["yyyy-MM-dd HH:mm:ss.SSSSSSSSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSSSSSSSS").concat(a)]])}static getFormats(e,t){var n=ee.makeFormatStringMap(e,t);return[...n.keys()]}constructor(e){var{timeZone:t="",showTimeZone:n=!0,showTSeparator:a=!1,defaultDateTimeFormatString:i=ee.DEFAULT_DATETIME_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),de(this,"dh",void 0),de(this,"dhTimeZone",void 0),de(this,"defaultDateTimeFormatString",void 0),de(this,"showTimeZone",void 0),de(this,"showTSeparator",void 0),de(this,"formatStringMap",void 0);var s=t||ee.DEFAULT_TIME_ZONE_ID;try{this.dhTimeZone=e.i18n.TimeZone.getTimeZone(s)}catch{Ut.error("Unsupported time zone id",s),this.dhTimeZone=e.i18n.TimeZone.getTimeZone(ee.DEFAULT_TIME_ZONE_ID)}this.dh=e,this.defaultDateTimeFormatString=i,this.showTimeZone=n,this.showTSeparator=a,this.formatStringMap=ee.makeFormatStringMap(n,a)}getEffectiveFormatString(e){var t;return(t=this.formatStringMap.get(e))!==null&&t!==void 0?t:e}format(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.formatString!=null&&t.formatString!==""?t.formatString:this.defaultDateTimeFormatString,a=this.getEffectiveFormatString(n);try{return this.dh.i18n.DateTimeFormat.format(a,e,this.dhTimeZone)}catch{Ut.error("Invalid format arguments")}return""}}de(ee,"DEFAULT_DATETIME_FORMAT_STRING","yyyy-MM-dd HH:mm:ss.SSS");de(ee,"DEFAULT_TIME_ZONE_ID","America/New_York");function ae(r,e,t){return e=ka(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ka(r){var e=$a(r,"string");return typeof e=="symbol"?e:String(e)}function $a(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Ka=V.module("DecimalColumnFormatter");class L extends B{static isValid(e,t){try{return e.i18n.NumberFormat.format(t.formatString,0),!0}catch{return!1}}static makeFormat(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:B.TYPE_CONTEXT_PRESET,a=arguments.length>3?arguments[3]:void 0;return{label:e,type:n,formatString:t,multiplier:a}}static makePresetFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return L.makeFormat(e,t,B.TYPE_CONTEXT_PRESET,n)}static makeCustomFormat(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return L.makeFormat("Custom Format",e,B.TYPE_CONTEXT_CUSTOM,t)}static isSameFormat(e,t){return e===t||e!=null&&t!=null&&e.type===t.type&&e.formatString===t.formatString&&e.multiplier===t.multiplier}constructor(e){var{defaultFormatString:t=L.DEFAULT_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ae(this,"defaultFormatString",void 0),ae(this,"dh",void 0),this.dh=e,this.defaultFormatString=t}format(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.formatString!=null&&t.formatString!==""?t.formatString:this.defaultFormatString,a=t.multiplier!=null&&t.multiplier!==0?e*t.multiplier:e;try{return this.dh.i18n.NumberFormat.format(n,a)}catch{Ka.error("Invalid format arguments")}return""}}ae(L,"DEFAULT_FORMAT_STRING","###,##0.0000");ae(L,"FORMAT_PERCENT",L.makePresetFormat("Percent","##0.00%"));ae(L,"FORMAT_BASIS_POINTS",L.makePresetFormat("Basis Points","###,##0 bp",1e4));ae(L,"FORMAT_MILLIONS",L.makePresetFormat("Millions","###,##0.000 mm",1e-6));ae(L,"FORMAT_SCIENTIFIC_NOTATION",L.makePresetFormat("Scientific Notation","0.0000E0"));ae(L,"FORMAT_ROUND",L.makePresetFormat("Round","###,##0"));ae(L,"FORMAT_ROUND_TWO_DECIMALS",L.makePresetFormat("0.00","###,##0.00"));ae(L,"FORMAT_ROUND_FOUR_DECIMALS",L.makePresetFormat("0.0000","###,##0.0000"));class Ba extends B{format(e){return"".concat(e)}}const Va=Ba;function xe(r,e,t){return e=_a(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function _a(r){var e=Ha(r,"string");return typeof e=="symbol"?e:String(e)}function Ha(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Wa=V.module("IntegerColumnFormatter");class re extends B{static isValid(e,t){try{return e.i18n.NumberFormat.format(t.formatString,0),!0}catch{return!1}}static makeFormat(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:B.TYPE_CONTEXT_PRESET,a=arguments.length>3?arguments[3]:void 0;return{label:e,type:n,formatString:t,multiplier:a}}static makePresetFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return re.makeFormat(e,t,B.TYPE_CONTEXT_PRESET,n)}static makeCustomFormat(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return re.makeFormat("Custom Format",e,B.TYPE_CONTEXT_CUSTOM,t)}static isSameFormat(e,t){return e===t||e!=null&&t!=null&&e.type===t.type&&e.formatString===t.formatString&&e.multiplier===t.multiplier}constructor(e){var{defaultFormatString:t=re.DEFAULT_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),xe(this,"dh",void 0),xe(this,"defaultFormatString",void 0),this.dh=e,this.defaultFormatString=t}format(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.formatString!=null&&t.formatString!==""?t.formatString:this.defaultFormatString,a=t.multiplier!=null&&t.multiplier!==0?e*t.multiplier:e;try{return this.dh.i18n.NumberFormat.format(n,a)}catch{Wa.error("Invalid format arguments")}return""}}xe(re,"DEFAULT_FORMAT_STRING","###,##0");xe(re,"FORMAT_MILLIONS",re.makePresetFormat("Millions","###,##0.000 mm",1e-6));xe(re,"FORMAT_SCIENTIFIC_NOTATION",re.makePresetFormat("Scientific Notation","0.0000E0"));class Ua extends B{format(e){return e}}function pn(r,e,t){return e=qa(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function qa(r){var e=Ga(r,"string");return typeof e=="symbol"?e:String(e)}function Ga(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class ${static makeDateWrapper(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:0,u=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0;if(!t)throw new Error("No timezone provided");var c="".concat(n).padStart(4,"0"),h="".concat(a+1).padStart(2,"0"),m="".concat(i).padStart(2,"0"),b="".concat(s).padStart(2,"0"),y="".concat(o).padStart(2,"0"),w="".concat(l).padStart(2,"0"),T="".concat(u).padStart(9,"0"),N="".concat(c,"-").concat(h,"-").concat(m," ").concat(b,":").concat(y,":").concat(w,".").concat(T);return e.i18n.DateTimeFormat.parse($.FULL_DATE_FORMAT,N,e.i18n.TimeZone.getTimeZone(t))}static getNextNanos(e){var t=parseInt(e,10),n="0".repeat(9-e.length),a="".concat(t+1).concat(n);return parseInt(a,10)}static getNextDate(e,t,n,a){var{year:i,month:s,date:o,hours:l,minutes:u,seconds:c,nanos:h}=n;if(t.nanos!=null){if(t.nanos.length===9)return null;h=$.getNextNanos(t.nanos),h>999999999&&(c+=1,h=0)}else t.seconds!=null?c+=1:t.minutes!=null?u+=1:t.hours!=null?l+=1:t.date!=null?o+=1:t.month!=null?s+=1:i+=1;var m=new Date(i,s,o,l,u,c);return $.makeDateWrapper(e,a,m.getFullYear(),m.getMonth(),m.getDate(),m.getHours(),m.getMinutes(),m.getSeconds(),h)}static parseMonth(e){var t=parseInt(e,10);if(!Number.isNaN(t))return t>=1&&t<=12?t-1:NaN;var n=e.trim().toLowerCase();if(n.length>=3){for(var a=0;a<$.months.length;a+=1)if($.months[a].startsWith(n))return a}return NaN}static parseDateValues(e,t,n,a,i,s,o){var l=parseInt(e,10),u=t!=null?this.parseMonth(t):0,c=n!=null?parseInt(n,10):1,h=a!=null?parseInt(a,10):0,m=i!=null?parseInt(i,10):0,b=s!=null?parseInt(s,10):0,y=o!=null?parseInt(o.padEnd(9,"0"),10):0;return Number.isNaN(l)||Number.isNaN(u)||Number.isNaN(c)||Number.isNaN(h)||Number.isNaN(m)||Number.isNaN(b)||Number.isNaN(y)?null:{year:l,month:u,date:c,hours:h,minutes:m,seconds:b,nanos:y}}static parseDateTimeString(e){var t=/\s*(\d{4})([-./]([\da-z]+))?([-./](\d{1,2}))?([tT\s](\d{2})([:](\d{2}))?([:](\d{2}))?([.](\d{1,9}))?)?(.*)/,n=t.exec(e);if(n==null)throw new Error("Unexpected date string: ".concat(e));var[,a,,i,,s,,o,,l,,u,,c,h]=n;if(h!=null&&h.length>0)throw new Error("Unexpected characters after date string '".concat(e,"': ").concat(h));return{year:a,month:i,date:s,hours:o,minutes:l,seconds:u,nanos:c}}static parseDateRange(e,t,n){var a=t.trim().toLowerCase();if(a.length===0)throw new Error("Cannot parse date range from empty string");if(a==="null")return[null,null];if(a==="today"){var i=new Date(Date.now()),s=$.makeDateWrapper(e,n,i.getFullYear(),i.getMonth(),i.getDate()),o=new Date(i.getFullYear(),i.getMonth(),i.getDate()+1),l=$.makeDateWrapper(e,n,o.getFullYear(),o.getMonth(),o.getDate());return[s,l]}if(a==="yesterday"){var u=new Date(Date.now()),c=new Date(u.getFullYear(),u.getMonth(),u.getDate()-1),h=$.makeDateWrapper(e,n,c.getFullYear(),c.getMonth(),c.getDate()),m=$.makeDateWrapper(e,n,u.getFullYear(),u.getMonth(),u.getDate());return[h,m]}if(a==="now"){var b=new Date(Date.now()),y=e.DateWrapper.ofJsDate(b);return[y,null]}var w=$.parseDateTimeString(a);if(w.year==null&&w.month==null&&w.date==null)throw new Error("Unable to extract year, month, or day ".concat(a));var T=$.parseDateValues(w.year,w.month,w.date,w.hours,w.minutes,w.seconds,w.nanos);if(T==null)throw new Error("Unable to extract date values from ".concat(w));var N=$.makeDateWrapper(e,n,T.year,T.month,T.date,T.hours,T.minutes,T.seconds,T.nanos),_=$.getNextDate(e,w,T,n);return[N,_]}static getJsDate(e){return typeof e=="number"?new Date(e):e.asDate()}}pn($,"FULL_DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSSSSS");pn($,"months",["january","february","march","april","may","june","july","august","september","october","november","december"]);function dt(r,e,t){return e=za(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function za(r){var e=Qa(r,"string");return typeof e=="symbol"?e:String(e)}function Qa(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class De{}dt(De,"not","not");dt(De,"and","and");dt(De,"or","or");function Li(r){if(!(r==="not"||r==="and"||r==="or"))throw new Error("operator is not a valid FilterOperatorValue")}function x(r,e,t){return e=Za(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Za(r){var e=Xa(r,"string");return typeof e=="symbol"?e:String(e)}function Xa(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class p{}x(p,"eq","eq");x(p,"eqIgnoreCase","eqIgnoreCase");x(p,"notEq","notEq");x(p,"notEqIgnoreCase","notEqIgnoreCase");x(p,"greaterThan","greaterThan");x(p,"greaterThanOrEqualTo","greaterThanOrEqualTo");x(p,"lessThan","lessThan");x(p,"lessThanOrEqualTo","lessThanOrEqualTo");x(p,"in","in");x(p,"inIgnoreCase","inIgnoreCase");x(p,"notIn","notIn");x(p,"notInIgnoreCase","notInIgnoreCase");x(p,"isTrue","isTrue");x(p,"isFalse","isFalse");x(p,"isNull","isNull");x(p,"invoke","invoke");x(p,"contains","contains");x(p,"notContains","notContains");x(p,"containsIgnoreCase","containsIgnoreCase");x(p,"startsWith","startsWith");x(p,"endsWith","endsWith");x(p,"containsAny","containsAny");function qt(r,e,t,n,a,i,s){try{var o=r[i](s),l=o.value}catch(u){t(u);return}o.done?e(l):Promise.resolve(l).then(n,a)}function Oe(r){return function(){var e=this,t=arguments;return new Promise(function(n,a){var i=r.apply(e,t);function s(l){qt(i,n,a,s,o,"next",l)}function o(l){qt(i,n,a,s,o,"throw",l)}s(void 0)})}}function ve(r,e,t){return e=Ja(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ja(r){var e=Ya(r,"string");return typeof e=="symbol"?e:String(e)}function Ya(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var ie=V.module("TableUtils");class f{static getSortIndex(e,t){for(var n=0;n<e.length;n+=1){var a,i=e[n];if(((a=i.column)===null||a===void 0?void 0:a.name)===t)return n}return null}static getSortForColumn(e,t){var n=f.getSortIndex(e,t);return n!=null?e[n]:null}static getFilterText(e){return e?e.toString():null}static getFilterTypes(e){return f.isBooleanType(e)?[p.isTrue,p.isFalse,p.isNull]:f.isCharType(e)||f.isNumberType(e)||f.isDateType(e)?[p.eq,p.notEq,p.greaterThan,p.greaterThanOrEqualTo,p.lessThan,p.lessThanOrEqualTo]:f.isTextType(e)?[p.eq,p.eqIgnoreCase,p.notEq,p.notEqIgnoreCase,p.contains,p.notContains,p.startsWith,p.endsWith]:[]}static getNextSort(e,t,n){if(n<0||n>=e.length)return null;var a=f.getSortForColumn(t,e[n].name);return a===null?e[n].sort().asc():a.direction===f.sortDirection.ascending?a.desc():null}static makeColumnSort(e,t,n,a){if(t<0||t>=e.length||n===f.sortDirection.none)return null;var i=e[t].sort();switch(n){case f.sortDirection.ascending:i=i.asc();break;case f.sortDirection.descending:i=i.desc();break}return a&&(i=i.abs()),i}static toggleSortForColumn(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(n<0||n>=t.length)return[];var i=f.getNextSort(t,e,n);return f.setSortForColumn(e,t[n].name,i,a)}static sortColumn(e,t,n,a,i,s){if(n<0||n>=t.length)return[];var o=f.makeColumnSort(t,n,a,i);return f.setSortForColumn(e,t[n].name,o,s)}static setSortForColumn(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=f.getSortIndex(e,t),s=[];return a&&(s=s.concat(e.filter(o=>{var{direction:l}=o;return l!==f.sortDirection.reverse})),i!==null&&s.splice(i,1)),n!==null&&s.push(n),s}static getNormalizedType(e){switch(e){case"boolean":case"java.lang.Boolean":case f.dataType.BOOLEAN:return f.dataType.BOOLEAN;case"char":case"java.lang.Character":case f.dataType.CHAR:return f.dataType.CHAR;case"java.lang.String":case f.dataType.STRING:return f.dataType.STRING;case"io.deephaven.db.tables.utils.DBDateTime":case"io.deephaven.time.DateTime":case"com.illumon.iris.db.tables.utils.DBDateTime":case"java.time.Instant":case"java.time.ZonedDateTime":case f.dataType.DATETIME:return f.dataType.DATETIME;case"double":case"java.lang.Double":case"float":case"java.lang.Float":case"java.math.BigDecimal":case f.dataType.DECIMAL:return f.dataType.DECIMAL;case"int":case"java.lang.Integer":case"long":case"java.lang.Long":case"short":case"java.lang.Short":case"byte":case"java.lang.Byte":case"java.math.BigInteger":case f.dataType.INT:return f.dataType.INT;default:return f.dataType.UNKNOWN}}static isLongType(e){switch(e){case"long":case"java.lang.Long":return!0;default:return!1}}static isDateType(e){switch(e){case"io.deephaven.db.tables.utils.DBDateTime":case"io.deephaven.time.DateTime":case"java.time.Instant":case"java.time.ZonedDateTime":case"com.illumon.iris.db.tables.utils.DBDateTime":return!0;default:return!1}}static isNumberType(e){return f.isIntegerType(e)||f.isDecimalType(e)}static isIntegerType(e){switch(e){case"int":case"java.lang.Integer":case"java.math.BigInteger":case"long":case"java.lang.Long":case"short":case"java.lang.Short":case"byte":case"java.lang.Byte":return!0;default:return!1}}static isDecimalType(e){switch(e){case"double":case"java.lang.Double":case"java.math.BigDecimal":case"float":case"java.lang.Float":return!0;default:return!1}}static isBigDecimalType(e){switch(e){case"java.math.BigDecimal":return!0;default:return!1}}static isBigIntegerType(e){switch(e){case"java.math.BigInteger":return!0;default:return!1}}static isBooleanType(e){switch(e){case"boolean":case"java.lang.Boolean":return!0;default:return!1}}static isCharType(e){switch(e){case"char":case"java.lang.Character":return!0;default:return!1}}static isStringType(e){switch(e){case"java.lang.String":return!0;default:return!1}}static isTextType(e){return this.isStringType(e)||this.isCharType(e)}static getBaseType(e){return e.split("[]")[0]}static isCompatibleType(e,t){return f.getNormalizedType(e)===f.getNormalizedType(t)}static quoteValue(e){return e.length>=2&&(e.charAt(0)==='"'&&e.charAt(e.length-1)==='"'||e.charAt(0)==="'"&&e.charAt(e.length-1)==="'")?e:'"'.concat(e,'"')}static isRangeOperation(e){switch(e){case"<":case"<=":case"=<":case">":case">=":case"=>":return!0;default:return!1}}static makeRangeFilterWithOperation(e,t,n){switch(t){case"=":return e.eq(n);case"<":return e.lessThan(n);case"<=":case"=<":return e.lessThanOrEqualTo(n);case">":return e.greaterThan(n);case">=":case"=>":return e.greaterThanOrEqualTo(n);case"!=":case"!":return e.notEq(n);default:return null}}static makeCancelableTablePromise(e){return Ye.makeCancelable(e,t=>{t.close()})}static makeCancelableTableEventPromise(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i,s,o=!0,l=new Promise((u,c)=>{s=setTimeout(()=>{i(),o=!1,c(new it('Event "'.concat(t,'" timed out.')))},n),i=e.addEventListener(t,h=>{if(a!=null&&!a(h)){ie.debug2("Event triggered, but matcher returned false.");return}ie.debug2("Event triggered, resolving."),i(),clearTimeout(s),o=!1,u(h)})});return l.cancel=()=>{if(o){ie.debug2("Pending promise cleanup."),i(),clearTimeout(s),o=!1;return}ie.debug2("Ignoring non-pending promise cancel.")},l}static removeCommas(e){return e.replace(/[\s|,]/g,"")}static makeBooleanValue(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e===""&&t)return null;switch(e==null?void 0:e.toLowerCase()){case"null":return null;case"0":case"f":case"fa":case"fal":case"fals":case"false":case"n":case"no":return!1;case"1":case"t":case"tr":case"tru":case"true":case"y":case"ye":case"yes":return!0;default:throw new Error("Invalid boolean '".concat(e,"'"))}}static makeNumberValue(e){if(e==="null"||e==="")return null;var t=e.toLowerCase().trim();if(t==="∞"||t==="infinity"||t==="inf")return Number.POSITIVE_INFINITY;if(t==="-∞"||t==="-infinity"||t==="-inf")return Number.NEGATIVE_INFINITY;var n=f.removeCommas(t);if(f.NUMBER_REGEX.test(n))return parseFloat(n);throw new Error("Invalid number '".concat(e,"'"))}static getFilterOperatorString(e){switch(e){case p.eq:return"=";case p.notEq:return"!=";case p.greaterThan:return">";case p.greaterThanOrEqualTo:return">=";case p.lessThan:return"<";case p.lessThanOrEqualTo:return"<=";case p.contains:return"~";case p.notContains:return"!~";default:throw new Error("Unexpected filter type ".concat(e))}}static isTreeTable(e){return e!=null&&e.expand!==void 0&&e.collapse!==void 0}static sortColumns(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return[...e].sort((n,a)=>{var i=n.name.toUpperCase(),s=a.name.toUpperCase();return hr.sort(i,s,t)})}constructor(e){ve(this,"dh",void 0),this.dh=e}makeQuickFilter(e,t,n){for(var a=t.split("||"),i=null,s=0;s<a.length;s+=1){for(var o=a[s],l=o.split("&&"),u=null,c=0;c<l.length;c+=1){var h=l[c].trim();if(h.length>0){var m=this.makeQuickFilterFromComponent(e,h,n);if(m)u?u=u.and(m):u=m;else throw new Error("Unable to parse quick filter from text ".concat(t))}}i&&u?i=i.or(u):i=u}return i}makeQuickFilterFromComponent(e,t,n){var{type:a}=e;return f.isNumberType(a)?this.makeQuickNumberFilter(e,t):f.isBooleanType(a)?this.makeQuickBooleanFilter(e,t):n!=null&&f.isDateType(a)?this.makeQuickDateFilter(e,t,n):f.isCharType(a)?this.makeQuickCharFilter(e,t):this.makeQuickTextFilter(e,t)}makeQuickNumberFilter(e,t){var n=e.filter(),{dh:a}=this,i=null,s=/\s*(>=|<=|=>|=<|>|<|!=|=|!)?(\s*-\s*)?(\s*\d*(?:,\d{3})*(?:\.\d*)?\s*)?(null|nan|infinity|inf|\u221E)?(.*)/i,o=s.exec(t),l=null,u=null,c=null,h=null,m=null;if(o!==null&&o.length>3&&([,l,u,c,h,m]=o),m!=null&&m.trim().length>0)return null;if(l==null&&(l="="),h!=null){if(!(l==="="||l==="!"||l==="!="))return null;switch(h=h.trim().toLowerCase(),h){case"null":i=n.isNull();break;case"nan":i=a.FilterCondition.invoke("isNaN",n);break;case"infinity":case"inf":case"∞":u!=null?i=a.FilterCondition.invoke("isInf",n).and(n.lessThan(a.FilterValue.ofNumber(0))):i=a.FilterCondition.invoke("isInf",n).and(n.greaterThan(a.FilterValue.ofNumber(0)));break}return i!==null&&(l==="!"||l==="!=")&&(i=i.not()),i}if(c==null)return null;if(c=f.removeCommas(c),f.isLongType(e.type))try{c=a.FilterValue.ofNumber(a.LongWrapper.ofString("".concat(u!=null?"-":"").concat(c)))}catch(b){return ie.warn("Unable to create long filter",b),null}else{if(c=parseFloat(c),c==null||Number.isNaN(c))return null;c=a.FilterValue.ofNumber(u!=null?0-c:c)}return i=e.filter(),f.makeRangeFilterWithOperation(i,l,c)}static escapeQuickTextFilter(e){var t,n;if(e==null)return null;var a=/^(!~|!=|~|=|!)?(.*)/,i=/^\\*null$/,s=a.exec(e),o=null,l=null;if(s!==null&&s.length>2&&([,o,l]=s),o!=null){var u;return"\\".concat(o).concat((u=l)!==null&&u!==void 0?u:"")}return l!=null&&i.test(l.toLowerCase())||l!=null&&l.startsWith("*")?"\\".concat(l):l!=null&&l.endsWith("*")&&!l.endsWith("\\*")?(l=l.substring(0,l.length-1),"".concat(l,"\\*")):"".concat((t=o)!==null&&t!==void 0?t:"").concat((n=l)!==null&&n!==void 0?n:"")}static unescapeQuickTextFilter(e){var t,n,a=/^(\\!~|\\!=|\\~|\\=|\\!)?(.*)/,i=/^\\*null$/,s=a.exec(e),o=null,l=null;return s!==null&&s.length>2&&([,o,l]=s),o!=null&&(o=o.replace("\\","")),l!=null&&i.test(l.toLowerCase())&&(l=l.replace("\\","")),o==null&&l!=null&&l.startsWith("\\*")&&(l=l.substring(1)),o==null&&l!=null&&l.endsWith("\\*")?(l=l.substring(0,l.length-2),"".concat(l,"*")):"".concat((t=o)!==null&&t!==void 0?t:"").concat((n=l)!==null&&n!==void 0?n:"")}makeQuickTextFilter(e,t){var{dh:n}=this,a="".concat(t).trim(),i=/^(!~|!=|~|=|!)?(.*)/,s=i.exec(a),o=null,l=null;if(s!==null&&s.length>2&&([,o,l]=s,l!=null&&(l=l.trim())),l==null||l.length===0&&!(o==="="||o==="!="))return null;o==null&&(o="=");var u=e.filter();if(l.toLowerCase()==="null")switch(o){case"=":return u.isNull();case"!=":case"!":return u.isNull().not()}var c=null,h=null;switch(l.startsWith("*")?(c="*",l=l.substring(1)):l.endsWith("*")&&!l.endsWith("\\*")&&(h="*",l=l.substring(0,l.length-1)),l=f.unescapeQuickTextFilter(l),o){case"~":return u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(l,"\\E.*"))));case"!~":return u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(l,"\\E.*"))).not());case"!=":return c==="*"?u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(l,"\\E$"))).not()):h==="*"?u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i)^\\Q".concat(l,"\\E.*"))).not()):u.notEqIgnoreCase(n.FilterValue.ofString(l.toLowerCase()));case"=":return c==="*"?u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(l,"\\E$")))):h==="*"?u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i)^\\Q".concat(l,"\\E.*")))):u.eqIgnoreCase(n.FilterValue.ofString(l.toLowerCase()))}return null}makeQuickBooleanFilter(e,t){var n=/^(!=|=|!)?(.*)/,a=n.exec("".concat(t).trim());if(a===null)return null;var[,i,s]=a,o=i==="!"||i==="!=",l=s.trim().toLowerCase(),u=e.filter();try{var c=f.makeBooleanValue(l);return c!=null&&c?u=u.isTrue():c===null?u=u.isNull():u=u.isFalse(),o?u.not():u}catch{return null}}makeQuickDateFilter(e,t,n){var a=t.trim(),i=/\s*(>=|<=|=>|=<|>|<|!=|!|=)?(.*)/,s=i.exec(a);if(s==null||s.length<=2)throw new Error("Unable to parse date filter: ".concat(t));var o=null,l=null;[,o,l]=s;var u=p.eq;switch(o){case"<":u=p.lessThan;break;case"<=":case"=<":u=p.lessThanOrEqualTo;break;case">":u=p.greaterThan;break;case">=":case"=>":u=p.greaterThanOrEqualTo;break;case"!=":case"!":u=p.notEq;break;case"=":case"==":default:u=p.eq;break}return this.makeQuickDateFilterWithOperation(e,l,u,n)}makeQuickDateFilterWithOperation(e,t,n,a){var{dh:i}=this,[s,o]=$.parseDateRange(i,t,a),l=s!=null?i.FilterValue.ofNumber(s):null,u=o!=null?i.FilterValue.ofNumber(o):null,c=e.filter();if(l==null)return n===p.notEq?c.isNull().not():c.isNull();switch(n){case p.eq:{if(u!=null){var h=c.greaterThanOrEqualTo(l),m=c.lessThan(u);return h.and(m)}return c.eq(l)}case p.lessThan:return c.lessThan(l);case p.lessThanOrEqualTo:return u!=null?c.lessThan(u):c.lessThanOrEqualTo(l);case p.greaterThan:return u!=null?c.greaterThanOrEqualTo(u):c.greaterThan(l);case p.greaterThanOrEqualTo:return c.greaterThanOrEqualTo(l);case p.notEq:{if(u!=null){var b=c.lessThan(l),y=c.greaterThanOrEqualTo(u);return b.or(y)}return c.notEq(l)}default:throw new Error("Invalid operator: ".concat(n))}}makeQuickCharFilter(e,t){var{dh:n}=this,a="".concat(t).trim(),i=/^(>=|<=|=>|=<|>|<|!=|=|!)?(null|"."|'.'|.)?(.*)/,s=i.exec(a),o=null,l=null,u=null;if(s!==null&&s.length>3&&([,o,l,u]=s),u!=null&&u.trim().length>0||l==null||l.length===0)return null;o==null&&(o="=");var c=e.filter();if(l.toLowerCase()==="null")switch(o){case"=":return c.isNull();case"!=":case"!":return c.isNull().not();default:return null}var h=n.FilterValue.ofString(f.isRangeOperation(o)?f.quoteValue(l):l);return f.makeRangeFilterWithOperation(c,o,h)}makeAdvancedFilter(e,t,n){for(var{filterItems:a,filterOperators:i,invertSelection:s,selectedValues:o}=t,l=null,u=0;u<a.length;u+=1){var c=a[u],{selectedType:h,value:m}=c;if(h!=null&&h.length>0&&m!=null&&m.length>0)try{var b=this.makeAdvancedValueFilter(e,h,m,n);if(b!=null){if(u===0)l=b;else if(l!==null&&u-1<i.length){var y=i[u-1];if(y===De.and)l=l.and(b);else if(y===De.or)l=l.or(b);else{ie.error("Unexpected filter operator",y,b),l=null;break}}}else ie.debug2("Empty filter ignored for",h,m)}catch(T){ie.error("Unable to create filter",T),l=null;break}}var w=this.makeSelectValueFilter(e,o,s);return w!=null&&(l!=null?l=l.and(w):l=w),l}makeAdvancedValueFilter(e,t,n,a){var{dh:i}=this;if(f.isDateType(e.type))return this.makeQuickDateFilterWithOperation(e,n,t,a);if(f.isNumberType(e.type)||f.isCharType(e.type))return this.makeQuickFilter(e,"".concat(f.getFilterOperatorString(t)).concat(n));var s=this.makeFilterValue(e.type,n),o=e.filter();switch(t){case p.eq:return o.eq(s);case p.eqIgnoreCase:return o.eqIgnoreCase(s);case p.notEq:return o.notEq(s);case p.notEqIgnoreCase:return o.notEqIgnoreCase(s);case p.greaterThan:return o.greaterThan(s);case p.greaterThanOrEqualTo:return o.greaterThanOrEqualTo(s);case p.lessThan:return o.lessThan(s);case p.lessThanOrEqualTo:return o.lessThanOrEqualTo(s);case p.isTrue:return o.isTrue();case p.isFalse:return o.isFalse();case p.isNull:return o.isNull();case p.contains:return o.isNull().not().and(o.invoke("matches",i.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E.*"))));case p.notContains:return o.isNull().or(o.invoke("matches",i.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E.*"))).not());case p.startsWith:return o.isNull().not().and(o.invoke("matches",i.FilterValue.ofString("(?s)(?i)^\\Q".concat(n,"\\E.*"))));case p.endsWith:return o.isNull().not().and(o.invoke("matches",i.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E$"))));case p.in:case p.inIgnoreCase:case p.notIn:case p.notInIgnoreCase:case p.invoke:default:throw new Error("Unexpected filter operation: ".concat(t))}}applyNeverFilter(e,t){var n=arguments,a=this;return Oe(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:f.APPLY_TABLE_CHANGE_TIMEOUT_MS;if(e==null)return null;var s=e.findColumn(t),o=[a.makeNeverFilter(s)];return yield a.applyFilter(e,o,i),e})()}applyCustomColumns(e,t){var n=arguments,a=this;return Oe(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:f.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:s}=a;return f.executeAndWaitForEvent(o=>o==null?void 0:o.applyCustomColumns(t),e,s.Table.EVENT_CUSTOMCOLUMNSCHANGED,i)})()}applyFilter(e,t){var n=arguments,a=this;return Oe(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:f.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:s}=a;return f.executeAndWaitForEvent(o=>o==null?void 0:o.applyFilter(t),e,s.Table.EVENT_FILTERCHANGED,i)})()}applySort(e,t){var n=arguments,a=this;return Oe(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:f.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:s}=a;return f.executeAndWaitForEvent(o=>o==null?void 0:o.applySort(t),e,s.Table.EVENT_SORTCHANGED,i)})()}makeNeverFilter(e){var{dh:t}=this,n=null;f.isTextType(e.type)?n=t.FilterValue.ofString("a"):f.isBooleanType(e.type)?n=t.FilterValue.ofBoolean(!0):f.isDateType(e.type)?n=t.FilterValue.ofNumber(t.DateWrapper.ofJsDate(new Date)):n=t.FilterValue.ofNumber(0);var a=e.filter().eq(n),i=e.filter().notEq(n);return a.and(i)}makeFilterValue(e,t){var{dh:n}=this,a=f.getBaseType(e);return f.isTextType(a)?n.FilterValue.ofString(t):f.isLongType(a)?n.FilterValue.ofNumber(n.LongWrapper.ofString(f.removeCommas(t))):n.FilterValue.ofNumber(f.removeCommas(t))}makeFilterRawValue(e,t){var{dh:n}=this;return f.isTextType(e)?n.FilterValue.ofString(t):f.isBooleanType(e)?n.FilterValue.ofBoolean(t):n.FilterValue.ofNumber(t)}makeValue(e,t,n){var{dh:a}=this;if(t==="null")return null;if(f.isTextType(e))return t;if(f.isLongType(e))return a.LongWrapper.ofString(f.removeCommas(t));if(f.isBooleanType(e))return f.makeBooleanValue(t,!0);if(f.isDateType(e)){var[i]=$.parseDateRange(a,t,n);return i}return f.isNumberType(e)?f.makeNumberValue(t):(ie.error("Unexpected column type",e),null)}makeSelectValueFilter(e,t,n){var{dh:a}=this;if(t.length===0)return n?null:this.makeNeverFilter(e);for(var i=[],s=!1,o=0;o<t.length;o+=1){var l=t[o];l==null?s=!0:f.isTextType(e.type)?i.push(a.FilterValue.ofString(typeof l=="number"?String.fromCharCode(l):l)):f.isBooleanType(e.type)?i.push(a.FilterValue.ofBoolean(!!l)):i.push(a.FilterValue.ofNumber(l))}return s?i.length>0?n?e.filter().isNull().not().and(e.filter().notIn(i)):e.filter().isNull().or(e.filter().in(i)):n?e.filter().isNull().not():e.filter().isNull():n?e.filter().notIn(i):e.filter().in(i)}}ve(f,"dataType",{BOOLEAN:"boolean",CHAR:"char",DATETIME:"datetime",DECIMAL:"decimal",INT:"int",STRING:"string",UNKNOWN:"unknown"});ve(f,"sortDirection",{ascending:"ASC",descending:"DESC",reverse:"REVERSE",none:null});ve(f,"APPLY_TABLE_CHANGE_TIMEOUT_MS",3e4);ve(f,"REVERSE_TYPE",Object.freeze({NONE:"none",PRE_SORT:"pre-sort",POST_SORT:"post-sort"}));ve(f,"NUMBER_REGEX",/^-?\d+(\.\d+)?$/);ve(f,"executeAndWaitForEvent",function(){var r=Oe(function*(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:f.APPLY_TABLE_CHANGE_TIMEOUT_MS;if(t==null)return null;var i=f.makeCancelableTableEventPromise(t,n,a);return e(t),yield i,t});return function(e,t,n){return r.apply(this,arguments)}}());function Le(r,e,t){return e=ei(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ei(r){var e=ti(r,"string");return typeof e=="symbol"?e:String(e)}function ti(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class vn{static makeColumnFormatMap(e){return e==null?new Map:e.reduce((t,n)=>{var a=f.getNormalizedType(n.columnType);if(a===null)return t;t.has(a)||t.set(a,new Map);var i=t.get(a);return i==null||i.set(n.columnName,n.format),t},new Map)}static makeColumnFormattingRule(e,t,n){return{columnType:e,columnName:t,format:n}}constructor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1;Le(this,"defaultColumnFormatter",void 0),Le(this,"typeFormatterMap",void 0),Le(this,"columnFormatMap",void 0),Le(this,"truncateNumbersWithPound",void 0),this.defaultColumnFormatter=new Va,this.typeFormatterMap=new Map([[f.dataType.BOOLEAN,new Fa],[f.dataType.CHAR,new Ra],[f.dataType.DATETIME,new ee(e,n)],[f.dataType.DECIMAL,new L(e,a)],[f.dataType.INT,new re(e,i)],[f.dataType.STRING,new Ua]]),this.columnFormatMap=vn.makeColumnFormatMap(t),this.truncateNumbersWithPound=s}getColumnFormatMapForType(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=f.getNormalizedType(e);if(n!==null)return t&&!this.columnFormatMap.has(n)&&this.columnFormatMap.set(n,new Map),this.columnFormatMap.get(n)}getColumnFormat(e,t){var n,a=this.getColumnFormatMapForType(e);return(n=a==null?void 0:a.get(t))!==null&&n!==void 0?n:null}getColumnTypeFormatter(e){var t=f.getNormalizedType(e),n=this.defaultColumnFormatter;if(t){var a;n=(a=this.typeFormatterMap.get(t))!==null&&a!==void 0?a:n}return n}getFormattedString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",a=arguments.length>3?arguments[3]:void 0;if(e==null)return"";var i=this.getColumnTypeFormatter(t),s=a||this.getColumnFormat(t,n);return i.format(e,s??void 0)}get timeZone(){var e,t=this.typeFormatterMap.get(f.dataType.DATETIME);return t==null||(e=t.dhTimeZone)===null||e===void 0?void 0:e.id}}function ni(r){if(r&&r.formatter){var{formatter:e}=r;return e}}function ri(r){return{timeZone:r==null?void 0:r.timeZone,defaultDateTimeFormatString:r==null?void 0:r.defaultDateTimeFormat,showTimeZone:r==null?void 0:r.showTimeZone,showTSeparator:r==null?void 0:r.showTSeparator}}function ai(r,e,t){var n=r.getColumnFormat(t,e);return n!=null&&(n.type===B.TYPE_CONTEXT_PRESET||n.type===B.TYPE_CONTEXT_CUSTOM)}const ki={getColumnFormats:ni,getDateTimeFormatterOptions:ri,isCustomColumnFormatDefined:ai};var $i=g.createContext({}),Ki=g.createContext({}),ii=g.createContext(null);function Gt(r,e,t,n,a,i,s){try{var o=r[i](s),l=o.value}catch(u){t(u);return}o.done?e(l):Promise.resolve(l).then(n,a)}function si(r){return function(){var e=this,t=arguments;return new Promise(function(n,a){var i=r.apply(e,t);function s(l){Gt(i,n,a,s,o,"next",l)}function o(l){Gt(i,n,a,s,o,"throw",l)}s(void 0)})}}var oi=V.module("@deephaven/jsapi-components.ConnectionBootstrap"),gn=g.createContext(null);function Bi(r){var{children:e}=r,t=fn(),n=Oa(),[a,i]=g.useState(),[s,o]=g.useState();return g.useEffect(function(){var u=!1;function c(){return h.apply(this,arguments)}function h(){return h=si(function*(){try{var m=yield n.getAsIdeConnection();if(u)return;o(m)}catch(b){if(u)return;i(b)}}),h.apply(this,arguments)}return c(),()=>{u=!0}},[t,n]),g.useEffect(function(){if(s==null)return;function u(h){var{detail:m}=h;oi.info("Shutdown","".concat(JSON.stringify(m))),i("Server shutdown: ".concat(m??"Unknown reason"))}var c=s.addEventListener(t.IdeConnection.EVENT_SHUTDOWN,u);return c},[t,s]),s==null||a!=null?d.jsx(Ln,{"data-testid":"connection-bootstrap-loading",isLoading:s==null,errorMessage:a!=null?"".concat(a):void 0}):d.jsx(gn.Provider,{value:s,children:e})}function Vi(){return Be(gn,"No IdeConnection available in useConnection. Was code wrapped in ConnectionBootstrap or ConnectionContext.Provider?")}function _i(){return Be(ii,"No user available in useUser. Was code wrapped in UserBootstrap or UserContext.Provider?")}export{gr as $,Mi as A,Xe as B,Mt as C,$ as D,ci as E,ki as F,Ai as G,Ei as H,re as I,yi as J,O as K,Ci as L,K as M,vn as N,De as O,Ye as P,Oi as Q,Ni as R,we as S,p as T,Ii as U,Jt as V,Vi as W,_i as X,gi as Y,ji as Z,Be as _,fi as a,Xt as a0,qr as a1,sn as a2,Yr as a3,le as a4,nn as a5,ua as a6,pa as a7,F as a8,ma as a9,Vr as aa,Nt as ab,Ri as ac,mn as ad,fn as ae,Oa as af,it as ag,Fa as ah,Ra as ai,Va as aj,Pa as ak,Ua as al,ni as am,ri as an,ai as ao,hi as ap,Ki as aq,ii as ar,$i as as,Bi as at,gn as au,f as b,di as c,sr as d,j as e,Zt as f,mi as g,B as h,ee as i,L as j,vi as k,bi as l,Fi as m,Li as n,Ti as o,wi as p,Di as q,Pi as r,xi as s,Rr as t,er as u,Z as v,kr as w,pi as x,hr as y,at as z};
|
|
3
|
-
//# sourceMappingURL=useUser-
|
|
3
|
+
//# sourceMappingURL=useUser-4f192587.js.map
|