@deephaven/embed-grid 0.44.1-beta.0 → 0.44.2-beta.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.
@@ -1,3 +1,3 @@
1
- import{r as g,a as c,V as pn,C as Qe,c as N,R as gn,P as E,F as de,s as rt,m as X,W as yn,X as bn,i as Sn,k as En,Y as Mn,E as Wt}from"./vendor-a75bc0d2.js";import{T as Ze,L as V,ah as Ut,a as Cn,a8 as wn,i as Tn,ai as In,aj as Nn,B as On,ak as Pn,U as Dn,ag as Fn,ab as xn}from"./index-79acaed5.js";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 An(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){we(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 we(r,e,t){return e=Rn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Rn(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 at extends g.Component{constructor(e){super(e),we(this,"element",void 0),we(this,"container",void 0),we(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=c.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=An({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 pn(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 c.createElement(Qe,{in:s,timeout:n,classNames:"popper-transition",onEntered:this.handleEnter,onExited:this.handleExit},c.createElement("div",{onClick:o=>{o.stopPropagation()},onKeyDown:o=>{o.key==="Escape"&&this.hide()},className:N("popper",{interactive:a},e),onBlur:i?this.handleBlur:void 0,tabIndex:i?-1:void 0,role:"presentation"},c.createElement("div",{className:"popper-content"},t,c.createElement("div",{className:"popper-arrow","x-arrow":""}))))}render(){var{popper:e}=this.state,{"data-testid":t}=this.props;return c.createElement("div",{className:"popper-parent-container",ref:this.container,style:{display:"none"},"data-testid":t},e&&gn.createPortal(this.renderContent(),this.element))}}we(at,"propTypes",{children:E.node.isRequired,options:E.shape({}),className:E.string,timeout:E.number,onEntered:E.func,onExited:E.func,isShown:E.bool,closeOnBlur:E.bool,interactive:E.bool,referenceObject:E.shape({}),"data-testid":E.string});we(at,"defaultProps",{options:{},className:"",timeout:Ze.transitionMs,onEntered(){},onExited(){},isShown:!1,interactive:!1,closeOnBlur:!1,referenceObject:null,"data-testid":void 0});const it=at;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 Ln(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){J(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 J(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)}var Bn=V.module("Tooltip");class A extends g.Component{static handleHidden(){A.shownTooltipCount-=1,A.shownTooltipCount===0&&(A.lastHiddenTime=Date.now())}static handleShown(){A.shownTooltipCount+=1}constructor(e){super(e),J(this,"container",void 0),J(this,"popper",void 0),J(this,"parent",void 0),J(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=c.createRef(),this.popper=c.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?A.handleShown():A.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();var{isShown:e}=this.state;e&&A.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Bn.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;(A.shownTooltipCount>0||Date.now()-A.lastHiddenTime<A.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=Ln({placement:"bottom"},l),c.createElement("div",{ref:this.container,style:{display:"none"},"data-testid":i},c.createElement(it,{className:N(a),options:l,ref:this.popper,onEntered:s,onExited:this.handleExited,interactive:e,referenceObject:n},c.createElement("div",{className:"tooltip-content"}," ",o&&t)))}}J(A,"defaultTimeout",500);J(A,"defaultReshowTimeout",100);J(A,"triggerReshowThreshold",300);J(A,"shownTooltipCount",0);J(A,"lastHiddenTime",Date.now());J(A,"defaultProps",{interactive:!1,options:{},popperClassName:"",reshowTimeout:A.defaultReshowTimeout,timeout:A.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0});const qt=A;var Vn=["kind","variant","type","tooltip","icon","disabled","active","onClick","onContextMenu","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","onKeyDown","className","style","children","tabIndex","data-testid","aria-label"];function Xe(){return Xe=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Xe.apply(this,arguments)}function jn(r,e){if(r==null)return{};var t=_n(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 _n(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 Hn=["primary","secondary","tertiary","success","danger","inline","ghost"],Wn=["group-end"];function Un(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 N("btn-link",{"btn-link-icon":e,"btn-link-icon-only":e})}}function qn(r){switch(r){case"group-end":return N("pl-2","pr-3")}}var Be=c.forwardRef((r,e)=>{var{kind:t,variant:n,type:a,tooltip:i,icon:s,disabled:o=!1,active:l,onClick:u,onContextMenu:d,onMouseDown:h,onMouseUp:f,onMouseEnter:b,onMouseLeave:y,onKeyDown:C,className:w,style:O,children:j,tabIndex:L,"data-testid":_,"aria-label":H}=r,x=jn(r,Vn),W=!!(s&&j==null),U=Un(t,W),fe;n&&(fe=qn(n));var ve;s&&(ve=c.isValidElement(s)?s:c.createElement(de,{icon:s}));var he;i!==void 0&&(he=typeof i=="string"?c.createElement(qt,null,i):i);var pe=H;H===void 0&&W&&i!=null&&typeof i=="string"&&(pe=i);var M=c.createElement("button",Xe({"data-testid":_,ref:e,type:a,className:N("btn",U,fe,{active:l},w),onClick:u,onContextMenu:d,onMouseUp:f,onMouseDown:h,onMouseEnter:b,onMouseLeave:y,onKeyDown:C,style:O,disabled:o,tabIndex:L,"aria-label":pe},x),s&&ve,j,i!=null&&!o&&he);return o?c.createElement("span",{className:"btn-disabled-wrapper"},M,i!==void 0&&he):M});Be.displayName="Button";Be.propTypes={kind:E.oneOf(Hn).isRequired,variant:E.oneOf(Wn),type:E.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&&!c.isValidElement(t)&&(t==null||t.iconName===""||t.iconName==null)?new Error("Icon must be react element or fontawesome IconDefinition"):null},disabled:E.bool,active:E.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:E.func,onMouseUp:E.func,onMouseDown:E.func,onMouseEnter:E.func,onMouseLeave:E.func,onKeyDown:E.func,tabIndex:E.number,children:E.node,className:E.string,style:E.object,"data-testid":E.string};Be.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 Je=Be;function Ve(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 Gn(r){var e=g.useRef();return g.useEffect(function(){e.current=r}),e.current}function Gt(r){var e=g.useRef(null);return g.useEffect(function(){r&&(typeof r=="function"?r(e.current):r.current=e.current)}),e}var ri=Object.freeze([]),ai=new Map,ii=()=>{};function zn(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=Zn(r,"string");return typeof e=="symbol"?e:String(e)}function Zn(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 Xn extends Error{constructor(){super(...arguments),zn(this,"isCanceled",!0)}}const St=Xn;function Et(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 Jn(r){return function(){var e=this,t=arguments;return new Promise(function(n,a){var i=r.apply(e,t);function s(l){Et(i,n,a,s,o,"next",l)}function o(l){Et(i,n,a,s,o,"throw",l)}s(void 0)})}}function Yn(r){return Ye.apply(this,arguments)}function Ye(){return Ye=Jn(function*(r){var{clipboard:e}=navigator;if(e!==void 0)try{return navigator.clipboard.writeText(r)}catch{return Mt(r)}Mt(r)}),Ye.apply(this,arguments)}function Mt(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 zt extends CustomEvent{constructor(e,t){super(e,t)}}function er(r,e,t){return e=tr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function tr(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)}class rr extends Error{constructor(){super(...arguments),er(this,"isTimeout",!0)}}const st=rr;class et{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 St),a!=null&&t&&t(a)},s}static isCanceled(e){return e instanceof St}static isTimedOut(e){return e instanceof st}static withTimeout(e,t){return new Promise((n,a)=>{setTimeout(()=>{try{n(t())}catch(i){a(i)}},e)})}}function si(r){if(r==null)throw new Error("Value is null or undefined")}function oi(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 ot{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(!ot.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 se=ot;class ar{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 ir=ar;function Qt(r,e,t){return e=sr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function sr(r){var e=or(r,"string");return typeof e=="symbol"?e:String(e)}function or(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])}}Qt(Fe,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Qt(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 li=Fe;var lr=3500,ur=V.module("useCopyToClipboard");function cr(){var[r,e]=g.useState(!1),t=g.useRef(null),n=g.useCallback(a=>{Yn(a).then(()=>{e(!0)}).catch(i=>ur.error("Unable to copy ".concat(a),`
1
+ import{r as g,a as c,V as pn,C as Qe,c as N,R as gn,P as E,F as de,s as rt,m as X,W as yn,X as bn,i as Sn,k as En,Y as Mn,E as Wt}from"./vendor-a75bc0d2.js";import{T as Ze,L as V,ah as Ut,a as Cn,a8 as wn,i as Tn,ai as In,aj as Nn,B as On,ak as Pn,U as Dn,ag as Fn,ab as xn}from"./index-064c5ef8.js";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 An(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){we(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 we(r,e,t){return e=Rn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Rn(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 at extends g.Component{constructor(e){super(e),we(this,"element",void 0),we(this,"container",void 0),we(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=c.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=An({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 pn(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 c.createElement(Qe,{in:s,timeout:n,classNames:"popper-transition",onEntered:this.handleEnter,onExited:this.handleExit},c.createElement("div",{onClick:o=>{o.stopPropagation()},onKeyDown:o=>{o.key==="Escape"&&this.hide()},className:N("popper",{interactive:a},e),onBlur:i?this.handleBlur:void 0,tabIndex:i?-1:void 0,role:"presentation"},c.createElement("div",{className:"popper-content"},t,c.createElement("div",{className:"popper-arrow","x-arrow":""}))))}render(){var{popper:e}=this.state,{"data-testid":t}=this.props;return c.createElement("div",{className:"popper-parent-container",ref:this.container,style:{display:"none"},"data-testid":t},e&&gn.createPortal(this.renderContent(),this.element))}}we(at,"propTypes",{children:E.node.isRequired,options:E.shape({}),className:E.string,timeout:E.number,onEntered:E.func,onExited:E.func,isShown:E.bool,closeOnBlur:E.bool,interactive:E.bool,referenceObject:E.shape({}),"data-testid":E.string});we(at,"defaultProps",{options:{},className:"",timeout:Ze.transitionMs,onEntered(){},onExited(){},isShown:!1,interactive:!1,closeOnBlur:!1,referenceObject:null,"data-testid":void 0});const it=at;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 Ln(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){J(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 J(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)}var Bn=V.module("Tooltip");class A extends g.Component{static handleHidden(){A.shownTooltipCount-=1,A.shownTooltipCount===0&&(A.lastHiddenTime=Date.now())}static handleShown(){A.shownTooltipCount+=1}constructor(e){super(e),J(this,"container",void 0),J(this,"popper",void 0),J(this,"parent",void 0),J(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=c.createRef(),this.popper=c.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?A.handleShown():A.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();var{isShown:e}=this.state;e&&A.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Bn.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;(A.shownTooltipCount>0||Date.now()-A.lastHiddenTime<A.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=Ln({placement:"bottom"},l),c.createElement("div",{ref:this.container,style:{display:"none"},"data-testid":i},c.createElement(it,{className:N(a),options:l,ref:this.popper,onEntered:s,onExited:this.handleExited,interactive:e,referenceObject:n},c.createElement("div",{className:"tooltip-content"}," ",o&&t)))}}J(A,"defaultTimeout",500);J(A,"defaultReshowTimeout",100);J(A,"triggerReshowThreshold",300);J(A,"shownTooltipCount",0);J(A,"lastHiddenTime",Date.now());J(A,"defaultProps",{interactive:!1,options:{},popperClassName:"",reshowTimeout:A.defaultReshowTimeout,timeout:A.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0});const qt=A;var Vn=["kind","variant","type","tooltip","icon","disabled","active","onClick","onContextMenu","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","onKeyDown","className","style","children","tabIndex","data-testid","aria-label"];function Xe(){return Xe=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Xe.apply(this,arguments)}function jn(r,e){if(r==null)return{};var t=_n(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 _n(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 Hn=["primary","secondary","tertiary","success","danger","inline","ghost"],Wn=["group-end"];function Un(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 N("btn-link",{"btn-link-icon":e,"btn-link-icon-only":e})}}function qn(r){switch(r){case"group-end":return N("pl-2","pr-3")}}var Be=c.forwardRef((r,e)=>{var{kind:t,variant:n,type:a,tooltip:i,icon:s,disabled:o=!1,active:l,onClick:u,onContextMenu:d,onMouseDown:h,onMouseUp:f,onMouseEnter:b,onMouseLeave:y,onKeyDown:C,className:w,style:O,children:j,tabIndex:L,"data-testid":_,"aria-label":H}=r,x=jn(r,Vn),W=!!(s&&j==null),U=Un(t,W),fe;n&&(fe=qn(n));var ve;s&&(ve=c.isValidElement(s)?s:c.createElement(de,{icon:s}));var he;i!==void 0&&(he=typeof i=="string"?c.createElement(qt,null,i):i);var pe=H;H===void 0&&W&&i!=null&&typeof i=="string"&&(pe=i);var M=c.createElement("button",Xe({"data-testid":_,ref:e,type:a,className:N("btn",U,fe,{active:l},w),onClick:u,onContextMenu:d,onMouseUp:f,onMouseDown:h,onMouseEnter:b,onMouseLeave:y,onKeyDown:C,style:O,disabled:o,tabIndex:L,"aria-label":pe},x),s&&ve,j,i!=null&&!o&&he);return o?c.createElement("span",{className:"btn-disabled-wrapper"},M,i!==void 0&&he):M});Be.displayName="Button";Be.propTypes={kind:E.oneOf(Hn).isRequired,variant:E.oneOf(Wn),type:E.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&&!c.isValidElement(t)&&(t==null||t.iconName===""||t.iconName==null)?new Error("Icon must be react element or fontawesome IconDefinition"):null},disabled:E.bool,active:E.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:E.func,onMouseUp:E.func,onMouseDown:E.func,onMouseEnter:E.func,onMouseLeave:E.func,onKeyDown:E.func,tabIndex:E.number,children:E.node,className:E.string,style:E.object,"data-testid":E.string};Be.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 Je=Be;function Ve(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 Gn(r){var e=g.useRef();return g.useEffect(function(){e.current=r}),e.current}function Gt(r){var e=g.useRef(null);return g.useEffect(function(){r&&(typeof r=="function"?r(e.current):r.current=e.current)}),e}var ri=Object.freeze([]),ai=new Map,ii=()=>{};function zn(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=Zn(r,"string");return typeof e=="symbol"?e:String(e)}function Zn(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 Xn extends Error{constructor(){super(...arguments),zn(this,"isCanceled",!0)}}const St=Xn;function Et(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 Jn(r){return function(){var e=this,t=arguments;return new Promise(function(n,a){var i=r.apply(e,t);function s(l){Et(i,n,a,s,o,"next",l)}function o(l){Et(i,n,a,s,o,"throw",l)}s(void 0)})}}function Yn(r){return Ye.apply(this,arguments)}function Ye(){return Ye=Jn(function*(r){var{clipboard:e}=navigator;if(e!==void 0)try{return navigator.clipboard.writeText(r)}catch{return Mt(r)}Mt(r)}),Ye.apply(this,arguments)}function Mt(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 zt extends CustomEvent{constructor(e,t){super(e,t)}}function er(r,e,t){return e=tr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function tr(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)}class rr extends Error{constructor(){super(...arguments),er(this,"isTimeout",!0)}}const st=rr;class et{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 St),a!=null&&t&&t(a)},s}static isCanceled(e){return e instanceof St}static isTimedOut(e){return e instanceof st}static withTimeout(e,t){return new Promise((n,a)=>{setTimeout(()=>{try{n(t())}catch(i){a(i)}},e)})}}function si(r){if(r==null)throw new Error("Value is null or undefined")}function oi(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 ot{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(!ot.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 se=ot;class ar{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 ir=ar;function Qt(r,e,t){return e=sr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function sr(r){var e=or(r,"string");return typeof e=="symbol"?e:String(e)}function or(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])}}Qt(Fe,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Qt(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 li=Fe;var lr=3500,ur=V.module("useCopyToClipboard");function cr(){var[r,e]=g.useState(!1),t=g.useRef(null),n=g.useCallback(a=>{Yn(a).then(()=>{e(!0)}).catch(i=>ur.error("Unable to copy ".concat(a),`
2
2
  `,i))},[]);return g.useEffect(()=>(t.current&&clearTimeout(t.current),r&&(t.current=setTimeout(()=>{e(!1)},lr)),()=>{t.current&&clearTimeout(t.current)}),[r]),[r,n]}function dr(r,e,t){return e=hr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function hr(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)}function ze(r){return r.then!==void 0}class ce{static disableAllActions(){ce.actionsDisabled=!0}static enableAllActions(){ce.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(ce.compareActions),t}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static getModifierKey(){return ce.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=ce.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}}dr(ce,"actionsDisabled",!1);const R=ce;var Ct=V.module("GlobalContextAction");class fr 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),Ct.debug("Received context menu event at global action! Menu items are now: ",t.contextActions))}handleKeyDown(e){var{action:t}=this.props;if(!R.actionsDisabled&&t.shortcut!==void 0&&t.shortcut.matchesEvent(e)){var n;Ct.debug("Global hotkey matched!",e),(n=t.action)===null||n===void 0||n.call(t,e),e.preventDefault(),e.stopPropagation()}}render(){return null}}const vr=fr;class pr 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=c.createElement(vr,{key:"".concat(i.title,".").concat(s==null?void 0:s.id),action:i,"data-testid":t});n.push(o)}}return n}}const gr=pr;function Zt(r,e,t){return e=yr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function yr(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 Ae=V.module("ContextActions");class Xt 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),Zt(this,"container",void 0),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.container=c.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,d=t.find(h=>u.contains(h));if(d!==void 0)return Ae.debug2('Contextmenu event ignored based on the target className "'.concat(d,'"')),{v:void 0};n=n.parentElement};n!=null;){var i=a();if(typeof i=="object")return i.v}if(R.isContextActionEvent(e)||(e.contextActions=[]),!!R.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)}Ae.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(!R.actionsDisabled&&a.shortcut!=null&&a.shortcut.matchesEvent(e)){var i;Ae.debug("Context hotkey matched!",e),(i=a.action)===null||i===void 0||i.call(a,e),e.stopPropagation(),e.preventDefault(),Ae.debug2("Matched hotkey returned false, key event not consumed")}}}render(){var{"data-testid":e}=this.props,{globalActions:t}=this.state;return c.createElement("div",{className:"context-actions-listener",ref:this.container,"data-testid":e},c.createElement(gr,{actions:t}))}}Zt(Xt,"groups",{default:void 0,high:100,medium:5e3,low:1e4,global:1e5,edit:100});const ui=Xt;var lt=c.forwardRef((r,e)=>{var t;function n(x){var{menuItem:W,onMenuItemClick:U}=r;U(W,x)}function a(x){var{menuItem:W,onMenuItemMouseMove:U}=r;U(W,x)}function i(x){var{menuItem:W,onMenuItemContextMenu:U}=r;U(W,x)}function s(x,W,U){if(typeof x.type=="string")return x;var{closeMenu:fe,menuItem:ve,isKeyboardSelected:he,isMouseSelected:pe,"data-testid":M}=r,S={menuItem:ve,closeMenu:fe,isKeyboardSelected:he,isMouseSelected:pe,iconElement:W,displayShortcut:U,"data-testid":M};return c.cloneElement(x,{forwardedProps:S})}var{children:o,menuItem:l,isKeyboardSelected:u=!1,isMouseSelected:d=!1,"data-testid":h}=r,f=(t=l.shortcut)===null||t===void 0?void 0:t.getDisplayText(),b=null;if(l.icon){var y=l.icon;if(c.isValidElement(y))b=y;else{var C;l.iconColor!=null&&(l.disabled===void 0||!l.disabled)&&(C={color:l.iconColor}),b=c.createElement(de,{icon:y,style:C})}}var w=null,O=!!o;l.actions&&(w=c.createElement(de,{icon:Ut}));var j=null;if(l.menuElement)j=c.createElement("div",{className:"custom-menu-item",onMouseMove:a},s(l.menuElement,b,f));else{var L,_=l.disabled,H=l.iconOutline;j=c.createElement("button",{type:"button",className:N("btn-context-menu",{disabled:_},{active:(O||d)&&(_===void 0||!_)},{"keyboard-active":u&&(_===void 0||!_)}),onClick:n,onMouseMove:a,onContextMenu:i,title:(L=l.description)!==null&&L!==void 0?L:""},c.createElement("div",{className:"btn-context-menu-wrapper"},c.createElement("span",{className:N("icon",{outline:H})},b),c.createElement("span",{className:"title"},l.title),f!==void 0&&c.createElement("span",{className:"shortcut"},f),w&&c.createElement("span",{className:N("submenu-indicator",{disabled:_})},w)))}return c.createElement("div",{className:"context-menu-item",ref:e,"data-testid":h},o,j)});lt.displayName="ContextMenuItem";lt.defaultProps={children:null,isKeyboardSelected:!1,isMouseSelected:!1,"data-testid":void 0};const Jt=lt;function wt(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 Sr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?wt(Object(t),!0).forEach(function(n){oe(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):wt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function oe(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=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)}var Tt=V.module("ContextMenu");class Oe extends g.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),oe(this,"container",void 0),oe(this,"oldFocus",void 0),oe(this,"activeSubMenuRef",void 0),oe(this,"subMenuTimer",void 0),oe(this,"rAF",void 0),oe(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=c.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=c.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=R.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:R.sortActions(i)})}initMenuPromise(e){var t=et.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:R.sortActions(a.menuItems.concat(n)),pendingItems:s}}return null})},n=>{et.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}),Tt.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:d}=this.props;if(!(!this.container.current||i.doNotVerifyPosition!=null&&i.doNotVerifyPosition)){var{top:h,left:f}=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},C=((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),f+b>window.innerWidth&&(f=f-b-o),(d!==f||u!==h)&&(this.setState({hasOverflow:C}),s(h,f)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){Tt.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=R.getNextMenuItem(a,-1,t):(e.key==="ArrowDown"||e.key==="Tab")&&(a=R.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:d,subMenuLeft:h,subMenuParentWidth:f,subMenuParentHeight:b}=this.state,y=0;y<o.length;y+=1){var C=o[y];y>0&&C.group!==o[y-1].group&&e.push(c.createElement("hr",{key:"".concat(y,".separator")}));var w=c.createElement(Jt,{key:y,ref:a===y?this.activeSubMenuRef:null,isKeyboardSelected:s===y,isMouseSelected:l===y,menuItem:C,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu});e.push(w)}var O=null;u.length>0&&(O=c.createElement("div",{className:"loading"},c.createElement(Cn,null)));var{menuStyle:j,"data-testid":L}=this.props,_=a!==null&&d!==null&&h!==null;return c.createElement(c.Fragment,null,c.createElement("div",{className:N({"has-overflow":i},"context-menu-container"),style:Sr({top:t,left:n},j),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:Oe.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":L},e,O),_&&a!==null&&d!==null&&h!==null&&c.createElement(Oe,{key:"sub-".concat(a),actions:o[a].actions||[],closeMenu:this.handleCloseSubMenu,top:d,left:h,updatePosition:(H,x)=>{this.setState({subMenuTop:H,subMenuLeft:x})},subMenuParentWidth:f,subMenuParentHeight:b}))}}oe(Oe,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const Cr=Oe;function It(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=Tr(r,"string");return typeof e=="symbol"?e:String(e)}function Tr(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 Ir extends g.Component{constructor(e){super(e),It(this,"container",void 0),It(this,"openMenu",void 0),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=c.createRef(),this.openMenu=c.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(R.isContextActionEvent(e)&&this.container.current&&!(e.metaKey||e.ctrlKey)){var t=R.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=c.createElement(Cr,{ref:this.openMenu,actions:n,onMenuClosed:this.handleMenuClose,top:a,left:i,updatePosition:(s,o)=>{this.setState({top:s,left:o})},"data-testid":t})),c.createElement("div",{className:N("context-menu-root",{active:n}),ref:this.container},e)}}const ci=Ir;var je=c.forwardRef((r,e)=>{var{checked:t=!1,children:n,className:a,disabled:i,inputClassName:s,isInvalid:o,labelClassName:l,name:u,onChange:d,"data-testid":h}=r,[f]=g.useState(rt()),b=Gt(e);g.useEffect(function(){b.current&&(b.current.indeterminate=t===null)},[b,t]);var y=g.useCallback(C=>{b.current&&(b.current.indeterminate=t===null),d&&d(C)},[b,t,d]);return c.createElement("div",{className:N("custom-control custom-checkbox",a)},c.createElement("input",{type:"checkbox",ref:b,checked:t??!1,className:N("custom-control-input",s,{"is-invalid":o}),disabled:i,id:f,name:u,onChange:y,"data-testid":h}),c.createElement("label",{className:N("custom-control-label",l),htmlFor:f},n))});je.displayName="Checkbox";je.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:E.node.isRequired,className:E.string,disabled:E.bool,inputClassName:E.string,isInvalid:E.bool,labelClassName:E.string,name:E.string,onChange:E.func,"data-testid":E.string};je.defaultProps={checked:!1,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};const Nr=je;function Yt(r,e,t){return e=Or(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Or(r){var e=Pr(r,"string");return typeof e=="symbol"?e:String(e)}function Pr(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 en extends g.PureComponent{constructor(e){super(e),Yt(this,"inputField",void 0),this.inputField=c.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":d}=this.props;return c.createElement("div",{className:N("search-group",i)},c.createElement("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":d}),o!=null&&c.createElement("span",{className:"search-match"},o),c.createElement("span",{className:"search-icon"},c.createElement(de,{icon:wn})))}}Yt(en,"defaultProps",{placeholder:"Search",className:"",matchCount:null,onKeyDown(){},id:"","data-testid":void 0});const Dr=en;function Nt(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 Fr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Nt(Object(t),!0).forEach(function(n){G(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Nt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function G(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=Ar(r,"string");return typeof e=="symbol"?e:String(e)}function Ar(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 tt;(function(r){r.UP="UP",r.DOWN="DOWN"})(tt||(tt={}));class ee extends g.Component{constructor(e){super(e),G(this,"popper",void 0),G(this,"cbContainer",void 0),G(this,"toggleButton",void 0),G(this,"menuContainer",void 0),G(this,"input",void 0),G(this,"searchInput",void 0),G(this,"getCachedFilteredOptions",X((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=c.createRef(),this.cbContainer=c.createRef(),this.toggleButton=c.createRef(),this.menuContainer=c.createRef(),this.input=c.createRef(),this.searchInput=c.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(ee.MENU_NAVIGATION_DIRECTION.UP),e.stopPropagation(),e.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(ee.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 ee.MENU_NAVIGATION_DIRECTION.UP:l=-1;break;case ee.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 c.createElement("div",{className:"cb-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:a=>{a.stopPropagation()},style:{width:n},onBlur:this.handleMenuBlur},c.createElement("div",{className:"cb-search-input-container"},c.createElement(Dr,{value:t,ref:this.searchInput,onChange:this.handleFilterChange,className:"cb-search-input",placeholder:e})),c.createElement("div",{className:"cb-options-container"},c.createElement("div",{className:"cb-options"},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 c.createElement("button",{key:l,type:"button",value:o,className:N("cb-option-btn",{"keyboard-active":t===o}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus},s.title)})}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=Fr({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},u),c.createElement("div",{className:"input-group cb-container",ref:this.cbContainer},c.createElement("input",{value:l||i,className:N("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}),c.createElement("div",{className:"input-group-append cb-dropdown"},c.createElement("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},c.createElement(de,{icon:Tn}),c.createElement(it,{ref:this.popper,options:u,className:N("combobox interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited},this.renderMenuElement()))))}}G(ee,"MENU_NAVIGATION_DIRECTION",tt);G(ee,"DROP_DOWN_MENU_HEIGHT",200);G(ee,"propTypes",{options:E.arrayOf(E.shape({title:E.string.isRequired,value:E.string.isRequired})).isRequired,popperOptions:E.shape({title:E.string.isRequired,value:E.string.isRequired}),onChange:E.func,inputPlaceholder:E.string,searchPlaceholder:E.string,disabled:E.bool,className:E.string,defaultValue:E.string,spellCheck:E.bool,onEnter:E.func,"data-testid":E.string});G(ee,"defaultProps",{onChange(){},inputPlaceholder:"",searchPlaceholder:"Search",disabled:!1,className:"",defaultValue:"",popperOptions:null,spellCheck:!0,onEnter(){},"data-testid":void 0});const di=ee;function hi(r){var{copy:e,kind:t="ghost",tooltip:n="Copy",className:a,"data-testid":i,children:s}=r,[o,l]=cr();return c.createElement(Je,{kind:t,className:a,"data-testid":i,icon:o?In:Nn,tooltip:o?"Copied":n,onClick:()=>{l(typeof e=="function"?e():e)}},s)}function tn(r,e,t){return r.substring(0,e)+t+r.substring(e+1)}function Rr(r,e,t){return r.length<t?"".concat(r).concat(e.substring(r.length,t)):r}function Ot(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 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 kr(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){Lr(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 Lr(r,e,t){return e=$r(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function $r(r){var e=Kr(r,"string");return typeof e=="symbol"?e:String(e)}function Kr(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 Q=V.module("MaskedInput"),ye={FORWARD:"forward",BACKWARD:"backward",NONE:"none"},Re=" ",nn=c.forwardRef((r,e)=>{var{className:t,example:n,getNextSegmentValue:a=(M,S,p)=>p,getPreferredReplacementString:i=tn,onChange:s=()=>!1,onSelect:o=()=>!1,onSubmit:l,pattern:u,placeholder:d,selection:h,value:f,onFocus:b=()=>!1,onBlur:y=()=>!1,"data-testid":C}=r,w=Gt(e),O=g.useMemo(()=>Array.isArray(n)?n:[n],[n]),j=g.useMemo(()=>O[0].replace(/[a-zA-Z0-9]/g,Re),[O]);g.useEffect(function(){if(h!=null){var S;Q.debug("setting selection...",h);var{selectionStart:p,selectionEnd:T,selectionDirection:D}=h;(S=w.current)===null||S===void 0||S.setSelectionRange(p,T,D),Q.debug("selection set!")}},[h,w]);var L=g.useCallback(M=>{for(var S=M,p=M,T=O.length>0?O[0]:f,D=S-1;D>=0&&/[a-zA-Z0-9]/g.test(T.charAt(D));D-=1)S=D;for(var q=p;q<T.length&&/[a-zA-Z0-9]/g.test(T.charAt(q));q+=1)p=q+1;var xe=S===p?ye.NONE:ye.BACKWARD;return{selectionStart:S,selectionEnd:p,selectionDirection:xe}},[O,f]);function _(M,S){for(var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:M.length,T="",D=0;D<p;D+=1)M.charAt(D)!==Re?T=T.concat(M[D]):T=T.concat(S[D]);return T=T.concat(S.substring(p)),T}function H(M){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:M.length,p=new RegExp("^".concat(u,"$"));if(p.test(M))return!0;for(var T=0;T<O.length;T+=1){var D=_(M,O[T],S);if(p.test(D))return!0}return!1}function x(M){var S=L(M),p=S.selectionEnd+1;return p>=f.length?S:L(p)}function W(M){var S=L(M),p=S.selectionStart-1;return p<=0?S:L(p)}function U(M,S){var p=L(M),T=f.substring(p.selectionStart,p.selectionEnd),D=a(p,S,T,f),q=f.substring(0,p.selectionStart)+D+f.substring(p.selectionEnd);H(q,p.selectionEnd)&&(s(q),o(p))}var fe=g.useCallback(M=>{var{selectionStart:S=0,selectionEnd:p=0,selectionDirection:T="none"}=M.target;if(S===null||p===null||T===null){Q.error("Selection attempted on non-text input element",M.target);return}if(Q.debug2("handleSelect",S,p,T),!(h!=null&&S===h.selectionStart&&p===h.selectionEnd)){if(h!=null&&S===f.length&&p===f.length&&M.nativeEvent.type!=="mouseup"){o(kr({},h));return}if(S===p){var D=L(S);Q.debug("Selection segment from ",S,p,"=>",D),o(D)}else o({selectionStart:S,selectionEnd:p,selectionDirection:T})}},[L,o,h,f]),ve=g.useCallback(M=>{var S;if(w.current){Q.debug("handleSelectCapture",M);var p=(S=w.current.selectionStart)!==null&&S!==void 0?S:0;p===f.length&&h!=null&&p!==h.selectionStart&&(M.preventDefault(),M.stopPropagation())}},[w,h,f]);function he(M){if(M.preventDefault(),M.stopPropagation(),!!w.current){var{key:S}=M,{selectionStart:p=0,selectionEnd:T=0}=w.current;if(p===null||T===null){Q.error("Selection arrow nvaigation attempted on non-text input element",M.target);return}S==="ArrowLeft"?o(W(p)):S==="ArrowRight"?o(x(T)):S==="ArrowUp"?U(p,-1):S==="ArrowDown"&&U(p,1)}}function pe(M){if(w.current){Q.debug("handleKeyDown",M);var{key:S}=M,{selectionStart:p=0,selectionEnd:T=0}=w.current;if(p===null||T===null){Q.error("Selection key event on non-text input element",M.target);return}if(S==="Enter"){l==null||l(M);return}if(S.startsWith("Arrow")){he(M);return}if(S==="Delete"||S==="Backspace"){if(M.preventDefault(),M.stopPropagation(),T>=Ot(f,j).length){var D=f.substring(0,p===T?p-1:p),q=Ot(D,j);q!==f&&(s(q),o({selectionStart:q.length,selectionEnd:q.length,selectionDirection:ye.NONE}));return}if(p!==T){var xe=f.substring(0,p)+f.substring(p,T).replace(/[a-zA-Z0-9]/g,Re)+f.substring(T);Q.debug("Range ",p,T,"deleted, setting value",xe),s(xe),o({selectionStart:p,selectionEnd:p,selectionDirection:ye.NONE})}else if(p>0)for(var ge=p-1;ge>=0;ge-=1){var mt=f.substring(0,ge)+f.substring(ge,p).replace(/[a-zA-Z0-9]/g,Re)+f.substring(p);if(mt!==f){s(mt),o({selectionStart:ge,selectionEnd:ge,selectionDirection:ye.NONE});return}}return}if(!(M.altKey||M.metaKey||M.ctrlKey||S.length>1)){M.preventDefault(),M.stopPropagation();for(var ft=Array.from(new Set([S,S.toUpperCase(),S.toLowerCase()])),We=0;We<ft.length;We+=1)for(var vt=ft[We],fn=/[a-zA-Z0-9]/g.test(vt)?O[0].length-1:p,ie=p;ie<=fn;ie+=1){var vn=Rr(f,O[0],ie+1),Ue=i(vn,ie,vt,p,T);if(H(Ue,ie+1)){var pt=L(ie),qe=ie+1,Ge={selectionStart:qe,selectionEnd:qe,selectionDirection:ye.NONE};if(qe>=pt.selectionEnd){var gt=x(ie);gt.selectionStart!==pt.selectionStart&&(Ge=gt)}Q.debug("handleKeyDown",S,"=>",Ue,Ge),s(Ue),o(Ge);return}}}}}return c.createElement("input",{ref:w,className:N("form-control masked-input",t),type:"text",pattern:u,placeholder:d,value:f,onChange:()=>{},onKeyDown:pe,onSelect:fe,onSelectCapture:ve,onFocus:b,onBlur:y,"data-testid":C})});nn.defaultProps={className:"",placeholder:void 0,onChange(){},onSelect(){},getNextSegmentValue:(r,e,t)=>t,getPreferredReplacementString:tn,selection:void 0,onFocus(){},onBlur(){},"data-testid":void 0};const Br=nn;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 Vr(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){Ie(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 Ie(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=_r(r,"string");return typeof e=="symbol"?e:String(e)}function _r(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 rn=class extends g.PureComponent{constructor(e){var t;super(e),Ie(this,"container",void 0),Ie(this,"oldFocus",void 0),Ie(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=c.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=R.getMenuItems(e,!1);t.length>0&&this.setState(n=>({menuItems:R.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=R.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=R.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(c.createElement("hr",{key:"".concat(s,".separator")}));var l=c.createElement(Jt,{key:s,isKeyboardSelected:n===s,isMouseSelected:i===s,menuItem:o,closeMenu:this.handleCloseMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:()=>!1});e.push(l)}var{menuStyle:u}=this.props;return c.createElement("div",{className:"context-menu-container",style:Vr({},u),ref:this.container,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,role:"menuitem",tabIndex:0,"data-testid":t},e)}};Ie(rn,"defaultProps",{closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const Hr=rn;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 xt(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){Me(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 Me(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)}class an extends g.PureComponent{constructor(e){super(e),Me(this,"container",void 0),Me(this,"parent",void 0),Me(this,"popper",void 0),Me(this,"isOpen",void 0),this.handleClick=this.handleClick.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.handleExited=this.handleExited.bind(this),this.container=c.createRef(),this.parent=null,this.popper=c.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=xt({placement:"bottom"},o),s=xt({separateKeyboardMouse:!0},s),c.createElement("div",{className:"menu-actions-listener",ref:this.container,"data-testid":a},c.createElement(it,{ref:this.popper,options:o,className:N("menu-popper",n),onExited:this.handleExited,closeOnBlur:!0,interactive:!0},c.createElement(Hr,{actions:e,closeMenu:this.handleCloseMenu,onMenuOpened:t,options:s,menuStyle:i})))}}Me(an,"defaultProps",{isShown:null,onMenuClosed(){},onMenuOpened(){},options:{},popperOptions:{},popperClassName:"",menuStyle:{},"data-testid":void 0});const fi=an;function be(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 qr(r,e,t){var{selectionStart:n}=r;return n===0?be(e,t,1900,2099,4):n===5?be(e,t,1,12,2):n===8?be(e,t,1,31,2):n===11?be(e,t,0,23,2):n===17||n===14?be(e,t,0,59,2):n===20||n===24||n===28?be(e,t,0,999,3):t}function nt(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 Gr=V.module("DateTimeInput"),zr="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",Qr="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{3}​[0-9]{3}​[0-9]{3}",Zr="".concat(zr," ").concat(Qr),Le="2022-01-01",sn="".concat(Le," 00:00:00.000000000"),Xr="YYYY-MM-DD HH:MM:SS.SSSSSSSSS";function At(r){return r!=null&&r.length>=Le.length?"".concat(r.substring(0,Le.length)).concat(r.substring(Le.length).replace(/\u2007/g,"0")).concat(sn.substring(r.length)):r}function Rt(r){return r.replace(/\u200B/g,"")}var Jr=[nt(sn)],ut=c.forwardRef((r,e)=>{var{className:t="",onChange:n=()=>{},defaultValue:a="",onFocus:i=()=>{},onBlur:s=()=>{},onSubmit:o,"data-testid":l}=r,[u,d]=g.useState(a.length>0?nt(a):""),[h,f]=g.useState(),b=g.useCallback(C=>{Gr.debug("handleChange",C),d(C),n(At(Rt(C)))},[n]),y=g.useCallback(()=>{var C=Rt(u),w=At(C);w!==C&&d(nt(w)),s()},[u,s]);return c.createElement("div",{className:"d-flex flex-row align-items-center"},c.createElement(Br,{ref:e,className:N(t),example:Jr,getNextSegmentValue:qr,onChange:b,onSelect:f,onSubmit:o,pattern:Zr,placeholder:Xr,selection:h,value:u,onFocus:i,onBlur:y,"data-testid":l}))});ut.displayName="DateTimeInput";ut.defaultProps={className:"",onChange:()=>{},defaultValue:"",onFocus:()=>{},onBlur:()=>{},"data-testid":void 0};const vi=ut;function on(r,e,t){return e=Yr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Yr(r){var e=ea(r,"string");return typeof e=="symbol"?e:String(e)}function ea(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 ta=V.module("ItemListItem");class _e extends g.Component{static handleKeyDown(){return ta.log("ItemListItem.handleKeyDown false"),!1}constructor(e){super(e),on(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=c.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 c.createElement("div",{className:N("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},i)}}on(_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 na=_e;function $e(){return $e=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},$e.apply(this,arguments)}function Z(r,e,t){return e=ra(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ra(r){var e=aa(r,"string");return typeof e=="symbol"?e:String(e)}function aa(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 kt=V.module("ItemList"),Lt=5;class z extends g.PureComponent{static renderItem(e){var t,n,{item:a}=e;return c.createElement("div",{className:"item-list-item-content"},a!=null&&((t=(n=a.displayValue)!==null&&n!==void 0?n:a.value)!==null&&t!==void 0?t:"".concat(a)))}constructor(e){super(e),Z(this,"list",void 0),Z(this,"listContainer",void 0),Z(this,"getItemSelected",X((a,i)=>se.isSelected(i,a),{max:z.CACHE_SIZE})),Z(this,"getCachedItem",X((a,i,s,o,l,u,d,h)=>{var f=u({item:s,itemIndex:a,isFocused:o,isSelected:l,style:d});return c.createElement(na,{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:d,key:i},f)},{max:z.CACHE_SIZE})),Z(this,"getOuterElement",X(a=>{var i=c.forwardRef((s,o)=>c.createElement("div",$e({ref:o,tabIndex:-1,onKeyDown:a,role:"presentation"},s)));return i.displayName="ItemListOuterElement",i})),Z(this,"getInnerElement",X(()=>{var a=c.forwardRef((i,s)=>c.createElement("div",$e({className:"item-list-inner-element",ref:s},i)));return a.displayName="ItemListInnerElement",a})),Z(this,"getItemData",X((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=c.createRef(),this.listContainer=c.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:d}=this.props;d(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=se.isSelected(n,e),i=a||R.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:se.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){kt.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){kt.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 d=Math.abs(t.clientX-(l??0)),h=Math.abs(t.clientY-(u??0));d>Lt&&h>Lt&&this.setState({isDragging:!0}),(n||s===e)&&(this.focusItem(e),a?(!n&&!this.getItemSelected(e,o)&&!R.isModifierKeyDown(t)&&this.deselectAll(),this.selectRange([Math.min(s,e),Math.max(s,e)])):this.toggleSelect(e,t.shiftKey,R.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=R.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){se.validateRange(e),this.setState(t=>{var{selectedRanges:n}=t;return{selectedRanges:se.deselectRange(n,e)}})}selectItem(e){var{disableSelect:t}=this.props;t||this.selectRange([e,e])}selectRange(e){se.validateRange(e),this.setState(t=>{var{selectedRanges:n}=t;return{selectedRanges:se.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 d=a[t-i];return this.getCachedItem(t,t,d,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 c.createElement(yn,{className:"item-list-auto-sizer",onResize:this.handleResize},u=>{var{width:d,height:h}=u;return c.createElement(bn,{className:"item-list-scroll-pane",height:h,width:d,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},this.renderInnerElement)})}}Z(z,"CACHE_SIZE",1e3);Z(z,"DEFAULT_ROW_HEIGHT",20);Z(z,"DEFAULT_OVERSCAN",10);Z(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 Ne(){return Ne=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ne.apply(this,arguments)}function Ce(r,e,t){return e=ia(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ia(r){var e=sa(r,"string");return typeof e=="symbol"?e:String(e)}function sa(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 te extends g.PureComponent{static renderHandle(){return c.createElement("div",null,c.createElement(qt,null,"Drag to re-order"),c.createElement(de,{icon:On}))}static renderBadge(e){var{text:t}=e;return t!=null&&t.length>0?c.createElement("span",{className:"number-badge"},t):null}static renderTextItem(e){var{text:t,badgeText:n="",className:a=""}=e;return c.createElement("div",{className:N("item-list-item-content","draggable-item-list-item-content",a)},c.createElement("span",{className:"title"},t),te.renderBadge({text:n}),te.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 te.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),Ce(this,"itemList",void 0),Ce(this,"getCachedDraggableItem",X((t,n,a,i,s,o,l,u)=>c.createElement(Sn,{key:i,draggableId:te.getDraggableId(t,i),index:i,isDragDisabled:l},d=>c.createElement("div",Ne({role:"menuitem",className:"draggable-item-list-item",ref:d.innerRef,tabIndex:-1},d.draggableProps,d.dragHandleProps),n({item:a,itemIndex:i,isFocused:s,isSelected:o,style:u,isClone:!1}))),{max:z.CACHE_SIZE})),Ce(this,"getCachedRenderDraggableItem",X((t,n,a)=>i=>{var{item:s,itemIndex:o,isFocused:l,isSelected:u,style:d}=i;return this.getCachedDraggableItem(t,a,s,o,l,u,n,d)},{max:1})),Ce(this,"getCachedRenderClone",X((t,n,a,i)=>(s,o,l)=>{var{selectedCount:u}=this.state,{draggableProps:d,dragHandleProps:h,innerRef:f}=s,{index:b}=l.source,y=n[b-a];return c.createElement("div",Ne({className:N("draggable-item-list-dragging-item-container",t)},d,h,{ref:f}),c.createElement("div",{className:N("draggable-item-list-dragging-item",{"two-dragged":u===2},{"multiple-dragged":u>2})},i({item:y,itemIndex:b,isFocused:!1,isSelected:!0,style:{},isClone:!0,selectedCount:u})))},{max:1})),this.handleSelectionChange=this.handleSelectionChange.bind(this),this.itemList=c.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:se.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:d,items:h,offset:f,onFocusChange:b,onSelect:y,onViewportChange:C,renderItem:w,rowHeight:O,selectedRanges:j,style:L,"data-testid":_}=this.props;return c.createElement(En,{isDropDisabled:o,droppableId:a,mode:"virtual",renderClone:this.getCachedRenderClone(n,h,f,w),"data-testid":_},(H,x)=>c.createElement("div",Ne({role:"menu",className:N("draggable-item-list",e,{"is-drop-disabled":o,"is-drag-disabled":s,"is-dragging-from-this":x.draggingFromThisWith,"is-dragging-over":x.isDraggingOver,"is-dropping":x.draggingOverWith}),style:L,ref:H.innerRef},H.droppableProps),c.createElement(z,{focusSelector:".draggable-item-list-item",isDoubleClickSelect:i,isDragSelect:!1,isMultiSelect:l,isStickyBottom:u,itemCount:d,items:h,onFocusChange:b,onSelect:y,onSelectionChange:this.handleSelectionChange,onViewportChange:C,offset:f,ref:this.itemList,renderItem:this.getCachedRenderDraggableItem(t,s,w),rowHeight:O,selectedRanges:j})))}}Ce(te,"DEFAULT_ROW_HEIGHT",30);Ce(te,"defaultProps",{className:"",draggingItemClassName:"",offset:0,items:[],rowHeight:te.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!0,isDropDisabled:!1,isDragDisabled:!1,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,style:null,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},renderItem:te.renderItem,selectedRanges:[],draggablePrefix:"draggable-item",droppableId:"droppable-item-list","data-testid":void 0});const pi=te;class Ke{static reorder(e,t,n,a){var i=e===n?Ke.adjustDestinationIndex(a,t):a,s=Ke.removeItems(e,t);return n.splice(i,0,...s),s}static removeItems(e,t){for(var n=[],a=t.map((d,h)=>({range:d,index:h})).sort((d,h)=>h.range[0]-d.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 Mn(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 gi=Ke;function oa(r){var{on:e,id:t,className:n,isInvalid:a,disabled:i=!1,onClick:s,"data-testid":o}=r;return c.createElement("button",{type:"button",className:N("btn","btn-switch",n,{active:e},{"is-invalid":a}),id:t,onClick:s,disabled:i,"data-testid":o},c.createElement("div",{className:"handle"}))}function $t(r){return r.isOn!==void 0}function la(r){var{item:e,onSelect:t=()=>{},"data-testid":n}=r,{icon:a,subtitle:i,title:s}=e,o=g.useMemo(()=>$t(e)?()=>{e.onChange(!e.isOn)}:t,[e,t]);return c.createElement("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"},a!==void 0&&c.createElement("div",{className:"icon"},c.createElement(de,{icon:a})),c.createElement("div",{className:"title"},s),i!==void 0&&c.createElement("div",{className:"shortcut"},i),c.createElement("div",{className:"accessory","data-testid":n},$t(e)?c.createElement(oa,{on:e.isOn,onClick:l=>{l.stopPropagation(),o()}}):c.createElement(de,{icon:Ut})))}function yi(r){var{items:e,onSelect:t=()=>{},"data-testid":n}=r;return c.createElement("div",{className:"navigation-menu-view","data-testid":n},c.createElement("ul",{className:"navigation-menu-list"},e.map((a,i)=>c.createElement("li",{key:a.title},c.createElement(la,{item:a,onSelect:()=>{t(i)}})))))}function bi(r){var{children:e,onBack:t,onClose:n,title:a,"data-testid":i}=r;return c.createElement("div",{className:"navigation-page","data-testid":i},c.createElement("div",{className:"navigation-title-bar"},c.createElement("div",{className:"navigation-left-buttons"},t!==void 0&&c.createElement(Je,{kind:"ghost",className:"btn-back","data-testid":"btn-page-back",onClick:t,icon:Pn},"Back")),c.createElement("div",{className:"navigation-title"},a),c.createElement("div",{className:"navigation-right-buttons"},n!==void 0&&c.createElement(Je,{kind:"ghost",className:"btn-close px-2 m-1","data-testid":"btn-page-close",onClick:n,icon:Dn,tooltip:"Close"}))),c.createElement("div",{className:"navigation-content"},e))}function Si(r){var{children:e,"data-testid":t}=r,n=g.useMemo(()=>c.Children.toArray(e),[e]),a=Gn(n),[i,s]=g.useState(n[n.length-1]),[o,l]=g.useState(null),[u,d]=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),d(a[a.length-1]))}},[n,a,o,u,i]);var h=g.useCallback(()=>{s(o),l(null)},[o]),f=g.useCallback(()=>{d(null)},[]);return c.createElement("div",{className:"navigation-stack"},c.createElement("div",{className:"main-view","data-testid":t},i),c.createElement(Qe,{in:u!=null,timeout:Ze.transitionMidMs,classNames:"slide-right",onEntered:f},c.createElement(c.Fragment,null,u!=null&&c.createElement("div",{className:"popping-view"},u))),c.createElement(Qe,{in:o!=null,timeout:Ze.transitionMidMs,classNames:"slide-left",onEntered:h},c.createElement(c.Fragment,null,o!=null&&c.createElement("div",{className:"pushing-view"},o))))}function Ei(r){var{children:e,disabled:t,value:n,"data-testid":a}=r;return c.createElement("option",{value:n,disabled:t,"data-testid":a},e)}function Mi(r){var{children:e,disabled:t=!1,name:n,onChange:a,value:i="","data-testid":s}=r,[o]=g.useState(n??rt());return c.createElement(c.Fragment,null,c.Children.map(e,l=>{var u,d;return l?c.cloneElement(l,{name:o,onChange:(u=l.props.onChange)!==null&&u!==void 0?u:a,checked:i===l.props.value,disabled:(d=l.props.disabled)!==null&&d!==void 0?d:t,"data-testid":s}):null}))}var ct=c.forwardRef((r,e)=>{var{checked:t,children:n,className:a="",disabled:i=!1,inputClassName:s="",isInvalid:o=!1,labelClassName:l="",name:u,onChange:d,value:h,"data-testid":f}=r,[b]=g.useState(rt());return c.createElement("div",{className:N("custom-control custom-radio",a)},c.createElement("input",{type:"radio",id:b,"data-testid":f,name:u,ref:e,className:N("custom-control-input",s,{"is-invalid":o}),checked:t,disabled:i,value:h,onChange:d}),c.createElement("label",{className:N("custom-control-label",l),htmlFor:b},n))});ct.displayName="RadioItem";ct.defaultProps={checked:void 0,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};const Ci=ct;function wi(r){var{children:e,onBlur:t,onChange:n,className:a,defaultValue:i,name:s,value:o,disabled:l,"data-testid":u}=r,d=g.useCallback(h=>{n(h.target.value)},[n]);return c.createElement("select",{className:N("custom-select",a),onBlur:t,onChange:d,defaultValue:i,value:o,name:s,disabled:l,"data-testid":u},e)}function Ee(r,e,t){return e=ua(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ua(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)}class ln extends g.PureComponent{constructor(e){super(e),Ee(this,"list",void 0),Ee(this,"topRow",void 0),Ee(this,"bottomRow",void 0),Ee(this,"getCachedItem",X((t,n,a,i,s,o,l)=>{var u={height:s},d=i??a;return c.createElement("li",{className:"value-list-item",style:u,key:n,tabIndex:-1},c.createElement(Nr,{checked:o,disabled:l,onChange:()=>this.handleSelect(t)},d))},{max:1e3})),Ee(this,"getCachedItems",X((t,n,a,i)=>{for(var s=[],o=0;o<t.length;o+=1){var l=t[o],{value:u,displayValue:d,isSelected:h}=l,f=a+o,b=f,y=this.getCachedItem(f,b,u,d,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=c.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 c.createElement("div",{className:N("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},c.createElement("div",{className:"select-value-list",style:{height:i*o}},c.createElement("ol",{className:"select-value-list-content",style:{position:"absolute",height:a.length*o,top:s*o,left:0}},u)))}}Ee(ln,"defaultProps",{disabled:!1,rowHeight:21,onBlur:()=>{},"data-testid":void 0});const Ti=ln;function le(r,e,t){return e=da(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function da(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 Kt=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 I;(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"})(I||(I={}));var ma=new Set([I.ENTER,I.DELETE,I.F1,I.F2,I.F3,I.F4,I.F5,I.F6,I.F7,I.F8,I.F9,I.F10,I.F11,I.F12]);class F extends Wt{static isAllowedKey(e){return Object.values(I).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||ma.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===I.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 I.ENTER:t+="⏎";break;case I.ESCAPE:t+="⎋";break;case I.BACKSPACE:t+="⌫";break;case I.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(),le(this,"id",void 0),le(this,"name",void 0),le(this,"tooltip",void 0),le(this,"isEditable",void 0),le(this,"defaultKeyState",void 0),le(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)?(Kt.debug2("Shortcut ".concat(this.id," updated to ").concat(JSON.stringify(e))),this.keyState=e,this.dispatchEvent(new zt("onUpdate",{detail:this}))):Kt.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))}}le(F,"NULL_KEY_STATE",{metaKey:!1,shiftKey:!1,altKey:!1,ctrlKey:!1,keyValue:null});le(F,"isMacPlatform",R.isMacPlatform());function Bt(r,e,t){return e=fa(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function fa(r){var e=va(r,"string");return typeof e=="symbol"?e:String(e)}function va(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 Vt=V.module("ShortcutRegistry");class pa extends Wt{constructor(){super(...arguments),Bt(this,"shortcutMap",new Map),Bt(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 Vt.warn("Skipping attempt to add duplicate shortcut ID to registry: ".concat(e.id)),t;Vt.debug2("Adding shortcut to registry: ".concat(e.id)),e.addEventListener("onUpdate",i=>{var{detail:s}=i;return this.dispatchEvent(new zt("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 ga=Object.freeze(new pa);const Se=ga;var ya={COPY:Se.createAndAdd({id:"GLOBAL.COPY",name:"Copy",shortcut:[K.CTRL,I.C],macShortcut:[K.CMD,I.C],isEditable:!1}),PASTE:Se.createAndAdd({id:"GLOBAL.PASTE",name:"Paste",shortcut:[K.CTRL,I.V],macShortcut:[K.CMD,I.V],isEditable:!1}),SAVE:Se.createAndAdd({id:"GLOBAL.SAVE",name:"Save",shortcut:[K.CTRL,I.S],macShortcut:[K.CMD,I.S],isEditable:!1}),SELECT_ALL:Se.createAndAdd({id:"GLOBAL.SELECT_ALL",name:"Select All",shortcut:[K.CTRL,I.A],macShortcut:[K.CMD,I.A],isEditable:!1}),LINKER:Se.createAndAdd({id:"GLOBAL.LINKER",name:"Linker",shortcut:[K.CTRL,I.L],macShortcut:[K.CMD,I.L]}),LINKER_CLOSE:Se.createAndAdd({id:"GLOBAL.LINKER_CLOSE",name:"Close Linker Overlay",shortcut:[I.ESCAPE],macShortcut:[I.ESCAPE],isEditable:!1})};const Ii=ya;function un(){return Ve(Fn,"No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?")}function ba(r,e){var t=un(),n=g.useMemo(()=>new t.CoreClient(r,e),[t,r,e]);return g.useEffect(()=>()=>{n.disconnect()},[n]),n}var cn=g.createContext(null);function Ni(r){var{serverUrl:e,options:t,children:n}=r,a=ba(e,t);return c.createElement(cn.Provider,{value:a},n)}function Sa(){return Ve(cn,"No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?")}var Ea=1e4;function Oi(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ea;return new Promise((n,a)=>{var i,s=setTimeout(()=>{var l;(l=i)===null||l===void 0||l(),a(new st("Variable ".concat(e," not found")))},t);function o(l){var u=l.created.find(h=>h.title===e);if(u!=null){var d;clearTimeout(s),(d=i)===null||d===void 0||d(),n(u)}}i=r.subscribeToFieldUpdates(o)})}function dt(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)}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""}}dt(He,"TYPE_GLOBAL","type-global");dt(He,"TYPE_CONTEXT_PRESET","type-context-preset");dt(He,"TYPE_CONTEXT_CUSTOM","type-context-custom");const B=He;class wa extends B{format(e){switch(e){case 1:case!0:return"true";case 0:case!1:return"false";default:return""}}}const Ta=wa;class Ia extends B{format(e){return String.fromCharCode(e)}}const Na=Ia;function ue(r,e,t){return e=Oa(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Oa(r){var e=Pa(r,"string");return typeof e=="symbol"?e:String(e)}function Pa(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 jt=V.module("DateTimeColumnFormatter");class Y 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=Y.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=Y.makeFormatStringMap(e,t);return[...n.keys()]}constructor(e){var{timeZone:t="",showTimeZone:n=!0,showTSeparator:a=!1,defaultDateTimeFormatString:i=Y.DEFAULT_DATETIME_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ue(this,"dh",void 0),ue(this,"dhTimeZone",void 0),ue(this,"defaultDateTimeFormatString",void 0),ue(this,"showTimeZone",void 0),ue(this,"showTSeparator",void 0),ue(this,"formatStringMap",void 0);var s=t||Y.DEFAULT_TIME_ZONE_ID;try{this.dhTimeZone=e.i18n.TimeZone.getTimeZone(s)}catch{jt.error("Unsupported time zone id",s),this.dhTimeZone=e.i18n.TimeZone.getTimeZone(Y.DEFAULT_TIME_ZONE_ID)}this.dh=e,this.defaultDateTimeFormatString=i,this.showTimeZone=n,this.showTSeparator=a,this.formatStringMap=Y.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{jt.error("Invalid format arguments")}return""}}ue(Y,"DEFAULT_DATETIME_FORMAT_STRING","yyyy-MM-dd HH:mm:ss.SSS");ue(Y,"DEFAULT_TIME_ZONE_ID","America/New_York");function re(r,e,t){return e=Da(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Da(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)}var xa=V.module("DecimalColumnFormatter");class k 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 k.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 k.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=k.DEFAULT_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),re(this,"defaultFormatString",void 0),re(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{xa.error("Invalid format arguments")}return""}}re(k,"DEFAULT_FORMAT_STRING","###,##0.0000");re(k,"FORMAT_PERCENT",k.makePresetFormat("Percent","##0.00%"));re(k,"FORMAT_BASIS_POINTS",k.makePresetFormat("Basis Points","###,##0 bp",1e4));re(k,"FORMAT_MILLIONS",k.makePresetFormat("Millions","###,##0.000 mm",1e-6));re(k,"FORMAT_SCIENTIFIC_NOTATION",k.makePresetFormat("Scientific Notation","0.0000E0"));re(k,"FORMAT_ROUND",k.makePresetFormat("Round","###,##0"));re(k,"FORMAT_ROUND_TWO_DECIMALS",k.makePresetFormat("0.00","###,##0.00"));re(k,"FORMAT_ROUND_FOUR_DECIMALS",k.makePresetFormat("0.0000","###,##0.0000"));class Aa extends B{format(e){return"".concat(e)}}const Ra=Aa;function Pe(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=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 $a=V.module("IntegerColumnFormatter");class ne 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 ne.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 ne.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=ne.DEFAULT_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Pe(this,"dh",void 0),Pe(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{$a.error("Invalid format arguments")}return""}}Pe(ne,"DEFAULT_FORMAT_STRING","###,##0");Pe(ne,"FORMAT_MILLIONS",ne.makePresetFormat("Millions","###,##0.000 mm",1e-6));Pe(ne,"FORMAT_SCIENTIFIC_NOTATION",ne.makePresetFormat("Scientific Notation","0.0000E0"));class Ka extends B{format(e){return e}}function dn(r,e,t){return e=Ba(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ba(r){var e=Va(r,"string");return typeof e=="symbol"?e:String(e)}function Va(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 d="".concat(n).padStart(4,"0"),h="".concat(a+1).padStart(2,"0"),f="".concat(i).padStart(2,"0"),b="".concat(s).padStart(2,"0"),y="".concat(o).padStart(2,"0"),C="".concat(l).padStart(2,"0"),w="".concat(u).padStart(9,"0"),O="".concat(d,"-").concat(h,"-").concat(f," ").concat(b,":").concat(y,":").concat(C,".").concat(w);return e.i18n.DateTimeFormat.parse($.FULL_DATE_FORMAT,O,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:d,nanos:h}=n;if(t.nanos!=null){if(t.nanos.length===9)return null;h=$.getNextNanos(t.nanos),h>999999999&&(d+=1,h=0)}else t.seconds!=null?d+=1:t.minutes!=null?u+=1:t.hours!=null?l+=1:t.date!=null?o+=1:t.month!=null?s+=1:i+=1;var f=new Date(i,s,o,l,u,d);return $.makeDateWrapper(e,a,f.getFullYear(),f.getMonth(),f.getDate(),f.getHours(),f.getMinutes(),f.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,d=n!=null?parseInt(n,10):1,h=a!=null?parseInt(a,10):0,f=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(d)||Number.isNaN(h)||Number.isNaN(f)||Number.isNaN(b)||Number.isNaN(y)?null:{year:l,month:u,date:d,hours:h,minutes:f,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,,d,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:d}}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()),d=new Date(u.getFullYear(),u.getMonth(),u.getDate()-1),h=$.makeDateWrapper(e,n,d.getFullYear(),d.getMonth(),d.getDate()),f=$.makeDateWrapper(e,n,u.getFullYear(),u.getMonth(),u.getDate());return[h,f]}if(a==="now"){var b=new Date(Date.now()),y=e.DateWrapper.ofJsDate(b);return[y,null]}var C=$.parseDateTimeString(a);if(C.year==null&&C.month==null&&C.date==null)throw new Error("Unable to extract year, month, or day ".concat(a));var w=$.parseDateValues(C.year,C.month,C.date,C.hours,C.minutes,C.seconds,C.nanos);if(w==null)throw new Error("Unable to extract date values from ".concat(C));var O=$.makeDateWrapper(e,n,w.year,w.month,w.date,w.hours,w.minutes,w.seconds,w.nanos),j=$.getNextDate(e,C,w,n);return[O,j]}static getJsDate(e){return typeof e=="number"?new Date(e):e.asDate()}}dn($,"FULL_DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSSSSS");dn($,"months",["january","february","march","april","may","june","july","august","september","october","november","december"]);function ht(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=_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)}class De{}ht(De,"not","not");ht(De,"and","and");ht(De,"or","or");function Pi(r){if(!(r==="not"||r==="and"||r==="or"))throw new Error("operator is not a valid FilterOperatorValue")}function P(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=Wa(r,"string");return typeof e=="symbol"?e:String(e)}function Wa(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 v{}P(v,"eq","eq");P(v,"eqIgnoreCase","eqIgnoreCase");P(v,"notEq","notEq");P(v,"notEqIgnoreCase","notEqIgnoreCase");P(v,"greaterThan","greaterThan");P(v,"greaterThanOrEqualTo","greaterThanOrEqualTo");P(v,"lessThan","lessThan");P(v,"lessThanOrEqualTo","lessThanOrEqualTo");P(v,"in","in");P(v,"inIgnoreCase","inIgnoreCase");P(v,"notIn","notIn");P(v,"notInIgnoreCase","notInIgnoreCase");P(v,"isTrue","isTrue");P(v,"isFalse","isFalse");P(v,"isNull","isNull");P(v,"invoke","invoke");P(v,"contains","contains");P(v,"notContains","notContains");P(v,"containsIgnoreCase","containsIgnoreCase");P(v,"startsWith","startsWith");P(v,"endsWith","endsWith");P(v,"containsAny","containsAny");function _t(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 Te(r){return function(){var e=this,t=arguments;return new Promise(function(n,a){var i=r.apply(e,t);function s(l){_t(i,n,a,s,o,"next",l)}function o(l){_t(i,n,a,s,o,"throw",l)}s(void 0)})}}function me(r,e,t){return e=Ua(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ua(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)}var ae=V.module("TableUtils");class m{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=m.getSortIndex(e,t);return n!=null?e[n]:null}static getFilterText(e){return e?e.toString():null}static getFilterTypes(e){return m.isBooleanType(e)?[v.isTrue,v.isFalse,v.isNull]:m.isCharType(e)||m.isNumberType(e)||m.isDateType(e)?[v.eq,v.notEq,v.greaterThan,v.greaterThanOrEqualTo,v.lessThan,v.lessThanOrEqualTo]:m.isTextType(e)?[v.eq,v.eqIgnoreCase,v.notEq,v.notEqIgnoreCase,v.contains,v.notContains,v.startsWith,v.endsWith]:[]}static getNextSort(e,t,n){if(n<0||n>=e.length)return null;var a=m.getSortForColumn(t,e[n].name);return a===null?e[n].sort().asc():a.direction===m.sortDirection.ascending?a.desc():null}static makeColumnSort(e,t,n,a){if(t<0||t>=e.length||n===m.sortDirection.none)return null;var i=e[t].sort();switch(n){case m.sortDirection.ascending:i=i.asc();break;case m.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=m.getNextSort(t,e,n);return m.setSortForColumn(e,t[n].name,i,a)}static sortColumn(e,t,n,a,i,s){if(n<0||n>=t.length)return[];var o=m.makeColumnSort(t,n,a,i);return m.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=m.getSortIndex(e,t),s=[];return a&&(s=s.concat(e.filter(o=>{var{direction:l}=o;return l!==m.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 m.dataType.BOOLEAN:return m.dataType.BOOLEAN;case"char":case"java.lang.Character":case m.dataType.CHAR:return m.dataType.CHAR;case"java.lang.String":case m.dataType.STRING:return m.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 m.dataType.DATETIME:return m.dataType.DATETIME;case"double":case"java.lang.Double":case"float":case"java.lang.Float":case"java.math.BigDecimal":case m.dataType.DECIMAL:return m.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 m.dataType.INT:return m.dataType.INT;default:return m.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 m.isIntegerType(e)||m.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 m.getNormalizedType(e)===m.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 et.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,d)=>{s=setTimeout(()=>{i(),o=!1,d(new st('Event "'.concat(t,'" timed out.')))},n),i=e.addEventListener(t,h=>{if(a!=null&&!a(h)){ae.debug2("Event triggered, but matcher returned false.");return}ae.debug2("Event triggered, resolving."),i(),clearTimeout(s),o=!1,u(h)})});return l.cancel=()=>{if(o){ae.debug2("Pending promise cleanup."),i(),clearTimeout(s),o=!1;return}ae.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=m.removeCommas(t);if(m.NUMBER_REGEX.test(n))return parseFloat(n);throw new Error("Invalid number '".concat(e,"'"))}static getFilterOperatorString(e){switch(e){case v.eq:return"=";case v.notEq:return"!=";case v.greaterThan:return">";case v.greaterThanOrEqualTo:return">=";case v.lessThan:return"<";case v.lessThanOrEqualTo:return"<=";case v.contains:return"~";case v.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 ir.sort(i,s,t)})}constructor(e){me(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,d=0;d<l.length;d+=1){var h=l[d].trim();if(h.length>0){var f=this.makeQuickFilterFromComponent(e,h,n);if(f)u?u=u.and(f):u=f;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 m.isNumberType(a)?this.makeQuickNumberFilter(e,t):m.isBooleanType(a)?this.makeQuickBooleanFilter(e,t):n!=null&&m.isDateType(a)?this.makeQuickDateFilter(e,t,n):m.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,d=null,h=null,f=null;if(o!==null&&o.length>3&&([,l,u,d,h,f]=o),f!=null&&f.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(d==null)return null;if(d=m.removeCommas(d),m.isLongType(e.type))try{d=a.FilterValue.ofNumber(a.LongWrapper.ofString("".concat(u!=null?"-":"").concat(d)))}catch(b){return ae.warn("Unable to create long filter",b),null}else{if(d=parseFloat(d),d==null||Number.isNaN(d))return null;d=a.FilterValue.ofNumber(u!=null?0-d:d)}return i=e.filter(),m.makeRangeFilterWithOperation(i,l,d)}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 d=null,h=null;switch(l.startsWith("*")?(d="*",l=l.substring(1)):l.endsWith("*")&&!l.endsWith("\\*")&&(h="*",l=l.substring(0,l.length-1)),l=m.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 d==="*"?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 d==="*"?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 d=m.makeBooleanValue(l);return d!=null&&d?u=u.isTrue():d===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=v.eq;switch(o){case"<":u=v.lessThan;break;case"<=":case"=<":u=v.lessThanOrEqualTo;break;case">":u=v.greaterThan;break;case">=":case"=>":u=v.greaterThanOrEqualTo;break;case"!=":case"!":u=v.notEq;break;case"=":case"==":default:u=v.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,d=e.filter();if(l==null)return n===v.notEq?d.isNull().not():d.isNull();switch(n){case v.eq:{if(u!=null){var h=d.greaterThanOrEqualTo(l),f=d.lessThan(u);return h.and(f)}return d.eq(l)}case v.lessThan:return d.lessThan(l);case v.lessThanOrEqualTo:return u!=null?d.lessThan(u):d.lessThanOrEqualTo(l);case v.greaterThan:return u!=null?d.greaterThanOrEqualTo(u):d.greaterThan(l);case v.greaterThanOrEqualTo:return d.greaterThanOrEqualTo(l);case v.notEq:{if(u!=null){var b=d.lessThan(l),y=d.greaterThanOrEqualTo(u);return b.or(y)}return d.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 d=e.filter();if(l.toLowerCase()==="null")switch(o){case"=":return d.isNull();case"!=":case"!":return d.isNull().not();default:return null}var h=n.FilterValue.ofString(m.isRangeOperation(o)?m.quoteValue(l):l);return m.makeRangeFilterWithOperation(d,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 d=a[u],{selectedType:h,value:f}=d;if(h!=null&&h.length>0&&f!=null&&f.length>0)try{var b=this.makeAdvancedValueFilter(e,h,f,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{ae.error("Unexpected filter operator",y,b),l=null;break}}}else ae.debug2("Empty filter ignored for",h,f)}catch(w){ae.error("Unable to create filter",w),l=null;break}}var C=this.makeSelectValueFilter(e,o,s);return C!=null&&(l!=null?l=l.and(C):l=C),l}makeAdvancedValueFilter(e,t,n,a){var{dh:i}=this;if(m.isDateType(e.type))return this.makeQuickDateFilterWithOperation(e,n,t,a);if(m.isNumberType(e.type)||m.isCharType(e.type))return this.makeQuickFilter(e,"".concat(m.getFilterOperatorString(t)).concat(n));var s=this.makeFilterValue(e.type,n),o=e.filter();switch(t){case v.eq:return o.eq(s);case v.eqIgnoreCase:return o.eqIgnoreCase(s);case v.notEq:return o.notEq(s);case v.notEqIgnoreCase:return o.notEqIgnoreCase(s);case v.greaterThan:return o.greaterThan(s);case v.greaterThanOrEqualTo:return o.greaterThanOrEqualTo(s);case v.lessThan:return o.lessThan(s);case v.lessThanOrEqualTo:return o.lessThanOrEqualTo(s);case v.isTrue:return o.isTrue();case v.isFalse:return o.isFalse();case v.isNull:return o.isNull();case v.contains:return o.isNull().not().and(o.invoke("matches",i.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E.*"))));case v.notContains:return o.isNull().or(o.invoke("matches",i.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E.*"))).not());case v.startsWith:return o.isNull().not().and(o.invoke("matches",i.FilterValue.ofString("(?s)(?i)^\\Q".concat(n,"\\E.*"))));case v.endsWith:return o.isNull().not().and(o.invoke("matches",i.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E$"))));case v.in:case v.inIgnoreCase:case v.notIn:case v.notInIgnoreCase:case v.invoke:default:throw new Error("Unexpected filter operation: ".concat(t))}}applyNeverFilter(e,t){var n=arguments,a=this;return Te(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:m.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 Te(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:m.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:s}=a;return m.executeAndWaitForEvent(o=>o==null?void 0:o.applyCustomColumns(t),e,s.Table.EVENT_CUSTOMCOLUMNSCHANGED,i)})()}applyFilter(e,t){var n=arguments,a=this;return Te(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:m.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:s}=a;return m.executeAndWaitForEvent(o=>o==null?void 0:o.applyFilter(t),e,s.Table.EVENT_FILTERCHANGED,i)})()}applySort(e,t){var n=arguments,a=this;return Te(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:m.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:s}=a;return m.executeAndWaitForEvent(o=>o==null?void 0:o.applySort(t),e,s.Table.EVENT_SORTCHANGED,i)})()}makeNeverFilter(e){var{dh:t}=this,n=null;m.isTextType(e.type)?n=t.FilterValue.ofString("a"):m.isBooleanType(e.type)?n=t.FilterValue.ofBoolean(!0):m.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=m.getBaseType(e);return m.isTextType(a)?n.FilterValue.ofString(t):m.isLongType(a)?n.FilterValue.ofNumber(n.LongWrapper.ofString(m.removeCommas(t))):n.FilterValue.ofNumber(m.removeCommas(t))}makeFilterRawValue(e,t){var{dh:n}=this;return m.isTextType(e)?n.FilterValue.ofString(t):m.isBooleanType(e)?n.FilterValue.ofBoolean(t):n.FilterValue.ofNumber(t)}makeValue(e,t,n){var{dh:a}=this;if(t==="null")return null;if(m.isTextType(e))return t;if(m.isLongType(e))return a.LongWrapper.ofString(m.removeCommas(t));if(m.isBooleanType(e))return m.makeBooleanValue(t,!0);if(m.isDateType(e)){var[i]=$.parseDateRange(a,t,n);return i}return m.isNumberType(e)?m.makeNumberValue(t):(ae.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:m.isTextType(e.type)?i.push(a.FilterValue.ofString(typeof l=="number"?String.fromCharCode(l):l)):m.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)}}me(m,"dataType",{BOOLEAN:"boolean",CHAR:"char",DATETIME:"datetime",DECIMAL:"decimal",INT:"int",STRING:"string",UNKNOWN:"unknown"});me(m,"sortDirection",{ascending:"ASC",descending:"DESC",reverse:"REVERSE",none:null});me(m,"APPLY_TABLE_CHANGE_TIMEOUT_MS",3e4);me(m,"REVERSE_TYPE",Object.freeze({NONE:"none",PRE_SORT:"pre-sort",POST_SORT:"post-sort"}));me(m,"NUMBER_REGEX",/^-?\d+(\.\d+)?$/);me(m,"executeAndWaitForEvent",function(){var r=Te(function*(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:m.APPLY_TABLE_CHANGE_TIMEOUT_MS;if(t==null)return null;var i=m.makeCancelableTableEventPromise(t,n,a);return e(t),yield i,t});return function(e,t,n){return r.apply(this,arguments)}}());function ke(r,e,t){return e=Ga(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ga(r){var e=za(r,"string");return typeof e=="symbol"?e:String(e)}function za(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{static makeColumnFormatMap(e){return e==null?new Map:e.reduce((t,n)=>{var a=m.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;ke(this,"defaultColumnFormatter",void 0),ke(this,"typeFormatterMap",void 0),ke(this,"columnFormatMap",void 0),ke(this,"truncateNumbersWithPound",void 0),this.defaultColumnFormatter=new Ra,this.typeFormatterMap=new Map([[m.dataType.BOOLEAN,new Ta],[m.dataType.CHAR,new Na],[m.dataType.DATETIME,new Y(e,n)],[m.dataType.DECIMAL,new k(e,a)],[m.dataType.INT,new ne(e,i)],[m.dataType.STRING,new Ka]]),this.columnFormatMap=hn.makeColumnFormatMap(t),this.truncateNumbersWithPound=s}getColumnFormatMapForType(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=m.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=m.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(m.dataType.DATETIME);return t==null||(e=t.dhTimeZone)===null||e===void 0?void 0:e.id}}function Qa(r){if(r&&r.formatter){var{formatter:e}=r;return e}}function Za(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 Xa(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 Di={getColumnFormats:Qa,getDateTimeFormatterOptions:Za,isCustomColumnFormatDefined:Xa};var Fi=g.createContext({}),xi=g.createContext({}),Ja=g.createContext(null);function Ht(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 Ya(r){return function(){var e=this,t=arguments;return new Promise(function(n,a){var i=r.apply(e,t);function s(l){Ht(i,n,a,s,o,"next",l)}function o(l){Ht(i,n,a,s,o,"throw",l)}s(void 0)})}}var ei=V.module("@deephaven/jsapi-components.ConnectionBootstrap"),mn=g.createContext(null);function Ai(r){var{children:e}=r,t=un(),n=Sa(),[a,i]=g.useState(),[s,o]=g.useState();return g.useEffect(function(){var u=!1;function d(){return h.apply(this,arguments)}function h(){return h=Ya(function*(){try{var f=yield n.getAsIdeConnection();if(u)return;o(f)}catch(b){if(u)return;i(b)}}),h.apply(this,arguments)}return d(),()=>{u=!0}},[t,n]),g.useEffect(function(){if(s==null)return;function u(h){var{detail:f}=h;ei.info("Shutdown","".concat(JSON.stringify(f))),i("Server shutdown: ".concat(f??"Unknown reason"))}var d=s.addEventListener(t.IdeConnection.EVENT_SHUTDOWN,u);return d},[t,s]),s==null||a!=null?c.createElement(xn,{"data-testid":"connection-bootstrap-loading",isLoading:s==null,errorMessage:a!=null?"".concat(a):void 0}):c.createElement(mn.Provider,{value:s},e)}function Ri(){return Ve(mn,"No IdeConnection available in useConnection. Was code wrapped in ConnectionBootstrap or ConnectionContext.Provider?")}function ki(){return Ve(Ja,"No user available in useUser. Was code wrapped in UserBootstrap or UserContext.Provider?")}export{cr as $,fi as A,Je as B,St as C,$ as D,ri as E,Di as F,Ii as G,yi as H,ne as I,di as J,I as K,vi as L,K as M,hn as N,De as O,et as P,Si as Q,Mi as R,Se as S,v as T,bi as U,zt as V,Ri as W,ki as X,ci as Y,Oi as Z,Ve as _,si as a,Gt as a0,Br as a1,tn as a2,qr as a3,se as a4,Jt as a5,na as a6,la as a7,F as a8,oa as a9,Rr as aa,Ot as ab,Ni as ac,cn as ad,un as ae,Sa as af,st as ag,Ta as ah,Na as ai,Ra as aj,Ea as ak,Ka as al,Qa as am,Za as an,Xa as ao,ii as ap,xi as aq,Ja as ar,Fi as as,Ai as at,mn as au,m as b,ai as c,Yn as d,R as e,qt as f,oi as g,B as h,Y as i,k as j,ui as k,hi as l,Ti as m,Pi as n,gi as o,pi as p,wi as q,Ei as r,Ci as s,Nr as t,Gn as u,z as v,Dr as w,li as x,ir as y,it as z};
3
- //# sourceMappingURL=useUser-a2b9df8d.js.map
3
+ //# sourceMappingURL=useUser-7adb082d.js.map