@deephaven/code-studio 0.52.1-alpha-theming-charts.2 → 0.52.1-alpha-theming-charts.8

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 b,H as C,a_ as dr,C as f,D as cr,F as I,R as hr,N as p,G as De,a1 as Ge,K as fr,L as ge,a$ as mr,b0 as gr,E as _t,b1 as pr,b2 as vr,aE as yr,aa as et}from"./vendor-0ba32da0.js";import{L as D,T as br,M as wr,b as Sr,c as Tr,aH as Mr,F as Cr,bn as Er,bq as Pr,aF as xr,Y as kr,_ as Or,O as Ir,W as Dr,U as Nr,a2 as Fr,a6 as Ar,a0 as Kt,e as ce}from"./index-ec35222d.js";import{e as Y,l as ue,a as B,K as Ve,b as tt,R as Lr}from"./monaco-1410cbed.js";import{P as qe,b as Rr,h as $r,p as jr,o as _r,s as Kr,t as Br,c as _e}from"./plotly-e73c874e.js";var jo=Object.freeze([]),_o=new Map,Ko=()=>{};function Ke(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return e.filter(n=>n!=null)}function Hr(r,e,t){return e=Wr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Wr(r){var e=Vr(r,"string");return typeof e=="symbol"?e:String(e)}function Vr(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 qr extends Error{constructor(){super(...arguments),Hr(this,"isCanceled",!0)}}const rt=qr;function Ur(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=Gr(r,e);t.forEach(n=>{r[n]=r[n].bind(r)})}function Gr(r,e){for(var t=new Set,n=r,i=0;n!=null&&n!==Object.prototype&&(i<=1||e);){for(var a of Object.getOwnPropertyNames(n))a!=="constructor"&&typeof n[a]=="function"&&t.add(a);n=Object.getPrototypeOf(n),i+=1}return[...t.keys()]}function nt(r,e,t,n,i,a,o){try{var l=r[a](o),s=l.value}catch(u){t(u);return}l.done?e(s):Promise.resolve(s).then(n,i)}function zr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(s){nt(a,n,i,o,l,"next",s)}function l(s){nt(a,n,i,o,l,"throw",s)}o(void 0)})}}function Qr(r){return Ue.apply(this,arguments)}function Ue(){return Ue=zr(function*(r){var{clipboard:e}=navigator;if(e!==void 0)try{return navigator.clipboard.writeText(r)}catch{return it(r)}it(r)}),Ue.apply(this,arguments)}function it(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")}function fe(r,e,t){return e=Zr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Zr(r){var e=Xr(r,"string");return typeof e=="symbol"?e:String(e)}function Xr(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 Jr="table_",Bt="column_",Yr=new Set(["in","not","i","ii","k"]),en=new Set(["abstract","continue","for","new","switch","assert","default","if","package","synchronized","boolean","do","goto","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","null","true","false"]),tn=/[^a-zA-Z0-9_$+@-]/g,rn=/[^A-Za-z0-9_$]/g;class _{}fe(_,"legalize",(r,e,t,n,i)=>{var a=r.trim().replace(/[- ]/g,"_");return n&&(Yr.has(a)||en.has(a))&&(a=e+a),a=a.replace(t,""),a||(a=e+i),Number.isNaN(Number(a.charAt(0)))||(a=e+a),a});fe(_,"legalizeTableName",r=>_.legalize(r,Jr,tn,!1,0));fe(_,"legalizeColumnNames",r=>{var e=[];return r.forEach((t,n)=>{var i=_.legalizeColumnName(t,n);e.includes(i)&&(i=Bt+n),e.push(i)}),e});fe(_,"legalizeColumnName",function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return _.legalize(r,Bt,rn,!0,e)});fe(_,"isValidTableName",r=>_.legalizeTableName(r)===r);fe(_,"isValidColumnName",r=>_.legalizeColumnName(r)===r);const Bo=_;class Ht extends CustomEvent{constructor(e,t){super(e,t)}}function nn(r,e,t){return e=an(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function an(r){var e=on(r,"string");return typeof e=="symbol"?e:String(e)}function on(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 sn extends Error{constructor(){super(...arguments),nn(this,"isTimeout",!0)}}const Wt=sn;class Ne{static makeCancelable(e,t){var n=!1,i,a,o=new Promise((l,s)=>{a=s,Promise.resolve(e).then(u=>{n?t&&t(u):(i=u,l(u))}).catch(u=>s(u))});return o.cancel=()=>{n=!0,a(new rt),i!=null&&t&&t(i)},o}static isCanceled(e){return e instanceof rt}static isTimedOut(e){return e instanceof Wt}static withTimeout(e,t){return new Promise((n,i)=>{setTimeout(()=>{try{n(t())}catch(a){i(a)}},e)})}}function at(r,e,t){return e=ln(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ln(r){var e=un(r,"string");return typeof e=="symbol"?e:String(e)}function un(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 dn{constructor(){at(this,"pending",[]),at(this,"resolved",[])}add(e,t){var n=Ne.makeCancelable(e,t);return this.pending.push(n),n.then(()=>{this.resolve(n)},()=>{this.resolve(n)}),n}remove(e){for(var t=0;t<this.pending.length;t+=1)if(this.pending[t]===e){this.pending.splice(t,1);return}}resolve(e){this.remove(e),this.resolved.push(e)}cancel(){for(var e=[...this.pending,...this.resolved],t=0;t<e.length;t+=1)e[t].cancel();this.pending=[],this.resolved=[]}}const Ho=dn;class ze{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(!ze.isValidRange(e))throw new Error("Invalid range! ".concat(e))}static isSelected(e,t){for(var n=0;n<e.length;n+=1){var i=e[n],a=i[0],o=i[1];if(a<=t&&t<=o)return!0}return!1}static selectRange(e,t){for(var[n,i]=t,a=[...e],o=a.length-1;o>=0;o-=1){var l=a[o],s=l[0],u=l[1];if(s<=n&&i<=u)return a;n<=u&&s<=i&&(n=Math.min(n,s),i=Math.max(i,u),a.splice(o,1))}return a.push([n,i]),a}static deselectRange(e,t){for(var[n,i]=t,a=[...e],o=a.length-1;o>=0;o-=1){var l=a[o],s=l[0],u=l[1];if(!(i<s||u<n))if(s<n&&i<u){a[o]=[s,n-1],a.splice(o+1,0,[i+1,u]);break}else n<=s&&u<=i?a.splice(o,1):s<n?a[o]=[s,n-1]:a[o]=[i+1,u]}return a}static count(e){return e.reduce((t,n)=>t+(n[1]-n[0]+1),0)}static getItemsInRanges(e,t){return t.reduce((n,i)=>{for(var a=[...n],o=i[0];o<=i[1];o+=1)a.push(e[o]);return a},[])}}const oe=ze;function*Wo(r,e){for(var t=r;t<=e;++t)yield t}class cn{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(", "),i=e[e.length-1];return"".concat(n,", ").concat(t," ").concat(i)}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 hn=cn;function Vt(r,e,t){return e=fn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function fn(r){var e=mn(r,"string");return typeof e=="symbol"?e:String(e)}function mn(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 we{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),i=e%60;return"".concat(t>0?"".concat(t,"h "):"")+"".concat(n>0||t>0?"".concat(n,"m "):"")+"".concat(e>=60?"".concat(i,"s").padStart(3,"0"):"".concat(i,"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),i=String(Math.floor(n/60)).padStart(2,"0"),a=n%60,o=String(Math.ceil(a)).padStart(2,"0");return"".concat(t,":").concat(i,":").concat(o)}static isTimeString(e){return new RegExp(we.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])}}Vt(we,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Vt(we,"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 Vo=we;function gn(r,e,t){return e=pn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function pn(r){var e=vn(r,"string");return typeof e=="symbol"?e:String(e)}function vn(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 yn extends Error{constructor(){super(...arguments),gn(this,"isInvalid",!0)}}const qo=yn;function bn(){var r=b.useRef(!1);return b.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[]),r}function ot(r,e,t,n,i,a,o){try{var l=r[a](o),s=l.value}catch(u){t(u);return}l.done?e(s):Promise.resolve(s).then(n,i)}function wn(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(s){ot(a,n,i,o,l,"next",s)}function l(s){ot(a,n,i,o,l,"throw",s)}o(void 0)})}}var Be=D.module("useAsyncInterval");function Uo(r,e){var t=bn(),n=b.useRef(0),i=b.useRef(0),a=b.useRef(null),o=b.useCallback(wn(function*(){var l=Date.now();i.current+=1;var s=a.current==null?e:l-a.current;if(Be.debug("tick #".concat(i.current,"."),s,"ms elapsed since last tick."),a.current=l,yield r(),!!t.current){s+=Date.now()-a.current;var u=Math.max(0,s-e),d=Math.max(0,e-u);Be.debug("Next tick target:",e,", overage",u,", adjusted:",d),n.current=window.setTimeout(o,d)}}),[r,t,e]);b.useEffect(()=>(Be.debug("Setting target interval:",e),a.current=null,o(),()=>{window.clearTimeout(n.current)}),[e,o])}function Qe(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"No value available in context. Was code wrapped in a provider?",t=b.useContext(r);if(t==null)throw new Error(e);return t}function Go(r){var e=b.useRef();return b.useEffect(function(){e.current=r}),e.current}function Sn(r){var e=b.useRef(null);return b.useEffect(function(){r&&(typeof r=="function"?r(e.current):r.current=e.current)}),e}var Tn=3500,Mn=D.module("useCopyToClipboard");function Cn(){var[r,e]=b.useState(!1),t=b.useRef(null),n=b.useCallback(i=>{Qr(i).then(()=>{e(!0)}).catch(a=>Mn.error("Unable to copy ".concat(i),`
2
- `,a))},[]);return b.useEffect(()=>(t.current&&clearTimeout(t.current),r&&(t.current=setTimeout(()=>{e(!1)},Tn)),()=>{t.current&&clearTimeout(t.current)}),[r]),[r,n]}function st(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function En(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?st(Object(t),!0).forEach(function(n){he(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):st(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function he(r,e,t){return e=Pn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Pn(r){var e=xn(r,"string");return typeof e=="symbol"?e:String(e)}function xn(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 Ze extends b.Component{constructor(e){super(e),he(this,"element",void 0),he(this,"container",void 0),he(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:i}=this.props;i=En({placement:"auto",modifiers:{preventOverflow:{boundariesElement:"viewport"}}},i),document.body.appendChild(this.element);var a=this.getVisibleElement(this.container.current);a==null&&(a=this.container.current),e=new dr(n||a,this.element,i),e.scheduleUpdate(),cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{if(t&&!this.element.contains(document.activeElement)){var o=this.element.firstElementChild;o instanceof HTMLElement&&o.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:i,closeOnBlur:a}=this.props,{show:o}=this.state;return f.jsx(cr,{in:o,timeout:n,classNames:"popper-transition",onEntered:this.handleEnter,onExited:this.handleExit,children:f.jsx("div",{onClick:l=>{l.stopPropagation()},onKeyDown:l=>{l.key==="Escape"&&this.hide()},className:I("popper",{interactive:i},e),onBlur:a?this.handleBlur:void 0,tabIndex:a?-1:void 0,role:"presentation",children:f.jsxs("div",{className:"popper-content",children:[t,f.jsx("div",{className:"popper-arrow","x-arrow":""})]})})})}render(){var{popper:e}=this.state,{"data-testid":t}=this.props;return f.jsx("div",{className:"popper-parent-container",ref:this.container,style:{display:"none"},"data-testid":t,children:e&&hr.createPortal(this.renderContent(),this.element)})}}he(Ze,"propTypes",{children:p.node.isRequired,options:p.shape({}),className:p.string,timeout:p.number,onEntered:p.func,onExited:p.func,isShown:p.bool,closeOnBlur:p.bool,interactive:p.bool,referenceObject:p.shape({}),"data-testid":p.string});he(Ze,"defaultProps",{options:{},className:"",timeout:br.transitionMs,onEntered(){},onExited(){},isShown:!1,interactive:!1,closeOnBlur:!1,referenceObject:null,"data-testid":void 0});const qt=Ze;function lt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function kn(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lt(Object(t),!0).forEach(function(n){H(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):lt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function H(r,e,t){return e=On(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function On(r){var e=In(r,"string");return typeof e=="symbol"?e:String(e)}function In(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 Dn=D.module("Tooltip");class x extends b.Component{static handleHidden(){x.shownTooltipCount-=1,x.shownTooltipCount===0&&(x.lastHiddenTime=Date.now())}static handleShown(){x.shownTooltipCount+=1}constructor(e){super(e),H(this,"container",void 0),H(this,"popper",void 0),H(this,"parent",void 0),H(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:i}=this.state;i!==n&&(i?x.handleShown():x.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();var{isShown:e}=this.state;e&&x.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Dn.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:i}=this.state;if(!(!this.popper.current||!this.parent)){var a=this.popper.current.element.getBoundingClientRect(),o=this.parent.getBoundingClientRect();t>=a.left&&t<=a.left+a.width&&n>=a.top&&n<=a.top+a.height?this.handleMouseMove():t>=o.left&&t<=o.left+o.width&&n>=o.top&&n<=o.top+o.height?this.handleMouseMove():i&&(this.stopTimer(),this.hide())}}startTimer(){this.stopTimer();var{timeout:e,reshowTimeout:t}=this.props,n=e;(x.shownTooltipCount>0||Date.now()-x.lastHiddenTime<x.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:i,"data-testid":a,onEntered:o}=this.props,{isShown:l}=this.state,{options:s}=this.props;return s=kn({placement:"bottom"},s),f.jsx("div",{ref:this.container,style:{display:"none"},"data-testid":a,children:f.jsx(qt,{className:I(i),options:s,ref:this.popper,onEntered:o,onExited:this.handleExited,interactive:e,referenceObject:n,children:f.jsxs("div",{className:"tooltip-content",children:[" ",l&&t]})})})}}H(x,"defaultTimeout",500);H(x,"defaultReshowTimeout",100);H(x,"triggerReshowThreshold",300);H(x,"shownTooltipCount",0);H(x,"lastHiddenTime",Date.now());H(x,"defaultProps",{interactive:!1,options:{},popperClassName:"",reshowTimeout:x.defaultReshowTimeout,timeout:x.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0});const Nn=x;function Ae(r){var{children:e,className:t,style:n,"data-testid":i}=r;return f.jsx("div",{className:I("btn-group",t),style:n,role:"group","data-testid":i,children:e})}Ae.displayName="ButtonGroup";Ae.propTypes={children:p.node.isRequired,className:p.string,style:p.object,"data-testid":p.string};Ae.defaultProps={className:null,style:{},"data-testid":void 0};var Fn=["kind","variant","type","tooltip","icon","disabled","active","onClick","onContextMenu","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","onKeyDown","className","style","children","tabIndex","data-testid","aria-label"];function ut(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function dt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ut(Object(t),!0).forEach(function(n){An(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ut(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function An(r,e,t){return e=Ln(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ln(r){var e=Rn(r,"string");return typeof e=="symbol"?e:String(e)}function Rn(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 $n(r,e){if(r==null)return{};var t=jn(r,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function jn(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}var _n=["primary","secondary","tertiary","success","danger","inline","ghost"],Kn=["group-end"];function Bn(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 I("btn-link",{"btn-link-icon":e,"btn-link-icon-only":e})}}function Hn(r){switch(r){case"group-end":return I("pl-2","pr-3")}}var Le=C.forwardRef((r,e)=>{var{kind:t,variant:n,type:i,tooltip:a,icon:o,disabled:l=!1,active:s,onClick:u,onContextMenu:d,onMouseDown:m,onMouseUp:g,onMouseEnter:v,onMouseLeave:w,onKeyDown:T,className:M,style:$,children:L,tabIndex:K,"data-testid":W,"aria-label":le}=r,R=$n(r,Fn),V=!!(o&&L==null),Q=Bn(t,V),Te;n&&(Te=Hn(n));var Me;o&&(Me=C.isValidElement(o)?o:f.jsx(De,{icon:o}));var me;a!==void 0&&(me=typeof a=="string"?f.jsx(Nn,{children:a}):a);var Ce=le;le===void 0&&V&&a!=null&&typeof a=="string"&&(Ce=a);var Ee=f.jsxs("button",dt(dt({"data-testid":W,ref:e,type:i,className:I("btn",Q,Te,{active:s},M),onClick:u,onContextMenu:d,onMouseUp:g,onMouseDown:m,onMouseEnter:v,onMouseLeave:w,onKeyDown:T,style:$,disabled:l,tabIndex:K,"aria-label":Ce},R),{},{children:[o&&Me,L,a!=null&&!l&&me]}));return l?f.jsxs("span",{className:"btn-disabled-wrapper",children:[Ee,a!==void 0&&me]}):Ee});Le.displayName="Button";Le.propTypes={kind:p.oneOf(_n).isRequired,variant:p.oneOf(Kn),type:p.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:p.bool,active:p.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:p.func,onMouseUp:p.func,onMouseDown:p.func,onMouseEnter:p.func,onMouseLeave:p.func,onKeyDown:p.func,tabIndex:p.number,children:p.node,className:p.string,style:p.object,"data-testid":p.string};Le.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 Ie=Le;function Wn(r){var{className:e="modal-footer",children:t,"data-testid":n}=r;return f.jsx("div",{className:e,"data-testid":n,children:t})}function Ut(r){var{isOpen:e,headerText:t,bodyText:n,onCancel:i,onConfirm:a,onDiscard:o,onModalDisable:l,cancelButtonText:s="Cancel",confirmButtonText:u="Okay",discardButtonText:d="Discard",isConfirmDanger:m=!1,children:g,"data-testid":v}=r,w=b.useRef(null),T=b.useRef(null),M=b.useCallback(()=>{T.current!==null&&T.current.checked&&l&&l(),a()},[a,l]),$=b.useCallback(()=>{var K;(K=w.current)===null||K===void 0||K.focus()},[]),L="";return e&&(L=typeof n=="function"?n():n),f.jsxs(wr,{isOpen:e,className:"theme-bg-light",onOpened:$,children:[f.jsx(Sr,{closeButton:!1,children:t}),f.jsx(Tr,{children:L}),f.jsxs(Wn,{children:[l&&f.jsxs("div",{className:"custom-control custom-checkbox form-group mr-auto",children:[f.jsx("input",{type:"checkbox",className:"custom-control-input",id:"move-confirmation-checkbox",defaultChecked:!1,ref:T,"data-testid":v!==void 0?"".concat(v,"-checkbox-confirm"):void 0}),f.jsx("label",{className:"custom-control-label",htmlFor:"move-confirmation-checkbox",children:"Don't ask me again"})]}),o&&f.jsx(Ie,{kind:"secondary",className:"mr-auto","data-dismiss":"modal",onClick:o,"data-testid":v!==void 0?"".concat(v,"-btn-discard"):void 0,children:d}),i&&f.jsx(Ie,{kind:"secondary","data-dismiss":"modal",onClick:i,"data-testid":v!==void 0?"".concat(v,"-btn-cancel"):void 0,children:s}),f.jsxs(Ae,{children:[f.jsx(Ie,{kind:m?"danger":"primary",onClick:M,ref:w,"data-testid":v!==void 0?"".concat(v,"-btn-confirm"):void 0,children:u}),g]})]})]})}Ut.propTypes={isOpen:p.bool.isRequired,headerText:p.string.isRequired,bodyText:p.oneOfType([p.string,p.func]).isRequired,onCancel:p.func,onConfirm:p.func.isRequired,onDiscard:p.func,onModalDisable:p.func,cancelButtonText:p.string,confirmButtonText:p.string,discardButtonText:p.string,children:p.node,"data-testid":p.string};Ut.defaultProps={children:void 0,cancelButtonText:"Cancel",confirmButtonText:"Okay",discardButtonText:"Discard",onCancel:void 0,onDiscard:void 0,onModalDisable:void 0,"data-testid":void 0};function Vn(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=Un(r,"string");return typeof e=="symbol"?e:String(e)}function Un(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 He(r){return r.then!==void 0}class ie{static disableAllActions(){ie.actionsDisabled=!0}static enableAllActions(){ie.actionsDisabled=!1}static isContextActionEvent(e){return Array.isArray(e.contextActions)}static compareActions(e,t){if(e.group!==t.group){var n,i;return((n=e.group)!==null&&n!==void 0?n:0)>((i=t.group)!==null&&i!==void 0?i:0)?1:-1}if(e.order!==t.order){var a,o;return((a=e.order)!==null&&a!==void 0?a:0)>((o=t.order)!==null&&o!==void 0?o:0)?1:-1}if(e.title!==t.title){var l,s;return((l=e.title)!==null&&l!==void 0?l:"")>((s=t.title)!==null&&s!==void 0?s:"")?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(ie.compareActions),t}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static getModifierKey(){return ie.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=ie.getModifierKey();return e[t]}static getMenuItems(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=[],i=e;Array.isArray(i)||(i=[i]);for(var a=0;a<i.length;a+=1){var o=i[a],l=void 0;typeof o=="function"?l=o():l=o,l!=null&&(l instanceof Promise?t&&n.push(l):Array.isArray(l)?n=n.concat(l):n.push(l))}return n=n.filter(s=>s.title!==void 0||s.then!=null||s.menuElement),n}static getNextMenuItem(e,t,n){var i=e;i<0&&t<0&&(i=n.length);for(var a=1;a<n.length+1;a+=1){var o=(i+t*a+n.length)%n.length,l=n[o];if(!(l instanceof Promise)&&l.disabled!==!0)return o}return e}}Vn(ie,"actionsDisabled",!1);const k=ie;var ct=D.module("GlobalContextAction");class Gn extends b.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(!k.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 zn=Gn;class Qn extends b.Component{render(){for(var{actions:e,"data-testid":t}=this.props,n=[],i=0;i<e.length;i+=1){var a=e[i],{shortcut:o}=a;if(a.title!=null||a.menuElement||o){var l=f.jsx(zn,{action:a,"data-testid":t},"".concat(a.title,".").concat(o?.id));n.push(l)}}return n}}const Zn=Qn;function Gt(r,e,t){return e=Xn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Xn(r){var e=Jn(r,"string");return typeof e=="symbol"?e:String(e)}function Jn(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 Pe=D.module("ContextActions");class zt extends b.Component{static triggerMenu(e,t,n,i){if(i.length!==0){var a=new MouseEvent("contextmenu",{clientX:t,clientY:n,bubbles:!0,cancelable:!0});a.contextActions=i,e.dispatchEvent(a)}}constructor(e){super(e),Gt(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(i=>!He(i)&&typeof i!="function"&&i.isGlobal),n=e.actions.filter(i=>!He(i)&&typeof i!="function"&&(i.isGlobal===void 0||!i.isGlobal)&&i.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,i=function(){var{classList:u}=n,d=t.find(m=>u.contains(m));if(d!==void 0)return Pe.debug2('Contextmenu event ignored based on the target className "'.concat(d,'"')),{v:void 0};n=n.parentElement};n!=null;){var a=i();if(typeof a=="object")return a.v}if(k.isContextActionEvent(e)||(e.contextActions=[]),!!k.isContextActionEvent(e)){var{actions:o}=this.props;if(o!=null){var l=o;Array.isArray(l)&&(l=l.filter(s=>He(s)||typeof s=="function"||s.isGlobal===void 0||!s.isGlobal)),e.contextActions=e.contextActions.concat(l)}Pe.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 i=t[n];if(!k.actionsDisabled&&i.shortcut!=null&&i.shortcut.matchesEvent(e)){var a;Pe.debug("Context hotkey matched!",e),(a=i.action)===null||a===void 0||a.call(i,e),e.stopPropagation(),e.preventDefault(),Pe.debug2("Matched hotkey returned false, key event not consumed")}}}render(){var{"data-testid":e}=this.props,{globalActions:t}=this.state;return f.jsx("div",{className:"context-actions-listener",ref:this.container,"data-testid":e,children:f.jsx(Zn,{actions:t})})}}Gt(zt,"groups",{default:void 0,high:100,medium:5e3,low:1e4,global:1e5,edit:100});const zo=zt;var Xe=C.forwardRef((r,e)=>{var t;function n(R){var{menuItem:V,onMenuItemClick:Q}=r;Q(V,R)}function i(R){var{menuItem:V,onMenuItemMouseMove:Q}=r;Q(V,R)}function a(R){var{menuItem:V,onMenuItemContextMenu:Q}=r;Q(V,R)}function o(R,V,Q){if(typeof R.type=="string")return R;var{closeMenu:Te,menuItem:Me,isKeyboardSelected:me,isMouseSelected:Ce,"data-testid":Ee}=r,ur={menuItem:Me,closeMenu:Te,isKeyboardSelected:me,isMouseSelected:Ce,iconElement:V,displayShortcut:Q,"data-testid":Ee};return C.cloneElement(R,{forwardedProps:ur})}var{children:l,menuItem:s,isKeyboardSelected:u=!1,isMouseSelected:d=!1,"data-testid":m}=r,g=(t=s.shortcut)===null||t===void 0?void 0:t.getDisplayText(),v=null;if(s.icon){var w=s.icon;if(C.isValidElement(w))v=w;else{var T;s.iconColor!=null&&(s.disabled===void 0||!s.disabled)&&(T={color:s.iconColor}),v=f.jsx(De,{icon:w,style:T})}}var M=null,$=!!l;s.actions&&(M=f.jsx(De,{icon:Mr}));var L=null;if(s.menuElement)L=f.jsx("div",{className:"custom-menu-item",onMouseMove:i,children:o(s.menuElement,v,g)});else{var K,W=s.disabled,le=s.iconOutline;L=f.jsx("button",{type:"button",className:I("btn-context-menu",{disabled:W},{active:($||d)&&(W===void 0||!W)},{"keyboard-active":u&&(W===void 0||!W)}),onClick:n,onMouseMove:i,onContextMenu:a,title:(K=s.description)!==null&&K!==void 0?K:"",children:f.jsxs("div",{className:"btn-context-menu-wrapper",children:[f.jsx("span",{className:I("icon",{outline:le}),children:v}),f.jsx("span",{className:"title",children:s.title}),g!==void 0&&f.jsx("span",{className:"shortcut",children:g}),M&&f.jsx("span",{className:I("submenu-indicator",{disabled:W}),children:M})]})})}return f.jsxs("div",{className:"context-menu-item",ref:e,"data-testid":m,children:[l,L]})});Xe.displayName="ContextMenuItem";Xe.defaultProps={children:null,isKeyboardSelected:!1,isMouseSelected:!1,"data-testid":void 0};const Qt=Xe;function ht(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Yn(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ht(Object(t),!0).forEach(function(n){ee(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ht(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ee(r,e,t){return e=ei(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ei(r){var e=ti(r,"string");return typeof e=="symbol"?e:String(e)}function ti(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var ft=D.module("ContextMenu");class ve extends b.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),ee(this,"container",void 0),ee(this,"oldFocus",void 0),ee(this,"activeSubMenuRef",void 0),ee(this,"subMenuTimer",void 0),ee(this,"rAF",void 0),ee(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:i}=this.state;if(i!==t.activeSubMenu)if(i==null){var a;(a=this.container.current)===null||a===void 0||a.focus()}else this.setActiveSubMenuPosition();if(e.actions!==n&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var o;(o=this.container.current)===null||o===void 0||o.focus()}this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var{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,i=k.getMenuItems(n),a=[],o=i.length-1;o>=0;o-=1){var l=i[o];l instanceof Promise?this.initMenuPromise(l):a.push(l)}this.setState({mouseIndex:-1,keyboardIndex:t,activeSubMenu:null,menuItems:k.sortActions(a)})}initMenuPromise(e){var t=Ne.makeCancelable(e);this.setState(n=>({pendingItems:n.pendingItems.concat(t)})),t.then(n=>{this.setState(i=>{var a=i.pendingItems.indexOf(t);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{menuItems:k.sortActions(i.menuItems.concat(n)),pendingItems:o}}return null})},n=>{Ne.isCanceled(n)||(this.setState(i=>{var a=i.pendingItems.indexOf(t);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{pendingItems:o}}return null}),ft.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,i,{options:a,updatePosition:o,subMenuParentWidth:l,subMenuParentHeight:s,top:u,left:d}=this.props;if(!(!this.container.current||a.doNotVerifyPosition!=null&&a.doNotVerifyPosition)){var{top:m,left:g}=this.initialPosition,{width:v,height:w}=(e=(t=this.container.current)===null||t===void 0?void 0:t.getBoundingClientRect())!==null&&e!==void 0?e:{width:0,height:0},T=((n=(i=this.container.current)===null||i===void 0?void 0:i.scrollHeight)!==null&&n!==void 0?n:0)>window.innerHeight;w===0||v===0||(m+w>window.innerHeight&&(m-w-s>0?m-=w-s:m=window.innerHeight-w),g+v>window.innerWidth&&(g=g-v-l),(d!==g||u!==m)&&(this.setState({hasOverflow:T}),o(m,g)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){ft.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(),i=n,a=!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?a=!0:i=0:this.isEscapeKey(e.key)?i=null:e.key==="ArrowUp"||e.shiftKey&&e.key==="Tab"?i=k.getNextMenuItem(i,-1,t):(e.key==="ArrowDown"||e.key==="Tab")&&(i=k.getNextMenuItem(i,1,t)),a){this.openSubMenu(n),e.preventDefault(),e.stopPropagation();return}n!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}openSubMenu(e){var{menuItems:t,activeSubMenu:n}=this.state,i=t[e].actions?e:null;n!==i&&this.setState({activeSubMenu:i,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(t.nativeEvent),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:i,hasOverflow:a,keyboardIndex:o,menuItems:l,mouseIndex:s,pendingItems:u,subMenuTop:d,subMenuLeft:m,subMenuParentWidth:g,subMenuParentHeight:v}=this.state,w=0;w<l.length;w+=1){var T=l[w];w>0&&T.group!==l[w-1].group&&e.push(f.jsx("hr",{},"".concat(w,".separator")));var M=f.jsx(Qt,{ref:i===w?this.activeSubMenuRef:null,isKeyboardSelected:o===w,isMouseSelected:s===w,menuItem:T,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},w);e.push(M)}var $=null;u.length>0&&($=f.jsx("div",{className:"loading",children:f.jsx(Cr,{className:"loading-spinner-vertical-align"})}));var{menuStyle:L,"data-testid":K}=this.props,W=i!==null&&d!==null&&m!==null;return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:I({"has-overflow":a},"context-menu-container"),style:Yn({top:t,left:n},L),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:ve.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":K,children:[e,$]}),W&&i!==null&&d!==null&&m!==null&&f.jsx(ve,{actions:l[i].actions||[],closeMenu:this.handleCloseSubMenu,top:d,left:m,updatePosition:(le,R)=>{this.setState({subMenuTop:le,subMenuLeft:R})},subMenuParentWidth:g,subMenuParentHeight:v},"sub-".concat(i))]})}}ee(ve,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const ri=ve;function mt(r,e,t){return e=ni(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ni(r){var e=ii(r,"string");return typeof e=="symbol"?e:String(e)}function ii(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 ai extends b.Component{constructor(e){super(e),mt(this,"container",void 0),mt(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(this.container.current){var t=this.container.current.getBoundingClientRect(),n=e.clientY-t.top,i=e.clientX-t.left,{actions:a}=this.state;if(a!=null&&e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{var l=document.elementFromPoint(i,n),s=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});l?.dispatchEvent(s)});return}if(k.isContextActionEvent(e)&&!(e.metaKey||e.ctrlKey)){var o=k.getMenuItems(e.contextActions);o.length!==0&&(e.preventDefault(),this.setState({actions:o,top:n,left:i}))}}}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){var e=null,{"data-testid":t}=this.props,{actions:n,top:i,left:a}=this.state;return n&&(e=f.jsx(ri,{ref:this.openMenu,actions:n,onMenuClosed:this.handleMenuClose,top:i,left:a,updatePosition:(o,l)=>{this.setState({top:o,left:l})},"data-testid":t})),f.jsx("div",{className:I("context-menu-root",{active:n}),ref:this.container,children:e})}}const Qo=ai;var Re=C.forwardRef((r,e)=>{var{checked:t=!1,children:n,className:i,disabled:a,inputClassName:o,isInvalid:l,labelClassName:s,name:u,onChange:d,"data-testid":m}=r,[g]=b.useState(Ge()),v=Sn(e);b.useEffect(function(){v.current&&(v.current.indeterminate=t===null)},[v,t]);var w=b.useCallback(T=>{v.current&&(v.current.indeterminate=t===null),d&&d(T)},[v,t,d]);return f.jsxs("div",{className:I("custom-control custom-checkbox",i),children:[f.jsx("input",{type:"checkbox",ref:v,checked:t??!1,className:I("custom-control-input",o,{"is-invalid":l}),disabled:a,id:g,name:u,onChange:w,"data-testid":m}),f.jsx("label",{className:I("custom-control-label",s),htmlFor:g,children:n})]})});Re.displayName="Checkbox";Re.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:p.node.isRequired,className:p.string,disabled:p.bool,inputClassName:p.string,isInvalid:p.bool,labelClassName:p.string,name:p.string,onChange:p.func,"data-testid":p.string};Re.defaultProps={checked:!1,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};const Zo=Re;function Zt(r,e,t){return e=oi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function oi(r){var e=si(r,"string");return typeof e=="symbol"?e:String(e)}function si(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 Xt extends b.PureComponent{constructor(e){super(e),Zt(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:i,className:a,disabled:o,matchCount:l,id:s,onKeyDown:u,"data-testid":d}=this.props;return f.jsxs("div",{className:I("search-group",a),children:[f.jsx("input",{type:"search",value:e,onBlur:n,onChange:i,onKeyDown:u,className:"form-control",disabled:o,placeholder:t,ref:this.inputField,id:s,"data-testid":d}),l!=null&&f.jsx("span",{className:"search-match",children:l}),f.jsx("span",{className:"search-icon",children:f.jsx(De,{icon:Er})})]})}}Zt(Xt,"defaultProps",{placeholder:"Search",className:"",matchCount:null,onKeyDown(){},id:"","data-testid":void 0});const li=Xt;function Xo(r){var{copy:e,kind:t="ghost",tooltip:n="Copy",className:i,"data-testid":a,children:o}=r,[l,s]=Cn();return f.jsx(Ie,{kind:t,className:i,"data-testid":a,icon:l?Pr:xr,tooltip:l?"Copied":n,onClick:()=>{s(typeof e=="function"?e():e)},children:o})}function gt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function ui(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?gt(Object(t),!0).forEach(function(n){pe(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):gt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function pe(r,e,t){return e=di(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function di(r){var e=ci(r,"string");return typeof e=="symbol"?e:String(e)}function ci(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 Jt extends b.PureComponent{constructor(e){var t;super(e),pe(this,"container",void 0),pe(this,"oldFocus",void 0),pe(this,"rAF",void 0),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.container=C.createRef(),this.oldFocus=document.activeElement,this.rAF=0;var{options:n}=e,i=(t=n.initialKeyboardIndex)!==null&&t!==void 0?t:-1;this.state={menuItems:[],keyboardIndex:i,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=k.getMenuItems(e,!1);t.length>0&&this.setState(n=>({menuItems:k.sortActions(n.menuItems.concat(t))}))}handleKeyDown(e){var{menuItems:t}=this.state,n=this.getKeyboardIndex(),i=n;if(e.key==="Enter"||e.key===" "){n!=null&&n>=0&&n<t.length&&this.handleMenuItemClick(t[n],e);return}if(e.key==="Escape")i=null;else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey===!0){var a;i=k.getNextMenuItem((a=i)!==null&&a!==void 0?a:0,-1,t)}else if(e.key==="ArrowDown"||e.key==="Tab"&&e.shiftKey===!1){var o;i=k.getNextMenuItem((o=i)!==null&&o!==void 0?o:0,1,t)}n!==i&&(i!==null?this.setKeyboardIndex(i):(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(t.nativeEvent),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:i,mouseIndex:a}=this.state,o=0;o<i.length;o+=1){var l=i[o];o>0&&l.group!==i[o-1].group&&e.push(f.jsx("hr",{},"".concat(o,".separator")));var s=f.jsx(Qt,{isKeyboardSelected:n===o,isMouseSelected:a===o,menuItem:l,closeMenu:this.handleCloseMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:()=>!1},o);e.push(s)}var{menuStyle:u}=this.props;return f.jsx("div",{className:"context-menu-container",style:ui({},u),ref:this.container,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,role:"menuitem",tabIndex:0,"data-testid":t,children:e})}}pe(Jt,"defaultProps",{closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const hi=Jt;function pt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function vt(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){de(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 de(r,e,t){return e=fi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function fi(r){var e=mi(r,"string");return typeof e=="symbol"?e:String(e)}function mi(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 Yt extends b.PureComponent{constructor(e){super(e),de(this,"container",void 0),de(this,"parent",void 0),de(this,"popper",void 0),de(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":i}=this.props,{menuStyle:a}=this.props,{options:o,popperOptions:l}=this.props;return l=vt({placement:"bottom"},l),o=vt({separateKeyboardMouse:!0},o),f.jsx("div",{className:"menu-actions-listener",ref:this.container,"data-testid":i,children:f.jsx(qt,{ref:this.popper,options:l,className:I("menu-popper",n),onExited:this.handleExited,closeOnBlur:!0,interactive:!0,children:f.jsx(hi,{actions:e,closeMenu:this.handleCloseMenu,onMenuOpened:t,options:o,menuStyle:a})})})}}de(Yt,"defaultProps",{isShown:null,onMenuClosed(){},onMenuOpened(){},options:{},popperOptions:{},popperClassName:"",menuStyle:{},"data-testid":void 0});const Jo=Yt;function er(r,e,t){return e=gi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function gi(r){var e=pi(r,"string");return typeof e=="symbol"?e:String(e)}function pi(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 tr extends b.PureComponent{constructor(e){super(e),er(this,"searchInput",void 0),this.searchInput=C.createRef(),this.handleChange=this.handleChange.bind(this),this.sendUpdate=fr(this.sendUpdate.bind(this),e.debounceMs),this.state={value:e.value}}componentDidUpdate(e){var{value:t}=this.props;e.value!==t&&this.setState({value:t})}focus(){var e;(e=this.searchInput.current)===null||e===void 0||e.focus()}handleChange(e){this.setState({value:e.target.value},this.sendUpdate)}sendUpdate(){var{onChange:e}=this.props,{value:t}=this.state;e(t)}render(){var{placeholder:e,className:t,matchCount:n,id:i,"data-testid":a}=this.props,{value:o}=this.state;return f.jsx(li,{value:o,placeholder:e,onChange:this.handleChange,className:t,matchCount:n,ref:this.searchInput,id:i,"data-testid":a})}}er(tr,"defaultProps",{placeholder:"Search",className:"",matchCount:null,debounceMs:250,id:"","data-testid":void 0});const Yo=tr;function rr(r,e,t){return e=vi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function vi(r){var e=yi(r,"string");return typeof e=="symbol"?e:String(e)}function yi(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 bi=D.module("ItemListItem");class $e extends b.Component{static handleKeyDown(){return bi.log("ItemListItem.handleKeyDown false"),!1}constructor(e){super(e),rr(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:i,children:a,"data-testid":o}=this.props;return f.jsx("div",{className:I("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:i,onFocus:this.handleFocus,onBlur:this.handleBlur,draggable:e,"data-testid":o,children:a})}}rr($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 wi=$e;function yt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function bt(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){j(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 j(r,e,t){return e=Si(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Si(r){var e=Ti(r,"string");return typeof e=="symbol"?e:String(e)}function Ti(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var wt=D.module("ItemList"),St=5;class U extends b.PureComponent{static renderItem(e){var t,n,{item:i}=e;return f.jsx("div",{className:"item-list-item-content",children:i!=null&&((t=(n=i.displayValue)!==null&&n!==void 0?n:i.value)!==null&&t!==void 0?t:"".concat(i))})}constructor(e){super(e),j(this,"list",void 0),j(this,"listContainer",void 0),j(this,"getItemSelected",ge((i,a)=>oe.isSelected(a,i),{max:U.CACHE_SIZE})),j(this,"getCachedItem",ge((i,a,o,l,s,u,d,m)=>{var g=u({item:o,itemIndex:i,isFocused:l,isSelected:s,style:d});return f.jsx(wi,{onContextMenu:this.handleItemContextMenu,onDoubleClick:this.handleItemDoubleClick,onMouseDown:this.handleItemMouseDown,onFocus:this.handleItemFocus,onBlur:this.handleItemBlur,disableSelect:m,onMouseMove:this.handleItemMouseMove,onMouseUp:this.handleItemMouseUp,isFocused:l,isSelected:s,itemIndex:i,style:d,children:g},a)},{max:U.CACHE_SIZE})),j(this,"getOuterElement",ge(i=>{var a=C.forwardRef((o,l)=>f.jsx("div",bt({ref:l,tabIndex:-1,onKeyDown:i,role:"presentation"},o)));return a.displayName="ItemListOuterElement",a})),j(this,"getInnerElement",ge(()=>{var i=C.forwardRef((a,o)=>f.jsx("div",bt({className:"item-list-inner-element",ref:o},a)));return i.displayName="ItemListInnerElement",i})),j(this,"getItemData",ge((i,a,o)=>({items:i,selectedRanges:a,renderItem:o}))),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:i}=this.props,{focusIndex:a,isStuckToBottom:o,scrollOffset:l,height:s,selectedRanges:u}=this.state;if(o&&!this.isListAtBottom()&&i>0&&this.scrollToBottom(),(l!==t.scrollOffset||s!==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(a!==t.focusIndex){var{onFocusChange:m}=this.props;m(a)}}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,i=this.listContainer.current.querySelectorAll(t),a=e-n;return i[a]}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?.scrollIntoView({block:"center"})}handleItemContextMenu(e,t){this.setState({focusIndex:e});var{selectedRanges:n}=this.state,i=oe.isSelected(n,e),a=i||k.isModifierKeyDown(t);this.toggleSelect(e,t.shiftKey,a,!1)}handleItemDoubleClick(e,t){var{isDoubleClickSelect:n,onSelect:i}=this.props;n&&this.setState(a=>{var{selectedRanges:o}=a;return{selectedRanges:oe.selectRange(o,[e,e])}},()=>{i(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){wt.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){wt.debug2("item focus",e,t.target),this.setState(n=>{var{focusIndex:i}=n;return i!==e?{focusIndex:e}:null})}handleItemMouseMove(e,t){var{isDragSelect:n,isMultiSelect:i,disableSelect:a}=this.props,{mouseDownIndex:o,selectedRanges:l,mouseX:s,mouseY:u}=this.state;if(!(o==null||a)){var d=Math.abs(t.clientX-(s??0)),m=Math.abs(t.clientY-(u??0));d>St&&m>St&&this.setState({isDragging:!0}),(n||o===e)&&(this.focusItem(e),i?(!n&&!this.getItemSelected(e,l)&&!k.isModifierKeyDown(t)&&this.deselectAll(),this.selectRange([Math.min(o,e),Math.max(o,e)])):this.toggleSelect(e,t.shiftKey,k.isModifierKeyDown(t),!1))}}handleItemMouseUp(e,t){var{isDeselectOnClick:n,isDoubleClickSelect:i,onSelect:a}=this.props,{mouseDownIndex:o,isDragging:l}=this.state;if(!(t.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(t.target.tagName.toLowerCase())!==-1)){if(o===e&&!l){var s=t.shiftKey,u=k.isModifierKeyDown(t);this.focusItem(e),this.toggleSelect(e,s,u,n),!i&&!s&&!u&&a(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:i}=this.props,{focusIndex:a}=this.state,o=a;if(e.key==="Enter"||e.key===" "){!t&&o!=null&&this.setState({selectedRanges:[[o,o]]},()=>{o!=null&&i(o,e)});return}if(e.key==="ArrowUp")o!=null&&o>=0?o=Math.max(0,o-1):o=n-1;else if(e.key==="ArrowDown")o!=null&&o>=0?o=Math.min(o+1,n-1):o=0;else return;if(a!==o){e.stopPropagation(),e.preventDefault(),this.focusItem(o);var{selectedRanges:l}=this.state;if(e.shiftKey&&l.length>0){var s=l[l.length-1];this.selectRange([Math.min(o,s[0]),Math.max(o,s[1])])}else if(this.deselectAll(),o!==null)this.selectItem(o);else{var u;(u=this.listContainer.current)===null||u===void 0||u.focus()}this.scrollIntoView(o)}}handleScroll(e){var{scrollUpdateWasRequested:t,scrollOffset:n}=e;this.setState(i=>{if(t)return{scrollOffset:n};var{isStickyBottom:a}=this.props,{height:o}=i,l=a&&this.isListAtBottom({scrollOffset:n,height:o});return{isStuckToBottom:l,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 i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,{isMultiSelect:a}=this.props,{selectedRanges:o}=this.state;if(a&&t&&o.length>0){var l=o[o.length-1];this.selectRange([Math.min(l[0],e),Math.max(e,l[1])])}else a&&o.length===1&&o[0][0]===e&&o[0][1]===e?i&&this.deselectItem(e):a&&n?this.getItemSelected(e,o)?i&&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){oe.validateRange(e),this.setState(t=>{var{selectedRanges:n}=t;return{selectedRanges:oe.deselectRange(n,e)}})}selectItem(e){var{disableSelect:t}=this.props;t||this.selectRange([e,e])}selectRange(e){oe.validateRange(e),this.setState(t=>{var{selectedRanges:n}=t;return{selectedRanges:oe.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:i}=this.props,a=Math.floor(e/i),o=a+Math.ceil(t/i);n(a,o)}}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:i}=this.props;return e+t>=n*i}renderInnerElement(e){var{index:t,style:n}=e,{items:i,offset:a,renderItem:o,disableSelect:l}=this.props,{focusIndex:s,selectedRanges:u}=this.state;if(t<a||t>=a+i.length)return null;var d=i[t-a];return this.getCachedItem(t,t,d,t===s&&!l,this.getItemSelected(t,u),o,n,l)}render(){var{items:e,itemCount:t,overscanCount:n,renderItem:i,rowHeight:a,"data-testid":o}=this.props,{selectedRanges:l,isStuckToBottom:s}=this.state;return f.jsx(mr,{className:"item-list-auto-sizer",onResize:this.handleResize,children:u=>{var{width:d,height:m}=u;return f.jsx(gr,{className:"item-list-scroll-pane",height:m,width:d,initialScrollOffset:s?t*a:0,itemCount:t,itemSize:a,itemData:this.getItemData(e,l,i),onScroll:this.handleScroll,onItemsRendered:this.handleItemsRendered,ref:this.list,outerElementType:this.getOuterElement(this.handleKeyDown),outerRef:this.listContainer,innerElementType:this.getInnerElement(),overscanCount:n,"data-testid":o,children:this.renderInnerElement})}})}}j(U,"CACHE_SIZE",1e3);j(U,"DEFAULT_ROW_HEIGHT",20);j(U,"DEFAULT_OVERSCAN",10);j(U,"defaultProps",{offset:0,items:[],rowHeight:U.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!1,isDragSelect:!0,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},overscanCount:U.DEFAULT_OVERSCAN,renderItem:U.renderItem,selectedRanges:[],focusSelector:".item-list-item","data-testid":void 0});function es(r){var{on:e,id:t,className:n,isInvalid:i,disabled:a=!1,onClick:o,"data-testid":l}=r;return f.jsx("button",{type:"button",className:I("btn","btn-switch",n,{active:e},{"is-invalid":i}),id:t,onClick:o,disabled:a,"data-testid":l,children:f.jsx("div",{className:"handle"})})}function te(r,e,t){return e=Mi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Mi(r){var e=Ci(r,"string");return typeof e=="symbol"?e:String(e)}function Ci(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=D.module("Shortcut"),S;(function(r){r.CTRL="MODIFIER_CTRL",r.CMD="MODIFIER_CMD",r.ALT="MODIFIER_ALT",r.OPTION="MODIFIER_OPTION",r.SHIFT="MODIFIER_SHIFT"})(S||(S={}));var y;(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"})(y||(y={}));var Ei=new Set([y.ENTER,y.DELETE,y.F1,y.F2,y.F3,y.F4,y.F5,y.F6,y.F7,y.F8,y.F9,y.F10,y.F11,y.F12]);class P extends _t{static isAllowedKey(e){return Object.values(y).includes(e)}static isValidKeyState(e){var{keyValue:t}=e;if(t===null)return!0;if(!P.isMacPlatform&&e.metaKey||!P.isAllowedKey(t))return!1;var n=!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey;return!n||Ei.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 S.CTRL:t.ctrlKey=!0;break;case S.ALT:case S.OPTION:t.altKey=!0;break;case S.CMD:t.metaKey=!0;break;case S.SHIFT:t.shiftKey=!0;break}}),t}static getKeyStateFromEvent(e){var{key:t,keyCode:n}=e,i="";return t==="Shift"||t==="Meta"||t==="Control"||t==="Alt"?i="":!P.isAllowedKey(t)&&P.isAllowedKey(String.fromCharCode(n))?i=String.fromCharCode(n):i=t,{keyValue:i,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===y.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 y.ENTER:t+="⏎";break;case y.ESCAPE:t+="⎋";break;case y.BACKSPACE:t+="⌫";break;case y.DELETE:t+="⌦";break;case null:break;default:t+=e.keyValue}return t}static doKeyStatesMatch(e,t){var n,i;return((n=e.keyValue)===null||n===void 0?void 0:n.toUpperCase())===((i=t.keyValue)===null||i===void 0?void 0:i.toUpperCase())&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey&&e.shiftKey===t.shiftKey}static getDisplayText(e){return e.keyValue===null?"":P.isMacPlatform?P.getMacDisplayText(e):P.getWindowsDisplayText(e)}constructor(e){var{id:t,shortcut:n,macShortcut:i,isEditable:a=!0,name:o,tooltip:l}=e;super(),te(this,"id",void 0),te(this,"name",void 0),te(this,"tooltip",void 0),te(this,"isEditable",void 0),te(this,"defaultKeyState",void 0),te(this,"keyState",void 0),this.id=t,this.name=o,this.tooltip=l,this.isEditable=a;var s=P.isMacPlatform,u=s?i:n;this.defaultKeyState=P.createKeyState(u),this.keyState=this.defaultKeyState}getDisplayText(){return P.getDisplayText(this.keyState)}getKeyState(){return this.keyState}setKeyState(e){P.isValidKeyState(e)?(Tt.debug2("Shortcut ".concat(this.id," updated to ").concat(JSON.stringify(e))),this.keyState=e,this.dispatchEvent(new Ht("onUpdate",{detail:this}))):Tt.debug2("Shortcut ".concat(this.id," tried to update to invalid keyState ").concat(JSON.stringify(e)))}getDefaultKeyState(){return this.defaultKeyState}isDefault(){return P.doKeyStatesMatch(this.getDefaultKeyState(),this.getKeyState())}setToNull(){this.setKeyState(P.NULL_KEY_STATE)}isNull(){return P.doKeyStatesMatch(this.keyState,P.NULL_KEY_STATE)}setToDefault(){this.setKeyState(this.defaultKeyState)}matchesKeyState(e){return P.doKeyStatesMatch(e,this.keyState)}matchesEvent(e){return this.matchesKeyState(P.getKeyStateFromEvent(e))}}te(P,"NULL_KEY_STATE",{metaKey:!1,shiftKey:!1,altKey:!1,ctrlKey:!1,keyValue:null});te(P,"isMacPlatform",k.isMacPlatform());function Mt(r,e,t){return e=Pi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Pi(r){var e=xi(r,"string");return typeof e=="symbol"?e:String(e)}function xi(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 Ct=D.module("ShortcutRegistry");class ki extends _t{constructor(){super(...arguments),Mt(this,"shortcutMap",new Map),Mt(this,"shortcutsByCategory",new Map)}createAndAdd(e){var t=new P(e);return this.add(t)}add(e){var t=this.shortcutMap.get(e.id);if(t)return Ct.warn("Skipping attempt to add duplicate shortcut ID to registry: ".concat(e.id)),t;Ct.debug2("Adding shortcut to registry: ".concat(e.id)),e.addEventListener("onUpdate",a=>{var{detail:o}=a;return this.dispatchEvent(new Ht("onUpdate",{detail:o}))});var n=e.id.split(".")[0];if(this.shortcutMap.set(e.id,e),this.shortcutsByCategory.has(n)){var i;(i=this.shortcutsByCategory.get(n))===null||i===void 0||i.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 Oi=Object.freeze(new ki);const F=Oi;var Ii={COPY:F.createAndAdd({id:"GLOBAL.COPY",name:"Copy",shortcut:[S.CTRL,y.C],macShortcut:[S.CMD,y.C],isEditable:!1}),PASTE:F.createAndAdd({id:"GLOBAL.PASTE",name:"Paste",shortcut:[S.CTRL,y.V],macShortcut:[S.CMD,y.V],isEditable:!1}),SAVE:F.createAndAdd({id:"GLOBAL.SAVE",name:"Save",shortcut:[S.CTRL,y.S],macShortcut:[S.CMD,y.S],isEditable:!1}),SELECT_ALL:F.createAndAdd({id:"GLOBAL.SELECT_ALL",name:"Select All",shortcut:[S.CTRL,y.A],macShortcut:[S.CMD,y.A],isEditable:!1}),LINKER:F.createAndAdd({id:"GLOBAL.LINKER",name:"Linker",shortcut:[S.CTRL,y.L],macShortcut:[S.CMD,y.L]}),LINKER_CLOSE:F.createAndAdd({id:"GLOBAL.LINKER_CLOSE",name:"Close Linker Overlay",shortcut:[y.ESCAPE],macShortcut:[y.ESCAPE],isEditable:!1})};const ts=Ii,Di={"dh-spectrum-palette":"_dh-spectrum-palette_1mcqx_1"},Ni={"dh-spectrum-alias":"_dh-spectrum-alias_83lrx_1"},Fi={};function Et(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function We(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Et(Object(t),!0).forEach(function(n){Ai(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Et(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Ai(r,e,t){return e=Li(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Li(r){var e=Ri(r,"string");return typeof e=="symbol"?e:String(e)}function Ri(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 Pt=We(We(We({},Di),Ni),Fi);function xt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function xe(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?xt(Object(t),!0).forEach(function(n){$i(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):xt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function $i(r,e,t){return e=ji(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ji(r){var e=_i(r,"string");return typeof e=="symbol"?e:String(e)}function _i(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{global:Ki,light:Bi,dark:Hi,medium:Wi,large:Vi}=pr,qi={global:Ki,light:xe(xe({},Bi),Pt),dark:xe(xe({},Hi),Pt),medium:Wi,large:Vi};function Ui(r){var{children:e,isPortal:t=!1,theme:n=qi,colorScheme:i}=r,[a]=b.useState(t?Ge():null);return f.jsx(vr,{theme:n,colorScheme:i,"data-unique-id":a,children:e})}var Gi=D.module("ThemeProvider"),nr=b.createContext(null);function rs(r){var{themes:e,children:t}=r,n=b.useMemo(()=>kr(),[]),[i,a]=b.useState(()=>{var s,u;return(s=(u=Or())===null||u===void 0?void 0:u.themeKey)!==null&&s!==void 0?s:Ir}),o=b.useMemo(()=>e==null?null:Dr(i,{base:n,custom:e??[]}),[n,i,e]);b.useEffect(function(){if(!(o==null||e==null)){var u=Nr();Gi.debug2("updateThemePreloadData:",{active:o.map(d=>d.themeKey),all:e.map(d=>d.themeKey),preloadStyleContent:u,selectedThemeKey:i}),Fr({themeKey:i,preloadStyleContent:u})}},[o,i,e]);var l=b.useMemo(()=>({activeThemes:o,selectedThemeKey:i,setSelectedThemeKey:a}),[o,i]);return f.jsxs(nr.Provider,{value:l,children:[o==null?null:f.jsx(f.Fragment,{children:o.map(s=>f.jsx("style",{"data-theme-key":s.themeKey,children:s.styleContent},s.themeKey))}),f.jsx(Ui,{children:t})]})}function zi(){return Qe(nr,"No ThemeContext value found. Component must be wrapped in a ThemeContext.Provider")}function ns(){return Qe(Ar,"No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?")}const Qi="var(--dh-color-editor-bg)",Zi="var(--dh-color-editor-fg)",Xi="var(--dh-color-editor-string)",Ji="var(--dh-color-editor-delimiter)",Yi="var(--dh-color-editor-predefined)",ea="var(--dh-color-editor-keyword)",ta="var(--dh-color-editor-storage)",ra="var(--dh-color-editor-number)",na="var(--dh-color-editor-operator)",ia="var(--dh-color-editor-identifier)",aa="var(--dh-color-editor-comment)",kt={"error-foreground":"var(--dh-color-editor-error-fg)",background:Qi,foreground:Zi,"line-height":"19px",string:Xi,"string-delim":"var(--dh-color-editor-string-delim)",delimiter:Ji,predefined:Yi,keyword:ea,storage:ta,number:ra,operator:na,identifier:ia,"namespace-identifier":"var(--dh-color-editor-identifier-namespace)","identifier-js":"var(--dh-color-editor-identifier-js)",comment:aa,"input-option-active-border":"var(--dh-color-editor-input-option-active-border)","focus-border":"var(--dh-color-editor-focus-border)","input-background":"var(--dh-color-editor-input-bg)","input-foreground":"var(--dh-color-editor-input-fg)","input-border":"var(--dh-color-editor-input-border)","editor-line-number-foreground":"var(--dh-color-editor-line-number-fg)","editor-selection-background":"var(--dh-color-editor-selection-bg)","editor-line-highlight-bg":"var(--dh-color-editor-line-highlight-bg)","context-menu-background":"var(--dh-color-editor-context-menu-bg)","context-menu-foreground":"var(--dh-color-editor-context-menu-fg)","menu-selection-background":"var(--dh-color-editor-menu-selection-bg)","log-date":"var(--dh-color-editor-log-date)","log-error":"var(--dh-color-editor-log-error)","log-info":"var(--dh-color-editor-log-info)","log-stdout":"var(--dh-color-editor-log-stdout)","log-warn":"var(--dh-color-editor-log-warn)","log-debug":"var(--dh-color-editor-log-debug)","log-trace":"var(--dh-color-editor-log-trace)","editor-find-match-background":"var(--dh-color-editor-find-match-bg)","editor-find-match-highlight-background":"var(--dh-color-editor-find-match-highlight-bg)","editor-widget-background":"var(--dh-color-editor-find-bg)","input-option-active-background":"var(--dh-color-editor-find-option-active-bg)","input-option-active-foreground":"var(--dh-color-editor-find-option-active-fg)","editor-suggest-widget-background":"var(--dh-color-editor-suggest-bg)","editor-suggest-widget-border":"var(--dh-color-editor-suggest-border)","editor-suggest-widget-foreground":"var(--dh-color-editor-suggest-fg)","editor-suggest-widget-selected-background":"var(--dh-color-editor-suggest-selected-bg)","editor-suggest-widget-selected-foreground":"var(--dh-color-editor-suggest-selected-fg)","editor-suggest-widget-highlightForeground":"var(--dh-color-editor-suggest-highlight-fg)","editor-suggest-widget-focus-highlight-foreground":"var(--dh-color-editor-suggest-focus-highlight-fg)","list-hover-background":"var(--dh-color-editor-suggest-hover-bg)","text-link-foreground":"var(--dh-color-editor-link-foreground)","text-link-active-foreground":"var(--dh-color-editor-link-active-fg)","editor-link-active-foreground":"var(--dh-color-editor-link-active-fg)"};var oa="python",sa={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:/^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,action:{indentAction:1}}],folding:{offSide:!0,markers:{start:/^\s*#region\b/,end:/^\s*#endregion\b/}}},la={keywords:["and","del","from","not","while","as","elif","global","or","with","assert","else","if","pass","yield","break","except","import","print","exec","in","raise","continue","finally","is","return","for","try",":","=","isinstance","__debug__"],storage:["class","def","async","lambda"],operators:["+","-","*","**","/","//","%","<<",">>","&","|","^","~","<",">","<=",">=","==","!=","<>","+=","-=","*=","/","//=","%=","&=","|=","^=",">>=","<<=","**="],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=><!~&|+\-*/^%]+/,delimiters:/[;=.@:,`]/,escapes:/\\(?:[abfnrtv\\"'\n\r]|x[0-9A-Fa-f]{2}|[0-7]{3}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|N\{\w+\})/,rawpre:/(?:[rR]|ur|Ur|uR|UR|br|Br|bR|BR)/,strpre:/(?:[buBU])/,tokenizer:{root:[[/@strpre?("""|''')/,{token:"string.delim",bracket:"@open",next:"@mstring.$1"}],[/@strpre?"([^"\\]|\\.)*$/,"string.invalid"],[/@strpre?'([^'\\]|\\.)*$/,"string.invalid"],[/@strpre?(["])/,{token:"string.delim",bracket:"@open",next:"@sstring.$1",nextEmbedded:"deephavenDb"}],[/@strpre?(["'])/,{token:"string.delim",bracket:"@open",next:"@string.$1"}],[/@rawpre("""|''')/,{token:"string.delim",bracket:"@open",next:"@mrawstring.$1"}],[/@rawpre"([^"\\]|\\.)*$/,"string.invalid"],[/@rawpre'([^'\\]|\\.)*$/,"string.invalid"],[/@rawpre(["'])/,{token:"string.delim",bracket:"@open",next:"@rawstring.$1"}],[/__[\w$]*/,"predefined"],[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@storage":"storage","@default":"identifier"}}],[/[A-Z][\w]*/,{cases:{"~[A-Z0-9_]+":"constructor.identifier","@default":"namespace.identifier"}}],{include:"@whitespace"},[/[{}()[\]]/,"@brackets"],[/@symbols/,{cases:{"@keywords":"keyword","@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+[lL]?/,"number.hex"],[/0[bB][0-1]+[lL]?/,"number.binary"],[/(0[oO][0-7]+|0[0-7]+)[lL]?/,"number.octal"],[/(0|[1-9]\d*)[lL]?/,"number"],[":",{token:"keyword",bracket:"@open"}],[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[/*]/,"comment"]],mstring:[{include:"@strcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],sstring:[{include:"@strcontent"},[/["]/,{token:"string.delim",bracket:"@close",next:"@pop",nextEmbedded:"@pop"}],[/./,"string.invalid"]],string:[{include:"@strcontent"},[/[']/,{token:"string.delim",bracket:"@close",next:"@pop"}],[/./,"string.invalid"]],strcontent:[[/[^\\"']+/,"string"],[/\\$/,"string.escape"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"]],mrawstring:[{include:"@rawstrcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],rawstring:[{include:"@rawstrcontent"},[/["']/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/./,"string.invalid"]],rawstrcontent:[[/[^\\"']+/,"string"],[/\\["']/,"string"],[/\\u[0-9A-Fa-f]{4}/,"string.escape"],[/\\/,"string"]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]]}},ua={id:oa,conf:sa,language:la};const da=ua;var ca="groovy",ha={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:/^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,action:{indentAction:1}}],folding:{offSide:!0,markers:{start:/^\s*#region\b/,end:/^\s*#endregion\b/}}},fa={keywords:["and","del","from","not","while","as","elif","global","or","with","assert","else","if","pass","yield","break","except","import","print","println","class","exec","in","raise","continue","finally","is","return","def","for","lambda","try",":","=","isinstance","__debug__"],operators:["+","-","*","**","/","//","%","<<",">>","&","|","^","~","<",">","<=",">=","==","!=","<>","+=","-=","*=","/","//=","%=","&=","|=","^=",">>=","<<=","**="],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=><!~&|+\-*/^%]+/,delimiters:/[;=.@:,`]/,escapes:/\\(?:[abfnrtv\\"'\n\r]|x[0-9A-Fa-f]{2}|[0-7]{3}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|N\{\w+\})/,rawpre:/(?:[rR]|ur|Ur|uR|UR|br|Br|bR|BR)/,strpre:/(?:[buBU])/,tokenizer:{root:[[/@strpre?("""|''')/,{token:"string.delim",bracket:"@open",next:"@mstring.$1"}],[/@strpre?"([^"\\]|\\.)*$/,"string.invalid"],[/@strpre?'([^'\\]|\\.)*$/,"string.invalid"],[/@strpre?(["])/,{token:"string.delim",bracket:"@open",next:"@sstring.$1",nextEmbedded:"deephavenDb"}],[/@strpre?(["'])/,{token:"string.delim",bracket:"@open",next:"@string.$1"}],[/@rawpre("""|''')/,{token:"string.delim",bracket:"@open",next:"@mrawstring.$1"}],[/@rawpre"([^"\\]|\\.)*$/,"string.invalid"],[/@rawpre'([^'\\]|\\.)*$/,"string.invalid"],[/@rawpre(["'])/,{token:"string.delim",bracket:"@open",next:"@rawstring.$1"}],[/__[\w$]*/,"predefined"],[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w]*/,{cases:{"~[A-Z0-9_]+":"constructor.identifier","@default":"namespace.identifier"}}],{include:"@whitespace"},[/[{}()[\]]/,"@brackets"],[/@symbols/,{cases:{"@keywords":"keyword","@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+[lL]?/,"number.hex"],[/0[bB][0-1]+[lL]?/,"number.binary"],[/(0[oO][0-7]+|0[0-7]+)[lL]?/,"number.octal"],[/(0|[1-9]\d*)[lL]?/,"number"],[":",{token:"keyword",bracket:"@open"}],[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}]],mstring:[{include:"@strcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],sstring:[{include:"@strcontent"},[/["]/,{token:"string.delim",bracket:"@close",next:"@pop",nextEmbedded:"@pop"}],[/./,"string.invalid"]],string:[{include:"@strcontent"},[/[']/,{token:"string.delim",bracket:"@close",next:"@pop"}],[/./,"string.invalid"]],strcontent:[[/[^\\"']+/,"string"],[/\\$/,"string.escape"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"]],mrawstring:[{include:"@rawstrcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],rawstring:[{include:"@rawstrcontent"},[/["']/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/./,"string.invalid"]],rawstrcontent:[[/[^\\"']+/,"string"],[/\\["']/,"string"],[/\\u[0-9A-Fa-f]{4}/,"string.escape"],[/\\/,"string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],doccomment:[[/[^/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[/*]/,"comment.doc"]]}},ma={id:ca,conf:ha,language:fa};const ga=ma;var pa="scala",va={wordPattern:/(unary_[@~!#%^&*()\-=+\\|:<>/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:/^\s*\/\/\s*(?:(?:#?region\b)|(?:<editor-fold\b))/,end:/^\s*\/\/\s*(?:(?:#?endregion\b)|(?:<\/editor-fold>))/}}},ya={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],softKeywords:["as","export","extension","end","derives","on"],constants:["true","false","null","this","super"],modifiers:["abstract","final","implicit","lazy","override","private","protected","sealed"],softModifiers:["inline","opaque","open","transparent","using"],name:/(?:[a-z_$][\w$]*|`[^`]+`)/,type:/(?:[A-Z][\w$]*)/,symbols:/[=><!~?:&|+\-*/^\\%@#]+/,digits:/\d+(_+\d+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,escapes:/\\(?:[btnfr\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,fstring_conv:/[bBhHsScCdoxXeEfgGaAt]|[Tn](?:[HIklMSLNpzZsQ]|[BbhAaCYyjmde]|[RTrDFC])/,tokenizer:{root:[[/\braw"""/,{token:"string.quote",bracket:"@open",next:"@rawstringt"}],[/\braw"/,{token:"string.quote",bracket:"@open",next:"@rawstring"}],[/\bs"""/,{token:"string.quote",bracket:"@open",next:"@sstringt"}],[/\bs"/,{token:"string.quote",bracket:"@open",next:"@sstring"}],[/\bf""""/,{token:"string.quote",bracket:"@open",next:"@fstringt"}],[/\bf"/,{token:"string.quote",bracket:"@open",next:"@fstring"}],[/"""/,{token:"string.quote",bracket:"@open",next:"@stringt"}],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/(@digits)[eE]([-+]?(@digits))?[fFdD]?/,"number.float","@allowMethod"],[/(@digits)\.(@digits)([eE][-+]?(@digits))?[fFdD]?/,"number.float","@allowMethod"],[/0[xX](@hexdigits)[Ll]?/,"number.hex","@allowMethod"],[/(@digits)[fFdD]/,"number.float","@allowMethod"],[/(@digits)[lL]?/,"number","@allowMethod"],[/\b_\*/,"key"],[/\b(_)\b/,"keyword","@allowMethod"],[/\bimport\b/,"keyword","@import"],[/\b(case)([ \t]+)(class)\b/,["keyword.modifier","white","keyword"]],[/\bcase\b/,"keyword","@case"],[/\bva[lr]\b/,"keyword","@vardef"],[/\b(def)([ \t]+)((?:unary_)?@symbols|@name(?:_=)|@name)/,["keyword","white","identifier"]],[/@name(?=[ \t]*:(?!:))/,"variable"],[/(\.)(@name|@symbols)/,[{token:"operator"},{token:"@rematch",next:"@allowMethod"}]],[/([{(])(\s*)(@name(?=\s*=>))/,["@brackets","white","variable"]],[/@name/,{cases:{"@keywords":"keyword","@softKeywords":"keyword","@modifiers":"keyword.modifier","@softModifiers":"keyword.modifier","@constants":{token:"constant",next:"@allowMethod"},"@default":{token:"identifier",next:"@allowMethod"}}}],[/@type/,"type","@allowMethod"],{include:"@whitespace"},[/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/,"annotation"],[/[{(]/,"@brackets"],[/[})]/,"@brackets","@allowMethod"],[/\[/,"operator.square"],[/](?!\s*(?:va[rl]|def|type)\b)/,"operator.square","@allowMethod"],[/]/,"operator.square"],[/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},."'`])/,"keyword"],[/@symbols/,"operator"],[/[;,.]/,"delimiter"],[/'[a-zA-Z$][\w$]*(?!')/,"attribute.name"],[/'[^\\']'/,"string","@allowMethod"],[/(')(@escapes)(')/,[{token:"string"},{token:"string.escape"},{token:"string",next:"@allowMethod"}]],[/'/,"string.invalid"]],import:[[/;/,"delimiter","@pop"],[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/@name|@type/,"type"],[/[(){}]/,"@brackets"],[/[[\]]/,"operator.square"],[/[.,]/,"delimiter"]],allowMethod:[[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/(?==>[\s\w([{])/,"keyword","@pop"],[/(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/,{cases:{"@keywords":{token:"keyword",next:"@pop"},"->|<-|>:|<:|<%":{token:"keyword",next:"@pop"},"@default":{token:"@rematch",next:"@pop"}}}],["","","@pop"]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],case:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword","@allowMethod"],[/\bif\b|=>/,"keyword","@pop"],[/`[^`]+`/,"identifier","@allowMethod"],[/@name/,"variable","@allowMethod"],[/:::?|\||@(?![a-z_$])/,"keyword"],{include:"@root"}],vardef:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword"],[/@name/,"variable"],[/:::?|\||@(?![a-z_$])/,"keyword"],[/=|:(?!:)/,"operator","@pop"],[/$/,"white","@pop"],{include:"@root"}],string:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],stringt:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],fstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],fstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],sstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],sstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],interp:[[/{/,"operator","@push"],[/}/,"operator","@pop"],{include:"@root"}],rawstring:[[/[^"]/,"string"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],rawstringt:[[/[^"]/,"string"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}},ba={id:pa,conf:va,language:ya};const wa=ba;var Sa="deephavenDb",Ta={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:/^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,action:{indentAction:1}}],folding:{offSide:!0,markers:{start:/^\s*#region\b/,end:/^\s*#endregion\b/}}},Ma={tokenPostfix:".js",keywords:["boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"],builtins:["define","require","window","document","undefined"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[~!@#%\^&*-+=|\\:`<>.?\/]+/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,exponent:/[eE][\-+]?[0-9]+/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/([a-zA-Z_\$][\w\$]*)(\s*)(:?)/,{cases:{"$1@keywords":["keyword","white","delimiter"],$3:["key.identifier","white","delimiter"],"$1@builtins":["predefined.identifier","white","delimiter"],"@default":["identifier","white","delimiter"]}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/)/,{token:"regexp.slash",bracket:"@open",next:"@regexp"}],[/[{}()\[\]]/,"@brackets"],[/[;,.]/,"delimiter"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d+\.\d*(@exponent)?/,"number.float"],[/\.\d+(@exponent)?/,"number.float"],[/\d+@exponent/,"number.float"],[/0[xX][\da-fA-F]+/,"number.hex"],[/0[0-7]+/,"number.octal"],[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment.invalid"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["@brackets.regexp.escape.control","regexp.escape.control","@brackets.regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,[{token:"@brackets.regexp.escape.control"},{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["@brackets.regexp.escape.control","regexp.escape.control"]],[/[()]/,"@brackets.regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],["/",{token:"regexp.slash",bracket:"@close"},"@pop"]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,"@brackets.regexp.escape.control","@pop"]]}},Ca={id:Sa,conf:Ta,language:Ma};const Ea=Ca;var Pa="log",xa={},ka={tokenizer:{root:[[/ FATAL[\s\S]*/,{token:"error",next:"@error"}],[/ ERROR[\s\S]*/,{token:"error",next:"@error"}],[/ STDERR[\s\S]*/,{token:"error",next:"@error"}],[/ STDOUT.*/,{token:"stdout",next:"@stdout"}],[/ INFO[\s\S]*/,{token:"info",next:"@info"}],[/ WARN.*/,{token:"warn",next:"@warn"}],[/ TRACE[\s\S]*/,{token:"trace",next:"@trace"}],[/ DEBUG[.\s\S]*/,{token:"debug",next:"@debug"}],[/^\d{2}:\d{2}:\d{2}.\d{3}/,"date"]],error:[{include:"@body"}],info:[{include:"@body"}],warn:[{include:"@body"}],stdout:[{include:"@body"}],trace:[{include:"@body"}],debug:[{include:"@body"}],body:[[/^\d{2}:\d{2}:\d{2}.\d{3}/,{token:"date",next:"@pop"}],[/[\s\S]*/,{token:"$S0"}]]}},Oa={id:Pa,conf:xa,language:ka};const Ia=Oa;function Ot(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function It(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ot(Object(t),!0).forEach(function(n){Da(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ot(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Da(r,e,t){return e=Na(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Na(r){var e=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 Z=D.module("MonacoUtils");class re{static init(){var{getWorker:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Z.debug("Initializing Monaco..."),e!==void 0&&re.registerGetWorker(e);var{registerLanguages:t,removeHashtag:n}=re,i=Kt(kt);Z.debug2("Monaco theme:",kt),Z.debug2("Monaco theme derived:",i);var a=[{token:"",foreground:n(i.foreground)},{token:"string",foreground:n(i.string)},{token:"string.delim",foreground:n(i["string-delim"])},{token:"keyword",foreground:n(i.keyword)},{token:"identifier.js",foreground:n(i["identifier-js"])},{token:"delimiter",foreground:n(i.delimiter)},{token:"comment",foreground:n(i.comment)},{token:"number",foreground:n(i.number)},{token:"storage",foreground:n(i.storage)},{token:"identifier",foreground:n(i.identifier)},{token:"namespace.identifier",foreground:n(i["namespace-identifier"])},{token:"operator",foreground:n(i.operator)},{token:"predefined",foreground:n(i.predefined)},{token:"error.log",foreground:i["log-error"].substring(1)},{token:"warn.log",foreground:n(i["log-warn"])},{token:"info.log",foreground:n(i["log-info"])},{token:"stdout.log",foreground:n(i["log-stdout"])},{token:"trace.log",foreground:n(i["log-trace"])},{token:"debug.log",foreground:n(i["log-debug"])},{token:"date.log",foreground:n(i["log-date"])}],o={errorForeground:i["error-foreground"],"inputOption.activeBorder":i["input-option-active-border"],"editor.background":i.background,"editor.foreground":i.foreground,"editor.lineHighlightBackground":i["editor-line-highlight-bg"],"editorLineNumber.foreground":i["editor-line-number-foreground"],"editor.selectionBackground":i["editor-selection-background"],"editor.findMatchBackground":i["editor-find-match-background"],"editor.findMatchHighlightBackground":i["editor-find-match-highlight-background"],"editorSuggestWidget.background":i["editor-suggest-widget-background"],"editorSuggestWidget.border":i["editor-suggest-widget-border"],"editorSuggestWidget.foreground":i["editor-suggest-widget-foreground"],"editorSuggestWidget.selectedBackground":i["editor-suggest-widget-selected-background"],"editorSuggestWidget.selectedForeground":i["editor-suggest-widget-selected-foreground"],"editorSuggestWidget.highlightForeground":i["editor-suggest-widget-highlightForeground"],"editorSuggestWidget.focusHighlightForeground":i["editor-suggest-widget-focus-highlight-foreground"],"list.hoverBackground":i["list-hover-background"],"dropdown.background":i["context-menu-background"],"dropdown.foreground":i["context-menu-foreground"],"menu.selectionBackground":i["menu-selection-background"],"list.focusBackground":i["menu-selection-background"],"editorWidget.background":i["editor-widget-background"],"inputOption.activeBackground":i["input-option-active-background"],"inputOption.activeForeground":i["input-option-active-foreground"],focusBorder:i["focus-border"],"input.background":i["input-background"],"input.foreground":i["input-foreground"],"input.border":i["input-border"],"textLink.foreground":i["text-link-foreground"],"textLink.activeForeground":i["text-link-active-foreground"],"editorLink.activeForeground":i["editor-link-active-foreground"]};Y.defineTheme("dh-dark",{base:"vs-dark",inherit:!0,rules:a,colors:o});try{Y.setTheme("dh-dark")}catch{Z.error("Failed to set 'dh-dark' Monaco theme, falling back to vs-dark"),Y.setTheme("vs-dark")}t([Ea,da,ga,Ia,wa]),re.removeConflictingKeybindings(),Z.debug("Monaco initialized.")}static registerGetWorker(e){window.MonacoEnvironment=It(It({},window.MonacoEnvironment),{},{getWorker:e})}static removeHashtag(e){return e.substring(1)}static registerLanguages(e){var t=e.map(n=>{var{id:i}=n;return i});ue.getLanguages().filter(n=>{var{id:i}=n;return t.includes(i)}).forEach(n=>{var i=n;Z.debug2("Overriding default language loader:",i.id)}),e.forEach(n=>{re.registerLanguage(n)})}static registerLanguage(e){Z.debug2("Registering language: ",e.id),ue.register(e),ue.onLanguage(e.id,()=>{ue.setLanguageConfiguration(e.id,e.conf),ue.setMonarchTokensProvider(e.id,e.language)})}static setEOL(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y.EndOfLineSequence.LF;(t=e.getModel())===null||t===void 0||t.setEOL(n)}static openDocument(e,t){var n=e.getModel();ce(n);var i={textDocument:{uri:"".concat(n.uri),languageId:n.getLanguageId(),version:n.getVersionId(),text:n.getValue()}};Z.debug2("didOpenDocumentParams: ",i),t.openDocument(i);var a=e.onDidChangeModelContent(o=>{for(var{changes:l,versionId:s}=o,u=[],d=0;d<l.length;d+=1){var m=l[d],{range:g,rangeLength:v,text:w}=m,T={range:{start:{line:g.startLineNumber-1,character:g.startColumn-1},end:{line:g.endLineNumber-1,character:g.endColumn-1}},rangeLength:v,text:w};u.push(T)}if(u.length>0){var M={textDocument:{version:s,uri:"".concat(n.uri)},contentChanges:u};Z.debug2("didChangeDocumentParams",M),t.changeDocument(M)}});return a}static closeDocument(e,t){var n=e.getModel();ce(n);var i={textDocument:{uri:"".concat(n.uri)}};t.closeDocument(i)}static registerPasteHandler(e){e.onDidPaste(t=>{var n=/“|”/g,i=/\u200b/g,a=/\u00A0/g,o=e.getModel();ce(o);var l=o.getValueInRange(t.range);(n.test(l)||i.test(l)||a.test(l))&&o.applyEdits([{range:t.range,text:l.replace(n,'"').replace(i,"").replace(a," ")}])})}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static removeConflictingKeybindings(){Y.addKeybindingRule({keybinding:B.CtrlCmd|Ve.KeyD,command:null}),re.isMacPlatform()||Y.addKeybindingRule({keybinding:B.CtrlCmd|Ve.KeyH,command:null})}static disableKeyBindings(e,t){e.addAction({id:"disable-keybindings-".concat(Ge()),label:"",keybindings:t,run:()=>{}})}static getMonacoKeyCodeFromShortcut(e){var{keyState:t}=e,{keyValue:n}=t;if(n===null)return 0;var i=re.isMacPlatform();return i?(t.metaKey?B.CtrlCmd:0)|(t.shiftKey?B.Shift:0)|(t.altKey?B.Alt:0)|(t.ctrlKey?B.WinCtrl:0)|tt.fromString(n):(t.ctrlKey?B.CtrlCmd:0)|(t.shiftKey?B.Shift:0)|(t.altKey?B.Alt:0)|(t.metaKey?B.WinCtrl:0)|tt.fromString(n)}static provideLinks(e){for(var t=[],n=function(o){var l=e.getLineContent(o),s=yr(l),u=s.filter(d=>d.type==="url"?/^https?:\/\//.test(d.value):!0);u.forEach(d=>{t.push({url:d.href,range:new Lr(o,d.start+1,o,d.end+1)})})},i=1;i<=e.getLineCount();i+=1)n(i);return{links:t}}}const Aa=re;function Dt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function La(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){Fe(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 Fe(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=$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 ir extends b.Component{constructor(e){super(e),Fe(this,"container",void 0),Fe(this,"editor",void 0),this.handleResize=this.handleResize.bind(this),this.container=null,this.state={}}componentDidMount(){this.initEditor(),window.addEventListener("resize",this.handleResize)}componentWillUnmount(){window.removeEventListener("resize",this.handleResize),this.destroyEditor()}setLanguage(e){if(this.editor){var t=this.editor.getModel();ce(t),Y.setModelLanguage(t,e)}}handleResize(){this.updateDimensions()}toggleFind(){this.editor&&(this.editor.focus(),this.editor.trigger("toggleFind","actions.find",void 0))}updateDimensions(){var e;(e=this.editor)===null||e===void 0||e.layout()}initEditor(){var{onEditorInitialized:e}=this.props,{settings:t}=this.props;t=La({copyWithSyntaxHighlighting:!1,fixedOverflowWidgets:!0,folding:!1,fontFamily:"Fira Mono",glyphMargin:!1,language:"python",lineNumbersMinChars:3,minimap:{enabled:!1},scrollBeyondLastLine:!1,tabCompletion:"on",value:"",wordWrap:"off",links:!0},t),ce(this.container),this.editor=Y.create(this.container,t),this.editor.addAction({id:"find",label:"Find",keybindings:[B.CtrlCmd|Ve.KeyF],precondition:void 0,keybindingContext:void 0,contextMenuGroupId:"navigation",contextMenuOrder:1,run:()=>{this.toggleFind()}}),this.editor.layout(),ue.registerLinkProvider("plaintext",{provideLinks:Aa.provideLinks}),e(this.editor)}destroyEditor(){var{onEditorWillDestroy:e}=this.props;ce(this.editor),e(this.editor),this.editor.dispose(),this.editor=void 0}render(){var{className:e}=this.props;return f.jsx("div",{className:I("editor-container",e),ref:t=>{this.container=t}})}}Fe(ir,"defaultProps",{className:"fill-parent-absolute",onEditorInitialized:()=>{},onEditorWillDestroy:()=>{},settings:{}});const is=ir;function Je(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 je{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""}}Je(je,"TYPE_GLOBAL","type-global");Je(je,"TYPE_CONTEXT_PRESET","type-context-preset");Je(je,"TYPE_CONTEXT_CUSTOM","type-context-custom");const A=je;class Ka extends A{format(e){switch(e){case 1:case!0:return"true";case 0:case!1:return"false";default:return""}}}const Ba=Ka;class Ha extends A{format(e){return String.fromCharCode(e)}}const Wa=Ha;function ne(r,e,t){return e=Va(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Va(r){var e=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 Nt=D.module("DateTimeColumnFormatter");class q extends A{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]:A.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'":" ",i=e?" z":"";return new Map([["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd".concat(n,"HH:mm:ss").concat(i)],["yyyy-MM-dd HH:mm:ss.SSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSS").concat(i)],["yyyy-MM-dd HH:mm:ss.SSSSSSSSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSSSSSSSS").concat(i)]])}static getGlobalFormats(e,t){var n=q.makeGlobalFormatStringMap(e,t);return[...n.keys()]}static makeFormatStringMap(e,t){var n=t!==void 0&&t?"'T'":" ",i=e!==void 0&&e?" z":"";return new Map([["yyyy-MM-dd","yyyy-MM-dd".concat(i)],["MM-dd-yyyy","MM-dd-yyyy".concat(i)],["HH:mm:ss","HH:mm:ss".concat(i)],["HH:mm:ss.SSS","HH:mm:ss.SSS".concat(i)],["HH:mm:ss.SSSSSSSSS","HH:mm:ss.SSSSSSSSS".concat(i)],["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd".concat(n,"HH:mm:ss").concat(i)],["yyyy-MM-dd HH:mm:ss.SSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSS").concat(i)],["yyyy-MM-dd HH:mm:ss.SSSSSSSSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSSSSSSSS").concat(i)]])}static getFormats(e,t){var n=q.makeFormatStringMap(e,t);return[...n.keys()]}constructor(e){var{timeZone:t="",showTimeZone:n=!0,showTSeparator:i=!1,defaultDateTimeFormatString:a=q.DEFAULT_DATETIME_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ne(this,"dh",void 0),ne(this,"dhTimeZone",void 0),ne(this,"defaultDateTimeFormatString",void 0),ne(this,"showTimeZone",void 0),ne(this,"showTSeparator",void 0),ne(this,"formatStringMap",void 0);var o=t||q.DEFAULT_TIME_ZONE_ID;try{this.dhTimeZone=e.i18n.TimeZone.getTimeZone(o)}catch{Nt.error("Unsupported time zone id",o),this.dhTimeZone=e.i18n.TimeZone.getTimeZone(q.DEFAULT_TIME_ZONE_ID)}this.dh=e,this.defaultDateTimeFormatString=a,this.showTimeZone=n,this.showTSeparator=i,this.formatStringMap=q.makeFormatStringMap(n,i)}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,i=this.getEffectiveFormatString(n);try{return this.dh.i18n.DateTimeFormat.format(i,e,this.dhTimeZone)}catch{Nt.error("Invalid format arguments")}return""}}ne(q,"DEFAULT_DATETIME_FORMAT_STRING","yyyy-MM-dd HH:mm:ss.SSS");ne(q,"DEFAULT_TIME_ZONE_ID","America/New_York");function z(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=Ga(r,"string");return typeof e=="symbol"?e:String(e)}function Ga(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var za=D.module("DecimalColumnFormatter");class O extends A{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]:A.TYPE_CONTEXT_PRESET,i=arguments.length>3?arguments[3]:void 0;return{label:e,type:n,formatString:t,multiplier:i}}static makePresetFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return O.makeFormat(e,t,A.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 O.makeFormat("Custom Format",e,A.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=O.DEFAULT_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),z(this,"defaultFormatString",void 0),z(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,i=t.multiplier!=null&&t.multiplier!==0?e*t.multiplier:e;try{return this.dh.i18n.NumberFormat.format(n,i)}catch{za.error("Invalid format arguments")}return""}}z(O,"DEFAULT_FORMAT_STRING","###,##0.0000");z(O,"FORMAT_PERCENT",O.makePresetFormat("Percent","##0.00%"));z(O,"FORMAT_BASIS_POINTS",O.makePresetFormat("Basis Points","###,##0 bp",1e4));z(O,"FORMAT_MILLIONS",O.makePresetFormat("Millions","###,##0.000 mm",1e-6));z(O,"FORMAT_SCIENTIFIC_NOTATION",O.makePresetFormat("Scientific Notation","0.0000E0"));z(O,"FORMAT_ROUND",O.makePresetFormat("Round","###,##0"));z(O,"FORMAT_ROUND_TWO_DECIMALS",O.makePresetFormat("0.00","###,##0.00"));z(O,"FORMAT_ROUND_FOUR_DECIMALS",O.makePresetFormat("0.0000","###,##0.0000"));class Qa extends A{format(e){return"".concat(e)}}const Za=Qa;function ye(r,e,t){return e=Xa(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Xa(r){var e=Ja(r,"string");return typeof e=="symbol"?e:String(e)}function Ja(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 Ya=D.module("IntegerColumnFormatter");class G extends A{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]:A.TYPE_CONTEXT_PRESET,i=arguments.length>3?arguments[3]:void 0;return{label:e,type:n,formatString:t,multiplier:i}}static makePresetFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return G.makeFormat(e,t,A.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 G.makeFormat("Custom Format",e,A.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=G.DEFAULT_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ye(this,"dh",void 0),ye(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,i=t.multiplier!=null&&t.multiplier!==0?e*t.multiplier:e;try{return this.dh.i18n.NumberFormat.format(n,i)}catch{Ya.error("Invalid format arguments")}return""}}ye(G,"DEFAULT_FORMAT_STRING","###,##0");ye(G,"FORMAT_MILLIONS",G.makePresetFormat("Millions","###,##0.000 mm",1e-6));ye(G,"FORMAT_SCIENTIFIC_NOTATION",G.makePresetFormat("Scientific Notation","0.0000E0"));class eo extends A{format(e){return e}}function ar(r,e,t){return e=to(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function to(r){var e=ro(r,"string");return typeof e=="symbol"?e:String(e)}function ro(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 N{static makeDateWrapper(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,s=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"),m="".concat(i+1).padStart(2,"0"),g="".concat(a).padStart(2,"0"),v="".concat(o).padStart(2,"0"),w="".concat(l).padStart(2,"0"),T="".concat(s).padStart(2,"0"),M="".concat(u).padStart(9,"0"),$="".concat(d,"-").concat(m,"-").concat(g," ").concat(v,":").concat(w,":").concat(T,".").concat(M);return e.i18n.DateTimeFormat.parse(N.FULL_DATE_FORMAT,$,e.i18n.TimeZone.getTimeZone(t))}static getNextNanos(e){var t=parseInt(e,10),n="0".repeat(9-e.length),i="".concat(t+1).concat(n);return parseInt(i,10)}static getNextDate(e,t,n,i){var{year:a,month:o,date:l,hours:s,minutes:u,seconds:d,nanos:m}=n;if(t.nanos!=null){if(t.nanos.length===9)return null;m=N.getNextNanos(t.nanos),m>999999999&&(d+=1,m=0)}else t.seconds!=null?d+=1:t.minutes!=null?u+=1:t.hours!=null?s+=1:t.date!=null?l+=1:t.month!=null?o+=1:a+=1;var g=new Date(a,o,l,s,u,d);return N.makeDateWrapper(e,i,g.getFullYear(),g.getMonth(),g.getDate(),g.getHours(),g.getMinutes(),g.getSeconds(),m)}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 i=0;i<N.months.length;i+=1)if(N.months[i].startsWith(n))return i}return NaN}static parseDateValues(e,t,n,i,a,o,l){var s=parseInt(e,10),u=t!=null?this.parseMonth(t):0,d=n!=null?parseInt(n,10):1,m=i!=null?parseInt(i,10):0,g=a!=null?parseInt(a,10):0,v=o!=null?parseInt(o,10):0,w=l!=null?parseInt(l.padEnd(9,"0"),10):0;return Number.isNaN(s)||Number.isNaN(u)||Number.isNaN(d)||Number.isNaN(m)||Number.isNaN(g)||Number.isNaN(v)||Number.isNaN(w)?null:{year:s,month:u,date:d,hours:m,minutes:g,seconds:v,nanos:w}}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[,i,,a,,o,,l,,s,,u,,d,m]=n;if(m!=null&&m.length>0)throw new Error("Unexpected characters after date string '".concat(e,"': ").concat(m));return{year:i,month:a,date:o,hours:l,minutes:s,seconds:u,nanos:d}}static parseDateRange(e,t,n){var i=t.trim().toLowerCase();if(i.length===0)throw new Error("Cannot parse date range from empty string");if(i==="null")return[null,null];if(i==="today"){var a=new Date(Date.now()),o=N.makeDateWrapper(e,n,a.getFullYear(),a.getMonth(),a.getDate()),l=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1),s=N.makeDateWrapper(e,n,l.getFullYear(),l.getMonth(),l.getDate());return[o,s]}if(i==="yesterday"){var u=new Date(Date.now()),d=new Date(u.getFullYear(),u.getMonth(),u.getDate()-1),m=N.makeDateWrapper(e,n,d.getFullYear(),d.getMonth(),d.getDate()),g=N.makeDateWrapper(e,n,u.getFullYear(),u.getMonth(),u.getDate());return[m,g]}if(i==="now"){var v=new Date(Date.now()),w=e.DateWrapper.ofJsDate(v);return[w,null]}var T=N.parseDateTimeString(i);if(T.year==null&&T.month==null&&T.date==null)throw new Error("Unable to extract year, month, or day ".concat(i));var M=N.parseDateValues(T.year,T.month,T.date,T.hours,T.minutes,T.seconds,T.nanos);if(M==null)throw new Error("Unable to extract date values from ".concat(T));var $=N.makeDateWrapper(e,n,M.year,M.month,M.date,M.hours,M.minutes,M.seconds,M.nanos),L=N.getNextDate(e,T,M,n);return[$,L]}static getJsDate(e){return typeof e=="number"?new Date(e):e.asDate()}}ar(N,"FULL_DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSSSSS");ar(N,"months",["january","february","march","april","may","june","july","august","september","october","november","december"]);const Ft=N;function as(r,e){return r===e?{operator:"notEq",value:""}:{operator:"eq",value:r}}function os(r,e,t){return function(i){var a=t.trim();if(a==="")return null;var o=or(e,l=>l.filter().containsIgnoreCase(r.makeFilterValue(l.type,a)),"or");return o(i)}}function or(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"or";return function(i){var a=i?.findColumns(typeof r=="string"?[r]:r);if(a==null||a.length===0)return null;var o=a.map(e);return o.reduce((l,s)=>l[t](s))}}function no(r,e,t,n){return or(e,i=>i.filter()[n](r.makeFilterValue(i.type,t)),"or")}function ss(r,e,t,n,i){return function(o){var l=o?.findColumn(e),s=t==="all"||n&&t.size===0;return l==null||s?null:r.makeSelectValueFilter(l,[...t.keys()],i)}}function ls(r){return function(t){return t.filter().isNull().not().and(t.filter().notEq(r.makeFilterValue(t.type,"")))}}function us(r,e){return function(n){var i=n.filter(),a=r.makeFilterValue(n.type,""),o=i.eq(a);return e?i.isNull().or(o):o.or(i.notEq(a))}}function Ye(r,e,t){return e=io(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function io(r){var e=ao(r,"string");return typeof e=="symbol"?e:String(e)}function ao(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 be{}Ye(be,"not","not");Ye(be,"and","and");Ye(be,"or","or");function ds(r){if(!(r==="not"||r==="and"||r==="or"))throw new Error("operator is not a valid FilterOperatorValue")}function E(r,e,t){return e=oo(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function oo(r){var e=so(r,"string");return typeof e=="symbol"?e:String(e)}function so(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 h{}E(h,"eq","eq");E(h,"eqIgnoreCase","eqIgnoreCase");E(h,"notEq","notEq");E(h,"notEqIgnoreCase","notEqIgnoreCase");E(h,"greaterThan","greaterThan");E(h,"greaterThanOrEqualTo","greaterThanOrEqualTo");E(h,"lessThan","lessThan");E(h,"lessThanOrEqualTo","lessThanOrEqualTo");E(h,"in","in");E(h,"inIgnoreCase","inIgnoreCase");E(h,"notIn","notIn");E(h,"notInIgnoreCase","notInIgnoreCase");E(h,"isTrue","isTrue");E(h,"isFalse","isFalse");E(h,"isNull","isNull");E(h,"invoke","invoke");E(h,"contains","contains");E(h,"notContains","notContains");E(h,"containsIgnoreCase","containsIgnoreCase");E(h,"startsWith","startsWith");E(h,"endsWith","endsWith");E(h,"containsAny","containsAny");var At=D.module("ViewportDataUtils");function lo(r,e){return String(r.offsetInSnapshot+e)}function cs(r,e){var{bulkUpdate:t}=r;return function(i){var{columns:a,offset:o,rows:l}=i.detail;At.debug("table updated",i.detail);var s=new Map;l.forEach(u=>{var d=e(u,a),m=lo(u,o);s.set(m,{key:m,item:d})}),At.debug("update keys",s),t(s)}}function hs(r,e){return e.reduce((t,n)=>(t[n.name]=r.get(n),t),{})}function*fs(r,e){for(var t=r;t<=e;++t)yield{key:String(t)}}function uo(r){return r==null||co(r)?0:r.size}function co(r){return"isClosed"in r?r.isClosed:!1}function ms(r,e,t,n){var i=r+e-1,[a,o]=[0,n-1],l=et(r-t,a,o),s=et(i+t,a,o);return[l,s]}function Lt(r,e,t,n,i,a,o){try{var l=r[a](o),s=l.value}catch(u){t(u);return}l.done?e(s):Promise.resolve(s).then(n,i)}function J(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(s){Lt(a,n,i,o,l,"next",s)}function l(s){Lt(a,n,i,o,l,"throw",s)}o(void 0)})}}function se(r,e,t){return e=ho(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ho(r){var e=fo(r,"string");return typeof e=="symbol"?e:String(e)}function fo(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var X=D.module("TableUtils");class c{static copyTableAndApplyFilters(e){var t=arguments;return J(function*(){if(e==null)return null;for(var n=yield e.copy(),i=t.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=t[o];return n.applyFilter(Ke(...a.map(l=>l(n)))),n})()}static getSortIndex(e,t){for(var n=0;n<e.length;n+=1){var i,a=e[n];if(((i=a.column)===null||i===void 0?void 0:i.name)===t)return n}return null}static getSortForColumn(e,t){var n=c.getSortIndex(e,t);return n!=null?e[n]:null}static getFilterText(e){return e?e.toString():null}static getFilterTypes(e){return c.isBooleanType(e)?[h.isTrue,h.isFalse,h.isNull]:c.isCharType(e)||c.isNumberType(e)||c.isDateType(e)?[h.eq,h.notEq,h.greaterThan,h.greaterThanOrEqualTo,h.lessThan,h.lessThanOrEqualTo]:c.isTextType(e)?[h.eq,h.eqIgnoreCase,h.notEq,h.notEqIgnoreCase,h.contains,h.notContains,h.startsWith,h.endsWith]:[]}static getNextSort(e,t,n){if(n<0||n>=e.length)return null;var i=c.getSortForColumn(t,e[n].name);return i===null?e[n].sort().asc():i.direction===c.sortDirection.ascending?i.desc():null}static makeColumnSort(e,t,n,i){if(t<0||t>=e.length||n===c.sortDirection.none)return null;var a=e[t].sort();switch(n){case c.sortDirection.ascending:a=a.asc();break;case c.sortDirection.descending:a=a.desc();break}return i&&(a=a.abs()),a}static toggleSortForColumn(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(n<0||n>=t.length)return[];var a=c.getNextSort(t,e,n);return c.setSortForColumn(e,t[n].name,a,i)}static sortColumn(e,t,n,i,a,o){if(n<0||n>=t.length)return[];var l=c.makeColumnSort(t,n,i,a);return c.setSortForColumn(e,t[n].name,l,o)}static setSortForColumn(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=c.getSortIndex(e,t),o=[];return i&&(o=o.concat(e.filter(l=>{var{direction:s}=l;return s!==c.sortDirection.reverse})),a!==null&&o.splice(a,1)),n!==null&&o.push(n),o}static getNormalizedType(e){switch(e){case"boolean":case"java.lang.Boolean":case c.dataType.BOOLEAN:return c.dataType.BOOLEAN;case"char":case"java.lang.Character":case c.dataType.CHAR:return c.dataType.CHAR;case"java.lang.String":case c.dataType.STRING:return c.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 c.dataType.DATETIME:return c.dataType.DATETIME;case"double":case"java.lang.Double":case"float":case"java.lang.Float":case"java.math.BigDecimal":case c.dataType.DECIMAL:return c.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 c.dataType.INT:return c.dataType.INT;default:return c.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 c.isIntegerType(e)||c.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 c.getNormalizedType(e)===c.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 Ne.makeCancelable(e,t=>{t.close()})}static makeCancelableTableEventPromise(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a,o,l=!0,s=new Promise((u,d)=>{o=setTimeout(()=>{a(),l=!1,d(new Wt('Event "'.concat(t,'" timed out.')))},n),a=e.addEventListener(t,m=>{if(i!=null&&!i(m)){X.debug2("Event triggered, but matcher returned false.");return}X.debug2("Event triggered, resolving."),a(),clearTimeout(o),l=!1,u(m)})});return s.cancel=()=>{if(l){X.debug2("Pending promise cleanup."),a(),clearTimeout(o),l=!1;return}X.debug2("Ignoring non-pending promise cancel.")},s}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?.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=c.removeCommas(t);if(c.NUMBER_REGEX.test(n))return parseFloat(n);throw new Error("Invalid number '".concat(e,"'"))}static getFilterOperatorString(e){switch(e){case h.eq:return"=";case h.notEq:return"!=";case h.greaterThan:return">";case h.greaterThanOrEqualTo:return">=";case h.lessThan:return"<";case h.lessThanOrEqualTo:return"<=";case h.contains:return"~";case h.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,i)=>{var a=n.name.toUpperCase(),o=i.name.toUpperCase();return hn.sort(a,o,t)})}constructor(e){se(this,"dh",void 0),this.dh=e,Ur(this)}createDistinctSortedColumnTable(e,t,n){var i=arguments,a=this;return J(function*(){if(e==null)return null;for(var o=e,l=i.length,s=new Array(l>3?l-3:0),u=3;u<l;u++)s[u-3]=i[u];s.length>0&&(o=yield e.copy(),yield o.applyFilter(Ke(...s.map(v=>v(o)))));var d=o.findColumn(t),m=yield o.selectDistinct([d]);o!==e&&o.close();var g=m.findColumn(t).sort()[n]();return a.applySort(m,[g])})()}doesColumnValueExist(e,t,n,i){var a=this;return J(function*(){if(e==null)return null;var o=no(a,t,n,i?"eq":"eqIgnoreCase"),l=yield e.copy();yield a.applyFilter(l,Ke(o(l)));var s=uo(l);return l.close(),s>0})()}makeQuickFilter(e,t,n){for(var i=t.split("||"),a=null,o=0;o<i.length;o+=1){for(var l=i[o],s=l.split("&&"),u=null,d=0;d<s.length;d+=1){var m=s[d].trim();if(m.length>0){var g=this.makeQuickFilterFromComponent(e,m,n);if(g)u?u=u.and(g):u=g;else throw new Error("Unable to parse quick filter from text ".concat(t))}}a&&u?a=a.or(u):a=u}return a}makeQuickFilterFromComponent(e,t,n){var{type:i}=e;return c.isNumberType(i)?this.makeQuickNumberFilter(e,t):c.isBooleanType(i)?this.makeQuickBooleanFilter(e,t):n!=null&&c.isDateType(i)?this.makeQuickDateFilter(e,t,n):c.isCharType(i)?this.makeQuickCharFilter(e,t):this.makeQuickTextFilter(e,t)}makeQuickNumberFilter(e,t){var n=e.filter(),{dh:i}=this,a=null,o=/\s*(>=|<=|=>|=<|>|<|!=|=|!)?(\s*-\s*)?(\s*\d*(?:,\d{3})*(?:\.\d*)?\s*)?(null|nan|infinity|inf|\u221E)?(.*)/i,l=o.exec(t),s=null,u=null,d=null,m=null,g=null;if(l!==null&&l.length>3&&([,s,u,d,m,g]=l),g!=null&&g.trim().length>0)return null;if(s==null&&(s="="),m!=null){if(!(s==="="||s==="!"||s==="!="))return null;switch(m=m.trim().toLowerCase(),m){case"null":a=n.isNull();break;case"nan":a=i.FilterCondition.invoke("isNaN",n);break;case"infinity":case"inf":case"∞":u!=null?a=i.FilterCondition.invoke("isInf",n).and(n.lessThan(i.FilterValue.ofNumber(0))):a=i.FilterCondition.invoke("isInf",n).and(n.greaterThan(i.FilterValue.ofNumber(0)));break}return a!==null&&(s==="!"||s==="!=")&&(a=a.not()),a}if(d==null)return null;if(d=c.removeCommas(d),c.isLongType(e.type))try{d=i.FilterValue.ofNumber(i.LongWrapper.ofString("".concat(u!=null?"-":"").concat(d)))}catch(v){return X.warn("Unable to create long filter",v),null}else{if(d=parseFloat(d),d==null||Number.isNaN(d))return null;d=i.FilterValue.ofNumber(u!=null?0-d:d)}return a=e.filter(),c.makeRangeFilterWithOperation(a,s,d)}static escapeQuickTextFilter(e){var t,n;if(e==null)return null;var i=/^(!~|!=|~|=|!)?(.*)/,a=/^\\*null$/,o=i.exec(e),l=null,s=null;if(o!==null&&o.length>2&&([,l,s]=o),l!=null){var u;return"\\".concat(l).concat((u=s)!==null&&u!==void 0?u:"")}return s!=null&&a.test(s.toLowerCase())||s!=null&&s.startsWith("*")?"\\".concat(s):s!=null&&s.endsWith("*")&&!s.endsWith("\\*")?(s=s.substring(0,s.length-1),"".concat(s,"\\*")):"".concat((t=l)!==null&&t!==void 0?t:"").concat((n=s)!==null&&n!==void 0?n:"")}static unescapeQuickTextFilter(e){var t,n,i=/^(\\!~|\\!=|\\~|\\=|\\!)?(.*)/,a=/^\\*null$/,o=i.exec(e),l=null,s=null;return o!==null&&o.length>2&&([,l,s]=o),l!=null&&(l=l.replace("\\","")),s!=null&&a.test(s.toLowerCase())&&(s=s.replace("\\","")),l==null&&s!=null&&s.startsWith("\\*")&&(s=s.substring(1)),l==null&&s!=null&&s.endsWith("\\*")?(s=s.substring(0,s.length-2),"".concat(s,"*")):"".concat((t=l)!==null&&t!==void 0?t:"").concat((n=s)!==null&&n!==void 0?n:"")}makeQuickTextFilter(e,t){var{dh:n}=this,i="".concat(t).trim(),a=/^(!~|!=|~|=|!)?(.*)/,o=a.exec(i),l=null,s=null;if(o!==null&&o.length>2&&([,l,s]=o,s!=null&&(s=s.trim())),s==null||s.length===0&&!(l==="="||l==="!="))return null;l==null&&(l="=");var u=e.filter();if(s.toLowerCase()==="null")switch(l){case"=":return u.isNull();case"!=":case"!":return u.isNull().not()}var d=null,m=null;switch(s.startsWith("*")?(d="*",s=s.substring(1)):s.endsWith("*")&&!s.endsWith("\\*")&&(m="*",s=s.substring(0,s.length-1)),s=c.unescapeQuickTextFilter(s),l){case"~":return u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(s,"\\E.*"))));case"!~":return u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(s,"\\E.*"))).not());case"!=":return d==="*"?u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(s,"\\E$"))).not()):m==="*"?u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i)^\\Q".concat(s,"\\E.*"))).not()):u.notEqIgnoreCase(n.FilterValue.ofString(s.toLowerCase()));case"=":return d==="*"?u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(s,"\\E$")))):m==="*"?u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i)^\\Q".concat(s,"\\E.*")))):u.eqIgnoreCase(n.FilterValue.ofString(s.toLowerCase()))}return null}makeQuickBooleanFilter(e,t){var n=/^(!=|=|!)?(.*)/,i=n.exec("".concat(t).trim());if(i===null)return null;var[,a,o]=i,l=a==="!"||a==="!=",s=o.trim().toLowerCase(),u=e.filter();try{var d=c.makeBooleanValue(s);return d!=null&&d?u=u.isTrue():d===null?u=u.isNull():u=u.isFalse(),l?u.not():u}catch{return null}}makeQuickDateFilter(e,t,n){var i=t.trim(),a=/\s*(>=|<=|=>|=<|>|<|!=|!|=)?(.*)/,o=a.exec(i);if(o==null||o.length<=2)throw new Error("Unable to parse date filter: ".concat(t));var l=null,s=null;[,l,s]=o;var u=h.eq;switch(l){case"<":u=h.lessThan;break;case"<=":case"=<":u=h.lessThanOrEqualTo;break;case">":u=h.greaterThan;break;case">=":case"=>":u=h.greaterThanOrEqualTo;break;case"!=":case"!":u=h.notEq;break;case"=":case"==":default:u=h.eq;break}return this.makeQuickDateFilterWithOperation(e,s,u,n)}makeQuickDateFilterWithOperation(e,t,n,i){var{dh:a}=this,[o,l]=Ft.parseDateRange(a,t,i),s=o!=null?a.FilterValue.ofNumber(o):null,u=l!=null?a.FilterValue.ofNumber(l):null,d=e.filter();if(s==null)return n===h.notEq?d.isNull().not():d.isNull();switch(n){case h.eq:{if(u!=null){var m=d.greaterThanOrEqualTo(s),g=d.lessThan(u);return m.and(g)}return d.eq(s)}case h.lessThan:return d.lessThan(s);case h.lessThanOrEqualTo:return u!=null?d.lessThan(u):d.lessThanOrEqualTo(s);case h.greaterThan:return u!=null?d.greaterThanOrEqualTo(u):d.greaterThan(s);case h.greaterThanOrEqualTo:return d.greaterThanOrEqualTo(s);case h.notEq:{if(u!=null){var v=d.lessThan(s),w=d.greaterThanOrEqualTo(u);return v.or(w)}return d.notEq(s)}default:throw new Error("Invalid operator: ".concat(n))}}makeQuickCharFilter(e,t){var{dh:n}=this,i="".concat(t).trim(),a=/^(>=|<=|=>|=<|>|<|!=|=|!)?(null|"."|'.'|.)?(.*)/,o=a.exec(i),l=null,s=null,u=null;if(o!==null&&o.length>3&&([,l,s,u]=o),u!=null&&u.trim().length>0||s==null||s.length===0)return null;l==null&&(l="=");var d=e.filter();if(s.toLowerCase()==="null")switch(l){case"=":return d.isNull();case"!=":case"!":return d.isNull().not();default:return null}var m=n.FilterValue.ofString(c.isRangeOperation(l)?c.quoteValue(s):s);return c.makeRangeFilterWithOperation(d,l,m)}makeAdvancedFilter(e,t,n){for(var{filterItems:i,filterOperators:a,invertSelection:o,selectedValues:l}=t,s=null,u=0;u<i.length;u+=1){var d=i[u],{selectedType:m,value:g}=d;if(m!=null&&m.length>0&&g!=null&&g.length>0)try{var v=this.makeAdvancedValueFilter(e,m,g,n);if(v!=null){if(u===0)s=v;else if(s!==null&&u-1<a.length){var w=a[u-1];if(w===be.and)s=s.and(v);else if(w===be.or)s=s.or(v);else{X.error("Unexpected filter operator",w,v),s=null;break}}}else X.debug2("Empty filter ignored for",m,g)}catch(M){X.error("Unable to create filter",M),s=null;break}}var T=this.makeSelectValueFilter(e,l,o);return T!=null&&(s!=null?s=s.and(T):s=T),s}makeAdvancedValueFilter(e,t,n,i){var{dh:a}=this;if(c.isDateType(e.type))return this.makeQuickDateFilterWithOperation(e,n,t,i);if(c.isNumberType(e.type)||c.isCharType(e.type))return this.makeQuickFilter(e,"".concat(c.getFilterOperatorString(t)).concat(n));var o=this.makeFilterValue(e.type,n),l=e.filter();switch(t){case h.eq:return l.eq(o);case h.eqIgnoreCase:return l.eqIgnoreCase(o);case h.notEq:return l.notEq(o);case h.notEqIgnoreCase:return l.notEqIgnoreCase(o);case h.greaterThan:return l.greaterThan(o);case h.greaterThanOrEqualTo:return l.greaterThanOrEqualTo(o);case h.lessThan:return l.lessThan(o);case h.lessThanOrEqualTo:return l.lessThanOrEqualTo(o);case h.isTrue:return l.isTrue();case h.isFalse:return l.isFalse();case h.isNull:return l.isNull();case h.contains:return l.isNull().not().and(l.invoke("matches",a.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E.*"))));case h.notContains:return l.isNull().or(l.invoke("matches",a.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E.*"))).not());case h.startsWith:return l.isNull().not().and(l.invoke("matches",a.FilterValue.ofString("(?s)(?i)^\\Q".concat(n,"\\E.*"))));case h.endsWith:return l.isNull().not().and(l.invoke("matches",a.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E$"))));case h.in:case h.inIgnoreCase:case h.notIn:case h.notInIgnoreCase:case h.invoke:default:throw new Error("Unexpected filter operation: ".concat(t))}}applyNeverFilter(e,t){var n=arguments,i=this;return J(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS;if(e==null)return null;var o=e.findColumn(t),l=[i.makeNeverFilter(o)];return yield i.applyFilter(e,l,a),e})()}applyCustomColumns(e,t){var n=arguments,i=this;return J(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:o}=i;return c.executeAndWaitForEvent(l=>l?.applyCustomColumns(t),e,o.Table.EVENT_CUSTOMCOLUMNSCHANGED,a)})()}applyFilter(e,t){var n=arguments,i=this;return J(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:o}=i;return c.executeAndWaitForEvent(l=>l?.applyFilter(t),e,o.Table.EVENT_FILTERCHANGED,a)})()}applySort(e,t){var n=arguments,i=this;return J(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:o}=i;return c.executeAndWaitForEvent(l=>l?.applySort(t),e,o.Table.EVENT_SORTCHANGED,a)})()}makeNeverFilter(e){var{dh:t}=this,n=null;c.isTextType(e.type)?n=t.FilterValue.ofString("a"):c.isBooleanType(e.type)?n=t.FilterValue.ofBoolean(!0):c.isDateType(e.type)?n=t.FilterValue.ofNumber(t.DateWrapper.ofJsDate(new Date)):n=t.FilterValue.ofNumber(0);var i=e.filter().eq(n),a=e.filter().notEq(n);return i.and(a)}makeFilterValue(e,t){var{dh:n}=this,i=c.getBaseType(e);return c.isTextType(i)?n.FilterValue.ofString(t):c.isLongType(i)?n.FilterValue.ofNumber(n.LongWrapper.ofString(c.removeCommas(t))):n.FilterValue.ofNumber(c.removeCommas(t))}makeFilterRawValue(e,t){var{dh:n}=this;return c.isTextType(e)?n.FilterValue.ofString(t):c.isBooleanType(e)?n.FilterValue.ofBoolean(t):n.FilterValue.ofNumber(t)}makeValue(e,t,n){var{dh:i}=this;if(t==="null")return null;if(c.isTextType(e))return t;if(c.isLongType(e))return i.LongWrapper.ofString(c.removeCommas(t));if(c.isBooleanType(e))return c.makeBooleanValue(t,!0);if(c.isDateType(e)){var[a]=Ft.parseDateRange(i,t,n);return a}return c.isNumberType(e)?c.makeNumberValue(t):(X.error("Unexpected column type",e),null)}makeSelectValueFilter(e,t,n){var{dh:i}=this;if(t.length===0)return n?null:this.makeNeverFilter(e);for(var a=[],o=!1,l=0;l<t.length;l+=1){var s=t[l];s==null?o=!0:c.isTextType(e.type)?a.push(i.FilterValue.ofString(typeof s=="number"?String.fromCharCode(s):s)):c.isBooleanType(e.type)?a.push(i.FilterValue.ofBoolean(!!s)):a.push(i.FilterValue.ofNumber(s))}return o?a.length>0?n?e.filter().isNull().not().and(e.filter().notIn(a)):e.filter().isNull().or(e.filter().in(a)):n?e.filter().isNull().not():e.filter().isNull():n?e.filter().notIn(a):e.filter().in(a)}}se(c,"dataType",{BOOLEAN:"boolean",CHAR:"char",DATETIME:"datetime",DECIMAL:"decimal",INT:"int",STRING:"string",UNKNOWN:"unknown"});se(c,"sortDirection",{ascending:"ASC",descending:"DESC",reverse:"REVERSE",none:null});se(c,"APPLY_TABLE_CHANGE_TIMEOUT_MS",3e4);se(c,"REVERSE_TYPE",Object.freeze({NONE:"none",PRE_SORT:"pre-sort",POST_SORT:"post-sort"}));se(c,"NUMBER_REGEX",/^-?\d+(\.\d+)?$/);se(c,"executeAndWaitForEvent",function(){var r=J(function*(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS;if(t==null)return null;var a=c.makeCancelableTableEventPromise(t,n,i);return e(t),yield a,t});return function(e,t,n){return r.apply(this,arguments)}}());function ke(r,e,t){return e=mo(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function mo(r){var e=go(r,"string");return typeof e=="symbol"?e:String(e)}function go(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 sr{static makeColumnFormatMap(e){return e==null?new Map:e.reduce((t,n)=>{var i=c.getNormalizedType(n.columnType);if(i===null)return t;t.has(i)||t.set(i,new Map);var a=t.get(i);return a?.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,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,o=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 Za,this.typeFormatterMap=new Map([[c.dataType.BOOLEAN,new Ba],[c.dataType.CHAR,new Wa],[c.dataType.DATETIME,new q(e,n)],[c.dataType.DECIMAL,new O(e,i)],[c.dataType.INT,new G(e,a)],[c.dataType.STRING,new eo]]),this.columnFormatMap=sr.makeColumnFormatMap(t),this.truncateNumbersWithPound=o}getColumnFormatMapForType(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=c.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,i=this.getColumnFormatMapForType(e);return(n=i?.get(t))!==null&&n!==void 0?n:null}getColumnTypeFormatter(e){var t=c.getNormalizedType(e),n=this.defaultColumnFormatter;if(t){var i;n=(i=this.typeFormatterMap.get(t))!==null&&i!==void 0?i:n}return n}getFormattedString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",i=arguments.length>3?arguments[3]:void 0;if(e==null)return"";var a=this.getColumnTypeFormatter(t),o=i||this.getColumnFormat(t,n);return a.format(e,o??void 0)}get timeZone(){var e,t=this.typeFormatterMap.get(c.dataType.DATETIME);return t==null||(e=t.dhTimeZone)===null||e===void 0?void 0:e.id}}qe.register([Rr,$r,jr,_r,Kr,Br]);const po="var(--dh-color-visual-blue) var(--dh-color-visual-green) var(--dh-color-visual-yellow) var(--dh-color-visual-purple) var(--dh-color-visual-orange) var(--dh-color-visual-red) var(--dh-color-white)",vo="var(--dh-color-gray-400)",yo="var(--dh-color-gray-500)",bo="var(--dh-color-gray-700)",wo="#4878ea",So="var(--dh-color-gray-500)",Rt={"paper-bgcolor":"var(--dh-color-content-background)","plot-bgcolor":"var(--dh-color-gray-200)","title-color":"var(--dh-color-white)",colorway:po,gridcolor:vo,linecolor:yo,zerolinecolor:bo,activecolor:wo,rangebgcolor:So,"area-color":"var(--dh-color-visual-blue)","trend-color":"var(--dh-color-green-1200)","line-color":"var(--dh-color-visual-green)","error-band-line-color":"var(--dh-color-green-1400)","error-band-fill-color":"var(--dh-color-green-1200)","ohlc-increasing":"var(--dh-color-visual-green)","ohlc-decreasing":"var(--dh-color-visual-red)"};var $t=D.module("ChartTheme");function To(){var r=Kt(Rt);return $t.debug2("Chart theme:",Rt),$t.debug2("Chart theme derived:",r),Object.freeze({paper_bgcolor:r["paper-bgcolor"],plot_bgcolor:r["plot-bgcolor"],title_color:r["title-color"],colorway:r.colorway,gridcolor:r.gridcolor,linecolor:r.linecolor,zerolinecolor:r.zerolinecolor,activecolor:r.activecolor,rangebgcolor:r.rangebgcolor,area_color:r["area-color"],trend_color:r["trend-color"],line_color:r["line-color"],error_band_line_color:r["error-band-line-color"],error_band_fill_color:r["error-band-fill-color"],ohlc_increasing:r["ohlc-increasing"],ohlc_decreasing:r["ohlc-decreasing"]})}const gs=typeof _e=="function"?_e(qe):_e.default(qe);var lr=b.createContext(null);function ps(r){var{children:e}=r,{activeThemes:t}=zi(),[n,i]=b.useState(null);return b.useEffect(()=>{t!=null&&i(To())},[t]),f.jsx(lr.Provider,{value:n,children:e})}function vs(){return b.useContext(lr)}var Mo={TOGGLE_QUICK_FILTER:F.createAndAdd({id:"TABLE.TOGGLE_QUICK_FILTER",name:"Toggle Quick Filter",shortcut:[S.CTRL,y.F],macShortcut:[S.CMD,y.F]}),CLEAR_ALL_FILTERS:F.createAndAdd({id:"TABLE.CLEAR_ALL_FILTERS",name:"Clear All Table Filters",shortcut:[S.CTRL,y.E],macShortcut:[S.CMD,y.E]}),CLEAR_FILTERS:F.createAndAdd({id:"TABLE.CLEAR_FILTERS",name:"Clear Active Table Filters",shortcut:[S.CTRL,S.SHIFT,y.E],macShortcut:[S.CMD,S.SHIFT,y.E]}),REVERSE:F.createAndAdd({id:"TABLE.REVERSE",name:"Reverse",shortcut:[S.CTRL,y.I],macShortcut:[S.CMD,y.I]}),TOGGLE_SEARCH:F.createAndAdd({id:"TABLE.TOGGLE_SEARCH",name:"Toggle Search",shortcut:[S.CTRL,S.SHIFT,y.F],macShortcut:[S.CMD,S.SHIFT,y.F]}),GOTO_ROW:F.createAndAdd({id:"TABLE.GOTO_ROW",name:"Go to Row",shortcut:[S.CTRL,y.G],macShortcut:[S.CMD,y.G]})},Co={COMMIT:F.createAndAdd({id:"INPUT_TABLE.COMMIT",name:"Commit",shortcut:[S.CTRL,y.S],macShortcut:[S.CMD,y.S]}),DISCARD:F.createAndAdd({id:"INPUT_TABLE.DISCARD",name:"Discard",shortcut:[S.CTRL,S.ALT,y.S],macShortcut:[S.CMD,S.OPTION,y.S]})},Eo={TABLE:Mo,INPUT_TABLE:Co};const ys=Eo;function jt(r,e,t,n,i,a,o){try{var l=r[a](o),s=l.value}catch(u){t(u);return}l.done?e(s):Promise.resolve(s).then(n,i)}function Po(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(s){jt(a,n,i,o,l,"next",s)}function l(s){jt(a,n,i,o,l,"throw",s)}o(void 0)})}}function xo(r,e,t){return e=ko(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ko(r){var e=Oo(r,"string");return typeof e=="symbol"?e:String(e)}function Oo(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 Oe=D.module("DownloadServiceWorkerUtils");class ae{static register(e){ae.serviceWorkerRegistration&&ae.unregisterSW(),"serviceWorker"in navigator?navigator.serviceWorker.register(e).then(t=>{t.update(),ae.serviceWorkerRegistration=t,Oe.info("Registering service worker on ",e,t)}).catch(t=>{Oe.error("Failed to register service worker",t)}):Oe.info("Service worker is not supported.")}static getServiceWorker(){return Po(function*(){if("serviceWorker"in navigator){var e=ae.serviceWorkerRegistration;if(e&&e.active)return Oe.info("Download service worker is active."),e.active;throw new Error("Can not find download service worker.")}throw new Error("Download service worker is not available.")})()}static unregisterSW(){var e;(e=ae.serviceWorkerRegistration)===null||e===void 0||e.unregister()}}xo(ae,"serviceWorkerRegistration",null);const bs=ae;var Io=b.createContext(null);function ws(){return Qe(Io,"No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?")}var Ss=b.createContext(null),Se=Object.freeze({AUTH_PLUGIN:"AuthPlugin",DASHBOARD_PLUGIN:"DashboardPlugin",WIDGET_PLUGIN:"WidgetPlugin",TABLE_PLUGIN:"TablePlugin",THEME_PLUGIN:"ThemePlugin"});function Do(r){return"DashboardPlugin"in r}function No(r){return"AuthPlugin"in r}function Fo(r){return"TablePlugin"in r}function Ts(r){return Do(r)||No(r)||Fo(r)}function Ms(r){return"type"in r&&r.type===Se.DASHBOARD_PLUGIN}function Cs(r){return"type"in r&&r.type===Se.WIDGET_PLUGIN}function Es(r){return"type"in r&&r.type===Se.TABLE_PLUGIN}function Ps(r){return"type"in r&&r.type===Se.AUTH_PLUGIN}function xs(r){return"type"in r&&r.type===Se.THEME_PLUGIN}export{zi as $,Sn as A,Ie as B,Zo as C,Bo as D,bn as E,sr as F,ts as G,Go as H,G as I,U as J,y as K,Ae as L,Aa as M,Qt as N,be as O,Ne as P,Yo as Q,oe as R,P as S,h as T,wi as U,S as V,Wn as W,nr as X,rs as Y,es as Z,qi as _,O as a,Wt as a0,Ba as a1,Wa as a2,N as a3,Za as a4,eo as a5,A as a6,as as a7,or as a8,lo as a9,hn as aA,Ho as aB,is as aC,Es as aD,Fo as aE,Cs as aF,kt as aG,qo as aH,jo as aI,_o as aJ,ds as aK,Ht as aL,ls as aa,cs as ab,os as ac,ss as ad,us as ae,no as af,hs as ag,fs as ah,uo as ai,co as aj,ms as ak,To as al,lr as am,ps as an,gs as ao,vs as ap,Ko as aq,Ke as ar,Io as as,Ps as at,No as au,Se as av,xs as aw,Ts as ax,Ss as ay,Qr as az,q as b,c,Vo as d,F as e,Nn as f,k as g,Xo as h,ys as i,Jo as j,li as k,Ur as l,qt as m,zo as n,Ut as o,Ms as p,Do as q,Qo as r,rt as s,ws as t,ns as u,bs as v,Wo as w,Uo as x,Qe as y,Cn as z};
3
- //# sourceMappingURL=PluginTypes-b339cea9.js.map
1
+ import{r as b,H as C,a_ as dr,C as f,D as cr,F as I,R as hr,N as p,G as De,a1 as Ue,K as fr,L as ge,a$ as mr,b0 as gr,E as jt,b1 as pr,b2 as vr,aE as yr,aa as Ye}from"./vendor-0ba32da0.js";import{L as D,T as br,M as wr,b as Sr,c as Tr,aH as Mr,F as Cr,bn as Er,bq as Pr,aF as xr,Y as kr,_ as Or,O as Ir,W as Dr,U as Nr,a2 as Fr,a6 as Ar,a0 as _t,e as ce}from"./index-8e41cc4e.js";import{e as Y,l as ue,a as B,K as Ve,b as et,R as Lr}from"./monaco-1410cbed.js";import{c as _e,P as Kt,b as Rr,h as $r,p as jr,o as _r,s as Kr,t as Br}from"./plotly-e73c874e.js";var _o=Object.freeze([]),Ko=new Map,Bo=()=>{};function Ke(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return e.filter(n=>n!=null)}function Hr(r,e,t){return e=Wr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Wr(r){var e=Vr(r,"string");return typeof e=="symbol"?e:String(e)}function Vr(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 qr extends Error{constructor(){super(...arguments),Hr(this,"isCanceled",!0)}}const tt=qr;function Ur(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=Gr(r,e);t.forEach(n=>{r[n]=r[n].bind(r)})}function Gr(r,e){for(var t=new Set,n=r,i=0;n!=null&&n!==Object.prototype&&(i<=1||e);){for(var a of Object.getOwnPropertyNames(n))a!=="constructor"&&typeof n[a]=="function"&&t.add(a);n=Object.getPrototypeOf(n),i+=1}return[...t.keys()]}function rt(r,e,t,n,i,a,o){try{var l=r[a](o),s=l.value}catch(u){t(u);return}l.done?e(s):Promise.resolve(s).then(n,i)}function zr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(s){rt(a,n,i,o,l,"next",s)}function l(s){rt(a,n,i,o,l,"throw",s)}o(void 0)})}}function Qr(r){return qe.apply(this,arguments)}function qe(){return qe=zr(function*(r){var{clipboard:e}=navigator;if(e!==void 0)try{return navigator.clipboard.writeText(r)}catch{return nt(r)}nt(r)}),qe.apply(this,arguments)}function nt(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")}function fe(r,e,t){return e=Zr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Zr(r){var e=Xr(r,"string");return typeof e=="symbol"?e:String(e)}function Xr(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 Jr="table_",Bt="column_",Yr=new Set(["in","not","i","ii","k"]),en=new Set(["abstract","continue","for","new","switch","assert","default","if","package","synchronized","boolean","do","goto","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","null","true","false"]),tn=/[^a-zA-Z0-9_$+@-]/g,rn=/[^A-Za-z0-9_$]/g;class _{}fe(_,"legalize",(r,e,t,n,i)=>{var a=r.trim().replace(/[- ]/g,"_");return n&&(Yr.has(a)||en.has(a))&&(a=e+a),a=a.replace(t,""),a||(a=e+i),Number.isNaN(Number(a.charAt(0)))||(a=e+a),a});fe(_,"legalizeTableName",r=>_.legalize(r,Jr,tn,!1,0));fe(_,"legalizeColumnNames",r=>{var e=[];return r.forEach((t,n)=>{var i=_.legalizeColumnName(t,n);e.includes(i)&&(i=Bt+n),e.push(i)}),e});fe(_,"legalizeColumnName",function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return _.legalize(r,Bt,rn,!0,e)});fe(_,"isValidTableName",r=>_.legalizeTableName(r)===r);fe(_,"isValidColumnName",r=>_.legalizeColumnName(r)===r);const Ho=_;class Ht extends CustomEvent{constructor(e,t){super(e,t)}}function nn(r,e,t){return e=an(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function an(r){var e=on(r,"string");return typeof e=="symbol"?e:String(e)}function on(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 sn extends Error{constructor(){super(...arguments),nn(this,"isTimeout",!0)}}const Wt=sn;class Ne{static makeCancelable(e,t){var n=!1,i,a,o=new Promise((l,s)=>{a=s,Promise.resolve(e).then(u=>{n?t&&t(u):(i=u,l(u))}).catch(u=>s(u))});return o.cancel=()=>{n=!0,a(new tt),i!=null&&t&&t(i)},o}static isCanceled(e){return e instanceof tt}static isTimedOut(e){return e instanceof Wt}static withTimeout(e,t){return new Promise((n,i)=>{setTimeout(()=>{try{n(t())}catch(a){i(a)}},e)})}}function it(r,e,t){return e=ln(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ln(r){var e=un(r,"string");return typeof e=="symbol"?e:String(e)}function un(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 dn{constructor(){it(this,"pending",[]),it(this,"resolved",[])}add(e,t){var n=Ne.makeCancelable(e,t);return this.pending.push(n),n.then(()=>{this.resolve(n)},()=>{this.resolve(n)}),n}remove(e){for(var t=0;t<this.pending.length;t+=1)if(this.pending[t]===e){this.pending.splice(t,1);return}}resolve(e){this.remove(e),this.resolved.push(e)}cancel(){for(var e=[...this.pending,...this.resolved],t=0;t<e.length;t+=1)e[t].cancel();this.pending=[],this.resolved=[]}}const Wo=dn;class Ge{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(!Ge.isValidRange(e))throw new Error("Invalid range! ".concat(e))}static isSelected(e,t){for(var n=0;n<e.length;n+=1){var i=e[n],a=i[0],o=i[1];if(a<=t&&t<=o)return!0}return!1}static selectRange(e,t){for(var[n,i]=t,a=[...e],o=a.length-1;o>=0;o-=1){var l=a[o],s=l[0],u=l[1];if(s<=n&&i<=u)return a;n<=u&&s<=i&&(n=Math.min(n,s),i=Math.max(i,u),a.splice(o,1))}return a.push([n,i]),a}static deselectRange(e,t){for(var[n,i]=t,a=[...e],o=a.length-1;o>=0;o-=1){var l=a[o],s=l[0],u=l[1];if(!(i<s||u<n))if(s<n&&i<u){a[o]=[s,n-1],a.splice(o+1,0,[i+1,u]);break}else n<=s&&u<=i?a.splice(o,1):s<n?a[o]=[s,n-1]:a[o]=[i+1,u]}return a}static count(e){return e.reduce((t,n)=>t+(n[1]-n[0]+1),0)}static getItemsInRanges(e,t){return t.reduce((n,i)=>{for(var a=[...n],o=i[0];o<=i[1];o+=1)a.push(e[o]);return a},[])}}const oe=Ge;function*Vo(r,e){for(var t=r;t<=e;++t)yield t}class cn{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(", "),i=e[e.length-1];return"".concat(n,", ").concat(t," ").concat(i)}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 hn=cn;function Vt(r,e,t){return e=fn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function fn(r){var e=mn(r,"string");return typeof e=="symbol"?e:String(e)}function mn(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 we{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),i=e%60;return"".concat(t>0?"".concat(t,"h "):"")+"".concat(n>0||t>0?"".concat(n,"m "):"")+"".concat(e>=60?"".concat(i,"s").padStart(3,"0"):"".concat(i,"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),i=String(Math.floor(n/60)).padStart(2,"0"),a=n%60,o=String(Math.ceil(a)).padStart(2,"0");return"".concat(t,":").concat(i,":").concat(o)}static isTimeString(e){return new RegExp(we.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])}}Vt(we,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Vt(we,"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 qo=we;function gn(r,e,t){return e=pn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function pn(r){var e=vn(r,"string");return typeof e=="symbol"?e:String(e)}function vn(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 yn extends Error{constructor(){super(...arguments),gn(this,"isInvalid",!0)}}const Uo=yn;function bn(){var r=b.useRef(!1);return b.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[]),r}function at(r,e,t,n,i,a,o){try{var l=r[a](o),s=l.value}catch(u){t(u);return}l.done?e(s):Promise.resolve(s).then(n,i)}function wn(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(s){at(a,n,i,o,l,"next",s)}function l(s){at(a,n,i,o,l,"throw",s)}o(void 0)})}}var Be=D.module("useAsyncInterval");function Go(r,e){var t=bn(),n=b.useRef(0),i=b.useRef(0),a=b.useRef(null),o=b.useCallback(wn(function*(){var l=Date.now();i.current+=1;var s=a.current==null?e:l-a.current;if(Be.debug("tick #".concat(i.current,"."),s,"ms elapsed since last tick."),a.current=l,yield r(),!!t.current){s+=Date.now()-a.current;var u=Math.max(0,s-e),d=Math.max(0,e-u);Be.debug("Next tick target:",e,", overage",u,", adjusted:",d),n.current=window.setTimeout(o,d)}}),[r,t,e]);b.useEffect(()=>(Be.debug("Setting target interval:",e),a.current=null,o(),()=>{window.clearTimeout(n.current)}),[e,o])}function ze(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"No value available in context. Was code wrapped in a provider?",t=b.useContext(r);if(t==null)throw new Error(e);return t}function zo(r){var e=b.useRef();return b.useEffect(function(){e.current=r}),e.current}function Sn(r){var e=b.useRef(null);return b.useEffect(function(){r&&(typeof r=="function"?r(e.current):r.current=e.current)}),e}var Tn=3500,Mn=D.module("useCopyToClipboard");function Cn(){var[r,e]=b.useState(!1),t=b.useRef(null),n=b.useCallback(i=>{Qr(i).then(()=>{e(!0)}).catch(a=>Mn.error("Unable to copy ".concat(i),`
2
+ `,a))},[]);return b.useEffect(()=>(t.current&&clearTimeout(t.current),r&&(t.current=setTimeout(()=>{e(!1)},Tn)),()=>{t.current&&clearTimeout(t.current)}),[r]),[r,n]}function ot(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function En(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ot(Object(t),!0).forEach(function(n){he(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ot(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function he(r,e,t){return e=Pn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Pn(r){var e=xn(r,"string");return typeof e=="symbol"?e:String(e)}function xn(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 Qe extends b.Component{constructor(e){super(e),he(this,"element",void 0),he(this,"container",void 0),he(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:i}=this.props;i=En({placement:"auto",modifiers:{preventOverflow:{boundariesElement:"viewport"}}},i),document.body.appendChild(this.element);var a=this.getVisibleElement(this.container.current);a==null&&(a=this.container.current),e=new dr(n||a,this.element,i),e.scheduleUpdate(),cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{if(t&&!this.element.contains(document.activeElement)){var o=this.element.firstElementChild;o instanceof HTMLElement&&o.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:i,closeOnBlur:a}=this.props,{show:o}=this.state;return f.jsx(cr,{in:o,timeout:n,classNames:"popper-transition",onEntered:this.handleEnter,onExited:this.handleExit,children:f.jsx("div",{onClick:l=>{l.stopPropagation()},onKeyDown:l=>{l.key==="Escape"&&this.hide()},className:I("popper",{interactive:i},e),onBlur:a?this.handleBlur:void 0,tabIndex:a?-1:void 0,role:"presentation",children:f.jsxs("div",{className:"popper-content",children:[t,f.jsx("div",{className:"popper-arrow","x-arrow":""})]})})})}render(){var{popper:e}=this.state,{"data-testid":t}=this.props;return f.jsx("div",{className:"popper-parent-container",ref:this.container,style:{display:"none"},"data-testid":t,children:e&&hr.createPortal(this.renderContent(),this.element)})}}he(Qe,"propTypes",{children:p.node.isRequired,options:p.shape({}),className:p.string,timeout:p.number,onEntered:p.func,onExited:p.func,isShown:p.bool,closeOnBlur:p.bool,interactive:p.bool,referenceObject:p.shape({}),"data-testid":p.string});he(Qe,"defaultProps",{options:{},className:"",timeout:br.transitionMs,onEntered(){},onExited(){},isShown:!1,interactive:!1,closeOnBlur:!1,referenceObject:null,"data-testid":void 0});const qt=Qe;function st(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function kn(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?st(Object(t),!0).forEach(function(n){H(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):st(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function H(r,e,t){return e=On(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function On(r){var e=In(r,"string");return typeof e=="symbol"?e:String(e)}function In(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 Dn=D.module("Tooltip");class x extends b.Component{static handleHidden(){x.shownTooltipCount-=1,x.shownTooltipCount===0&&(x.lastHiddenTime=Date.now())}static handleShown(){x.shownTooltipCount+=1}constructor(e){super(e),H(this,"container",void 0),H(this,"popper",void 0),H(this,"parent",void 0),H(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:i}=this.state;i!==n&&(i?x.handleShown():x.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();var{isShown:e}=this.state;e&&x.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Dn.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:i}=this.state;if(!(!this.popper.current||!this.parent)){var a=this.popper.current.element.getBoundingClientRect(),o=this.parent.getBoundingClientRect();t>=a.left&&t<=a.left+a.width&&n>=a.top&&n<=a.top+a.height?this.handleMouseMove():t>=o.left&&t<=o.left+o.width&&n>=o.top&&n<=o.top+o.height?this.handleMouseMove():i&&(this.stopTimer(),this.hide())}}startTimer(){this.stopTimer();var{timeout:e,reshowTimeout:t}=this.props,n=e;(x.shownTooltipCount>0||Date.now()-x.lastHiddenTime<x.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:i,"data-testid":a,onEntered:o}=this.props,{isShown:l}=this.state,{options:s}=this.props;return s=kn({placement:"bottom"},s),f.jsx("div",{ref:this.container,style:{display:"none"},"data-testid":a,children:f.jsx(qt,{className:I(i),options:s,ref:this.popper,onEntered:o,onExited:this.handleExited,interactive:e,referenceObject:n,children:f.jsxs("div",{className:"tooltip-content",children:[" ",l&&t]})})})}}H(x,"defaultTimeout",500);H(x,"defaultReshowTimeout",100);H(x,"triggerReshowThreshold",300);H(x,"shownTooltipCount",0);H(x,"lastHiddenTime",Date.now());H(x,"defaultProps",{interactive:!1,options:{},popperClassName:"",reshowTimeout:x.defaultReshowTimeout,timeout:x.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0});const Nn=x;function Ae(r){var{children:e,className:t,style:n,"data-testid":i}=r;return f.jsx("div",{className:I("btn-group",t),style:n,role:"group","data-testid":i,children:e})}Ae.displayName="ButtonGroup";Ae.propTypes={children:p.node.isRequired,className:p.string,style:p.object,"data-testid":p.string};Ae.defaultProps={className:null,style:{},"data-testid":void 0};var Fn=["kind","variant","type","tooltip","icon","disabled","active","onClick","onContextMenu","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","onKeyDown","className","style","children","tabIndex","data-testid","aria-label"];function lt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function ut(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lt(Object(t),!0).forEach(function(n){An(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):lt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function An(r,e,t){return e=Ln(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ln(r){var e=Rn(r,"string");return typeof e=="symbol"?e:String(e)}function Rn(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 $n(r,e){if(r==null)return{};var t=jn(r,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function jn(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}var _n=["primary","secondary","tertiary","success","danger","inline","ghost"],Kn=["group-end"];function Bn(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 I("btn-link",{"btn-link-icon":e,"btn-link-icon-only":e})}}function Hn(r){switch(r){case"group-end":return I("pl-2","pr-3")}}var Le=C.forwardRef((r,e)=>{var{kind:t,variant:n,type:i,tooltip:a,icon:o,disabled:l=!1,active:s,onClick:u,onContextMenu:d,onMouseDown:m,onMouseUp:g,onMouseEnter:v,onMouseLeave:w,onKeyDown:T,className:M,style:$,children:L,tabIndex:K,"data-testid":W,"aria-label":le}=r,R=$n(r,Fn),V=!!(o&&L==null),Q=Bn(t,V),Te;n&&(Te=Hn(n));var Me;o&&(Me=C.isValidElement(o)?o:f.jsx(De,{icon:o}));var me;a!==void 0&&(me=typeof a=="string"?f.jsx(Nn,{children:a}):a);var Ce=le;le===void 0&&V&&a!=null&&typeof a=="string"&&(Ce=a);var Ee=f.jsxs("button",ut(ut({"data-testid":W,ref:e,type:i,className:I("btn",Q,Te,{active:s},M),onClick:u,onContextMenu:d,onMouseUp:g,onMouseDown:m,onMouseEnter:v,onMouseLeave:w,onKeyDown:T,style:$,disabled:l,tabIndex:K,"aria-label":Ce},R),{},{children:[o&&Me,L,a!=null&&!l&&me]}));return l?f.jsxs("span",{className:"btn-disabled-wrapper",children:[Ee,a!==void 0&&me]}):Ee});Le.displayName="Button";Le.propTypes={kind:p.oneOf(_n).isRequired,variant:p.oneOf(Kn),type:p.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:p.bool,active:p.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:p.func,onMouseUp:p.func,onMouseDown:p.func,onMouseEnter:p.func,onMouseLeave:p.func,onKeyDown:p.func,tabIndex:p.number,children:p.node,className:p.string,style:p.object,"data-testid":p.string};Le.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 Ie=Le;function Wn(r){var{className:e="modal-footer",children:t,"data-testid":n}=r;return f.jsx("div",{className:e,"data-testid":n,children:t})}function Ut(r){var{isOpen:e,headerText:t,bodyText:n,onCancel:i,onConfirm:a,onDiscard:o,onModalDisable:l,cancelButtonText:s="Cancel",confirmButtonText:u="Okay",discardButtonText:d="Discard",isConfirmDanger:m=!1,children:g,"data-testid":v}=r,w=b.useRef(null),T=b.useRef(null),M=b.useCallback(()=>{T.current!==null&&T.current.checked&&l&&l(),a()},[a,l]),$=b.useCallback(()=>{var K;(K=w.current)===null||K===void 0||K.focus()},[]),L="";return e&&(L=typeof n=="function"?n():n),f.jsxs(wr,{isOpen:e,className:"theme-bg-light",onOpened:$,children:[f.jsx(Sr,{closeButton:!1,children:t}),f.jsx(Tr,{children:L}),f.jsxs(Wn,{children:[l&&f.jsxs("div",{className:"custom-control custom-checkbox form-group mr-auto",children:[f.jsx("input",{type:"checkbox",className:"custom-control-input",id:"move-confirmation-checkbox",defaultChecked:!1,ref:T,"data-testid":v!==void 0?"".concat(v,"-checkbox-confirm"):void 0}),f.jsx("label",{className:"custom-control-label",htmlFor:"move-confirmation-checkbox",children:"Don't ask me again"})]}),o&&f.jsx(Ie,{kind:"secondary",className:"mr-auto","data-dismiss":"modal",onClick:o,"data-testid":v!==void 0?"".concat(v,"-btn-discard"):void 0,children:d}),i&&f.jsx(Ie,{kind:"secondary","data-dismiss":"modal",onClick:i,"data-testid":v!==void 0?"".concat(v,"-btn-cancel"):void 0,children:s}),f.jsxs(Ae,{children:[f.jsx(Ie,{kind:m?"danger":"primary",onClick:M,ref:w,"data-testid":v!==void 0?"".concat(v,"-btn-confirm"):void 0,children:u}),g]})]})]})}Ut.propTypes={isOpen:p.bool.isRequired,headerText:p.string.isRequired,bodyText:p.oneOfType([p.string,p.func]).isRequired,onCancel:p.func,onConfirm:p.func.isRequired,onDiscard:p.func,onModalDisable:p.func,cancelButtonText:p.string,confirmButtonText:p.string,discardButtonText:p.string,children:p.node,"data-testid":p.string};Ut.defaultProps={children:void 0,cancelButtonText:"Cancel",confirmButtonText:"Okay",discardButtonText:"Discard",onCancel:void 0,onDiscard:void 0,onModalDisable:void 0,"data-testid":void 0};function Vn(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=Un(r,"string");return typeof e=="symbol"?e:String(e)}function Un(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 He(r){return r.then!==void 0}class ie{static disableAllActions(){ie.actionsDisabled=!0}static enableAllActions(){ie.actionsDisabled=!1}static isContextActionEvent(e){return Array.isArray(e.contextActions)}static compareActions(e,t){if(e.group!==t.group){var n,i;return((n=e.group)!==null&&n!==void 0?n:0)>((i=t.group)!==null&&i!==void 0?i:0)?1:-1}if(e.order!==t.order){var a,o;return((a=e.order)!==null&&a!==void 0?a:0)>((o=t.order)!==null&&o!==void 0?o:0)?1:-1}if(e.title!==t.title){var l,s;return((l=e.title)!==null&&l!==void 0?l:"")>((s=t.title)!==null&&s!==void 0?s:"")?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(ie.compareActions),t}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static getModifierKey(){return ie.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=ie.getModifierKey();return e[t]}static getMenuItems(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=[],i=e;Array.isArray(i)||(i=[i]);for(var a=0;a<i.length;a+=1){var o=i[a],l=void 0;typeof o=="function"?l=o():l=o,l!=null&&(l instanceof Promise?t&&n.push(l):Array.isArray(l)?n=n.concat(l):n.push(l))}return n=n.filter(s=>s.title!==void 0||s.then!=null||s.menuElement),n}static getNextMenuItem(e,t,n){var i=e;i<0&&t<0&&(i=n.length);for(var a=1;a<n.length+1;a+=1){var o=(i+t*a+n.length)%n.length,l=n[o];if(!(l instanceof Promise)&&l.disabled!==!0)return o}return e}}Vn(ie,"actionsDisabled",!1);const k=ie;var dt=D.module("GlobalContextAction");class Gn extends b.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),dt.debug("Received context menu event at global action! Menu items are now: ",t.contextActions))}handleKeyDown(e){var{action:t}=this.props;if(!k.actionsDisabled&&t.shortcut!==void 0&&t.shortcut.matchesEvent(e)){var n;dt.debug("Global hotkey matched!",e),(n=t.action)===null||n===void 0||n.call(t,e),e.preventDefault(),e.stopPropagation()}}render(){return null}}const zn=Gn;class Qn extends b.Component{render(){for(var{actions:e,"data-testid":t}=this.props,n=[],i=0;i<e.length;i+=1){var a=e[i],{shortcut:o}=a;if(a.title!=null||a.menuElement||o){var l=f.jsx(zn,{action:a,"data-testid":t},"".concat(a.title,".").concat(o?.id));n.push(l)}}return n}}const Zn=Qn;function Gt(r,e,t){return e=Xn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Xn(r){var e=Jn(r,"string");return typeof e=="symbol"?e:String(e)}function Jn(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 Pe=D.module("ContextActions");class zt extends b.Component{static triggerMenu(e,t,n,i){if(i.length!==0){var a=new MouseEvent("contextmenu",{clientX:t,clientY:n,bubbles:!0,cancelable:!0});a.contextActions=i,e.dispatchEvent(a)}}constructor(e){super(e),Gt(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(i=>!He(i)&&typeof i!="function"&&i.isGlobal),n=e.actions.filter(i=>!He(i)&&typeof i!="function"&&(i.isGlobal===void 0||!i.isGlobal)&&i.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,i=function(){var{classList:u}=n,d=t.find(m=>u.contains(m));if(d!==void 0)return Pe.debug2('Contextmenu event ignored based on the target className "'.concat(d,'"')),{v:void 0};n=n.parentElement};n!=null;){var a=i();if(typeof a=="object")return a.v}if(k.isContextActionEvent(e)||(e.contextActions=[]),!!k.isContextActionEvent(e)){var{actions:o}=this.props;if(o!=null){var l=o;Array.isArray(l)&&(l=l.filter(s=>He(s)||typeof s=="function"||s.isGlobal===void 0||!s.isGlobal)),e.contextActions=e.contextActions.concat(l)}Pe.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 i=t[n];if(!k.actionsDisabled&&i.shortcut!=null&&i.shortcut.matchesEvent(e)){var a;Pe.debug("Context hotkey matched!",e),(a=i.action)===null||a===void 0||a.call(i,e),e.stopPropagation(),e.preventDefault(),Pe.debug2("Matched hotkey returned false, key event not consumed")}}}render(){var{"data-testid":e}=this.props,{globalActions:t}=this.state;return f.jsx("div",{className:"context-actions-listener",ref:this.container,"data-testid":e,children:f.jsx(Zn,{actions:t})})}}Gt(zt,"groups",{default:void 0,high:100,medium:5e3,low:1e4,global:1e5,edit:100});const Qo=zt;var Ze=C.forwardRef((r,e)=>{var t;function n(R){var{menuItem:V,onMenuItemClick:Q}=r;Q(V,R)}function i(R){var{menuItem:V,onMenuItemMouseMove:Q}=r;Q(V,R)}function a(R){var{menuItem:V,onMenuItemContextMenu:Q}=r;Q(V,R)}function o(R,V,Q){if(typeof R.type=="string")return R;var{closeMenu:Te,menuItem:Me,isKeyboardSelected:me,isMouseSelected:Ce,"data-testid":Ee}=r,ur={menuItem:Me,closeMenu:Te,isKeyboardSelected:me,isMouseSelected:Ce,iconElement:V,displayShortcut:Q,"data-testid":Ee};return C.cloneElement(R,{forwardedProps:ur})}var{children:l,menuItem:s,isKeyboardSelected:u=!1,isMouseSelected:d=!1,"data-testid":m}=r,g=(t=s.shortcut)===null||t===void 0?void 0:t.getDisplayText(),v=null;if(s.icon){var w=s.icon;if(C.isValidElement(w))v=w;else{var T;s.iconColor!=null&&(s.disabled===void 0||!s.disabled)&&(T={color:s.iconColor}),v=f.jsx(De,{icon:w,style:T})}}var M=null,$=!!l;s.actions&&(M=f.jsx(De,{icon:Mr}));var L=null;if(s.menuElement)L=f.jsx("div",{className:"custom-menu-item",onMouseMove:i,children:o(s.menuElement,v,g)});else{var K,W=s.disabled,le=s.iconOutline;L=f.jsx("button",{type:"button",className:I("btn-context-menu",{disabled:W},{active:($||d)&&(W===void 0||!W)},{"keyboard-active":u&&(W===void 0||!W)}),onClick:n,onMouseMove:i,onContextMenu:a,title:(K=s.description)!==null&&K!==void 0?K:"",children:f.jsxs("div",{className:"btn-context-menu-wrapper",children:[f.jsx("span",{className:I("icon",{outline:le}),children:v}),f.jsx("span",{className:"title",children:s.title}),g!==void 0&&f.jsx("span",{className:"shortcut",children:g}),M&&f.jsx("span",{className:I("submenu-indicator",{disabled:W}),children:M})]})})}return f.jsxs("div",{className:"context-menu-item",ref:e,"data-testid":m,children:[l,L]})});Ze.displayName="ContextMenuItem";Ze.defaultProps={children:null,isKeyboardSelected:!1,isMouseSelected:!1,"data-testid":void 0};const Qt=Ze;function ct(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Yn(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ct(Object(t),!0).forEach(function(n){ee(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ct(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ee(r,e,t){return e=ei(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ei(r){var e=ti(r,"string");return typeof e=="symbol"?e:String(e)}function ti(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var ht=D.module("ContextMenu");class ve extends b.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),ee(this,"container",void 0),ee(this,"oldFocus",void 0),ee(this,"activeSubMenuRef",void 0),ee(this,"subMenuTimer",void 0),ee(this,"rAF",void 0),ee(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:i}=this.state;if(i!==t.activeSubMenu)if(i==null){var a;(a=this.container.current)===null||a===void 0||a.focus()}else this.setActiveSubMenuPosition();if(e.actions!==n&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var o;(o=this.container.current)===null||o===void 0||o.focus()}this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var{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,i=k.getMenuItems(n),a=[],o=i.length-1;o>=0;o-=1){var l=i[o];l instanceof Promise?this.initMenuPromise(l):a.push(l)}this.setState({mouseIndex:-1,keyboardIndex:t,activeSubMenu:null,menuItems:k.sortActions(a)})}initMenuPromise(e){var t=Ne.makeCancelable(e);this.setState(n=>({pendingItems:n.pendingItems.concat(t)})),t.then(n=>{this.setState(i=>{var a=i.pendingItems.indexOf(t);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{menuItems:k.sortActions(i.menuItems.concat(n)),pendingItems:o}}return null})},n=>{Ne.isCanceled(n)||(this.setState(i=>{var a=i.pendingItems.indexOf(t);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{pendingItems:o}}return null}),ht.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,i,{options:a,updatePosition:o,subMenuParentWidth:l,subMenuParentHeight:s,top:u,left:d}=this.props;if(!(!this.container.current||a.doNotVerifyPosition!=null&&a.doNotVerifyPosition)){var{top:m,left:g}=this.initialPosition,{width:v,height:w}=(e=(t=this.container.current)===null||t===void 0?void 0:t.getBoundingClientRect())!==null&&e!==void 0?e:{width:0,height:0},T=((n=(i=this.container.current)===null||i===void 0?void 0:i.scrollHeight)!==null&&n!==void 0?n:0)>window.innerHeight;w===0||v===0||(m+w>window.innerHeight&&(m-w-s>0?m-=w-s:m=window.innerHeight-w),g+v>window.innerWidth&&(g=g-v-l),(d!==g||u!==m)&&(this.setState({hasOverflow:T}),o(m,g)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){ht.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(),i=n,a=!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?a=!0:i=0:this.isEscapeKey(e.key)?i=null:e.key==="ArrowUp"||e.shiftKey&&e.key==="Tab"?i=k.getNextMenuItem(i,-1,t):(e.key==="ArrowDown"||e.key==="Tab")&&(i=k.getNextMenuItem(i,1,t)),a){this.openSubMenu(n),e.preventDefault(),e.stopPropagation();return}n!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}openSubMenu(e){var{menuItems:t,activeSubMenu:n}=this.state,i=t[e].actions?e:null;n!==i&&this.setState({activeSubMenu:i,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(t.nativeEvent),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:i,hasOverflow:a,keyboardIndex:o,menuItems:l,mouseIndex:s,pendingItems:u,subMenuTop:d,subMenuLeft:m,subMenuParentWidth:g,subMenuParentHeight:v}=this.state,w=0;w<l.length;w+=1){var T=l[w];w>0&&T.group!==l[w-1].group&&e.push(f.jsx("hr",{},"".concat(w,".separator")));var M=f.jsx(Qt,{ref:i===w?this.activeSubMenuRef:null,isKeyboardSelected:o===w,isMouseSelected:s===w,menuItem:T,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},w);e.push(M)}var $=null;u.length>0&&($=f.jsx("div",{className:"loading",children:f.jsx(Cr,{className:"loading-spinner-vertical-align"})}));var{menuStyle:L,"data-testid":K}=this.props,W=i!==null&&d!==null&&m!==null;return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:I({"has-overflow":a},"context-menu-container"),style:Yn({top:t,left:n},L),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:ve.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":K,children:[e,$]}),W&&i!==null&&d!==null&&m!==null&&f.jsx(ve,{actions:l[i].actions||[],closeMenu:this.handleCloseSubMenu,top:d,left:m,updatePosition:(le,R)=>{this.setState({subMenuTop:le,subMenuLeft:R})},subMenuParentWidth:g,subMenuParentHeight:v},"sub-".concat(i))]})}}ee(ve,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const ri=ve;function ft(r,e,t){return e=ni(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ni(r){var e=ii(r,"string");return typeof e=="symbol"?e:String(e)}function ii(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 ai extends b.Component{constructor(e){super(e),ft(this,"container",void 0),ft(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(this.container.current){var t=this.container.current.getBoundingClientRect(),n=e.clientY-t.top,i=e.clientX-t.left,{actions:a}=this.state;if(a!=null&&e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{var l=document.elementFromPoint(i,n),s=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});l?.dispatchEvent(s)});return}if(k.isContextActionEvent(e)&&!(e.metaKey||e.ctrlKey)){var o=k.getMenuItems(e.contextActions);o.length!==0&&(e.preventDefault(),this.setState({actions:o,top:n,left:i}))}}}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){var e=null,{"data-testid":t}=this.props,{actions:n,top:i,left:a}=this.state;return n&&(e=f.jsx(ri,{ref:this.openMenu,actions:n,onMenuClosed:this.handleMenuClose,top:i,left:a,updatePosition:(o,l)=>{this.setState({top:o,left:l})},"data-testid":t})),f.jsx("div",{className:I("context-menu-root",{active:n}),ref:this.container,children:e})}}const Zo=ai;var Re=C.forwardRef((r,e)=>{var{checked:t=!1,children:n,className:i,disabled:a,inputClassName:o,isInvalid:l,labelClassName:s,name:u,onChange:d,"data-testid":m}=r,[g]=b.useState(Ue()),v=Sn(e);b.useEffect(function(){v.current&&(v.current.indeterminate=t===null)},[v,t]);var w=b.useCallback(T=>{v.current&&(v.current.indeterminate=t===null),d&&d(T)},[v,t,d]);return f.jsxs("div",{className:I("custom-control custom-checkbox",i),children:[f.jsx("input",{type:"checkbox",ref:v,checked:t??!1,className:I("custom-control-input",o,{"is-invalid":l}),disabled:a,id:g,name:u,onChange:w,"data-testid":m}),f.jsx("label",{className:I("custom-control-label",s),htmlFor:g,children:n})]})});Re.displayName="Checkbox";Re.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:p.node.isRequired,className:p.string,disabled:p.bool,inputClassName:p.string,isInvalid:p.bool,labelClassName:p.string,name:p.string,onChange:p.func,"data-testid":p.string};Re.defaultProps={checked:!1,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};const Xo=Re;function Zt(r,e,t){return e=oi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function oi(r){var e=si(r,"string");return typeof e=="symbol"?e:String(e)}function si(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 Xt extends b.PureComponent{constructor(e){super(e),Zt(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:i,className:a,disabled:o,matchCount:l,id:s,onKeyDown:u,"data-testid":d}=this.props;return f.jsxs("div",{className:I("search-group",a),children:[f.jsx("input",{type:"search",value:e,onBlur:n,onChange:i,onKeyDown:u,className:"form-control",disabled:o,placeholder:t,ref:this.inputField,id:s,"data-testid":d}),l!=null&&f.jsx("span",{className:"search-match",children:l}),f.jsx("span",{className:"search-icon",children:f.jsx(De,{icon:Er})})]})}}Zt(Xt,"defaultProps",{placeholder:"Search",className:"",matchCount:null,onKeyDown(){},id:"","data-testid":void 0});const li=Xt;function Jo(r){var{copy:e,kind:t="ghost",tooltip:n="Copy",className:i,"data-testid":a,children:o}=r,[l,s]=Cn();return f.jsx(Ie,{kind:t,className:i,"data-testid":a,icon:l?Pr:xr,tooltip:l?"Copied":n,onClick:()=>{s(typeof e=="function"?e():e)},children:o})}function mt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function ui(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?mt(Object(t),!0).forEach(function(n){pe(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):mt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function pe(r,e,t){return e=di(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function di(r){var e=ci(r,"string");return typeof e=="symbol"?e:String(e)}function ci(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 Jt extends b.PureComponent{constructor(e){var t;super(e),pe(this,"container",void 0),pe(this,"oldFocus",void 0),pe(this,"rAF",void 0),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.container=C.createRef(),this.oldFocus=document.activeElement,this.rAF=0;var{options:n}=e,i=(t=n.initialKeyboardIndex)!==null&&t!==void 0?t:-1;this.state={menuItems:[],keyboardIndex:i,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=k.getMenuItems(e,!1);t.length>0&&this.setState(n=>({menuItems:k.sortActions(n.menuItems.concat(t))}))}handleKeyDown(e){var{menuItems:t}=this.state,n=this.getKeyboardIndex(),i=n;if(e.key==="Enter"||e.key===" "){n!=null&&n>=0&&n<t.length&&this.handleMenuItemClick(t[n],e);return}if(e.key==="Escape")i=null;else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey===!0){var a;i=k.getNextMenuItem((a=i)!==null&&a!==void 0?a:0,-1,t)}else if(e.key==="ArrowDown"||e.key==="Tab"&&e.shiftKey===!1){var o;i=k.getNextMenuItem((o=i)!==null&&o!==void 0?o:0,1,t)}n!==i&&(i!==null?this.setKeyboardIndex(i):(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(t.nativeEvent),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:i,mouseIndex:a}=this.state,o=0;o<i.length;o+=1){var l=i[o];o>0&&l.group!==i[o-1].group&&e.push(f.jsx("hr",{},"".concat(o,".separator")));var s=f.jsx(Qt,{isKeyboardSelected:n===o,isMouseSelected:a===o,menuItem:l,closeMenu:this.handleCloseMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:()=>!1},o);e.push(s)}var{menuStyle:u}=this.props;return f.jsx("div",{className:"context-menu-container",style:ui({},u),ref:this.container,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,role:"menuitem",tabIndex:0,"data-testid":t,children:e})}}pe(Jt,"defaultProps",{closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const hi=Jt;function gt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function pt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?gt(Object(t),!0).forEach(function(n){de(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):gt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function de(r,e,t){return e=fi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function fi(r){var e=mi(r,"string");return typeof e=="symbol"?e:String(e)}function mi(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 Yt extends b.PureComponent{constructor(e){super(e),de(this,"container",void 0),de(this,"parent",void 0),de(this,"popper",void 0),de(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":i}=this.props,{menuStyle:a}=this.props,{options:o,popperOptions:l}=this.props;return l=pt({placement:"bottom"},l),o=pt({separateKeyboardMouse:!0},o),f.jsx("div",{className:"menu-actions-listener",ref:this.container,"data-testid":i,children:f.jsx(qt,{ref:this.popper,options:l,className:I("menu-popper",n),onExited:this.handleExited,closeOnBlur:!0,interactive:!0,children:f.jsx(hi,{actions:e,closeMenu:this.handleCloseMenu,onMenuOpened:t,options:o,menuStyle:a})})})}}de(Yt,"defaultProps",{isShown:null,onMenuClosed(){},onMenuOpened(){},options:{},popperOptions:{},popperClassName:"",menuStyle:{},"data-testid":void 0});const Yo=Yt;function er(r,e,t){return e=gi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function gi(r){var e=pi(r,"string");return typeof e=="symbol"?e:String(e)}function pi(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 tr extends b.PureComponent{constructor(e){super(e),er(this,"searchInput",void 0),this.searchInput=C.createRef(),this.handleChange=this.handleChange.bind(this),this.sendUpdate=fr(this.sendUpdate.bind(this),e.debounceMs),this.state={value:e.value}}componentDidUpdate(e){var{value:t}=this.props;e.value!==t&&this.setState({value:t})}focus(){var e;(e=this.searchInput.current)===null||e===void 0||e.focus()}handleChange(e){this.setState({value:e.target.value},this.sendUpdate)}sendUpdate(){var{onChange:e}=this.props,{value:t}=this.state;e(t)}render(){var{placeholder:e,className:t,matchCount:n,id:i,"data-testid":a}=this.props,{value:o}=this.state;return f.jsx(li,{value:o,placeholder:e,onChange:this.handleChange,className:t,matchCount:n,ref:this.searchInput,id:i,"data-testid":a})}}er(tr,"defaultProps",{placeholder:"Search",className:"",matchCount:null,debounceMs:250,id:"","data-testid":void 0});const es=tr;function rr(r,e,t){return e=vi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function vi(r){var e=yi(r,"string");return typeof e=="symbol"?e:String(e)}function yi(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 bi=D.module("ItemListItem");class $e extends b.Component{static handleKeyDown(){return bi.log("ItemListItem.handleKeyDown false"),!1}constructor(e){super(e),rr(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:i,children:a,"data-testid":o}=this.props;return f.jsx("div",{className:I("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:i,onFocus:this.handleFocus,onBlur:this.handleBlur,draggable:e,"data-testid":o,children:a})}}rr($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 wi=$e;function vt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function yt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?vt(Object(t),!0).forEach(function(n){j(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):vt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function j(r,e,t){return e=Si(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Si(r){var e=Ti(r,"string");return typeof e=="symbol"?e:String(e)}function Ti(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var bt=D.module("ItemList"),wt=5;class U extends b.PureComponent{static renderItem(e){var t,n,{item:i}=e;return f.jsx("div",{className:"item-list-item-content",children:i!=null&&((t=(n=i.displayValue)!==null&&n!==void 0?n:i.value)!==null&&t!==void 0?t:"".concat(i))})}constructor(e){super(e),j(this,"list",void 0),j(this,"listContainer",void 0),j(this,"getItemSelected",ge((i,a)=>oe.isSelected(a,i),{max:U.CACHE_SIZE})),j(this,"getCachedItem",ge((i,a,o,l,s,u,d,m)=>{var g=u({item:o,itemIndex:i,isFocused:l,isSelected:s,style:d});return f.jsx(wi,{onContextMenu:this.handleItemContextMenu,onDoubleClick:this.handleItemDoubleClick,onMouseDown:this.handleItemMouseDown,onFocus:this.handleItemFocus,onBlur:this.handleItemBlur,disableSelect:m,onMouseMove:this.handleItemMouseMove,onMouseUp:this.handleItemMouseUp,isFocused:l,isSelected:s,itemIndex:i,style:d,children:g},a)},{max:U.CACHE_SIZE})),j(this,"getOuterElement",ge(i=>{var a=C.forwardRef((o,l)=>f.jsx("div",yt({ref:l,tabIndex:-1,onKeyDown:i,role:"presentation"},o)));return a.displayName="ItemListOuterElement",a})),j(this,"getInnerElement",ge(()=>{var i=C.forwardRef((a,o)=>f.jsx("div",yt({className:"item-list-inner-element",ref:o},a)));return i.displayName="ItemListInnerElement",i})),j(this,"getItemData",ge((i,a,o)=>({items:i,selectedRanges:a,renderItem:o}))),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:i}=this.props,{focusIndex:a,isStuckToBottom:o,scrollOffset:l,height:s,selectedRanges:u}=this.state;if(o&&!this.isListAtBottom()&&i>0&&this.scrollToBottom(),(l!==t.scrollOffset||s!==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(a!==t.focusIndex){var{onFocusChange:m}=this.props;m(a)}}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,i=this.listContainer.current.querySelectorAll(t),a=e-n;return i[a]}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?.scrollIntoView({block:"center"})}handleItemContextMenu(e,t){this.setState({focusIndex:e});var{selectedRanges:n}=this.state,i=oe.isSelected(n,e),a=i||k.isModifierKeyDown(t);this.toggleSelect(e,t.shiftKey,a,!1)}handleItemDoubleClick(e,t){var{isDoubleClickSelect:n,onSelect:i}=this.props;n&&this.setState(a=>{var{selectedRanges:o}=a;return{selectedRanges:oe.selectRange(o,[e,e])}},()=>{i(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){bt.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){bt.debug2("item focus",e,t.target),this.setState(n=>{var{focusIndex:i}=n;return i!==e?{focusIndex:e}:null})}handleItemMouseMove(e,t){var{isDragSelect:n,isMultiSelect:i,disableSelect:a}=this.props,{mouseDownIndex:o,selectedRanges:l,mouseX:s,mouseY:u}=this.state;if(!(o==null||a)){var d=Math.abs(t.clientX-(s??0)),m=Math.abs(t.clientY-(u??0));d>wt&&m>wt&&this.setState({isDragging:!0}),(n||o===e)&&(this.focusItem(e),i?(!n&&!this.getItemSelected(e,l)&&!k.isModifierKeyDown(t)&&this.deselectAll(),this.selectRange([Math.min(o,e),Math.max(o,e)])):this.toggleSelect(e,t.shiftKey,k.isModifierKeyDown(t),!1))}}handleItemMouseUp(e,t){var{isDeselectOnClick:n,isDoubleClickSelect:i,onSelect:a}=this.props,{mouseDownIndex:o,isDragging:l}=this.state;if(!(t.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(t.target.tagName.toLowerCase())!==-1)){if(o===e&&!l){var s=t.shiftKey,u=k.isModifierKeyDown(t);this.focusItem(e),this.toggleSelect(e,s,u,n),!i&&!s&&!u&&a(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:i}=this.props,{focusIndex:a}=this.state,o=a;if(e.key==="Enter"||e.key===" "){!t&&o!=null&&this.setState({selectedRanges:[[o,o]]},()=>{o!=null&&i(o,e)});return}if(e.key==="ArrowUp")o!=null&&o>=0?o=Math.max(0,o-1):o=n-1;else if(e.key==="ArrowDown")o!=null&&o>=0?o=Math.min(o+1,n-1):o=0;else return;if(a!==o){e.stopPropagation(),e.preventDefault(),this.focusItem(o);var{selectedRanges:l}=this.state;if(e.shiftKey&&l.length>0){var s=l[l.length-1];this.selectRange([Math.min(o,s[0]),Math.max(o,s[1])])}else if(this.deselectAll(),o!==null)this.selectItem(o);else{var u;(u=this.listContainer.current)===null||u===void 0||u.focus()}this.scrollIntoView(o)}}handleScroll(e){var{scrollUpdateWasRequested:t,scrollOffset:n}=e;this.setState(i=>{if(t)return{scrollOffset:n};var{isStickyBottom:a}=this.props,{height:o}=i,l=a&&this.isListAtBottom({scrollOffset:n,height:o});return{isStuckToBottom:l,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 i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,{isMultiSelect:a}=this.props,{selectedRanges:o}=this.state;if(a&&t&&o.length>0){var l=o[o.length-1];this.selectRange([Math.min(l[0],e),Math.max(e,l[1])])}else a&&o.length===1&&o[0][0]===e&&o[0][1]===e?i&&this.deselectItem(e):a&&n?this.getItemSelected(e,o)?i&&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){oe.validateRange(e),this.setState(t=>{var{selectedRanges:n}=t;return{selectedRanges:oe.deselectRange(n,e)}})}selectItem(e){var{disableSelect:t}=this.props;t||this.selectRange([e,e])}selectRange(e){oe.validateRange(e),this.setState(t=>{var{selectedRanges:n}=t;return{selectedRanges:oe.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:i}=this.props,a=Math.floor(e/i),o=a+Math.ceil(t/i);n(a,o)}}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:i}=this.props;return e+t>=n*i}renderInnerElement(e){var{index:t,style:n}=e,{items:i,offset:a,renderItem:o,disableSelect:l}=this.props,{focusIndex:s,selectedRanges:u}=this.state;if(t<a||t>=a+i.length)return null;var d=i[t-a];return this.getCachedItem(t,t,d,t===s&&!l,this.getItemSelected(t,u),o,n,l)}render(){var{items:e,itemCount:t,overscanCount:n,renderItem:i,rowHeight:a,"data-testid":o}=this.props,{selectedRanges:l,isStuckToBottom:s}=this.state;return f.jsx(mr,{className:"item-list-auto-sizer",onResize:this.handleResize,children:u=>{var{width:d,height:m}=u;return f.jsx(gr,{className:"item-list-scroll-pane",height:m,width:d,initialScrollOffset:s?t*a:0,itemCount:t,itemSize:a,itemData:this.getItemData(e,l,i),onScroll:this.handleScroll,onItemsRendered:this.handleItemsRendered,ref:this.list,outerElementType:this.getOuterElement(this.handleKeyDown),outerRef:this.listContainer,innerElementType:this.getInnerElement(),overscanCount:n,"data-testid":o,children:this.renderInnerElement})}})}}j(U,"CACHE_SIZE",1e3);j(U,"DEFAULT_ROW_HEIGHT",20);j(U,"DEFAULT_OVERSCAN",10);j(U,"defaultProps",{offset:0,items:[],rowHeight:U.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!1,isDragSelect:!0,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},overscanCount:U.DEFAULT_OVERSCAN,renderItem:U.renderItem,selectedRanges:[],focusSelector:".item-list-item","data-testid":void 0});function ts(r){var{on:e,id:t,className:n,isInvalid:i,disabled:a=!1,onClick:o,"data-testid":l}=r;return f.jsx("button",{type:"button",className:I("btn","btn-switch",n,{active:e},{"is-invalid":i}),id:t,onClick:o,disabled:a,"data-testid":l,children:f.jsx("div",{className:"handle"})})}function te(r,e,t){return e=Mi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Mi(r){var e=Ci(r,"string");return typeof e=="symbol"?e:String(e)}function Ci(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 St=D.module("Shortcut"),S;(function(r){r.CTRL="MODIFIER_CTRL",r.CMD="MODIFIER_CMD",r.ALT="MODIFIER_ALT",r.OPTION="MODIFIER_OPTION",r.SHIFT="MODIFIER_SHIFT"})(S||(S={}));var y;(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"})(y||(y={}));var Ei=new Set([y.ENTER,y.DELETE,y.F1,y.F2,y.F3,y.F4,y.F5,y.F6,y.F7,y.F8,y.F9,y.F10,y.F11,y.F12]);class P extends jt{static isAllowedKey(e){return Object.values(y).includes(e)}static isValidKeyState(e){var{keyValue:t}=e;if(t===null)return!0;if(!P.isMacPlatform&&e.metaKey||!P.isAllowedKey(t))return!1;var n=!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey;return!n||Ei.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 S.CTRL:t.ctrlKey=!0;break;case S.ALT:case S.OPTION:t.altKey=!0;break;case S.CMD:t.metaKey=!0;break;case S.SHIFT:t.shiftKey=!0;break}}),t}static getKeyStateFromEvent(e){var{key:t,keyCode:n}=e,i="";return t==="Shift"||t==="Meta"||t==="Control"||t==="Alt"?i="":!P.isAllowedKey(t)&&P.isAllowedKey(String.fromCharCode(n))?i=String.fromCharCode(n):i=t,{keyValue:i,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===y.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 y.ENTER:t+="⏎";break;case y.ESCAPE:t+="⎋";break;case y.BACKSPACE:t+="⌫";break;case y.DELETE:t+="⌦";break;case null:break;default:t+=e.keyValue}return t}static doKeyStatesMatch(e,t){var n,i;return((n=e.keyValue)===null||n===void 0?void 0:n.toUpperCase())===((i=t.keyValue)===null||i===void 0?void 0:i.toUpperCase())&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey&&e.shiftKey===t.shiftKey}static getDisplayText(e){return e.keyValue===null?"":P.isMacPlatform?P.getMacDisplayText(e):P.getWindowsDisplayText(e)}constructor(e){var{id:t,shortcut:n,macShortcut:i,isEditable:a=!0,name:o,tooltip:l}=e;super(),te(this,"id",void 0),te(this,"name",void 0),te(this,"tooltip",void 0),te(this,"isEditable",void 0),te(this,"defaultKeyState",void 0),te(this,"keyState",void 0),this.id=t,this.name=o,this.tooltip=l,this.isEditable=a;var s=P.isMacPlatform,u=s?i:n;this.defaultKeyState=P.createKeyState(u),this.keyState=this.defaultKeyState}getDisplayText(){return P.getDisplayText(this.keyState)}getKeyState(){return this.keyState}setKeyState(e){P.isValidKeyState(e)?(St.debug2("Shortcut ".concat(this.id," updated to ").concat(JSON.stringify(e))),this.keyState=e,this.dispatchEvent(new Ht("onUpdate",{detail:this}))):St.debug2("Shortcut ".concat(this.id," tried to update to invalid keyState ").concat(JSON.stringify(e)))}getDefaultKeyState(){return this.defaultKeyState}isDefault(){return P.doKeyStatesMatch(this.getDefaultKeyState(),this.getKeyState())}setToNull(){this.setKeyState(P.NULL_KEY_STATE)}isNull(){return P.doKeyStatesMatch(this.keyState,P.NULL_KEY_STATE)}setToDefault(){this.setKeyState(this.defaultKeyState)}matchesKeyState(e){return P.doKeyStatesMatch(e,this.keyState)}matchesEvent(e){return this.matchesKeyState(P.getKeyStateFromEvent(e))}}te(P,"NULL_KEY_STATE",{metaKey:!1,shiftKey:!1,altKey:!1,ctrlKey:!1,keyValue:null});te(P,"isMacPlatform",k.isMacPlatform());function Tt(r,e,t){return e=Pi(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Pi(r){var e=xi(r,"string");return typeof e=="symbol"?e:String(e)}function xi(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 Mt=D.module("ShortcutRegistry");class ki extends jt{constructor(){super(...arguments),Tt(this,"shortcutMap",new Map),Tt(this,"shortcutsByCategory",new Map)}createAndAdd(e){var t=new P(e);return this.add(t)}add(e){var t=this.shortcutMap.get(e.id);if(t)return Mt.warn("Skipping attempt to add duplicate shortcut ID to registry: ".concat(e.id)),t;Mt.debug2("Adding shortcut to registry: ".concat(e.id)),e.addEventListener("onUpdate",a=>{var{detail:o}=a;return this.dispatchEvent(new Ht("onUpdate",{detail:o}))});var n=e.id.split(".")[0];if(this.shortcutMap.set(e.id,e),this.shortcutsByCategory.has(n)){var i;(i=this.shortcutsByCategory.get(n))===null||i===void 0||i.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 Oi=Object.freeze(new ki);const F=Oi;var Ii={COPY:F.createAndAdd({id:"GLOBAL.COPY",name:"Copy",shortcut:[S.CTRL,y.C],macShortcut:[S.CMD,y.C],isEditable:!1}),PASTE:F.createAndAdd({id:"GLOBAL.PASTE",name:"Paste",shortcut:[S.CTRL,y.V],macShortcut:[S.CMD,y.V],isEditable:!1}),SAVE:F.createAndAdd({id:"GLOBAL.SAVE",name:"Save",shortcut:[S.CTRL,y.S],macShortcut:[S.CMD,y.S],isEditable:!1}),SELECT_ALL:F.createAndAdd({id:"GLOBAL.SELECT_ALL",name:"Select All",shortcut:[S.CTRL,y.A],macShortcut:[S.CMD,y.A],isEditable:!1}),LINKER:F.createAndAdd({id:"GLOBAL.LINKER",name:"Linker",shortcut:[S.CTRL,y.L],macShortcut:[S.CMD,y.L]}),LINKER_CLOSE:F.createAndAdd({id:"GLOBAL.LINKER_CLOSE",name:"Close Linker Overlay",shortcut:[y.ESCAPE],macShortcut:[y.ESCAPE],isEditable:!1})};const rs=Ii,Di={"dh-spectrum-palette":"_dh-spectrum-palette_1mcqx_1"},Ni={"dh-spectrum-alias":"_dh-spectrum-alias_83lrx_1"},Fi={};function Ct(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function We(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ct(Object(t),!0).forEach(function(n){Ai(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ct(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Ai(r,e,t){return e=Li(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Li(r){var e=Ri(r,"string");return typeof e=="symbol"?e:String(e)}function Ri(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Et=We(We(We({},Di),Ni),Fi);function Pt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function xe(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){$i(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 $i(r,e,t){return e=ji(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ji(r){var e=_i(r,"string");return typeof e=="symbol"?e:String(e)}function _i(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{global:Ki,light:Bi,dark:Hi,medium:Wi,large:Vi}=pr,qi={global:Ki,light:xe(xe({},Bi),Et),dark:xe(xe({},Hi),Et),medium:Wi,large:Vi};function Ui(r){var{children:e,isPortal:t=!1,theme:n=qi,colorScheme:i}=r,[a]=b.useState(t?Ue():null);return f.jsx(vr,{theme:n,colorScheme:i,"data-unique-id":a,children:e})}var Gi=D.module("ThemeProvider"),nr=b.createContext(null);function ns(r){var{themes:e,children:t}=r,n=b.useMemo(()=>kr(),[]),[i,a]=b.useState(()=>{var s,u;return(s=(u=Or())===null||u===void 0?void 0:u.themeKey)!==null&&s!==void 0?s:Ir}),o=b.useMemo(()=>e==null?null:Dr(i,{base:n,custom:e??[]}),[n,i,e]);b.useEffect(function(){if(!(o==null||e==null)){var u=Nr();Gi.debug2("updateThemePreloadData:",{active:o.map(d=>d.themeKey),all:e.map(d=>d.themeKey),preloadStyleContent:u,selectedThemeKey:i}),Fr({themeKey:i,preloadStyleContent:u})}},[o,i,e]);var l=b.useMemo(()=>({activeThemes:o,selectedThemeKey:i,setSelectedThemeKey:a}),[o,i]);return f.jsxs(nr.Provider,{value:l,children:[o==null?null:f.jsx(f.Fragment,{children:o.map(s=>f.jsx("style",{"data-theme-key":s.themeKey,children:s.styleContent},s.themeKey))}),f.jsx(Ui,{children:t})]})}function zi(){return ze(nr,"No ThemeContext value found. Component must be wrapped in a ThemeContext.Provider")}function is(){return ze(Ar,"No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?")}const Qi="var(--dh-color-editor-bg)",Zi="var(--dh-color-editor-fg)",Xi="var(--dh-color-editor-string)",Ji="var(--dh-color-editor-delimiter)",Yi="var(--dh-color-editor-predefined)",ea="var(--dh-color-editor-keyword)",ta="var(--dh-color-editor-storage)",ra="var(--dh-color-editor-number)",na="var(--dh-color-editor-operator)",ia="var(--dh-color-editor-identifier)",aa="var(--dh-color-editor-comment)",xt={"error-foreground":"var(--dh-color-editor-error-fg)",background:Qi,foreground:Zi,"line-height":"19px",string:Xi,"string-delim":"var(--dh-color-editor-string-delim)",delimiter:Ji,predefined:Yi,keyword:ea,storage:ta,number:ra,operator:na,identifier:ia,"namespace-identifier":"var(--dh-color-editor-identifier-namespace)","identifier-js":"var(--dh-color-editor-identifier-js)",comment:aa,"input-option-active-border":"var(--dh-color-editor-input-option-active-border)","focus-border":"var(--dh-color-editor-focus-border)","input-background":"var(--dh-color-editor-input-bg)","input-foreground":"var(--dh-color-editor-input-fg)","input-border":"var(--dh-color-editor-input-border)","editor-line-number-foreground":"var(--dh-color-editor-line-number-fg)","editor-selection-background":"var(--dh-color-editor-selection-bg)","editor-line-highlight-bg":"var(--dh-color-editor-line-highlight-bg)","context-menu-background":"var(--dh-color-editor-context-menu-bg)","context-menu-foreground":"var(--dh-color-editor-context-menu-fg)","menu-selection-background":"var(--dh-color-editor-menu-selection-bg)","log-date":"var(--dh-color-editor-log-date)","log-error":"var(--dh-color-editor-log-error)","log-info":"var(--dh-color-editor-log-info)","log-stdout":"var(--dh-color-editor-log-stdout)","log-warn":"var(--dh-color-editor-log-warn)","log-debug":"var(--dh-color-editor-log-debug)","log-trace":"var(--dh-color-editor-log-trace)","editor-find-match-background":"var(--dh-color-editor-find-match-bg)","editor-find-match-highlight-background":"var(--dh-color-editor-find-match-highlight-bg)","editor-widget-background":"var(--dh-color-editor-find-bg)","input-option-active-background":"var(--dh-color-editor-find-option-active-bg)","input-option-active-foreground":"var(--dh-color-editor-find-option-active-fg)","editor-suggest-widget-background":"var(--dh-color-editor-suggest-bg)","editor-suggest-widget-border":"var(--dh-color-editor-suggest-border)","editor-suggest-widget-foreground":"var(--dh-color-editor-suggest-fg)","editor-suggest-widget-selected-background":"var(--dh-color-editor-suggest-selected-bg)","editor-suggest-widget-selected-foreground":"var(--dh-color-editor-suggest-selected-fg)","editor-suggest-widget-highlightForeground":"var(--dh-color-editor-suggest-highlight-fg)","editor-suggest-widget-focus-highlight-foreground":"var(--dh-color-editor-suggest-focus-highlight-fg)","list-hover-background":"var(--dh-color-editor-suggest-hover-bg)","text-link-foreground":"var(--dh-color-editor-link-foreground)","text-link-active-foreground":"var(--dh-color-editor-link-active-fg)","editor-link-active-foreground":"var(--dh-color-editor-link-active-fg)"};var oa="python",sa={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:/^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,action:{indentAction:1}}],folding:{offSide:!0,markers:{start:/^\s*#region\b/,end:/^\s*#endregion\b/}}},la={keywords:["and","del","from","not","while","as","elif","global","or","with","assert","else","if","pass","yield","break","except","import","print","exec","in","raise","continue","finally","is","return","for","try",":","=","isinstance","__debug__"],storage:["class","def","async","lambda"],operators:["+","-","*","**","/","//","%","<<",">>","&","|","^","~","<",">","<=",">=","==","!=","<>","+=","-=","*=","/","//=","%=","&=","|=","^=",">>=","<<=","**="],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=><!~&|+\-*/^%]+/,delimiters:/[;=.@:,`]/,escapes:/\\(?:[abfnrtv\\"'\n\r]|x[0-9A-Fa-f]{2}|[0-7]{3}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|N\{\w+\})/,rawpre:/(?:[rR]|ur|Ur|uR|UR|br|Br|bR|BR)/,strpre:/(?:[buBU])/,tokenizer:{root:[[/@strpre?("""|''')/,{token:"string.delim",bracket:"@open",next:"@mstring.$1"}],[/@strpre?"([^"\\]|\\.)*$/,"string.invalid"],[/@strpre?'([^'\\]|\\.)*$/,"string.invalid"],[/@strpre?(["])/,{token:"string.delim",bracket:"@open",next:"@sstring.$1",nextEmbedded:"deephavenDb"}],[/@strpre?(["'])/,{token:"string.delim",bracket:"@open",next:"@string.$1"}],[/@rawpre("""|''')/,{token:"string.delim",bracket:"@open",next:"@mrawstring.$1"}],[/@rawpre"([^"\\]|\\.)*$/,"string.invalid"],[/@rawpre'([^'\\]|\\.)*$/,"string.invalid"],[/@rawpre(["'])/,{token:"string.delim",bracket:"@open",next:"@rawstring.$1"}],[/__[\w$]*/,"predefined"],[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@storage":"storage","@default":"identifier"}}],[/[A-Z][\w]*/,{cases:{"~[A-Z0-9_]+":"constructor.identifier","@default":"namespace.identifier"}}],{include:"@whitespace"},[/[{}()[\]]/,"@brackets"],[/@symbols/,{cases:{"@keywords":"keyword","@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+[lL]?/,"number.hex"],[/0[bB][0-1]+[lL]?/,"number.binary"],[/(0[oO][0-7]+|0[0-7]+)[lL]?/,"number.octal"],[/(0|[1-9]\d*)[lL]?/,"number"],[":",{token:"keyword",bracket:"@open"}],[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[/*]/,"comment"]],mstring:[{include:"@strcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],sstring:[{include:"@strcontent"},[/["]/,{token:"string.delim",bracket:"@close",next:"@pop",nextEmbedded:"@pop"}],[/./,"string.invalid"]],string:[{include:"@strcontent"},[/[']/,{token:"string.delim",bracket:"@close",next:"@pop"}],[/./,"string.invalid"]],strcontent:[[/[^\\"']+/,"string"],[/\\$/,"string.escape"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"]],mrawstring:[{include:"@rawstrcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],rawstring:[{include:"@rawstrcontent"},[/["']/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/./,"string.invalid"]],rawstrcontent:[[/[^\\"']+/,"string"],[/\\["']/,"string"],[/\\u[0-9A-Fa-f]{4}/,"string.escape"],[/\\/,"string"]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]]}},ua={id:oa,conf:sa,language:la};const da=ua;var ca="groovy",ha={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:/^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,action:{indentAction:1}}],folding:{offSide:!0,markers:{start:/^\s*#region\b/,end:/^\s*#endregion\b/}}},fa={keywords:["and","del","from","not","while","as","elif","global","or","with","assert","else","if","pass","yield","break","except","import","print","println","class","exec","in","raise","continue","finally","is","return","def","for","lambda","try",":","=","isinstance","__debug__"],operators:["+","-","*","**","/","//","%","<<",">>","&","|","^","~","<",">","<=",">=","==","!=","<>","+=","-=","*=","/","//=","%=","&=","|=","^=",">>=","<<=","**="],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=><!~&|+\-*/^%]+/,delimiters:/[;=.@:,`]/,escapes:/\\(?:[abfnrtv\\"'\n\r]|x[0-9A-Fa-f]{2}|[0-7]{3}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|N\{\w+\})/,rawpre:/(?:[rR]|ur|Ur|uR|UR|br|Br|bR|BR)/,strpre:/(?:[buBU])/,tokenizer:{root:[[/@strpre?("""|''')/,{token:"string.delim",bracket:"@open",next:"@mstring.$1"}],[/@strpre?"([^"\\]|\\.)*$/,"string.invalid"],[/@strpre?'([^'\\]|\\.)*$/,"string.invalid"],[/@strpre?(["])/,{token:"string.delim",bracket:"@open",next:"@sstring.$1",nextEmbedded:"deephavenDb"}],[/@strpre?(["'])/,{token:"string.delim",bracket:"@open",next:"@string.$1"}],[/@rawpre("""|''')/,{token:"string.delim",bracket:"@open",next:"@mrawstring.$1"}],[/@rawpre"([^"\\]|\\.)*$/,"string.invalid"],[/@rawpre'([^'\\]|\\.)*$/,"string.invalid"],[/@rawpre(["'])/,{token:"string.delim",bracket:"@open",next:"@rawstring.$1"}],[/__[\w$]*/,"predefined"],[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w]*/,{cases:{"~[A-Z0-9_]+":"constructor.identifier","@default":"namespace.identifier"}}],{include:"@whitespace"},[/[{}()[\]]/,"@brackets"],[/@symbols/,{cases:{"@keywords":"keyword","@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+[lL]?/,"number.hex"],[/0[bB][0-1]+[lL]?/,"number.binary"],[/(0[oO][0-7]+|0[0-7]+)[lL]?/,"number.octal"],[/(0|[1-9]\d*)[lL]?/,"number"],[":",{token:"keyword",bracket:"@open"}],[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}]],mstring:[{include:"@strcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],sstring:[{include:"@strcontent"},[/["]/,{token:"string.delim",bracket:"@close",next:"@pop",nextEmbedded:"@pop"}],[/./,"string.invalid"]],string:[{include:"@strcontent"},[/[']/,{token:"string.delim",bracket:"@close",next:"@pop"}],[/./,"string.invalid"]],strcontent:[[/[^\\"']+/,"string"],[/\\$/,"string.escape"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"]],mrawstring:[{include:"@rawstrcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],rawstring:[{include:"@rawstrcontent"},[/["']/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/./,"string.invalid"]],rawstrcontent:[[/[^\\"']+/,"string"],[/\\["']/,"string"],[/\\u[0-9A-Fa-f]{4}/,"string.escape"],[/\\/,"string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],doccomment:[[/[^/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[/*]/,"comment.doc"]]}},ma={id:ca,conf:ha,language:fa};const ga=ma;var pa="scala",va={wordPattern:/(unary_[@~!#%^&*()\-=+\\|:<>/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:/^\s*\/\/\s*(?:(?:#?region\b)|(?:<editor-fold\b))/,end:/^\s*\/\/\s*(?:(?:#?endregion\b)|(?:<\/editor-fold>))/}}},ya={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],softKeywords:["as","export","extension","end","derives","on"],constants:["true","false","null","this","super"],modifiers:["abstract","final","implicit","lazy","override","private","protected","sealed"],softModifiers:["inline","opaque","open","transparent","using"],name:/(?:[a-z_$][\w$]*|`[^`]+`)/,type:/(?:[A-Z][\w$]*)/,symbols:/[=><!~?:&|+\-*/^\\%@#]+/,digits:/\d+(_+\d+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,escapes:/\\(?:[btnfr\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,fstring_conv:/[bBhHsScCdoxXeEfgGaAt]|[Tn](?:[HIklMSLNpzZsQ]|[BbhAaCYyjmde]|[RTrDFC])/,tokenizer:{root:[[/\braw"""/,{token:"string.quote",bracket:"@open",next:"@rawstringt"}],[/\braw"/,{token:"string.quote",bracket:"@open",next:"@rawstring"}],[/\bs"""/,{token:"string.quote",bracket:"@open",next:"@sstringt"}],[/\bs"/,{token:"string.quote",bracket:"@open",next:"@sstring"}],[/\bf""""/,{token:"string.quote",bracket:"@open",next:"@fstringt"}],[/\bf"/,{token:"string.quote",bracket:"@open",next:"@fstring"}],[/"""/,{token:"string.quote",bracket:"@open",next:"@stringt"}],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/(@digits)[eE]([-+]?(@digits))?[fFdD]?/,"number.float","@allowMethod"],[/(@digits)\.(@digits)([eE][-+]?(@digits))?[fFdD]?/,"number.float","@allowMethod"],[/0[xX](@hexdigits)[Ll]?/,"number.hex","@allowMethod"],[/(@digits)[fFdD]/,"number.float","@allowMethod"],[/(@digits)[lL]?/,"number","@allowMethod"],[/\b_\*/,"key"],[/\b(_)\b/,"keyword","@allowMethod"],[/\bimport\b/,"keyword","@import"],[/\b(case)([ \t]+)(class)\b/,["keyword.modifier","white","keyword"]],[/\bcase\b/,"keyword","@case"],[/\bva[lr]\b/,"keyword","@vardef"],[/\b(def)([ \t]+)((?:unary_)?@symbols|@name(?:_=)|@name)/,["keyword","white","identifier"]],[/@name(?=[ \t]*:(?!:))/,"variable"],[/(\.)(@name|@symbols)/,[{token:"operator"},{token:"@rematch",next:"@allowMethod"}]],[/([{(])(\s*)(@name(?=\s*=>))/,["@brackets","white","variable"]],[/@name/,{cases:{"@keywords":"keyword","@softKeywords":"keyword","@modifiers":"keyword.modifier","@softModifiers":"keyword.modifier","@constants":{token:"constant",next:"@allowMethod"},"@default":{token:"identifier",next:"@allowMethod"}}}],[/@type/,"type","@allowMethod"],{include:"@whitespace"},[/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/,"annotation"],[/[{(]/,"@brackets"],[/[})]/,"@brackets","@allowMethod"],[/\[/,"operator.square"],[/](?!\s*(?:va[rl]|def|type)\b)/,"operator.square","@allowMethod"],[/]/,"operator.square"],[/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},."'`])/,"keyword"],[/@symbols/,"operator"],[/[;,.]/,"delimiter"],[/'[a-zA-Z$][\w$]*(?!')/,"attribute.name"],[/'[^\\']'/,"string","@allowMethod"],[/(')(@escapes)(')/,[{token:"string"},{token:"string.escape"},{token:"string",next:"@allowMethod"}]],[/'/,"string.invalid"]],import:[[/;/,"delimiter","@pop"],[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/@name|@type/,"type"],[/[(){}]/,"@brackets"],[/[[\]]/,"operator.square"],[/[.,]/,"delimiter"]],allowMethod:[[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/(?==>[\s\w([{])/,"keyword","@pop"],[/(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/,{cases:{"@keywords":{token:"keyword",next:"@pop"},"->|<-|>:|<:|<%":{token:"keyword",next:"@pop"},"@default":{token:"@rematch",next:"@pop"}}}],["","","@pop"]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],case:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword","@allowMethod"],[/\bif\b|=>/,"keyword","@pop"],[/`[^`]+`/,"identifier","@allowMethod"],[/@name/,"variable","@allowMethod"],[/:::?|\||@(?![a-z_$])/,"keyword"],{include:"@root"}],vardef:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword"],[/@name/,"variable"],[/:::?|\||@(?![a-z_$])/,"keyword"],[/=|:(?!:)/,"operator","@pop"],[/$/,"white","@pop"],{include:"@root"}],string:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],stringt:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],fstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],fstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],sstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],sstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],interp:[[/{/,"operator","@push"],[/}/,"operator","@pop"],{include:"@root"}],rawstring:[[/[^"]/,"string"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],rawstringt:[[/[^"]/,"string"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}},ba={id:pa,conf:va,language:ya};const wa=ba;var Sa="deephavenDb",Ta={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:/^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,action:{indentAction:1}}],folding:{offSide:!0,markers:{start:/^\s*#region\b/,end:/^\s*#endregion\b/}}},Ma={tokenPostfix:".js",keywords:["boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"],builtins:["define","require","window","document","undefined"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[~!@#%\^&*-+=|\\:`<>.?\/]+/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,exponent:/[eE][\-+]?[0-9]+/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/([a-zA-Z_\$][\w\$]*)(\s*)(:?)/,{cases:{"$1@keywords":["keyword","white","delimiter"],$3:["key.identifier","white","delimiter"],"$1@builtins":["predefined.identifier","white","delimiter"],"@default":["identifier","white","delimiter"]}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/)/,{token:"regexp.slash",bracket:"@open",next:"@regexp"}],[/[{}()\[\]]/,"@brackets"],[/[;,.]/,"delimiter"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d+\.\d*(@exponent)?/,"number.float"],[/\.\d+(@exponent)?/,"number.float"],[/\d+@exponent/,"number.float"],[/0[xX][\da-fA-F]+/,"number.hex"],[/0[0-7]+/,"number.octal"],[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment.invalid"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["@brackets.regexp.escape.control","regexp.escape.control","@brackets.regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,[{token:"@brackets.regexp.escape.control"},{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["@brackets.regexp.escape.control","regexp.escape.control"]],[/[()]/,"@brackets.regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],["/",{token:"regexp.slash",bracket:"@close"},"@pop"]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,"@brackets.regexp.escape.control","@pop"]]}},Ca={id:Sa,conf:Ta,language:Ma};const Ea=Ca;var Pa="log",xa={},ka={tokenizer:{root:[[/ FATAL[\s\S]*/,{token:"error",next:"@error"}],[/ ERROR[\s\S]*/,{token:"error",next:"@error"}],[/ STDERR[\s\S]*/,{token:"error",next:"@error"}],[/ STDOUT.*/,{token:"stdout",next:"@stdout"}],[/ INFO[\s\S]*/,{token:"info",next:"@info"}],[/ WARN.*/,{token:"warn",next:"@warn"}],[/ TRACE[\s\S]*/,{token:"trace",next:"@trace"}],[/ DEBUG[.\s\S]*/,{token:"debug",next:"@debug"}],[/^\d{2}:\d{2}:\d{2}.\d{3}/,"date"]],error:[{include:"@body"}],info:[{include:"@body"}],warn:[{include:"@body"}],stdout:[{include:"@body"}],trace:[{include:"@body"}],debug:[{include:"@body"}],body:[[/^\d{2}:\d{2}:\d{2}.\d{3}/,{token:"date",next:"@pop"}],[/[\s\S]*/,{token:"$S0"}]]}},Oa={id:Pa,conf:xa,language:ka};const Ia=Oa;function kt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ot(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?kt(Object(t),!0).forEach(function(n){Da(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):kt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Da(r,e,t){return e=Na(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Na(r){var e=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 Z=D.module("MonacoUtils");class re{static init(){var{getWorker:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Z.debug("Initializing Monaco..."),e!==void 0&&re.registerGetWorker(e);var{registerLanguages:t,removeHashtag:n}=re,i=_t(xt);Z.debug2("Monaco theme:",xt),Z.debug2("Monaco theme derived:",i);var a=[{token:"",foreground:n(i.foreground)},{token:"string",foreground:n(i.string)},{token:"string.delim",foreground:n(i["string-delim"])},{token:"keyword",foreground:n(i.keyword)},{token:"identifier.js",foreground:n(i["identifier-js"])},{token:"delimiter",foreground:n(i.delimiter)},{token:"comment",foreground:n(i.comment)},{token:"number",foreground:n(i.number)},{token:"storage",foreground:n(i.storage)},{token:"identifier",foreground:n(i.identifier)},{token:"namespace.identifier",foreground:n(i["namespace-identifier"])},{token:"operator",foreground:n(i.operator)},{token:"predefined",foreground:n(i.predefined)},{token:"error.log",foreground:i["log-error"].substring(1)},{token:"warn.log",foreground:n(i["log-warn"])},{token:"info.log",foreground:n(i["log-info"])},{token:"stdout.log",foreground:n(i["log-stdout"])},{token:"trace.log",foreground:n(i["log-trace"])},{token:"debug.log",foreground:n(i["log-debug"])},{token:"date.log",foreground:n(i["log-date"])}],o={errorForeground:i["error-foreground"],"inputOption.activeBorder":i["input-option-active-border"],"editor.background":i.background,"editor.foreground":i.foreground,"editor.lineHighlightBackground":i["editor-line-highlight-bg"],"editorLineNumber.foreground":i["editor-line-number-foreground"],"editor.selectionBackground":i["editor-selection-background"],"editor.findMatchBackground":i["editor-find-match-background"],"editor.findMatchHighlightBackground":i["editor-find-match-highlight-background"],"editorSuggestWidget.background":i["editor-suggest-widget-background"],"editorSuggestWidget.border":i["editor-suggest-widget-border"],"editorSuggestWidget.foreground":i["editor-suggest-widget-foreground"],"editorSuggestWidget.selectedBackground":i["editor-suggest-widget-selected-background"],"editorSuggestWidget.selectedForeground":i["editor-suggest-widget-selected-foreground"],"editorSuggestWidget.highlightForeground":i["editor-suggest-widget-highlightForeground"],"editorSuggestWidget.focusHighlightForeground":i["editor-suggest-widget-focus-highlight-foreground"],"list.hoverBackground":i["list-hover-background"],"dropdown.background":i["context-menu-background"],"dropdown.foreground":i["context-menu-foreground"],"menu.selectionBackground":i["menu-selection-background"],"list.focusBackground":i["menu-selection-background"],"editorWidget.background":i["editor-widget-background"],"inputOption.activeBackground":i["input-option-active-background"],"inputOption.activeForeground":i["input-option-active-foreground"],focusBorder:i["focus-border"],"input.background":i["input-background"],"input.foreground":i["input-foreground"],"input.border":i["input-border"],"textLink.foreground":i["text-link-foreground"],"textLink.activeForeground":i["text-link-active-foreground"],"editorLink.activeForeground":i["editor-link-active-foreground"]};Y.defineTheme("dh-dark",{base:"vs-dark",inherit:!0,rules:a,colors:o});try{Y.setTheme("dh-dark")}catch{Z.error("Failed to set 'dh-dark' Monaco theme, falling back to vs-dark"),Y.setTheme("vs-dark")}t([Ea,da,ga,Ia,wa]),re.removeConflictingKeybindings(),Z.debug("Monaco initialized.")}static registerGetWorker(e){window.MonacoEnvironment=Ot(Ot({},window.MonacoEnvironment),{},{getWorker:e})}static removeHashtag(e){return e.substring(1)}static registerLanguages(e){var t=e.map(n=>{var{id:i}=n;return i});ue.getLanguages().filter(n=>{var{id:i}=n;return t.includes(i)}).forEach(n=>{var i=n;Z.debug2("Overriding default language loader:",i.id)}),e.forEach(n=>{re.registerLanguage(n)})}static registerLanguage(e){Z.debug2("Registering language: ",e.id),ue.register(e),ue.onLanguage(e.id,()=>{ue.setLanguageConfiguration(e.id,e.conf),ue.setMonarchTokensProvider(e.id,e.language)})}static setEOL(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y.EndOfLineSequence.LF;(t=e.getModel())===null||t===void 0||t.setEOL(n)}static openDocument(e,t){var n=e.getModel();ce(n);var i={textDocument:{uri:"".concat(n.uri),languageId:n.getLanguageId(),version:n.getVersionId(),text:n.getValue()}};Z.debug2("didOpenDocumentParams: ",i),t.openDocument(i);var a=e.onDidChangeModelContent(o=>{for(var{changes:l,versionId:s}=o,u=[],d=0;d<l.length;d+=1){var m=l[d],{range:g,rangeLength:v,text:w}=m,T={range:{start:{line:g.startLineNumber-1,character:g.startColumn-1},end:{line:g.endLineNumber-1,character:g.endColumn-1}},rangeLength:v,text:w};u.push(T)}if(u.length>0){var M={textDocument:{version:s,uri:"".concat(n.uri)},contentChanges:u};Z.debug2("didChangeDocumentParams",M),t.changeDocument(M)}});return a}static closeDocument(e,t){var n=e.getModel();ce(n);var i={textDocument:{uri:"".concat(n.uri)}};t.closeDocument(i)}static registerPasteHandler(e){e.onDidPaste(t=>{var n=/“|”/g,i=/\u200b/g,a=/\u00A0/g,o=e.getModel();ce(o);var l=o.getValueInRange(t.range);(n.test(l)||i.test(l)||a.test(l))&&o.applyEdits([{range:t.range,text:l.replace(n,'"').replace(i,"").replace(a," ")}])})}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static removeConflictingKeybindings(){Y.addKeybindingRule({keybinding:B.CtrlCmd|Ve.KeyD,command:null}),re.isMacPlatform()||Y.addKeybindingRule({keybinding:B.CtrlCmd|Ve.KeyH,command:null})}static disableKeyBindings(e,t){e.addAction({id:"disable-keybindings-".concat(Ue()),label:"",keybindings:t,run:()=>{}})}static getMonacoKeyCodeFromShortcut(e){var{keyState:t}=e,{keyValue:n}=t;if(n===null)return 0;var i=re.isMacPlatform();return i?(t.metaKey?B.CtrlCmd:0)|(t.shiftKey?B.Shift:0)|(t.altKey?B.Alt:0)|(t.ctrlKey?B.WinCtrl:0)|et.fromString(n):(t.ctrlKey?B.CtrlCmd:0)|(t.shiftKey?B.Shift:0)|(t.altKey?B.Alt:0)|(t.metaKey?B.WinCtrl:0)|et.fromString(n)}static provideLinks(e){for(var t=[],n=function(o){var l=e.getLineContent(o),s=yr(l),u=s.filter(d=>d.type==="url"?/^https?:\/\//.test(d.value):!0);u.forEach(d=>{t.push({url:d.href,range:new Lr(o,d.start+1,o,d.end+1)})})},i=1;i<=e.getLineCount();i+=1)n(i);return{links:t}}}const Aa=re;function It(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function La(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?It(Object(t),!0).forEach(function(n){Fe(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):It(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Fe(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=$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 ir extends b.Component{constructor(e){super(e),Fe(this,"container",void 0),Fe(this,"editor",void 0),this.handleResize=this.handleResize.bind(this),this.container=null,this.state={}}componentDidMount(){this.initEditor(),window.addEventListener("resize",this.handleResize)}componentWillUnmount(){window.removeEventListener("resize",this.handleResize),this.destroyEditor()}setLanguage(e){if(this.editor){var t=this.editor.getModel();ce(t),Y.setModelLanguage(t,e)}}handleResize(){this.updateDimensions()}toggleFind(){this.editor&&(this.editor.focus(),this.editor.trigger("toggleFind","actions.find",void 0))}updateDimensions(){var e;(e=this.editor)===null||e===void 0||e.layout()}initEditor(){var{onEditorInitialized:e}=this.props,{settings:t}=this.props;t=La({copyWithSyntaxHighlighting:!1,fixedOverflowWidgets:!0,folding:!1,fontFamily:"Fira Mono",glyphMargin:!1,language:"python",lineNumbersMinChars:3,minimap:{enabled:!1},scrollBeyondLastLine:!1,tabCompletion:"on",value:"",wordWrap:"off",links:!0},t),ce(this.container),this.editor=Y.create(this.container,t),this.editor.addAction({id:"find",label:"Find",keybindings:[B.CtrlCmd|Ve.KeyF],precondition:void 0,keybindingContext:void 0,contextMenuGroupId:"navigation",contextMenuOrder:1,run:()=>{this.toggleFind()}}),this.editor.layout(),ue.registerLinkProvider("plaintext",{provideLinks:Aa.provideLinks}),e(this.editor)}destroyEditor(){var{onEditorWillDestroy:e}=this.props;ce(this.editor),e(this.editor),this.editor.dispose(),this.editor=void 0}render(){var{className:e}=this.props;return f.jsx("div",{className:I("editor-container",e),ref:t=>{this.container=t}})}}Fe(ir,"defaultProps",{className:"fill-parent-absolute",onEditorInitialized:()=>{},onEditorWillDestroy:()=>{},settings:{}});const as=ir;function Xe(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 je{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""}}Xe(je,"TYPE_GLOBAL","type-global");Xe(je,"TYPE_CONTEXT_PRESET","type-context-preset");Xe(je,"TYPE_CONTEXT_CUSTOM","type-context-custom");const A=je;class Ka extends A{format(e){switch(e){case 1:case!0:return"true";case 0:case!1:return"false";default:return""}}}const Ba=Ka;class Ha extends A{format(e){return String.fromCharCode(e)}}const Wa=Ha;function ne(r,e,t){return e=Va(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Va(r){var e=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 Dt=D.module("DateTimeColumnFormatter");class q extends A{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]:A.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'":" ",i=e?" z":"";return new Map([["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd".concat(n,"HH:mm:ss").concat(i)],["yyyy-MM-dd HH:mm:ss.SSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSS").concat(i)],["yyyy-MM-dd HH:mm:ss.SSSSSSSSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSSSSSSSS").concat(i)]])}static getGlobalFormats(e,t){var n=q.makeGlobalFormatStringMap(e,t);return[...n.keys()]}static makeFormatStringMap(e,t){var n=t!==void 0&&t?"'T'":" ",i=e!==void 0&&e?" z":"";return new Map([["yyyy-MM-dd","yyyy-MM-dd".concat(i)],["MM-dd-yyyy","MM-dd-yyyy".concat(i)],["HH:mm:ss","HH:mm:ss".concat(i)],["HH:mm:ss.SSS","HH:mm:ss.SSS".concat(i)],["HH:mm:ss.SSSSSSSSS","HH:mm:ss.SSSSSSSSS".concat(i)],["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd".concat(n,"HH:mm:ss").concat(i)],["yyyy-MM-dd HH:mm:ss.SSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSS").concat(i)],["yyyy-MM-dd HH:mm:ss.SSSSSSSSS","yyyy-MM-dd".concat(n,"HH:mm:ss.SSSSSSSSS").concat(i)]])}static getFormats(e,t){var n=q.makeFormatStringMap(e,t);return[...n.keys()]}constructor(e){var{timeZone:t="",showTimeZone:n=!0,showTSeparator:i=!1,defaultDateTimeFormatString:a=q.DEFAULT_DATETIME_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ne(this,"dh",void 0),ne(this,"dhTimeZone",void 0),ne(this,"defaultDateTimeFormatString",void 0),ne(this,"showTimeZone",void 0),ne(this,"showTSeparator",void 0),ne(this,"formatStringMap",void 0);var o=t||q.DEFAULT_TIME_ZONE_ID;try{this.dhTimeZone=e.i18n.TimeZone.getTimeZone(o)}catch{Dt.error("Unsupported time zone id",o),this.dhTimeZone=e.i18n.TimeZone.getTimeZone(q.DEFAULT_TIME_ZONE_ID)}this.dh=e,this.defaultDateTimeFormatString=a,this.showTimeZone=n,this.showTSeparator=i,this.formatStringMap=q.makeFormatStringMap(n,i)}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,i=this.getEffectiveFormatString(n);try{return this.dh.i18n.DateTimeFormat.format(i,e,this.dhTimeZone)}catch{Dt.error("Invalid format arguments")}return""}}ne(q,"DEFAULT_DATETIME_FORMAT_STRING","yyyy-MM-dd HH:mm:ss.SSS");ne(q,"DEFAULT_TIME_ZONE_ID","America/New_York");function z(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=Ga(r,"string");return typeof e=="symbol"?e:String(e)}function Ga(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var za=D.module("DecimalColumnFormatter");class O extends A{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]:A.TYPE_CONTEXT_PRESET,i=arguments.length>3?arguments[3]:void 0;return{label:e,type:n,formatString:t,multiplier:i}}static makePresetFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return O.makeFormat(e,t,A.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 O.makeFormat("Custom Format",e,A.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=O.DEFAULT_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),z(this,"defaultFormatString",void 0),z(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,i=t.multiplier!=null&&t.multiplier!==0?e*t.multiplier:e;try{return this.dh.i18n.NumberFormat.format(n,i)}catch{za.error("Invalid format arguments")}return""}}z(O,"DEFAULT_FORMAT_STRING","###,##0.0000");z(O,"FORMAT_PERCENT",O.makePresetFormat("Percent","##0.00%"));z(O,"FORMAT_BASIS_POINTS",O.makePresetFormat("Basis Points","###,##0 bp",1e4));z(O,"FORMAT_MILLIONS",O.makePresetFormat("Millions","###,##0.000 mm",1e-6));z(O,"FORMAT_SCIENTIFIC_NOTATION",O.makePresetFormat("Scientific Notation","0.0000E0"));z(O,"FORMAT_ROUND",O.makePresetFormat("Round","###,##0"));z(O,"FORMAT_ROUND_TWO_DECIMALS",O.makePresetFormat("0.00","###,##0.00"));z(O,"FORMAT_ROUND_FOUR_DECIMALS",O.makePresetFormat("0.0000","###,##0.0000"));class Qa extends A{format(e){return"".concat(e)}}const Za=Qa;function ye(r,e,t){return e=Xa(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Xa(r){var e=Ja(r,"string");return typeof e=="symbol"?e:String(e)}function Ja(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 Ya=D.module("IntegerColumnFormatter");class G extends A{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]:A.TYPE_CONTEXT_PRESET,i=arguments.length>3?arguments[3]:void 0;return{label:e,type:n,formatString:t,multiplier:i}}static makePresetFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return G.makeFormat(e,t,A.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 G.makeFormat("Custom Format",e,A.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=G.DEFAULT_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ye(this,"dh",void 0),ye(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,i=t.multiplier!=null&&t.multiplier!==0?e*t.multiplier:e;try{return this.dh.i18n.NumberFormat.format(n,i)}catch{Ya.error("Invalid format arguments")}return""}}ye(G,"DEFAULT_FORMAT_STRING","###,##0");ye(G,"FORMAT_MILLIONS",G.makePresetFormat("Millions","###,##0.000 mm",1e-6));ye(G,"FORMAT_SCIENTIFIC_NOTATION",G.makePresetFormat("Scientific Notation","0.0000E0"));class eo extends A{format(e){return e}}function ar(r,e,t){return e=to(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function to(r){var e=ro(r,"string");return typeof e=="symbol"?e:String(e)}function ro(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 N{static makeDateWrapper(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,s=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"),m="".concat(i+1).padStart(2,"0"),g="".concat(a).padStart(2,"0"),v="".concat(o).padStart(2,"0"),w="".concat(l).padStart(2,"0"),T="".concat(s).padStart(2,"0"),M="".concat(u).padStart(9,"0"),$="".concat(d,"-").concat(m,"-").concat(g," ").concat(v,":").concat(w,":").concat(T,".").concat(M);return e.i18n.DateTimeFormat.parse(N.FULL_DATE_FORMAT,$,e.i18n.TimeZone.getTimeZone(t))}static getNextNanos(e){var t=parseInt(e,10),n="0".repeat(9-e.length),i="".concat(t+1).concat(n);return parseInt(i,10)}static getNextDate(e,t,n,i){var{year:a,month:o,date:l,hours:s,minutes:u,seconds:d,nanos:m}=n;if(t.nanos!=null){if(t.nanos.length===9)return null;m=N.getNextNanos(t.nanos),m>999999999&&(d+=1,m=0)}else t.seconds!=null?d+=1:t.minutes!=null?u+=1:t.hours!=null?s+=1:t.date!=null?l+=1:t.month!=null?o+=1:a+=1;var g=new Date(a,o,l,s,u,d);return N.makeDateWrapper(e,i,g.getFullYear(),g.getMonth(),g.getDate(),g.getHours(),g.getMinutes(),g.getSeconds(),m)}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 i=0;i<N.months.length;i+=1)if(N.months[i].startsWith(n))return i}return NaN}static parseDateValues(e,t,n,i,a,o,l){var s=parseInt(e,10),u=t!=null?this.parseMonth(t):0,d=n!=null?parseInt(n,10):1,m=i!=null?parseInt(i,10):0,g=a!=null?parseInt(a,10):0,v=o!=null?parseInt(o,10):0,w=l!=null?parseInt(l.padEnd(9,"0"),10):0;return Number.isNaN(s)||Number.isNaN(u)||Number.isNaN(d)||Number.isNaN(m)||Number.isNaN(g)||Number.isNaN(v)||Number.isNaN(w)?null:{year:s,month:u,date:d,hours:m,minutes:g,seconds:v,nanos:w}}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[,i,,a,,o,,l,,s,,u,,d,m]=n;if(m!=null&&m.length>0)throw new Error("Unexpected characters after date string '".concat(e,"': ").concat(m));return{year:i,month:a,date:o,hours:l,minutes:s,seconds:u,nanos:d}}static parseDateRange(e,t,n){var i=t.trim().toLowerCase();if(i.length===0)throw new Error("Cannot parse date range from empty string");if(i==="null")return[null,null];if(i==="today"){var a=new Date(Date.now()),o=N.makeDateWrapper(e,n,a.getFullYear(),a.getMonth(),a.getDate()),l=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1),s=N.makeDateWrapper(e,n,l.getFullYear(),l.getMonth(),l.getDate());return[o,s]}if(i==="yesterday"){var u=new Date(Date.now()),d=new Date(u.getFullYear(),u.getMonth(),u.getDate()-1),m=N.makeDateWrapper(e,n,d.getFullYear(),d.getMonth(),d.getDate()),g=N.makeDateWrapper(e,n,u.getFullYear(),u.getMonth(),u.getDate());return[m,g]}if(i==="now"){var v=new Date(Date.now()),w=e.DateWrapper.ofJsDate(v);return[w,null]}var T=N.parseDateTimeString(i);if(T.year==null&&T.month==null&&T.date==null)throw new Error("Unable to extract year, month, or day ".concat(i));var M=N.parseDateValues(T.year,T.month,T.date,T.hours,T.minutes,T.seconds,T.nanos);if(M==null)throw new Error("Unable to extract date values from ".concat(T));var $=N.makeDateWrapper(e,n,M.year,M.month,M.date,M.hours,M.minutes,M.seconds,M.nanos),L=N.getNextDate(e,T,M,n);return[$,L]}static getJsDate(e){return typeof e=="number"?new Date(e):e.asDate()}}ar(N,"FULL_DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSSSSS");ar(N,"months",["january","february","march","april","may","june","july","august","september","october","november","december"]);const Nt=N;function os(r,e){return r===e?{operator:"notEq",value:""}:{operator:"eq",value:r}}function ss(r,e,t){return function(i){var a=t.trim();if(a==="")return null;var o=or(e,l=>l.filter().containsIgnoreCase(r.makeFilterValue(l.type,a)),"or");return o(i)}}function or(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"or";return function(i){var a=i?.findColumns(typeof r=="string"?[r]:r);if(a==null||a.length===0)return null;var o=a.map(e);return o.reduce((l,s)=>l[t](s))}}function no(r,e,t,n){return or(e,i=>i.filter()[n](r.makeFilterValue(i.type,t)),"or")}function ls(r,e,t,n,i){return function(o){var l=o?.findColumn(e),s=t==="all"||n&&t.size===0;return l==null||s?null:r.makeSelectValueFilter(l,[...t.keys()],i)}}function us(r){return function(t){return t.filter().isNull().not().and(t.filter().notEq(r.makeFilterValue(t.type,"")))}}function ds(r,e){return function(n){var i=n.filter(),a=r.makeFilterValue(n.type,""),o=i.eq(a);return e?i.isNull().or(o):o.or(i.notEq(a))}}function Je(r,e,t){return e=io(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function io(r){var e=ao(r,"string");return typeof e=="symbol"?e:String(e)}function ao(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 be{}Je(be,"not","not");Je(be,"and","and");Je(be,"or","or");function cs(r){if(!(r==="not"||r==="and"||r==="or"))throw new Error("operator is not a valid FilterOperatorValue")}function E(r,e,t){return e=oo(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function oo(r){var e=so(r,"string");return typeof e=="symbol"?e:String(e)}function so(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 h{}E(h,"eq","eq");E(h,"eqIgnoreCase","eqIgnoreCase");E(h,"notEq","notEq");E(h,"notEqIgnoreCase","notEqIgnoreCase");E(h,"greaterThan","greaterThan");E(h,"greaterThanOrEqualTo","greaterThanOrEqualTo");E(h,"lessThan","lessThan");E(h,"lessThanOrEqualTo","lessThanOrEqualTo");E(h,"in","in");E(h,"inIgnoreCase","inIgnoreCase");E(h,"notIn","notIn");E(h,"notInIgnoreCase","notInIgnoreCase");E(h,"isTrue","isTrue");E(h,"isFalse","isFalse");E(h,"isNull","isNull");E(h,"invoke","invoke");E(h,"contains","contains");E(h,"notContains","notContains");E(h,"containsIgnoreCase","containsIgnoreCase");E(h,"startsWith","startsWith");E(h,"endsWith","endsWith");E(h,"containsAny","containsAny");var Ft=D.module("ViewportDataUtils");function lo(r,e){return String(r.offsetInSnapshot+e)}function hs(r,e){var{bulkUpdate:t}=r;return function(i){var{columns:a,offset:o,rows:l}=i.detail;Ft.debug("table updated",i.detail);var s=new Map;l.forEach(u=>{var d=e(u,a),m=lo(u,o);s.set(m,{key:m,item:d})}),Ft.debug("update keys",s),t(s)}}function fs(r,e){return e.reduce((t,n)=>(t[n.name]=r.get(n),t),{})}function*ms(r,e){for(var t=r;t<=e;++t)yield{key:String(t)}}function uo(r){return r==null||co(r)?0:r.size}function co(r){return"isClosed"in r?r.isClosed:!1}function gs(r,e,t,n){var i=r+e-1,[a,o]=[0,n-1],l=Ye(r-t,a,o),s=Ye(i+t,a,o);return[l,s]}function At(r,e,t,n,i,a,o){try{var l=r[a](o),s=l.value}catch(u){t(u);return}l.done?e(s):Promise.resolve(s).then(n,i)}function J(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(s){At(a,n,i,o,l,"next",s)}function l(s){At(a,n,i,o,l,"throw",s)}o(void 0)})}}function se(r,e,t){return e=ho(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ho(r){var e=fo(r,"string");return typeof e=="symbol"?e:String(e)}function fo(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var X=D.module("TableUtils");class c{static copyTableAndApplyFilters(e){var t=arguments;return J(function*(){if(e==null)return null;for(var n=yield e.copy(),i=t.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=t[o];return n.applyFilter(Ke(...a.map(l=>l(n)))),n})()}static getSortIndex(e,t){for(var n=0;n<e.length;n+=1){var i,a=e[n];if(((i=a.column)===null||i===void 0?void 0:i.name)===t)return n}return null}static getSortForColumn(e,t){var n=c.getSortIndex(e,t);return n!=null?e[n]:null}static getFilterText(e){return e?e.toString():null}static getFilterTypes(e){return c.isBooleanType(e)?[h.isTrue,h.isFalse,h.isNull]:c.isCharType(e)||c.isNumberType(e)||c.isDateType(e)?[h.eq,h.notEq,h.greaterThan,h.greaterThanOrEqualTo,h.lessThan,h.lessThanOrEqualTo]:c.isTextType(e)?[h.eq,h.eqIgnoreCase,h.notEq,h.notEqIgnoreCase,h.contains,h.notContains,h.startsWith,h.endsWith]:[]}static getNextSort(e,t,n){if(n<0||n>=e.length)return null;var i=c.getSortForColumn(t,e[n].name);return i===null?e[n].sort().asc():i.direction===c.sortDirection.ascending?i.desc():null}static makeColumnSort(e,t,n,i){if(t<0||t>=e.length||n===c.sortDirection.none)return null;var a=e[t].sort();switch(n){case c.sortDirection.ascending:a=a.asc();break;case c.sortDirection.descending:a=a.desc();break}return i&&(a=a.abs()),a}static toggleSortForColumn(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(n<0||n>=t.length)return[];var a=c.getNextSort(t,e,n);return c.setSortForColumn(e,t[n].name,a,i)}static sortColumn(e,t,n,i,a,o){if(n<0||n>=t.length)return[];var l=c.makeColumnSort(t,n,i,a);return c.setSortForColumn(e,t[n].name,l,o)}static setSortForColumn(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=c.getSortIndex(e,t),o=[];return i&&(o=o.concat(e.filter(l=>{var{direction:s}=l;return s!==c.sortDirection.reverse})),a!==null&&o.splice(a,1)),n!==null&&o.push(n),o}static getNormalizedType(e){switch(e){case"boolean":case"java.lang.Boolean":case c.dataType.BOOLEAN:return c.dataType.BOOLEAN;case"char":case"java.lang.Character":case c.dataType.CHAR:return c.dataType.CHAR;case"java.lang.String":case c.dataType.STRING:return c.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 c.dataType.DATETIME:return c.dataType.DATETIME;case"double":case"java.lang.Double":case"float":case"java.lang.Float":case"java.math.BigDecimal":case c.dataType.DECIMAL:return c.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 c.dataType.INT:return c.dataType.INT;default:return c.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 c.isIntegerType(e)||c.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 c.getNormalizedType(e)===c.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 Ne.makeCancelable(e,t=>{t.close()})}static makeCancelableTableEventPromise(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a,o,l=!0,s=new Promise((u,d)=>{o=setTimeout(()=>{a(),l=!1,d(new Wt('Event "'.concat(t,'" timed out.')))},n),a=e.addEventListener(t,m=>{if(i!=null&&!i(m)){X.debug2("Event triggered, but matcher returned false.");return}X.debug2("Event triggered, resolving."),a(),clearTimeout(o),l=!1,u(m)})});return s.cancel=()=>{if(l){X.debug2("Pending promise cleanup."),a(),clearTimeout(o),l=!1;return}X.debug2("Ignoring non-pending promise cancel.")},s}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?.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=c.removeCommas(t);if(c.NUMBER_REGEX.test(n))return parseFloat(n);throw new Error("Invalid number '".concat(e,"'"))}static getFilterOperatorString(e){switch(e){case h.eq:return"=";case h.notEq:return"!=";case h.greaterThan:return">";case h.greaterThanOrEqualTo:return">=";case h.lessThan:return"<";case h.lessThanOrEqualTo:return"<=";case h.contains:return"~";case h.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,i)=>{var a=n.name.toUpperCase(),o=i.name.toUpperCase();return hn.sort(a,o,t)})}constructor(e){se(this,"dh",void 0),this.dh=e,Ur(this)}createDistinctSortedColumnTable(e,t,n){var i=arguments,a=this;return J(function*(){if(e==null)return null;for(var o=e,l=i.length,s=new Array(l>3?l-3:0),u=3;u<l;u++)s[u-3]=i[u];s.length>0&&(o=yield e.copy(),yield o.applyFilter(Ke(...s.map(v=>v(o)))));var d=o.findColumn(t),m=yield o.selectDistinct([d]);o!==e&&o.close();var g=m.findColumn(t).sort()[n]();return a.applySort(m,[g])})()}doesColumnValueExist(e,t,n,i){var a=this;return J(function*(){if(e==null)return null;var o=no(a,t,n,i?"eq":"eqIgnoreCase"),l=yield e.copy();yield a.applyFilter(l,Ke(o(l)));var s=uo(l);return l.close(),s>0})()}makeQuickFilter(e,t,n){for(var i=t.split("||"),a=null,o=0;o<i.length;o+=1){for(var l=i[o],s=l.split("&&"),u=null,d=0;d<s.length;d+=1){var m=s[d].trim();if(m.length>0){var g=this.makeQuickFilterFromComponent(e,m,n);if(g)u?u=u.and(g):u=g;else throw new Error("Unable to parse quick filter from text ".concat(t))}}a&&u?a=a.or(u):a=u}return a}makeQuickFilterFromComponent(e,t,n){var{type:i}=e;return c.isNumberType(i)?this.makeQuickNumberFilter(e,t):c.isBooleanType(i)?this.makeQuickBooleanFilter(e,t):n!=null&&c.isDateType(i)?this.makeQuickDateFilter(e,t,n):c.isCharType(i)?this.makeQuickCharFilter(e,t):this.makeQuickTextFilter(e,t)}makeQuickNumberFilter(e,t){var n=e.filter(),{dh:i}=this,a=null,o=/\s*(>=|<=|=>|=<|>|<|!=|=|!)?(\s*-\s*)?(\s*\d*(?:,\d{3})*(?:\.\d*)?\s*)?(null|nan|infinity|inf|\u221E)?(.*)/i,l=o.exec(t),s=null,u=null,d=null,m=null,g=null;if(l!==null&&l.length>3&&([,s,u,d,m,g]=l),g!=null&&g.trim().length>0)return null;if(s==null&&(s="="),m!=null){if(!(s==="="||s==="!"||s==="!="))return null;switch(m=m.trim().toLowerCase(),m){case"null":a=n.isNull();break;case"nan":a=i.FilterCondition.invoke("isNaN",n);break;case"infinity":case"inf":case"∞":u!=null?a=i.FilterCondition.invoke("isInf",n).and(n.lessThan(i.FilterValue.ofNumber(0))):a=i.FilterCondition.invoke("isInf",n).and(n.greaterThan(i.FilterValue.ofNumber(0)));break}return a!==null&&(s==="!"||s==="!=")&&(a=a.not()),a}if(d==null)return null;if(d=c.removeCommas(d),c.isLongType(e.type))try{d=i.FilterValue.ofNumber(i.LongWrapper.ofString("".concat(u!=null?"-":"").concat(d)))}catch(v){return X.warn("Unable to create long filter",v),null}else{if(d=parseFloat(d),d==null||Number.isNaN(d))return null;d=i.FilterValue.ofNumber(u!=null?0-d:d)}return a=e.filter(),c.makeRangeFilterWithOperation(a,s,d)}static escapeQuickTextFilter(e){var t,n;if(e==null)return null;var i=/^(!~|!=|~|=|!)?(.*)/,a=/^\\*null$/,o=i.exec(e),l=null,s=null;if(o!==null&&o.length>2&&([,l,s]=o),l!=null){var u;return"\\".concat(l).concat((u=s)!==null&&u!==void 0?u:"")}return s!=null&&a.test(s.toLowerCase())||s!=null&&s.startsWith("*")?"\\".concat(s):s!=null&&s.endsWith("*")&&!s.endsWith("\\*")?(s=s.substring(0,s.length-1),"".concat(s,"\\*")):"".concat((t=l)!==null&&t!==void 0?t:"").concat((n=s)!==null&&n!==void 0?n:"")}static unescapeQuickTextFilter(e){var t,n,i=/^(\\!~|\\!=|\\~|\\=|\\!)?(.*)/,a=/^\\*null$/,o=i.exec(e),l=null,s=null;return o!==null&&o.length>2&&([,l,s]=o),l!=null&&(l=l.replace("\\","")),s!=null&&a.test(s.toLowerCase())&&(s=s.replace("\\","")),l==null&&s!=null&&s.startsWith("\\*")&&(s=s.substring(1)),l==null&&s!=null&&s.endsWith("\\*")?(s=s.substring(0,s.length-2),"".concat(s,"*")):"".concat((t=l)!==null&&t!==void 0?t:"").concat((n=s)!==null&&n!==void 0?n:"")}makeQuickTextFilter(e,t){var{dh:n}=this,i="".concat(t).trim(),a=/^(!~|!=|~|=|!)?(.*)/,o=a.exec(i),l=null,s=null;if(o!==null&&o.length>2&&([,l,s]=o,s!=null&&(s=s.trim())),s==null||s.length===0&&!(l==="="||l==="!="))return null;l==null&&(l="=");var u=e.filter();if(s.toLowerCase()==="null")switch(l){case"=":return u.isNull();case"!=":case"!":return u.isNull().not()}var d=null,m=null;switch(s.startsWith("*")?(d="*",s=s.substring(1)):s.endsWith("*")&&!s.endsWith("\\*")&&(m="*",s=s.substring(0,s.length-1)),s=c.unescapeQuickTextFilter(s),l){case"~":return u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(s,"\\E.*"))));case"!~":return u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(s,"\\E.*"))).not());case"!=":return d==="*"?u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(s,"\\E$"))).not()):m==="*"?u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i)^\\Q".concat(s,"\\E.*"))).not()):u.notEqIgnoreCase(n.FilterValue.ofString(s.toLowerCase()));case"=":return d==="*"?u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(s,"\\E$")))):m==="*"?u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i)^\\Q".concat(s,"\\E.*")))):u.eqIgnoreCase(n.FilterValue.ofString(s.toLowerCase()))}return null}makeQuickBooleanFilter(e,t){var n=/^(!=|=|!)?(.*)/,i=n.exec("".concat(t).trim());if(i===null)return null;var[,a,o]=i,l=a==="!"||a==="!=",s=o.trim().toLowerCase(),u=e.filter();try{var d=c.makeBooleanValue(s);return d!=null&&d?u=u.isTrue():d===null?u=u.isNull():u=u.isFalse(),l?u.not():u}catch{return null}}makeQuickDateFilter(e,t,n){var i=t.trim(),a=/\s*(>=|<=|=>|=<|>|<|!=|!|=)?(.*)/,o=a.exec(i);if(o==null||o.length<=2)throw new Error("Unable to parse date filter: ".concat(t));var l=null,s=null;[,l,s]=o;var u=h.eq;switch(l){case"<":u=h.lessThan;break;case"<=":case"=<":u=h.lessThanOrEqualTo;break;case">":u=h.greaterThan;break;case">=":case"=>":u=h.greaterThanOrEqualTo;break;case"!=":case"!":u=h.notEq;break;case"=":case"==":default:u=h.eq;break}return this.makeQuickDateFilterWithOperation(e,s,u,n)}makeQuickDateFilterWithOperation(e,t,n,i){var{dh:a}=this,[o,l]=Nt.parseDateRange(a,t,i),s=o!=null?a.FilterValue.ofNumber(o):null,u=l!=null?a.FilterValue.ofNumber(l):null,d=e.filter();if(s==null)return n===h.notEq?d.isNull().not():d.isNull();switch(n){case h.eq:{if(u!=null){var m=d.greaterThanOrEqualTo(s),g=d.lessThan(u);return m.and(g)}return d.eq(s)}case h.lessThan:return d.lessThan(s);case h.lessThanOrEqualTo:return u!=null?d.lessThan(u):d.lessThanOrEqualTo(s);case h.greaterThan:return u!=null?d.greaterThanOrEqualTo(u):d.greaterThan(s);case h.greaterThanOrEqualTo:return d.greaterThanOrEqualTo(s);case h.notEq:{if(u!=null){var v=d.lessThan(s),w=d.greaterThanOrEqualTo(u);return v.or(w)}return d.notEq(s)}default:throw new Error("Invalid operator: ".concat(n))}}makeQuickCharFilter(e,t){var{dh:n}=this,i="".concat(t).trim(),a=/^(>=|<=|=>|=<|>|<|!=|=|!)?(null|"."|'.'|.)?(.*)/,o=a.exec(i),l=null,s=null,u=null;if(o!==null&&o.length>3&&([,l,s,u]=o),u!=null&&u.trim().length>0||s==null||s.length===0)return null;l==null&&(l="=");var d=e.filter();if(s.toLowerCase()==="null")switch(l){case"=":return d.isNull();case"!=":case"!":return d.isNull().not();default:return null}var m=n.FilterValue.ofString(c.isRangeOperation(l)?c.quoteValue(s):s);return c.makeRangeFilterWithOperation(d,l,m)}makeAdvancedFilter(e,t,n){for(var{filterItems:i,filterOperators:a,invertSelection:o,selectedValues:l}=t,s=null,u=0;u<i.length;u+=1){var d=i[u],{selectedType:m,value:g}=d;if(m!=null&&m.length>0&&g!=null&&g.length>0)try{var v=this.makeAdvancedValueFilter(e,m,g,n);if(v!=null){if(u===0)s=v;else if(s!==null&&u-1<a.length){var w=a[u-1];if(w===be.and)s=s.and(v);else if(w===be.or)s=s.or(v);else{X.error("Unexpected filter operator",w,v),s=null;break}}}else X.debug2("Empty filter ignored for",m,g)}catch(M){X.error("Unable to create filter",M),s=null;break}}var T=this.makeSelectValueFilter(e,l,o);return T!=null&&(s!=null?s=s.and(T):s=T),s}makeAdvancedValueFilter(e,t,n,i){var{dh:a}=this;if(c.isDateType(e.type))return this.makeQuickDateFilterWithOperation(e,n,t,i);if(c.isNumberType(e.type)||c.isCharType(e.type))return this.makeQuickFilter(e,"".concat(c.getFilterOperatorString(t)).concat(n));var o=this.makeFilterValue(e.type,n),l=e.filter();switch(t){case h.eq:return l.eq(o);case h.eqIgnoreCase:return l.eqIgnoreCase(o);case h.notEq:return l.notEq(o);case h.notEqIgnoreCase:return l.notEqIgnoreCase(o);case h.greaterThan:return l.greaterThan(o);case h.greaterThanOrEqualTo:return l.greaterThanOrEqualTo(o);case h.lessThan:return l.lessThan(o);case h.lessThanOrEqualTo:return l.lessThanOrEqualTo(o);case h.isTrue:return l.isTrue();case h.isFalse:return l.isFalse();case h.isNull:return l.isNull();case h.contains:return l.isNull().not().and(l.invoke("matches",a.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E.*"))));case h.notContains:return l.isNull().or(l.invoke("matches",a.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E.*"))).not());case h.startsWith:return l.isNull().not().and(l.invoke("matches",a.FilterValue.ofString("(?s)(?i)^\\Q".concat(n,"\\E.*"))));case h.endsWith:return l.isNull().not().and(l.invoke("matches",a.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E$"))));case h.in:case h.inIgnoreCase:case h.notIn:case h.notInIgnoreCase:case h.invoke:default:throw new Error("Unexpected filter operation: ".concat(t))}}applyNeverFilter(e,t){var n=arguments,i=this;return J(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS;if(e==null)return null;var o=e.findColumn(t),l=[i.makeNeverFilter(o)];return yield i.applyFilter(e,l,a),e})()}applyCustomColumns(e,t){var n=arguments,i=this;return J(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:o}=i;return c.executeAndWaitForEvent(l=>l?.applyCustomColumns(t),e,o.Table.EVENT_CUSTOMCOLUMNSCHANGED,a)})()}applyFilter(e,t){var n=arguments,i=this;return J(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:o}=i;return c.executeAndWaitForEvent(l=>l?.applyFilter(t),e,o.Table.EVENT_FILTERCHANGED,a)})()}applySort(e,t){var n=arguments,i=this;return J(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:o}=i;return c.executeAndWaitForEvent(l=>l?.applySort(t),e,o.Table.EVENT_SORTCHANGED,a)})()}makeNeverFilter(e){var{dh:t}=this,n=null;c.isTextType(e.type)?n=t.FilterValue.ofString("a"):c.isBooleanType(e.type)?n=t.FilterValue.ofBoolean(!0):c.isDateType(e.type)?n=t.FilterValue.ofNumber(t.DateWrapper.ofJsDate(new Date)):n=t.FilterValue.ofNumber(0);var i=e.filter().eq(n),a=e.filter().notEq(n);return i.and(a)}makeFilterValue(e,t){var{dh:n}=this,i=c.getBaseType(e);return c.isTextType(i)?n.FilterValue.ofString(t):c.isLongType(i)?n.FilterValue.ofNumber(n.LongWrapper.ofString(c.removeCommas(t))):n.FilterValue.ofNumber(c.removeCommas(t))}makeFilterRawValue(e,t){var{dh:n}=this;return c.isTextType(e)?n.FilterValue.ofString(t):c.isBooleanType(e)?n.FilterValue.ofBoolean(t):n.FilterValue.ofNumber(t)}makeValue(e,t,n){var{dh:i}=this;if(t==="null")return null;if(c.isTextType(e))return t;if(c.isLongType(e))return i.LongWrapper.ofString(c.removeCommas(t));if(c.isBooleanType(e))return c.makeBooleanValue(t,!0);if(c.isDateType(e)){var[a]=Nt.parseDateRange(i,t,n);return a}return c.isNumberType(e)?c.makeNumberValue(t):(X.error("Unexpected column type",e),null)}makeSelectValueFilter(e,t,n){var{dh:i}=this;if(t.length===0)return n?null:this.makeNeverFilter(e);for(var a=[],o=!1,l=0;l<t.length;l+=1){var s=t[l];s==null?o=!0:c.isTextType(e.type)?a.push(i.FilterValue.ofString(typeof s=="number"?String.fromCharCode(s):s)):c.isBooleanType(e.type)?a.push(i.FilterValue.ofBoolean(!!s)):a.push(i.FilterValue.ofNumber(s))}return o?a.length>0?n?e.filter().isNull().not().and(e.filter().notIn(a)):e.filter().isNull().or(e.filter().in(a)):n?e.filter().isNull().not():e.filter().isNull():n?e.filter().notIn(a):e.filter().in(a)}}se(c,"dataType",{BOOLEAN:"boolean",CHAR:"char",DATETIME:"datetime",DECIMAL:"decimal",INT:"int",STRING:"string",UNKNOWN:"unknown"});se(c,"sortDirection",{ascending:"ASC",descending:"DESC",reverse:"REVERSE",none:null});se(c,"APPLY_TABLE_CHANGE_TIMEOUT_MS",3e4);se(c,"REVERSE_TYPE",Object.freeze({NONE:"none",PRE_SORT:"pre-sort",POST_SORT:"post-sort"}));se(c,"NUMBER_REGEX",/^-?\d+(\.\d+)?$/);se(c,"executeAndWaitForEvent",function(){var r=J(function*(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS;if(t==null)return null;var a=c.makeCancelableTableEventPromise(t,n,i);return e(t),yield a,t});return function(e,t,n){return r.apply(this,arguments)}}());function ke(r,e,t){return e=mo(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function mo(r){var e=go(r,"string");return typeof e=="symbol"?e:String(e)}function go(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 sr{static makeColumnFormatMap(e){return e==null?new Map:e.reduce((t,n)=>{var i=c.getNormalizedType(n.columnType);if(i===null)return t;t.has(i)||t.set(i,new Map);var a=t.get(i);return a?.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,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,o=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 Za,this.typeFormatterMap=new Map([[c.dataType.BOOLEAN,new Ba],[c.dataType.CHAR,new Wa],[c.dataType.DATETIME,new q(e,n)],[c.dataType.DECIMAL,new O(e,i)],[c.dataType.INT,new G(e,a)],[c.dataType.STRING,new eo]]),this.columnFormatMap=sr.makeColumnFormatMap(t),this.truncateNumbersWithPound=o}getColumnFormatMapForType(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=c.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,i=this.getColumnFormatMapForType(e);return(n=i?.get(t))!==null&&n!==void 0?n:null}getColumnTypeFormatter(e){var t=c.getNormalizedType(e),n=this.defaultColumnFormatter;if(t){var i;n=(i=this.typeFormatterMap.get(t))!==null&&i!==void 0?i:n}return n}getFormattedString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",i=arguments.length>3?arguments[3]:void 0;if(e==null)return"";var a=this.getColumnTypeFormatter(t),o=i||this.getColumnFormat(t,n);return a.format(e,o??void 0)}get timeZone(){var e,t=this.typeFormatterMap.get(c.dataType.DATETIME);return t==null||(e=t.dhTimeZone)===null||e===void 0?void 0:e.id}}const po=typeof _e=="function"?_e:_e.default;Kt.register([Rr,$r,jr,_r,Kr,Br]);const vo="var(--dh-color-visual-blue) var(--dh-color-visual-green) var(--dh-color-visual-yellow) var(--dh-color-visual-purple) var(--dh-color-visual-orange) var(--dh-color-visual-red) var(--dh-color-white)",yo="var(--dh-color-gray-400)",bo="var(--dh-color-gray-500)",wo="var(--dh-color-gray-700)",So="#4878ea",To="var(--dh-color-gray-500)",Lt={"paper-bgcolor":"var(--dh-color-content-background)","plot-bgcolor":"var(--dh-color-gray-200)","title-color":"var(--dh-color-white)",colorway:vo,gridcolor:yo,linecolor:bo,zerolinecolor:wo,activecolor:So,rangebgcolor:To,"area-color":"var(--dh-color-visual-blue)","trend-color":"var(--dh-color-green-1200)","line-color":"var(--dh-color-visual-green)","error-band-line-color":"var(--dh-color-green-1400)","error-band-fill-color":"var(--dh-color-green-1200)","ohlc-increasing":"var(--dh-color-visual-green)","ohlc-decreasing":"var(--dh-color-visual-red)"};var Rt=D.module("ChartTheme");function Mo(){var r=_t(Lt);return Rt.debug2("Chart theme:",Lt),Rt.debug2("Chart theme derived:",r),Object.freeze({paper_bgcolor:r["paper-bgcolor"],plot_bgcolor:r["plot-bgcolor"],title_color:r["title-color"],colorway:r.colorway,gridcolor:r.gridcolor,linecolor:r.linecolor,zerolinecolor:r.zerolinecolor,activecolor:r.activecolor,rangebgcolor:r.rangebgcolor,area_color:r["area-color"],trend_color:r["trend-color"],line_color:r["line-color"],error_band_line_color:r["error-band-line-color"],error_band_fill_color:r["error-band-fill-color"],ohlc_increasing:r["ohlc-increasing"],ohlc_decreasing:r["ohlc-decreasing"]})}const ps=po(Kt);var lr=b.createContext(null);function vs(r){var{children:e}=r,{activeThemes:t}=zi(),[n,i]=b.useState(null);return b.useEffect(()=>{t!=null&&i(Mo())},[t]),f.jsx(lr.Provider,{value:n,children:e})}function ys(){return b.useContext(lr)}var Co={TOGGLE_QUICK_FILTER:F.createAndAdd({id:"TABLE.TOGGLE_QUICK_FILTER",name:"Toggle Quick Filter",shortcut:[S.CTRL,y.F],macShortcut:[S.CMD,y.F]}),CLEAR_ALL_FILTERS:F.createAndAdd({id:"TABLE.CLEAR_ALL_FILTERS",name:"Clear All Table Filters",shortcut:[S.CTRL,y.E],macShortcut:[S.CMD,y.E]}),CLEAR_FILTERS:F.createAndAdd({id:"TABLE.CLEAR_FILTERS",name:"Clear Active Table Filters",shortcut:[S.CTRL,S.SHIFT,y.E],macShortcut:[S.CMD,S.SHIFT,y.E]}),REVERSE:F.createAndAdd({id:"TABLE.REVERSE",name:"Reverse",shortcut:[S.CTRL,y.I],macShortcut:[S.CMD,y.I]}),TOGGLE_SEARCH:F.createAndAdd({id:"TABLE.TOGGLE_SEARCH",name:"Toggle Search",shortcut:[S.CTRL,S.SHIFT,y.F],macShortcut:[S.CMD,S.SHIFT,y.F]}),GOTO_ROW:F.createAndAdd({id:"TABLE.GOTO_ROW",name:"Go to Row",shortcut:[S.CTRL,y.G],macShortcut:[S.CMD,y.G]})},Eo={COMMIT:F.createAndAdd({id:"INPUT_TABLE.COMMIT",name:"Commit",shortcut:[S.CTRL,y.S],macShortcut:[S.CMD,y.S]}),DISCARD:F.createAndAdd({id:"INPUT_TABLE.DISCARD",name:"Discard",shortcut:[S.CTRL,S.ALT,y.S],macShortcut:[S.CMD,S.OPTION,y.S]})},Po={TABLE:Co,INPUT_TABLE:Eo};const bs=Po;function $t(r,e,t,n,i,a,o){try{var l=r[a](o),s=l.value}catch(u){t(u);return}l.done?e(s):Promise.resolve(s).then(n,i)}function xo(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(s){$t(a,n,i,o,l,"next",s)}function l(s){$t(a,n,i,o,l,"throw",s)}o(void 0)})}}function ko(r,e,t){return e=Oo(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Oo(r){var e=Io(r,"string");return typeof e=="symbol"?e:String(e)}function Io(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 Oe=D.module("DownloadServiceWorkerUtils");class ae{static register(e){ae.serviceWorkerRegistration&&ae.unregisterSW(),"serviceWorker"in navigator?navigator.serviceWorker.register(e).then(t=>{t.update(),ae.serviceWorkerRegistration=t,Oe.info("Registering service worker on ",e,t)}).catch(t=>{Oe.error("Failed to register service worker",t)}):Oe.info("Service worker is not supported.")}static getServiceWorker(){return xo(function*(){if("serviceWorker"in navigator){var e=ae.serviceWorkerRegistration;if(e&&e.active)return Oe.info("Download service worker is active."),e.active;throw new Error("Can not find download service worker.")}throw new Error("Download service worker is not available.")})()}static unregisterSW(){var e;(e=ae.serviceWorkerRegistration)===null||e===void 0||e.unregister()}}ko(ae,"serviceWorkerRegistration",null);const ws=ae;var Do=b.createContext(null);function Ss(){return ze(Do,"No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?")}var Ts=b.createContext(null),Se=Object.freeze({AUTH_PLUGIN:"AuthPlugin",DASHBOARD_PLUGIN:"DashboardPlugin",WIDGET_PLUGIN:"WidgetPlugin",TABLE_PLUGIN:"TablePlugin",THEME_PLUGIN:"ThemePlugin"});function No(r){return"DashboardPlugin"in r}function Fo(r){return"AuthPlugin"in r}function Ao(r){return"TablePlugin"in r}function Ms(r){return No(r)||Fo(r)||Ao(r)}function Cs(r){return"type"in r&&r.type===Se.DASHBOARD_PLUGIN}function Es(r){return"type"in r&&r.type===Se.WIDGET_PLUGIN}function Ps(r){return"type"in r&&r.type===Se.TABLE_PLUGIN}function xs(r){return"type"in r&&r.type===Se.AUTH_PLUGIN}function ks(r){return"type"in r&&r.type===Se.THEME_PLUGIN}export{zi as $,Sn as A,Ie as B,Xo as C,Ho as D,bn as E,sr as F,rs as G,zo as H,G as I,U as J,y as K,Ae as L,Aa as M,Qt as N,be as O,Ne as P,es as Q,oe as R,P as S,h as T,wi as U,S as V,Wn as W,nr as X,ns as Y,ts as Z,qi as _,O as a,Wt as a0,Ba as a1,Wa as a2,N as a3,Za as a4,eo as a5,A as a6,os as a7,or as a8,lo as a9,hn as aA,Wo as aB,as as aC,Ps as aD,Ao as aE,Es as aF,xt as aG,Uo as aH,po as aI,_o as aJ,Ko as aK,cs as aL,Ht as aM,us as aa,hs as ab,ss as ac,ls as ad,ds as ae,no as af,fs as ag,ms as ah,uo as ai,co as aj,gs as ak,Mo as al,lr as am,vs as an,ps as ao,ys as ap,Bo as aq,Ke as ar,Do as as,xs as at,Fo as au,Se as av,ks as aw,Ms as ax,Ts as ay,Qr as az,q as b,c,qo as d,F as e,Nn as f,k as g,Jo as h,bs as i,Yo as j,li as k,Ur as l,qt as m,Qo as n,Ut as o,Cs as p,No as q,Zo as r,tt as s,Ss as t,is as u,ws as v,Vo as w,Go as x,ze as y,Cn as z};
3
+ //# sourceMappingURL=PluginTypes-a8f8e34e.js.map