@deephaven/code-studio 0.52.1-beta.8 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- import{r as S,H as C,b0 as tr,C as m,D as rr,F as I,R as nr,N as p,G as De,a1 as Dt,K as ir,L as pe,b1 as ar,b2 as or,E as Nt,aG as sr,aa as Xe}from"./vendor-9bc0b4ef.js";import{L as N,T as lr,M as ur,b as dr,c as cr,aH as hr,F as fr,bn as mr,bq as gr,aF as pr,a6 as vr,a1 as yr,e as he}from"./index-1b406293.js";import{e as ee,l as de,a as H,K as We,b as Je,R as br}from"./monaco-1410cbed.js";import{P as Ve,b as wr,h as Sr,p as Mr,o as Tr,s as Cr,t as Er,c as _e}from"./plotly-26031571.js";var ro=Object.freeze([]),no=new Map,io=()=>{};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 xr(r,e,t){return e=kr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function kr(r){var e=Pr(r,"string");return typeof e=="symbol"?e:String(e)}function Pr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Or extends Error{constructor(){super(...arguments),xr(this,"isCanceled",!0)}}const Ye=Or;function Ir(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=Dr(r,e);t.forEach(n=>{r[n]=r[n].bind(r)})}function Dr(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 et(r,e,t,n,i,a,o){try{var s=r[a](o),l=s.value}catch(u){t(u);return}s.done?e(l):Promise.resolve(l).then(n,i)}function Nr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(l){et(a,n,i,o,s,"next",l)}function s(l){et(a,n,i,o,s,"throw",l)}o(void 0)})}}function Fr(r){return qe.apply(this,arguments)}function qe(){return qe=Nr(function*(r){var{clipboard:e}=navigator;if(e!==void 0)try{return navigator.clipboard.writeText(r)}catch{return tt(r)}tt(r)}),qe.apply(this,arguments)}function tt(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 me(r,e,t){return e=Ar(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ar(r){var e=Lr(r,"string");return typeof e=="symbol"?e:String(e)}function Lr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Rr="table_",Ft="column_",$r=new Set(["in","not","i","ii","k"]),jr=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"]),_r=/[^a-zA-Z0-9_$+@-]/g,Kr=/[^A-Za-z0-9_$]/g;class K{}me(K,"legalize",(r,e,t,n,i)=>{var a=r.trim().replace(/[- ]/g,"_");return n&&($r.has(a)||jr.has(a))&&(a=e+a),a=a.replace(t,""),a||(a=e+i),Number.isNaN(Number(a.charAt(0)))||(a=e+a),a});me(K,"legalizeTableName",r=>K.legalize(r,Rr,_r,!1,0));me(K,"legalizeColumnNames",r=>{var e=[];return r.forEach((t,n)=>{var i=K.legalizeColumnName(t,n);e.includes(i)&&(i=Ft+n),e.push(i)}),e});me(K,"legalizeColumnName",function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return K.legalize(r,Ft,Kr,!0,e)});me(K,"isValidTableName",r=>K.legalizeTableName(r)===r);me(K,"isValidColumnName",r=>K.legalizeColumnName(r)===r);const ao=K;class At extends CustomEvent{constructor(e,t){super(e,t)}}function Br(r,e,t){return e=Hr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Hr(r){var e=Wr(r,"string");return typeof e=="symbol"?e:String(e)}function Wr(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 Vr extends Error{constructor(){super(...arguments),Br(this,"isTimeout",!0)}}const Lt=Vr;class Ne{static makeCancelable(e,t){var n=!1,i,a,o=new Promise((s,l)=>{a=l,Promise.resolve(e).then(u=>{n?t&&t(u):(i=u,s(u))}).catch(u=>l(u))});return o.cancel=()=>{n=!0,a(new Ye),i!=null&&t&&t(i)},o}static isCanceled(e){return e instanceof Ye}static isTimedOut(e){return e instanceof Lt}static withTimeout(e,t){return new Promise((n,i)=>{setTimeout(()=>{try{n(t())}catch(a){i(a)}},e)})}}function rt(r,e,t){return e=qr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function qr(r){var e=Ur(r,"string");return typeof e=="symbol"?e:String(e)}function Ur(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Gr{constructor(){rt(this,"pending",[]),rt(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 oo=Gr;class Ue{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(!Ue.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 s=a[o],l=s[0],u=s[1];if(l<=n&&i<=u)return a;n<=u&&l<=i&&(n=Math.min(n,l),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 s=a[o],l=s[0],u=s[1];if(!(i<l||u<n))if(l<n&&i<u){a[o]=[l,n-1],a.splice(o+1,0,[i+1,u]);break}else n<=l&&u<=i?a.splice(o,1):l<n?a[o]=[l,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 se=Ue;function*so(r,e){for(var t=r;t<=e;++t)yield t}class zr{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 Qr=zr;function Rt(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)}class Se{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(Se.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])}}Rt(Se,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Rt(Se,"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 lo=Se;function Jr(r,e,t){return e=Yr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Yr(r){var e=en(r,"string");return typeof e=="symbol"?e:String(e)}function en(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 tn extends Error{constructor(){super(...arguments),Jr(this,"isInvalid",!0)}}const uo=tn;function rn(){var r=S.useRef(!1);return S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[]),r}function nt(r,e,t,n,i,a,o){try{var s=r[a](o),l=s.value}catch(u){t(u);return}s.done?e(l):Promise.resolve(l).then(n,i)}function nn(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(l){nt(a,n,i,o,s,"next",l)}function s(l){nt(a,n,i,o,s,"throw",l)}o(void 0)})}}var Be=N.module("useAsyncInterval");function co(r,e){var t=rn(),n=S.useRef(0),i=S.useRef(0),a=S.useRef(null),o=S.useCallback(nn(function*(){var s=Date.now();i.current+=1;var l=a.current==null?e:s-a.current;if(Be.debug("tick #".concat(i.current,"."),l,"ms elapsed since last tick."),a.current=s,yield r(),!!t.current){l+=Date.now()-a.current;var u=Math.max(0,l-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]);S.useEffect(()=>(Be.debug("Setting target interval:",e),a.current=null,o(),()=>{window.clearTimeout(n.current)}),[e,o])}function $t(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"No value available in context. Was code wrapped in a provider?",t=S.useContext(r);if(t==null)throw new Error(e);return t}function ho(r){var e=S.useRef();return S.useEffect(function(){e.current=r}),e.current}function an(r){var e=S.useRef(null);return S.useEffect(function(){r&&(typeof r=="function"?r(e.current):r.current=e.current)}),e}var on=3500,sn=N.module("useCopyToClipboard");function ln(){var[r,e]=S.useState(!1),t=S.useRef(null),n=S.useCallback(i=>{Fr(i).then(()=>{e(!0)}).catch(a=>sn.error("Unable to copy ".concat(i),`
1
+ import{r as S,H as C,b0 as tr,C as m,D as rr,F as I,R as nr,N as p,G as De,a1 as Dt,K as ir,L as pe,b1 as ar,b2 as or,E as Nt,aG as sr,aa as Xe}from"./vendor-9bc0b4ef.js";import{L as N,T as lr,M as ur,b as dr,c as cr,aH as hr,F as fr,bn as mr,bq as gr,aF as pr,a6 as vr,a1 as yr,e as he}from"./index-81fc0d6a.js";import{e as ee,l as de,a as H,K as We,b as Je,R as br}from"./monaco-1410cbed.js";import{P as Ve,b as wr,h as Sr,p as Mr,o as Tr,s as Cr,t as Er,c as _e}from"./plotly-26031571.js";var ro=Object.freeze([]),no=new Map,io=()=>{};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 xr(r,e,t){return e=kr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function kr(r){var e=Pr(r,"string");return typeof e=="symbol"?e:String(e)}function Pr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Or extends Error{constructor(){super(...arguments),xr(this,"isCanceled",!0)}}const Ye=Or;function Ir(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=Dr(r,e);t.forEach(n=>{r[n]=r[n].bind(r)})}function Dr(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 et(r,e,t,n,i,a,o){try{var s=r[a](o),l=s.value}catch(u){t(u);return}s.done?e(l):Promise.resolve(l).then(n,i)}function Nr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(l){et(a,n,i,o,s,"next",l)}function s(l){et(a,n,i,o,s,"throw",l)}o(void 0)})}}function Fr(r){return qe.apply(this,arguments)}function qe(){return qe=Nr(function*(r){var{clipboard:e}=navigator;if(e!==void 0)try{return navigator.clipboard.writeText(r)}catch{return tt(r)}tt(r)}),qe.apply(this,arguments)}function tt(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 me(r,e,t){return e=Ar(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ar(r){var e=Lr(r,"string");return typeof e=="symbol"?e:String(e)}function Lr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Rr="table_",Ft="column_",$r=new Set(["in","not","i","ii","k"]),jr=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"]),_r=/[^a-zA-Z0-9_$+@-]/g,Kr=/[^A-Za-z0-9_$]/g;class K{}me(K,"legalize",(r,e,t,n,i)=>{var a=r.trim().replace(/[- ]/g,"_");return n&&($r.has(a)||jr.has(a))&&(a=e+a),a=a.replace(t,""),a||(a=e+i),Number.isNaN(Number(a.charAt(0)))||(a=e+a),a});me(K,"legalizeTableName",r=>K.legalize(r,Rr,_r,!1,0));me(K,"legalizeColumnNames",r=>{var e=[];return r.forEach((t,n)=>{var i=K.legalizeColumnName(t,n);e.includes(i)&&(i=Ft+n),e.push(i)}),e});me(K,"legalizeColumnName",function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return K.legalize(r,Ft,Kr,!0,e)});me(K,"isValidTableName",r=>K.legalizeTableName(r)===r);me(K,"isValidColumnName",r=>K.legalizeColumnName(r)===r);const ao=K;class At extends CustomEvent{constructor(e,t){super(e,t)}}function Br(r,e,t){return e=Hr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Hr(r){var e=Wr(r,"string");return typeof e=="symbol"?e:String(e)}function Wr(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 Vr extends Error{constructor(){super(...arguments),Br(this,"isTimeout",!0)}}const Lt=Vr;class Ne{static makeCancelable(e,t){var n=!1,i,a,o=new Promise((s,l)=>{a=l,Promise.resolve(e).then(u=>{n?t&&t(u):(i=u,s(u))}).catch(u=>l(u))});return o.cancel=()=>{n=!0,a(new Ye),i!=null&&t&&t(i)},o}static isCanceled(e){return e instanceof Ye}static isTimedOut(e){return e instanceof Lt}static withTimeout(e,t){return new Promise((n,i)=>{setTimeout(()=>{try{n(t())}catch(a){i(a)}},e)})}}function rt(r,e,t){return e=qr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function qr(r){var e=Ur(r,"string");return typeof e=="symbol"?e:String(e)}function Ur(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Gr{constructor(){rt(this,"pending",[]),rt(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 oo=Gr;class Ue{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(!Ue.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 s=a[o],l=s[0],u=s[1];if(l<=n&&i<=u)return a;n<=u&&l<=i&&(n=Math.min(n,l),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 s=a[o],l=s[0],u=s[1];if(!(i<l||u<n))if(l<n&&i<u){a[o]=[l,n-1],a.splice(o+1,0,[i+1,u]);break}else n<=l&&u<=i?a.splice(o,1):l<n?a[o]=[l,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 se=Ue;function*so(r,e){for(var t=r;t<=e;++t)yield t}class zr{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 Qr=zr;function Rt(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)}class Se{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(Se.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])}}Rt(Se,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Rt(Se,"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 lo=Se;function Jr(r,e,t){return e=Yr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Yr(r){var e=en(r,"string");return typeof e=="symbol"?e:String(e)}function en(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 tn extends Error{constructor(){super(...arguments),Jr(this,"isInvalid",!0)}}const uo=tn;function rn(){var r=S.useRef(!1);return S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[]),r}function nt(r,e,t,n,i,a,o){try{var s=r[a](o),l=s.value}catch(u){t(u);return}s.done?e(l):Promise.resolve(l).then(n,i)}function nn(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(l){nt(a,n,i,o,s,"next",l)}function s(l){nt(a,n,i,o,s,"throw",l)}o(void 0)})}}var Be=N.module("useAsyncInterval");function co(r,e){var t=rn(),n=S.useRef(0),i=S.useRef(0),a=S.useRef(null),o=S.useCallback(nn(function*(){var s=Date.now();i.current+=1;var l=a.current==null?e:s-a.current;if(Be.debug("tick #".concat(i.current,"."),l,"ms elapsed since last tick."),a.current=s,yield r(),!!t.current){l+=Date.now()-a.current;var u=Math.max(0,l-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]);S.useEffect(()=>(Be.debug("Setting target interval:",e),a.current=null,o(),()=>{window.clearTimeout(n.current)}),[e,o])}function $t(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"No value available in context. Was code wrapped in a provider?",t=S.useContext(r);if(t==null)throw new Error(e);return t}function ho(r){var e=S.useRef();return S.useEffect(function(){e.current=r}),e.current}function an(r){var e=S.useRef(null);return S.useEffect(function(){r&&(typeof r=="function"?r(e.current):r.current=e.current)}),e}var on=3500,sn=N.module("useCopyToClipboard");function ln(){var[r,e]=S.useState(!1),t=S.useRef(null),n=S.useCallback(i=>{Fr(i).then(()=>{e(!0)}).catch(a=>sn.error("Unable to copy ".concat(i),`
2
2
  `,a))},[]);return S.useEffect(()=>(t.current&&clearTimeout(t.current),r&&(t.current=setTimeout(()=>{e(!1)},on)),()=>{t.current&&clearTimeout(t.current)}),[r]),[r,n]}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 un(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=dn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function dn(r){var e=cn(r,"string");return typeof e=="symbol"?e:String(e)}function cn(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 Ge extends S.Component{constructor(e){super(e),fe(this,"element",void 0),fe(this,"container",void 0),fe(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=un({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 tr(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 m.jsx(rr,{in:o,timeout:n,classNames:"popper-transition",onEntered:this.handleEnter,onExited:this.handleExit,children:m.jsx("div",{onClick:s=>{s.stopPropagation()},onKeyDown:s=>{s.key==="Escape"&&this.hide()},className:I("popper",{interactive:i},e),onBlur:a?this.handleBlur:void 0,tabIndex:a?-1:void 0,role:"presentation",children:m.jsxs("div",{className:"popper-content",children:[t,m.jsx("div",{className:"popper-arrow","x-arrow":""})]})})})}render(){var{popper:e}=this.state,{"data-testid":t}=this.props;return m.jsx("div",{className:"popper-parent-container",ref:this.container,style:{display:"none"},"data-testid":t,children:e&&nr.createPortal(this.renderContent(),this.element)})}}fe(Ge,"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});fe(Ge,"defaultProps",{options:{},className:"",timeout:lr.transitionMs,onEntered(){},onExited(){},isShown:!1,interactive:!1,closeOnBlur:!1,referenceObject:null,"data-testid":void 0});const jt=Ge;function at(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 hn(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?at(Object(t),!0).forEach(function(n){W(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):at(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function W(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)}var gn=N.module("Tooltip");class k extends S.Component{static handleHidden(){k.shownTooltipCount-=1,k.shownTooltipCount===0&&(k.lastHiddenTime=Date.now())}static handleShown(){k.shownTooltipCount+=1}constructor(e){super(e),W(this,"container",void 0),W(this,"popper",void 0),W(this,"parent",void 0),W(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?k.handleShown():k.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();var{isShown:e}=this.state;e&&k.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){gn.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;(k.shownTooltipCount>0||Date.now()-k.lastHiddenTime<k.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:s}=this.state,{options:l}=this.props;return l=hn({placement:"bottom"},l),m.jsx("div",{ref:this.container,style:{display:"none"},"data-testid":a,children:m.jsx(jt,{className:I(i),options:l,ref:this.popper,onEntered:o,onExited:this.handleExited,interactive:e,referenceObject:n,children:m.jsxs("div",{className:"tooltip-content",children:[" ",s&&t]})})})}}W(k,"defaultTimeout",500);W(k,"defaultReshowTimeout",100);W(k,"triggerReshowThreshold",300);W(k,"shownTooltipCount",0);W(k,"lastHiddenTime",Date.now());W(k,"defaultProps",{interactive:!1,options:{},popperClassName:"",reshowTimeout:k.defaultReshowTimeout,timeout:k.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0});const pn=k;function Ae(r){var{children:e,className:t,style:n,"data-testid":i}=r;return m.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 vn=["kind","variant","type","tooltip","icon","disabled","active","onClick","onContextMenu","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","onKeyDown","className","style","children","tabIndex","data-testid","aria-label"];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 st(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){yn(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 yn(r,e,t){return e=bn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function bn(r){var e=wn(r,"string");return typeof e=="symbol"?e:String(e)}function wn(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 Sn(r,e){if(r==null)return{};var t=Mn(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 Mn(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 Tn=["primary","secondary","tertiary","success","danger","inline","ghost"],Cn=["group-end"];function En(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 xn(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:s=!1,active:l,onClick:u,onContextMenu:d,onMouseDown:f,onMouseUp:g,onMouseEnter:v,onMouseLeave:b,onKeyDown:M,className:T,style:j,children:R,tabIndex:B,"data-testid":V,"aria-label":ue}=r,$=Sn(r,vn),q=!!(o&&R==null),Z=En(t,q),Te;n&&(Te=xn(n));var Ce;o&&(Ce=C.isValidElement(o)?o:m.jsx(De,{icon:o}));var ge;a!==void 0&&(ge=typeof a=="string"?m.jsx(pn,{children:a}):a);var Ee=ue;ue===void 0&&q&&a!=null&&typeof a=="string"&&(Ee=a);var xe=m.jsxs("button",st(st({"data-testid":V,ref:e,type:i,className:I("btn",Z,Te,{active:l},T),onClick:u,onContextMenu:d,onMouseUp:g,onMouseDown:f,onMouseEnter:v,onMouseLeave:b,onKeyDown:M,style:j,disabled:s,tabIndex:B,"aria-label":Ee},$),{},{children:[o&&Ce,R,a!=null&&!s&&ge]}));return s?m.jsxs("span",{className:"btn-disabled-wrapper",children:[xe,a!==void 0&&ge]}):xe});Le.displayName="Button";Le.propTypes={kind:p.oneOf(Tn).isRequired,variant:p.oneOf(Cn),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 kn(r){var{className:e="modal-footer",children:t,"data-testid":n}=r;return m.jsx("div",{className:e,"data-testid":n,children:t})}function _t(r){var{isOpen:e,headerText:t,bodyText:n,onCancel:i,onConfirm:a,onDiscard:o,onModalDisable:s,cancelButtonText:l="Cancel",confirmButtonText:u="Okay",discardButtonText:d="Discard",isConfirmDanger:f=!1,children:g,"data-testid":v}=r,b=S.useRef(null),M=S.useRef(null),T=S.useCallback(()=>{M.current!==null&&M.current.checked&&s&&s(),a()},[a,s]),j=S.useCallback(()=>{var B;(B=b.current)===null||B===void 0||B.focus()},[]),R="";return e&&(R=typeof n=="function"?n():n),m.jsxs(ur,{isOpen:e,className:"theme-bg-light",onOpened:j,children:[m.jsx(dr,{closeButton:!1,children:t}),m.jsx(cr,{children:R}),m.jsxs(kn,{children:[s&&m.jsxs("div",{className:"custom-control custom-checkbox form-group mr-auto",children:[m.jsx("input",{type:"checkbox",className:"custom-control-input",id:"move-confirmation-checkbox",defaultChecked:!1,ref:M,"data-testid":v!==void 0?"".concat(v,"-checkbox-confirm"):void 0}),m.jsx("label",{className:"custom-control-label",htmlFor:"move-confirmation-checkbox",children:"Don't ask me again"})]}),o&&m.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&&m.jsx(Ie,{kind:"secondary","data-dismiss":"modal",onClick:i,"data-testid":v!==void 0?"".concat(v,"-btn-cancel"):void 0,children:l}),m.jsxs(Ae,{children:[m.jsx(Ie,{kind:f?"danger":"primary",onClick:T,ref:b,"data-testid":v!==void 0?"".concat(v,"-btn-confirm"):void 0,children:u}),g]})]})]})}_t.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};_t.defaultProps={children:void 0,cancelButtonText:"Cancel",confirmButtonText:"Okay",discardButtonText:"Discard",onCancel:void 0,onDiscard:void 0,onModalDisable:void 0,"data-testid":void 0};function Pn(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)}function He(r){return r.then!==void 0}class ae{static disableAllActions(){ae.actionsDisabled=!0}static enableAllActions(){ae.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 s,l;return((s=e.title)!==null&&s!==void 0?s:"")>((l=t.title)!==null&&l!==void 0?l:"")?1:-1}return e!==t?e>t?1:-1:0}static sortActions(e){if(e==null||!Array.isArray(e))return[];var t=e.slice();return t.sort(ae.compareActions),t}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static getModifierKey(){return ae.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=ae.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],s=void 0;typeof o=="function"?s=o():s=o,s!=null&&(s instanceof Promise?t&&n.push(s):Array.isArray(s)?n=n.concat(s):n.push(s))}return n=n.filter(l=>l.title!==void 0||l.then!=null||l.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,s=n[o];if(!(s instanceof Promise)&&s.disabled!==!0)return o}return e}}Pn(ae,"actionsDisabled",!1);const P=ae;var lt=N.module("GlobalContextAction");class Dn extends S.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),lt.debug("Received context menu event at global action! Menu items are now: ",t.contextActions))}handleKeyDown(e){var{action:t}=this.props;if(!P.actionsDisabled&&t.shortcut!==void 0&&t.shortcut.matchesEvent(e)){var n;lt.debug("Global hotkey matched!",e),(n=t.action)===null||n===void 0||n.call(t,e),e.preventDefault(),e.stopPropagation()}}render(){return null}}const Nn=Dn;class Fn extends S.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 s=m.jsx(Nn,{action:a,"data-testid":t},"".concat(a.title,".").concat(o?.id));n.push(s)}}return n}}const An=Fn;function Kt(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)}var ke=N.module("ContextActions");class Bt extends S.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),Kt(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(f=>u.contains(f));if(d!==void 0)return ke.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(P.isContextActionEvent(e)||(e.contextActions=[]),!!P.isContextActionEvent(e)){var{actions:o}=this.props;if(o!=null){var s=o;Array.isArray(s)&&(s=s.filter(l=>He(l)||typeof l=="function"||l.isGlobal===void 0||!l.isGlobal)),e.contextActions=e.contextActions.concat(s)}ke.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(!P.actionsDisabled&&i.shortcut!=null&&i.shortcut.matchesEvent(e)){var a;ke.debug("Context hotkey matched!",e),(a=i.action)===null||a===void 0||a.call(i,e),e.stopPropagation(),e.preventDefault(),ke.debug2("Matched hotkey returned false, key event not consumed")}}}render(){var{"data-testid":e}=this.props,{globalActions:t}=this.state;return m.jsx("div",{className:"context-actions-listener",ref:this.container,"data-testid":e,children:m.jsx(An,{actions:t})})}}Kt(Bt,"groups",{default:void 0,high:100,medium:5e3,low:1e4,global:1e5,edit:100});const fo=Bt;var ze=C.forwardRef((r,e)=>{var t;function n($){var{menuItem:q,onMenuItemClick:Z}=r;Z(q,$)}function i($){var{menuItem:q,onMenuItemMouseMove:Z}=r;Z(q,$)}function a($){var{menuItem:q,onMenuItemContextMenu:Z}=r;Z(q,$)}function o($,q,Z){if(typeof $.type=="string")return $;var{closeMenu:Te,menuItem:Ce,isKeyboardSelected:ge,isMouseSelected:Ee,"data-testid":xe}=r,er={menuItem:Ce,closeMenu:Te,isKeyboardSelected:ge,isMouseSelected:Ee,iconElement:q,displayShortcut:Z,"data-testid":xe};return C.cloneElement($,{forwardedProps:er})}var{children:s,menuItem:l,isKeyboardSelected:u=!1,isMouseSelected:d=!1,"data-testid":f}=r,g=(t=l.shortcut)===null||t===void 0?void 0:t.getDisplayText(),v=null;if(l.icon){var b=l.icon;if(C.isValidElement(b))v=b;else{var M;l.iconColor!=null&&(l.disabled===void 0||!l.disabled)&&(M={color:l.iconColor}),v=m.jsx(De,{icon:b,style:M})}}var T=null,j=!!s;l.actions&&(T=m.jsx(De,{icon:hr}));var R=null;if(l.menuElement)R=m.jsx("div",{className:"custom-menu-item",onMouseMove:i,children:o(l.menuElement,v,g)});else{var B,V=l.disabled,ue=l.iconOutline;R=m.jsx("button",{type:"button",className:I("btn-context-menu",{disabled:V},{active:(j||d)&&(V===void 0||!V)},{"keyboard-active":u&&(V===void 0||!V)}),onClick:n,onMouseMove:i,onContextMenu:a,title:(B=l.description)!==null&&B!==void 0?B:"",children:m.jsxs("div",{className:"btn-context-menu-wrapper",children:[m.jsx("span",{className:I("icon",{outline:ue}),children:v}),m.jsx("span",{className:"title",children:l.title}),g!==void 0&&m.jsx("span",{className:"shortcut",children:g}),T&&m.jsx("span",{className:I("submenu-indicator",{disabled:V}),children:T})]})})}return m.jsxs("div",{className:"context-menu-item",ref:e,"data-testid":f,children:[s,R]})});ze.displayName="ContextMenuItem";ze.defaultProps={children:null,isKeyboardSelected:!1,isMouseSelected:!1,"data-testid":void 0};const Ht=ze;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 $n(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){te(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 te(r,e,t){return e=jn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function jn(r){var e=_n(r,"string");return typeof e=="symbol"?e:String(e)}function _n(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var dt=N.module("ContextMenu");class ye extends S.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),te(this,"container",void 0),te(this,"oldFocus",void 0),te(this,"activeSubMenuRef",void 0),te(this,"subMenuTimer",void 0),te(this,"rAF",void 0),te(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=P.getMenuItems(n),a=[],o=i.length-1;o>=0;o-=1){var s=i[o];s instanceof Promise?this.initMenuPromise(s):a.push(s)}this.setState({mouseIndex:-1,keyboardIndex:t,activeSubMenu:null,menuItems:P.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:P.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}),dt.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:s,subMenuParentHeight:l,top:u,left:d}=this.props;if(!(!this.container.current||a.doNotVerifyPosition!=null&&a.doNotVerifyPosition)){var{top:f,left:g}=this.initialPosition,{width:v,height:b}=(e=(t=this.container.current)===null||t===void 0?void 0:t.getBoundingClientRect())!==null&&e!==void 0?e:{width:0,height:0},M=((n=(i=this.container.current)===null||i===void 0?void 0:i.scrollHeight)!==null&&n!==void 0?n:0)>window.innerHeight;b===0||v===0||(f+b>window.innerHeight&&(f-b-l>0?f-=b-l:f=window.innerHeight-b),g+v>window.innerWidth&&(g=g-v-s),(d!==g||u!==f)&&(this.setState({hasOverflow:M}),o(f,g)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){dt.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=P.getNextMenuItem(i,-1,t):(e.key==="ArrowDown"||e.key==="Tab")&&(i=P.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:s,mouseIndex:l,pendingItems:u,subMenuTop:d,subMenuLeft:f,subMenuParentWidth:g,subMenuParentHeight:v}=this.state,b=0;b<s.length;b+=1){var M=s[b];b>0&&M.group!==s[b-1].group&&e.push(m.jsx("hr",{},"".concat(b,".separator")));var T=m.jsx(Ht,{ref:i===b?this.activeSubMenuRef:null,isKeyboardSelected:o===b,isMouseSelected:l===b,menuItem:M,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},b);e.push(T)}var j=null;u.length>0&&(j=m.jsx("div",{className:"loading",children:m.jsx(fr,{className:"loading-spinner-vertical-align"})}));var{menuStyle:R,"data-testid":B}=this.props,V=i!==null&&d!==null&&f!==null;return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:I({"has-overflow":a},"context-menu-container"),style:$n({top:t,left:n},R),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:ye.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":B,children:[e,j]}),V&&i!==null&&d!==null&&f!==null&&m.jsx(ye,{actions:s[i].actions||[],closeMenu:this.handleCloseSubMenu,top:d,left:f,updatePosition:(ue,$)=>{this.setState({subMenuTop:ue,subMenuLeft:$})},subMenuParentWidth:g,subMenuParentHeight:v},"sub-".concat(i))]})}}te(ye,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const Kn=ye;function ct(r,e,t){return e=Bn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Bn(r){var e=Hn(r,"string");return typeof e=="symbol"?e:String(e)}function Hn(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 Wn extends S.Component{constructor(e){super(e),ct(this,"container",void 0),ct(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 s=document.elementFromPoint(i,n),l=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});s?.dispatchEvent(l)});return}if(P.isContextActionEvent(e)&&!(e.metaKey||e.ctrlKey)){var o=P.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=m.jsx(Kn,{ref:this.openMenu,actions:n,onMenuClosed:this.handleMenuClose,top:i,left:a,updatePosition:(o,s)=>{this.setState({top:o,left:s})},"data-testid":t})),m.jsx("div",{className:I("context-menu-root",{active:n}),ref:this.container,children:e})}}const mo=Wn;var Re=C.forwardRef((r,e)=>{var{checked:t=!1,children:n,className:i,disabled:a,inputClassName:o,isInvalid:s,labelClassName:l,name:u,onChange:d,"data-testid":f}=r,[g]=S.useState(Dt()),v=an(e);S.useEffect(function(){v.current&&(v.current.indeterminate=t===null)},[v,t]);var b=S.useCallback(M=>{v.current&&(v.current.indeterminate=t===null),d&&d(M)},[v,t,d]);return m.jsxs("div",{className:I("custom-control custom-checkbox",i),children:[m.jsx("input",{type:"checkbox",ref:v,checked:t??!1,className:I("custom-control-input",o,{"is-invalid":s}),disabled:a,id:g,name:u,onChange:b,"data-testid":f}),m.jsx("label",{className:I("custom-control-label",l),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 go=Re;function Wt(r,e,t){return e=Vn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Vn(r){var e=qn(r,"string");return typeof e=="symbol"?e:String(e)}function qn(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 Vt extends S.PureComponent{constructor(e){super(e),Wt(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:s,id:l,onKeyDown:u,"data-testid":d}=this.props;return m.jsxs("div",{className:I("search-group",a),children:[m.jsx("input",{type:"search",value:e,onBlur:n,onChange:i,onKeyDown:u,className:"form-control",disabled:o,placeholder:t,ref:this.inputField,id:l,"data-testid":d}),s!=null&&m.jsx("span",{className:"search-match",children:s}),m.jsx("span",{className:"search-icon",children:m.jsx(De,{icon:mr})})]})}}Wt(Vt,"defaultProps",{placeholder:"Search",className:"",matchCount:null,onKeyDown(){},id:"","data-testid":void 0});const Un=Vt;function po(r){var{copy:e,kind:t="ghost",tooltip:n="Copy",className:i,"data-testid":a,children:o}=r,[s,l]=ln();return m.jsx(Ie,{kind:t,className:i,"data-testid":a,icon:s?gr:pr,tooltip:s?"Copied":n,onClick:()=>{l(typeof e=="function"?e():e)},children:o})}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 Gn(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){ve(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 ve(r,e,t){return e=zn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function zn(r){var e=Qn(r,"string");return typeof e=="symbol"?e:String(e)}function Qn(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 qt extends S.PureComponent{constructor(e){var t;super(e),ve(this,"container",void 0),ve(this,"oldFocus",void 0),ve(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=P.getMenuItems(e,!1);t.length>0&&this.setState(n=>({menuItems:P.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=P.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=P.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 s=i[o];o>0&&s.group!==i[o-1].group&&e.push(m.jsx("hr",{},"".concat(o,".separator")));var l=m.jsx(Ht,{isKeyboardSelected:n===o,isMouseSelected:a===o,menuItem:s,closeMenu:this.handleCloseMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:()=>!1},o);e.push(l)}var{menuStyle:u}=this.props;return m.jsx("div",{className:"context-menu-container",style:Gn({},u),ref:this.container,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,role:"menuitem",tabIndex:0,"data-testid":t,children:e})}}ve(qt,"defaultProps",{closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const Zn=qt;function ft(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 mt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ft(Object(t),!0).forEach(function(n){ce(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ft(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ce(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)}class Ut extends S.PureComponent{constructor(e){super(e),ce(this,"container",void 0),ce(this,"parent",void 0),ce(this,"popper",void 0),ce(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:s}=this.props;return s=mt({placement:"bottom"},s),o=mt({separateKeyboardMouse:!0},o),m.jsx("div",{className:"menu-actions-listener",ref:this.container,"data-testid":i,children:m.jsx(jt,{ref:this.popper,options:s,className:I("menu-popper",n),onExited:this.handleExited,closeOnBlur:!0,interactive:!0,children:m.jsx(Zn,{actions:e,closeMenu:this.handleCloseMenu,onMenuOpened:t,options:o,menuStyle:a})})})}}ce(Ut,"defaultProps",{isShown:null,onMenuClosed(){},onMenuOpened(){},options:{},popperOptions:{},popperClassName:"",menuStyle:{},"data-testid":void 0});const vo=Ut;function Gt(r,e,t){return e=Yn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Yn(r){var e=ei(r,"string");return typeof e=="symbol"?e:String(e)}function ei(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 zt extends S.PureComponent{constructor(e){super(e),Gt(this,"searchInput",void 0),this.searchInput=C.createRef(),this.handleChange=this.handleChange.bind(this),this.sendUpdate=ir(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 m.jsx(Un,{value:o,placeholder:e,onChange:this.handleChange,className:t,matchCount:n,ref:this.searchInput,id:i,"data-testid":a})}}Gt(zt,"defaultProps",{placeholder:"Search",className:"",matchCount:null,debounceMs:250,id:"","data-testid":void 0});const yo=zt;function Qt(r,e,t){return e=ti(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ti(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 ni=N.module("ItemListItem");class $e extends S.Component{static handleKeyDown(){return ni.log("ItemListItem.handleKeyDown false"),!1}constructor(e){super(e),Qt(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 m.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})}}Qt($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 ii=$e;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){_(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 _(r,e,t){return e=ai(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ai(r){var e=oi(r,"string");return typeof e=="symbol"?e:String(e)}function oi(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var vt=N.module("ItemList"),yt=5;class G extends S.PureComponent{static renderItem(e){var t,n,{item:i}=e;return m.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),_(this,"list",void 0),_(this,"listContainer",void 0),_(this,"getItemSelected",pe((i,a)=>se.isSelected(a,i),{max:G.CACHE_SIZE})),_(this,"getCachedItem",pe((i,a,o,s,l,u,d,f)=>{var g=u({item:o,itemIndex:i,isFocused:s,isSelected:l,style:d});return m.jsx(ii,{onContextMenu:this.handleItemContextMenu,onDoubleClick:this.handleItemDoubleClick,onMouseDown:this.handleItemMouseDown,onFocus:this.handleItemFocus,onBlur:this.handleItemBlur,disableSelect:f,onMouseMove:this.handleItemMouseMove,onMouseUp:this.handleItemMouseUp,isFocused:s,isSelected:l,itemIndex:i,style:d,children:g},a)},{max:G.CACHE_SIZE})),_(this,"getOuterElement",pe(i=>{var a=C.forwardRef((o,s)=>m.jsx("div",pt({ref:s,tabIndex:-1,onKeyDown:i,role:"presentation"},o)));return a.displayName="ItemListOuterElement",a})),_(this,"getInnerElement",pe(()=>{var i=C.forwardRef((a,o)=>m.jsx("div",pt({className:"item-list-inner-element",ref:o},a)));return i.displayName="ItemListInnerElement",i})),_(this,"getItemData",pe((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:s,height:l,selectedRanges:u}=this.state;if(o&&!this.isListAtBottom()&&i>0&&this.scrollToBottom(),(s!==t.scrollOffset||l!==t.height)&&this.sendViewportUpdate(),n!==e.selectedRanges&&n!==u)this.setSelectedRanges(n);else if(u!==t.selectedRanges){var{onSelectionChange:d}=this.props;d(u)}if(a!==t.focusIndex){var{onFocusChange:f}=this.props;f(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=se.isSelected(n,e),a=i||P.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:se.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){vt.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){vt.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:s,mouseX:l,mouseY:u}=this.state;if(!(o==null||a)){var d=Math.abs(t.clientX-(l??0)),f=Math.abs(t.clientY-(u??0));d>yt&&f>yt&&this.setState({isDragging:!0}),(n||o===e)&&(this.focusItem(e),i?(!n&&!this.getItemSelected(e,s)&&!P.isModifierKeyDown(t)&&this.deselectAll(),this.selectRange([Math.min(o,e),Math.max(o,e)])):this.toggleSelect(e,t.shiftKey,P.isModifierKeyDown(t),!1))}}handleItemMouseUp(e,t){var{isDeselectOnClick:n,isDoubleClickSelect:i,onSelect:a}=this.props,{mouseDownIndex:o,isDragging:s}=this.state;if(!(t.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(t.target.tagName.toLowerCase())!==-1)){if(o===e&&!s){var l=t.shiftKey,u=P.isModifierKeyDown(t);this.focusItem(e),this.toggleSelect(e,l,u,n),!i&&!l&&!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:s}=this.state;if(e.shiftKey&&s.length>0){var l=s[s.length-1];this.selectRange([Math.min(o,l[0]),Math.max(o,l[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,s=a&&this.isListAtBottom({scrollOffset:n,height:o});return{isStuckToBottom:s,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 s=o[o.length-1];this.selectRange([Math.min(s[0],e),Math.max(e,s[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){se.validateRange(e),this.setState(t=>{var{selectedRanges:n}=t;return{selectedRanges:se.deselectRange(n,e)}})}selectItem(e){var{disableSelect:t}=this.props;t||this.selectRange([e,e])}selectRange(e){se.validateRange(e),this.setState(t=>{var{selectedRanges:n}=t;return{selectedRanges:se.selectRange(n,e)}})}setSelectedRanges(e){this.setState({selectedRanges:e})}sendViewportUpdate(){var{scrollOffset:e,height:t}=this.state;if(e!=null&&t!=null){var{onViewportChange:n,rowHeight: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:s}=this.props,{focusIndex:l,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===l&&!s,this.getItemSelected(t,u),o,n,s)}render(){var{items:e,itemCount:t,overscanCount:n,renderItem:i,rowHeight:a,"data-testid":o}=this.props,{selectedRanges:s,isStuckToBottom:l}=this.state;return m.jsx(ar,{className:"item-list-auto-sizer",onResize:this.handleResize,children:u=>{var{width:d,height:f}=u;return m.jsx(or,{className:"item-list-scroll-pane",height:f,width:d,initialScrollOffset:l?t*a:0,itemCount:t,itemSize:a,itemData:this.getItemData(e,s,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})}})}}_(G,"CACHE_SIZE",1e3);_(G,"DEFAULT_ROW_HEIGHT",20);_(G,"DEFAULT_OVERSCAN",10);_(G,"defaultProps",{offset:0,items:[],rowHeight:G.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!1,isDragSelect:!0,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},overscanCount:G.DEFAULT_OVERSCAN,renderItem:G.renderItem,selectedRanges:[],focusSelector:".item-list-item","data-testid":void 0});function bo(r){var{on:e,id:t,className:n,isInvalid:i,disabled:a=!1,onClick:o,"data-testid":s}=r;return m.jsx("button",{type:"button",className:I("btn","btn-switch",n,{active:e},{"is-invalid":i}),id:t,onClick:o,disabled:a,"data-testid":s,children:m.jsx("div",{className:"handle"})})}function re(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=li(r,"string");return typeof e=="symbol"?e:String(e)}function li(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=N.module("Shortcut"),w;(function(r){r.CTRL="MODIFIER_CTRL",r.CMD="MODIFIER_CMD",r.ALT="MODIFIER_ALT",r.OPTION="MODIFIER_OPTION",r.SHIFT="MODIFIER_SHIFT"})(w||(w={}));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 ui=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 x extends Nt{static isAllowedKey(e){return Object.values(y).includes(e)}static isValidKeyState(e){var{keyValue:t}=e;if(t===null)return!0;if(!x.isMacPlatform&&e.metaKey||!x.isAllowedKey(t))return!1;var n=!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey;return!n||ui.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 w.CTRL:t.ctrlKey=!0;break;case w.ALT:case w.OPTION:t.altKey=!0;break;case w.CMD:t.metaKey=!0;break;case w.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="":!x.isAllowedKey(t)&&x.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?"":x.isMacPlatform?x.getMacDisplayText(e):x.getWindowsDisplayText(e)}constructor(e){var{id:t,shortcut:n,macShortcut:i,isEditable:a=!0,name:o,tooltip:s}=e;super(),re(this,"id",void 0),re(this,"name",void 0),re(this,"tooltip",void 0),re(this,"isEditable",void 0),re(this,"defaultKeyState",void 0),re(this,"keyState",void 0),this.id=t,this.name=o,this.tooltip=s,this.isEditable=a;var l=x.isMacPlatform,u=l?i:n;this.defaultKeyState=x.createKeyState(u),this.keyState=this.defaultKeyState}getDisplayText(){return x.getDisplayText(this.keyState)}getKeyState(){return this.keyState}setKeyState(e){x.isValidKeyState(e)?(bt.debug2("Shortcut ".concat(this.id," updated to ").concat(JSON.stringify(e))),this.keyState=e,this.dispatchEvent(new At("onUpdate",{detail:this}))):bt.debug2("Shortcut ".concat(this.id," tried to update to invalid keyState ").concat(JSON.stringify(e)))}getDefaultKeyState(){return this.defaultKeyState}isDefault(){return x.doKeyStatesMatch(this.getDefaultKeyState(),this.getKeyState())}setToNull(){this.setKeyState(x.NULL_KEY_STATE)}isNull(){return x.doKeyStatesMatch(this.keyState,x.NULL_KEY_STATE)}setToDefault(){this.setKeyState(this.defaultKeyState)}matchesKeyState(e){return x.doKeyStatesMatch(e,this.keyState)}matchesEvent(e){return this.matchesKeyState(x.getKeyStateFromEvent(e))}}re(x,"NULL_KEY_STATE",{metaKey:!1,shiftKey:!1,altKey:!1,ctrlKey:!1,keyValue:null});re(x,"isMacPlatform",P.isMacPlatform());function wt(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)}var St=N.module("ShortcutRegistry");class hi extends Nt{constructor(){super(...arguments),wt(this,"shortcutMap",new Map),wt(this,"shortcutsByCategory",new Map)}createAndAdd(e){var t=new x(e);return this.add(t)}add(e){var t=this.shortcutMap.get(e.id);if(t)return St.warn("Skipping attempt to add duplicate shortcut ID to registry: ".concat(e.id)),t;St.debug2("Adding shortcut to registry: ".concat(e.id)),e.addEventListener("onUpdate",a=>{var{detail:o}=a;return this.dispatchEvent(new At("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 fi=Object.freeze(new hi);const A=fi;var mi={COPY:A.createAndAdd({id:"GLOBAL.COPY",name:"Copy",shortcut:[w.CTRL,y.C],macShortcut:[w.CMD,y.C],isEditable:!1}),PASTE:A.createAndAdd({id:"GLOBAL.PASTE",name:"Paste",shortcut:[w.CTRL,y.V],macShortcut:[w.CMD,y.V],isEditable:!1}),SAVE:A.createAndAdd({id:"GLOBAL.SAVE",name:"Save",shortcut:[w.CTRL,y.S],macShortcut:[w.CMD,y.S],isEditable:!1}),SELECT_ALL:A.createAndAdd({id:"GLOBAL.SELECT_ALL",name:"Select All",shortcut:[w.CTRL,y.A],macShortcut:[w.CMD,y.A],isEditable:!1}),LINKER:A.createAndAdd({id:"GLOBAL.LINKER",name:"Linker",shortcut:[w.CTRL,y.L],macShortcut:[w.CMD,y.L]}),LINKER_CLOSE:A.createAndAdd({id:"GLOBAL.LINKER_CLOSE",name:"Close Linker Overlay",shortcut:[y.ESCAPE],macShortcut:[y.ESCAPE],isEditable:!1})};const wo=mi;function So(){return $t(vr,"No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?")}const gi="var(--dh-color-editor-bg)",pi="var(--dh-color-editor-fg)",vi="var(--dh-color-editor-string)",yi="var(--dh-color-editor-delimiter)",bi="var(--dh-color-editor-predefined)",wi="var(--dh-color-editor-keyword)",Si="var(--dh-color-editor-storage)",Mi="var(--dh-color-editor-number)",Ti="var(--dh-color-editor-operator)",Ci="var(--dh-color-editor-identifier)",Ei="var(--dh-color-editor-comment)",Mt={"error-foreground":"var(--dh-color-editor-error-fg)",background:gi,foreground:pi,"line-height":"19px",string:vi,"string-delim":"var(--dh-color-editor-string-delim)",delimiter:yi,predefined:bi,keyword:wi,storage:Si,number:Mi,operator:Ti,identifier:Ci,"namespace-identifier":"var(--dh-color-editor-identifier-namespace)","identifier-js":"var(--dh-color-editor-identifier-js)",comment:Ei,"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 xi="python",ki={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/}}},Pi={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"]]}},Oi={id:xi,conf:ki,language:Pi};const Ii=Oi;var Di="groovy",Ni={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/}}},Fi={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"]]}},Ai={id:Di,conf:Ni,language:Fi};const Li=Ai;var Ri="scala",$i={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>))/}}},ji={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"]]}},_i={id:Ri,conf:$i,language:ji};const Ki=_i;var Bi="deephavenDb",Hi={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/}}},Wi={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"]]}},Vi={id:Bi,conf:Hi,language:Wi};const qi=Vi;var Ui="log",Gi={},zi={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"}]]}},Qi={id:Ui,conf:Gi,language:zi};const Zi=Qi;function Tt(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 Ct(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Tt(Object(t),!0).forEach(function(n){Xi(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Tt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Xi(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=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 X=N.module("MonacoUtils");class ne{static init(){var{getWorker:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};X.debug("Initializing Monaco..."),e!==void 0&&ne.registerGetWorker(e);var{registerLanguages:t,removeHashtag:n}=ne,i=yr(Mt);X.debug2("Monaco theme:",Mt),X.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"]};ee.defineTheme("dh-dark",{base:"vs-dark",inherit:!0,rules:a,colors:o});try{ee.setTheme("dh-dark")}catch{X.error("Failed to set 'dh-dark' Monaco theme, falling back to vs-dark"),ee.setTheme("vs-dark")}t([qi,Ii,Li,Zi,Ki]),ne.removeConflictingKeybindings(),X.debug("Monaco initialized.")}static registerGetWorker(e){window.MonacoEnvironment=Ct(Ct({},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});de.getLanguages().filter(n=>{var{id:i}=n;return t.includes(i)}).forEach(n=>{var i=n;X.debug2("Overriding default language loader:",i.id)}),e.forEach(n=>{ne.registerLanguage(n)})}static registerLanguage(e){X.debug2("Registering language: ",e.id),de.register(e),de.onLanguage(e.id,()=>{de.setLanguageConfiguration(e.id,e.conf),de.setMonarchTokensProvider(e.id,e.language)})}static setEOL(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.EndOfLineSequence.LF;(t=e.getModel())===null||t===void 0||t.setEOL(n)}static openDocument(e,t){var n=e.getModel();he(n);var i={textDocument:{uri:"".concat(n.uri),languageId:n.getLanguageId(),version:n.getVersionId(),text:n.getValue()}};X.debug2("didOpenDocumentParams: ",i),t.openDocument(i);var a=e.onDidChangeModelContent(o=>{for(var{changes:s,versionId:l}=o,u=[],d=0;d<s.length;d+=1){var f=s[d],{range:g,rangeLength:v,text:b}=f,M={range:{start:{line:g.startLineNumber-1,character:g.startColumn-1},end:{line:g.endLineNumber-1,character:g.endColumn-1}},rangeLength:v,text:b};u.push(M)}if(u.length>0){var T={textDocument:{version:l,uri:"".concat(n.uri)},contentChanges:u};X.debug2("didChangeDocumentParams",T),t.changeDocument(T)}});return a}static closeDocument(e,t){var n=e.getModel();he(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();he(o);var s=o.getValueInRange(t.range);(n.test(s)||i.test(s)||a.test(s))&&o.applyEdits([{range:t.range,text:s.replace(n,'"').replace(i,"").replace(a," ")}])})}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static removeConflictingKeybindings(){ee.addKeybindingRule({keybinding:H.CtrlCmd|We.KeyD,command:null}),ne.isMacPlatform()||ee.addKeybindingRule({keybinding:H.CtrlCmd|We.KeyH,command:null})}static disableKeyBindings(e,t){e.addAction({id:"disable-keybindings-".concat(Dt()),label:"",keybindings:t,run:()=>{}})}static getMonacoKeyCodeFromShortcut(e){var{keyState:t}=e,{keyValue:n}=t;if(n===null)return 0;var i=ne.isMacPlatform();return i?(t.metaKey?H.CtrlCmd:0)|(t.shiftKey?H.Shift:0)|(t.altKey?H.Alt:0)|(t.ctrlKey?H.WinCtrl:0)|Je.fromString(n):(t.ctrlKey?H.CtrlCmd:0)|(t.shiftKey?H.Shift:0)|(t.altKey?H.Alt:0)|(t.metaKey?H.WinCtrl:0)|Je.fromString(n)}static provideLinks(e){for(var t=[],n=function(o){var s=e.getLineContent(o),l=sr(s),u=l.filter(d=>d.type==="url"?/^https?:\/\//.test(d.value):!0);u.forEach(d=>{t.push({url:d.href,range:new br(o,d.start+1,o,d.end+1)})})},i=1;i<=e.getLineCount();i+=1)n(i);return{links:t}}}const ea=ne;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 ta(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){Fe(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 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=na(r,"string");return typeof e=="symbol"?e:String(e)}function na(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 Zt extends S.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();he(t),ee.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=ta({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),he(this.container),this.editor=ee.create(this.container,t),this.editor.addAction({id:"find",label:"Find",keybindings:[H.CtrlCmd|We.KeyF],precondition:void 0,keybindingContext:void 0,contextMenuGroupId:"navigation",contextMenuOrder:1,run:()=>{this.toggleFind()}}),this.editor.layout(),de.registerLinkProvider("plaintext",{provideLinks:ea.provideLinks}),e(this.editor)}destroyEditor(){var{onEditorWillDestroy:e}=this.props;he(this.editor),e(this.editor),this.editor.dispose(),this.editor=void 0}render(){var{className:e}=this.props;return m.jsx("div",{className:I("editor-container",e),ref:t=>{this.container=t}})}}Fe(Zt,"defaultProps",{className:"fill-parent-absolute",onEditorInitialized:()=>{},onEditorWillDestroy:()=>{},settings:{}});const Mo=Zt;function Qe(r,e,t){return e=ia(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ia(r){var e=aa(r,"string");return typeof e=="symbol"?e:String(e)}function aa(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}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""}}Qe(je,"TYPE_GLOBAL","type-global");Qe(je,"TYPE_CONTEXT_PRESET","type-context-preset");Qe(je,"TYPE_CONTEXT_CUSTOM","type-context-custom");const L=je;class oa extends L{format(e){switch(e){case 1:case!0:return"true";case 0:case!1:return"false";default:return""}}}const sa=oa;class la extends L{format(e){return String.fromCharCode(e)}}const ua=la;function ie(r,e,t){return e=da(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function da(r){var e=ca(r,"string");return typeof e=="symbol"?e:String(e)}function ca(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var xt=N.module("DateTimeColumnFormatter");class U extends L{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]:L.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=U.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=U.makeFormatStringMap(e,t);return[...n.keys()]}constructor(e){var{timeZone:t="",showTimeZone:n=!0,showTSeparator:i=!1,defaultDateTimeFormatString:a=U.DEFAULT_DATETIME_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ie(this,"dh",void 0),ie(this,"dhTimeZone",void 0),ie(this,"defaultDateTimeFormatString",void 0),ie(this,"showTimeZone",void 0),ie(this,"showTSeparator",void 0),ie(this,"formatStringMap",void 0);var o=t||U.DEFAULT_TIME_ZONE_ID;try{this.dhTimeZone=e.i18n.TimeZone.getTimeZone(o)}catch{xt.error("Unsupported time zone id",o),this.dhTimeZone=e.i18n.TimeZone.getTimeZone(U.DEFAULT_TIME_ZONE_ID)}this.dh=e,this.defaultDateTimeFormatString=a,this.showTimeZone=n,this.showTSeparator=i,this.formatStringMap=U.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{xt.error("Invalid format arguments")}return""}}ie(U,"DEFAULT_DATETIME_FORMAT_STRING","yyyy-MM-dd HH:mm:ss.SSS");ie(U,"DEFAULT_TIME_ZONE_ID","America/New_York");function Q(r,e,t){return e=ha(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ha(r){var e=fa(r,"string");return typeof e=="symbol"?e:String(e)}function fa(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var ma=N.module("DecimalColumnFormatter");class O extends L{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]:L.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,L.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,L.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(),Q(this,"defaultFormatString",void 0),Q(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{ma.error("Invalid format arguments")}return""}}Q(O,"DEFAULT_FORMAT_STRING","###,##0.0000");Q(O,"FORMAT_PERCENT",O.makePresetFormat("Percent","##0.00%"));Q(O,"FORMAT_BASIS_POINTS",O.makePresetFormat("Basis Points","###,##0 bp",1e4));Q(O,"FORMAT_MILLIONS",O.makePresetFormat("Millions","###,##0.000 mm",1e-6));Q(O,"FORMAT_SCIENTIFIC_NOTATION",O.makePresetFormat("Scientific Notation","0.0000E0"));Q(O,"FORMAT_ROUND",O.makePresetFormat("Round","###,##0"));Q(O,"FORMAT_ROUND_TWO_DECIMALS",O.makePresetFormat("0.00","###,##0.00"));Q(O,"FORMAT_ROUND_FOUR_DECIMALS",O.makePresetFormat("0.0000","###,##0.0000"));class ga extends L{format(e){return"".concat(e)}}const pa=ga;function be(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=ya(r,"string");return typeof e=="symbol"?e:String(e)}function ya(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var ba=N.module("IntegerColumnFormatter");class z extends L{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]:L.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 z.makeFormat(e,t,L.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 z.makeFormat("Custom Format",e,L.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=z.DEFAULT_FORMAT_STRING}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),be(this,"dh",void 0),be(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{ba.error("Invalid format arguments")}return""}}be(z,"DEFAULT_FORMAT_STRING","###,##0");be(z,"FORMAT_MILLIONS",z.makePresetFormat("Millions","###,##0.000 mm",1e-6));be(z,"FORMAT_SCIENTIFIC_NOTATION",z.makePresetFormat("Scientific Notation","0.0000E0"));class wa extends L{format(e){return e}}function Xt(r,e,t){return e=Sa(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Sa(r){var e=Ma(r,"string");return typeof e=="symbol"?e:String(e)}function Ma(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 D{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,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:0,u=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0;if(!t)throw new Error("No timezone provided");var d="".concat(n).padStart(4,"0"),f="".concat(i+1).padStart(2,"0"),g="".concat(a).padStart(2,"0"),v="".concat(o).padStart(2,"0"),b="".concat(s).padStart(2,"0"),M="".concat(l).padStart(2,"0"),T="".concat(u).padStart(9,"0"),j="".concat(d,"-").concat(f,"-").concat(g," ").concat(v,":").concat(b,":").concat(M,".").concat(T);return e.i18n.DateTimeFormat.parse(D.FULL_DATE_FORMAT,j,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:s,hours:l,minutes:u,seconds:d,nanos:f}=n;if(t.nanos!=null){if(t.nanos.length===9)return null;f=D.getNextNanos(t.nanos),f>999999999&&(d+=1,f=0)}else t.seconds!=null?d+=1:t.minutes!=null?u+=1:t.hours!=null?l+=1:t.date!=null?s+=1:t.month!=null?o+=1:a+=1;var g=new Date(a,o,s,l,u,d);return D.makeDateWrapper(e,i,g.getFullYear(),g.getMonth(),g.getDate(),g.getHours(),g.getMinutes(),g.getSeconds(),f)}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<D.months.length;i+=1)if(D.months[i].startsWith(n))return i}return NaN}static parseDateValues(e,t,n,i,a,o,s){var l=parseInt(e,10),u=t!=null?this.parseMonth(t):0,d=n!=null?parseInt(n,10):1,f=i!=null?parseInt(i,10):0,g=a!=null?parseInt(a,10):0,v=o!=null?parseInt(o,10):0,b=s!=null?parseInt(s.padEnd(9,"0"),10):0;return Number.isNaN(l)||Number.isNaN(u)||Number.isNaN(d)||Number.isNaN(f)||Number.isNaN(g)||Number.isNaN(v)||Number.isNaN(b)?null:{year:l,month:u,date:d,hours:f,minutes:g,seconds:v,nanos:b}}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,,s,,l,,u,,d,f]=n;if(f!=null&&f.length>0)throw new Error("Unexpected characters after date string '".concat(e,"': ").concat(f));return{year:i,month:a,date:o,hours:s,minutes:l,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=D.makeDateWrapper(e,n,a.getFullYear(),a.getMonth(),a.getDate()),s=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1),l=D.makeDateWrapper(e,n,s.getFullYear(),s.getMonth(),s.getDate());return[o,l]}if(i==="yesterday"){var u=new Date(Date.now()),d=new Date(u.getFullYear(),u.getMonth(),u.getDate()-1),f=D.makeDateWrapper(e,n,d.getFullYear(),d.getMonth(),d.getDate()),g=D.makeDateWrapper(e,n,u.getFullYear(),u.getMonth(),u.getDate());return[f,g]}if(i==="now"){var v=new Date(Date.now()),b=e.DateWrapper.ofJsDate(v);return[b,null]}var M=D.parseDateTimeString(i);if(M.year==null&&M.month==null&&M.date==null)throw new Error("Unable to extract year, month, or day ".concat(i));var T=D.parseDateValues(M.year,M.month,M.date,M.hours,M.minutes,M.seconds,M.nanos);if(T==null)throw new Error("Unable to extract date values from ".concat(M));var j=D.makeDateWrapper(e,n,T.year,T.month,T.date,T.hours,T.minutes,T.seconds,T.nanos),R=D.getNextDate(e,M,T,n);return[j,R]}static getJsDate(e){return typeof e=="number"?new Date(e):e.asDate()}}Xt(D,"FULL_DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSSSSS");Xt(D,"months",["january","february","march","april","may","june","july","august","september","october","november","december"]);const kt=D;function To(r,e){return r===e?{operator:"notEq",value:""}:{operator:"eq",value:r}}function Co(r,e,t){return function(i){var a=t.trim();if(a==="")return null;var o=Jt(e,s=>s.filter().containsIgnoreCase(r.makeFilterValue(s.type,a)),"or");return o(i)}}function Jt(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((s,l)=>s[t](l))}}function Ta(r,e,t,n){return Jt(e,i=>i.filter()[n](r.makeFilterValue(i.type,t)),"or")}function Eo(r,e,t,n,i){return function(o){var s=o?.findColumn(e),l=t==="all"||n&&t.size===0;return s==null||l?null:r.makeSelectValueFilter(s,[...t.keys()],i)}}function xo(r){return function(t){return t.filter().isNull().not().and(t.filter().notEq(r.makeFilterValue(t.type,"")))}}function ko(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 Ze(r,e,t){return e=Ca(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ca(r){var e=Ea(r,"string");return typeof e=="symbol"?e:String(e)}function Ea(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class we{}Ze(we,"not","not");Ze(we,"and","and");Ze(we,"or","or");function Po(r){if(!(r==="not"||r==="and"||r==="or"))throw new Error("operator is not a valid FilterOperatorValue")}function E(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=ka(r,"string");return typeof e=="symbol"?e:String(e)}function ka(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 Pt=N.module("ViewportDataUtils");function Pa(r,e){return String(r.offsetInSnapshot+e)}function Oo(r,e){var{bulkUpdate:t}=r;return function(i){var{columns:a,offset:o,rows:s}=i.detail;Pt.debug("table updated",i.detail);var l=new Map;s.forEach(u=>{var d=e(u,a),f=Pa(u,o);l.set(f,{key:f,item:d})}),Pt.debug("update keys",l),t(l)}}function Io(r,e){return e.reduce((t,n)=>(t[n.name]=r.get(n),t),{})}function*Do(r,e){for(var t=r;t<=e;++t)yield{key:String(t)}}function Oa(r){return r==null||Ia(r)?0:r.size}function Ia(r){return"isClosed"in r?r.isClosed:!1}function No(r,e,t,n){var i=r+e-1,[a,o]=[0,n-1],s=Xe(r-t,a,o),l=Xe(i+t,a,o);return[s,l]}function Ot(r,e,t,n,i,a,o){try{var s=r[a](o),l=s.value}catch(u){t(u);return}s.done?e(l):Promise.resolve(l).then(n,i)}function Y(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(l){Ot(a,n,i,o,s,"next",l)}function s(l){Ot(a,n,i,o,s,"throw",l)}o(void 0)})}}function le(r,e,t){return e=Da(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Da(r){var e=Na(r,"string");return typeof e=="symbol"?e:String(e)}function Na(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 J=N.module("TableUtils");class c{static copyTableAndApplyFilters(e){var t=arguments;return Y(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(s=>s(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 s=c.makeColumnSort(t,n,i,a);return c.setSortForColumn(e,t[n].name,s,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(s=>{var{direction:l}=s;return l!==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,s=!0,l=new Promise((u,d)=>{o=setTimeout(()=>{a(),s=!1,d(new Lt('Event "'.concat(t,'" timed out.')))},n),a=e.addEventListener(t,f=>{if(i!=null&&!i(f)){J.debug2("Event triggered, but matcher returned false.");return}J.debug2("Event triggered, resolving."),a(),clearTimeout(o),s=!1,u(f)})});return l.cancel=()=>{if(s){J.debug2("Pending promise cleanup."),a(),clearTimeout(o),s=!1;return}J.debug2("Ignoring non-pending promise cancel.")},l}static removeCommas(e){return e.replace(/[\s|,]/g,"")}static makeBooleanValue(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e===""&&t)return null;switch(e?.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 Qr.sort(a,o,t)})}constructor(e){le(this,"dh",void 0),this.dh=e,Ir(this)}createDistinctSortedColumnTable(e,t,n){var i=arguments,a=this;return Y(function*(){if(e==null)return null;for(var o=e,s=i.length,l=new Array(s>3?s-3:0),u=3;u<s;u++)l[u-3]=i[u];l.length>0&&(o=yield e.copy(),yield o.applyFilter(Ke(...l.map(v=>v(o)))));var d=o.findColumn(t),f=yield o.selectDistinct([d]);o!==e&&o.close();var g=f.findColumn(t).sort()[n]();return a.applySort(f,[g])})()}doesColumnValueExist(e,t,n,i){var a=this;return Y(function*(){if(e==null)return null;var o=Ta(a,t,n,i?"eq":"eqIgnoreCase"),s=yield e.copy();yield a.applyFilter(s,Ke(o(s)));var l=Oa(s);return s.close(),l>0})()}makeQuickFilter(e,t,n){for(var i=t.split("||"),a=null,o=0;o<i.length;o+=1){for(var s=i[o],l=s.split("&&"),u=null,d=0;d<l.length;d+=1){var f=l[d].trim();if(f.length>0){var g=this.makeQuickFilterFromComponent(e,f,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,s=o.exec(t),l=null,u=null,d=null,f=null,g=null;if(s!==null&&s.length>3&&([,l,u,d,f,g]=s),g!=null&&g.trim().length>0)return null;if(l==null&&(l="="),f!=null){if(!(l==="="||l==="!"||l==="!="))return null;switch(f=f.trim().toLowerCase(),f){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&&(l==="!"||l==="!=")&&(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 J.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,l,d)}static escapeQuickTextFilter(e){var t,n;if(e==null)return null;var i=/^(!~|!=|~|=|!)?(.*)/,a=/^\\*null$/,o=i.exec(e),s=null,l=null;if(o!==null&&o.length>2&&([,s,l]=o),s!=null){var u;return"\\".concat(s).concat((u=l)!==null&&u!==void 0?u:"")}return l!=null&&a.test(l.toLowerCase())||l!=null&&l.startsWith("*")?"\\".concat(l):l!=null&&l.endsWith("*")&&!l.endsWith("\\*")?(l=l.substring(0,l.length-1),"".concat(l,"\\*")):"".concat((t=s)!==null&&t!==void 0?t:"").concat((n=l)!==null&&n!==void 0?n:"")}static unescapeQuickTextFilter(e){var t,n,i=/^(\\!~|\\!=|\\~|\\=|\\!)?(.*)/,a=/^\\*null$/,o=i.exec(e),s=null,l=null;return o!==null&&o.length>2&&([,s,l]=o),s!=null&&(s=s.replace("\\","")),l!=null&&a.test(l.toLowerCase())&&(l=l.replace("\\","")),s==null&&l!=null&&l.startsWith("\\*")&&(l=l.substring(1)),s==null&&l!=null&&l.endsWith("\\*")?(l=l.substring(0,l.length-2),"".concat(l,"*")):"".concat((t=s)!==null&&t!==void 0?t:"").concat((n=l)!==null&&n!==void 0?n:"")}makeQuickTextFilter(e,t){var{dh:n}=this,i="".concat(t).trim(),a=/^(!~|!=|~|=|!)?(.*)/,o=a.exec(i),s=null,l=null;if(o!==null&&o.length>2&&([,s,l]=o,l!=null&&(l=l.trim())),l==null||l.length===0&&!(s==="="||s==="!="))return null;s==null&&(s="=");var u=e.filter();if(l.toLowerCase()==="null")switch(s){case"=":return u.isNull();case"!=":case"!":return u.isNull().not()}var d=null,f=null;switch(l.startsWith("*")?(d="*",l=l.substring(1)):l.endsWith("*")&&!l.endsWith("\\*")&&(f="*",l=l.substring(0,l.length-1)),l=c.unescapeQuickTextFilter(l),s){case"~":return u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(l,"\\E.*"))));case"!~":return u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(l,"\\E.*"))).not());case"!=":return d==="*"?u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(l,"\\E$"))).not()):f==="*"?u.isNull().or(u.invoke("matches",n.FilterValue.ofString("(?s)(?i)^\\Q".concat(l,"\\E.*"))).not()):u.notEqIgnoreCase(n.FilterValue.ofString(l.toLowerCase()));case"=":return d==="*"?u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i).*\\Q".concat(l,"\\E$")))):f==="*"?u.isNull().not().and(u.invoke("matches",n.FilterValue.ofString("(?s)(?i)^\\Q".concat(l,"\\E.*")))):u.eqIgnoreCase(n.FilterValue.ofString(l.toLowerCase()))}return null}makeQuickBooleanFilter(e,t){var n=/^(!=|=|!)?(.*)/,i=n.exec("".concat(t).trim());if(i===null)return null;var[,a,o]=i,s=a==="!"||a==="!=",l=o.trim().toLowerCase(),u=e.filter();try{var d=c.makeBooleanValue(l);return d!=null&&d?u=u.isTrue():d===null?u=u.isNull():u=u.isFalse(),s?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 s=null,l=null;[,s,l]=o;var u=h.eq;switch(s){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,l,u,n)}makeQuickDateFilterWithOperation(e,t,n,i){var{dh:a}=this,[o,s]=kt.parseDateRange(a,t,i),l=o!=null?a.FilterValue.ofNumber(o):null,u=s!=null?a.FilterValue.ofNumber(s):null,d=e.filter();if(l==null)return n===h.notEq?d.isNull().not():d.isNull();switch(n){case h.eq:{if(u!=null){var f=d.greaterThanOrEqualTo(l),g=d.lessThan(u);return f.and(g)}return d.eq(l)}case h.lessThan:return d.lessThan(l);case h.lessThanOrEqualTo:return u!=null?d.lessThan(u):d.lessThanOrEqualTo(l);case h.greaterThan:return u!=null?d.greaterThanOrEqualTo(u):d.greaterThan(l);case h.greaterThanOrEqualTo:return d.greaterThanOrEqualTo(l);case h.notEq:{if(u!=null){var v=d.lessThan(l),b=d.greaterThanOrEqualTo(u);return v.or(b)}return d.notEq(l)}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),s=null,l=null,u=null;if(o!==null&&o.length>3&&([,s,l,u]=o),u!=null&&u.trim().length>0||l==null||l.length===0)return null;s==null&&(s="=");var d=e.filter();if(l.toLowerCase()==="null")switch(s){case"=":return d.isNull();case"!=":case"!":return d.isNull().not();default:return null}var f=n.FilterValue.ofString(c.isRangeOperation(s)?c.quoteValue(l):l);return c.makeRangeFilterWithOperation(d,s,f)}makeAdvancedFilter(e,t,n){for(var{filterItems:i,filterOperators:a,invertSelection:o,selectedValues:s}=t,l=null,u=0;u<i.length;u+=1){var d=i[u],{selectedType:f,value:g}=d;if(f!=null&&f.length>0&&g!=null&&g.length>0)try{var v=this.makeAdvancedValueFilter(e,f,g,n);if(v!=null){if(u===0)l=v;else if(l!==null&&u-1<a.length){var b=a[u-1];if(b===we.and)l=l.and(v);else if(b===we.or)l=l.or(v);else{J.error("Unexpected filter operator",b,v),l=null;break}}}else J.debug2("Empty filter ignored for",f,g)}catch(T){J.error("Unable to create filter",T),l=null;break}}var M=this.makeSelectValueFilter(e,s,o);return M!=null&&(l!=null?l=l.and(M):l=M),l}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),s=e.filter();switch(t){case h.eq:return s.eq(o);case h.eqIgnoreCase:return s.eqIgnoreCase(o);case h.notEq:return s.notEq(o);case h.notEqIgnoreCase:return s.notEqIgnoreCase(o);case h.greaterThan:return s.greaterThan(o);case h.greaterThanOrEqualTo:return s.greaterThanOrEqualTo(o);case h.lessThan:return s.lessThan(o);case h.lessThanOrEqualTo:return s.lessThanOrEqualTo(o);case h.isTrue:return s.isTrue();case h.isFalse:return s.isFalse();case h.isNull:return s.isNull();case h.contains:return s.isNull().not().and(s.invoke("matches",a.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E.*"))));case h.notContains:return s.isNull().or(s.invoke("matches",a.FilterValue.ofString("(?s)(?i).*\\Q".concat(n,"\\E.*"))).not());case h.startsWith:return s.isNull().not().and(s.invoke("matches",a.FilterValue.ofString("(?s)(?i)^\\Q".concat(n,"\\E.*"))));case h.endsWith:return s.isNull().not().and(s.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 Y(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),s=[i.makeNeverFilter(o)];return yield i.applyFilter(e,s,a),e})()}applyCustomColumns(e,t){var n=arguments,i=this;return Y(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:o}=i;return c.executeAndWaitForEvent(s=>s?.applyCustomColumns(t),e,o.Table.EVENT_CUSTOMCOLUMNSCHANGED,a)})()}applyFilter(e,t){var n=arguments,i=this;return Y(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:o}=i;return c.executeAndWaitForEvent(s=>s?.applyFilter(t),e,o.Table.EVENT_FILTERCHANGED,a)})()}applySort(e,t){var n=arguments,i=this;return Y(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:c.APPLY_TABLE_CHANGE_TIMEOUT_MS,{dh:o}=i;return c.executeAndWaitForEvent(s=>s?.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]=kt.parseDateRange(i,t,n);return a}return c.isNumberType(e)?c.makeNumberValue(t):(J.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,s=0;s<t.length;s+=1){var l=t[s];l==null?o=!0:c.isTextType(e.type)?a.push(i.FilterValue.ofString(typeof l=="number"?String.fromCharCode(l):l)):c.isBooleanType(e.type)?a.push(i.FilterValue.ofBoolean(!!l)):a.push(i.FilterValue.ofNumber(l))}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)}}le(c,"dataType",{BOOLEAN:"boolean",CHAR:"char",DATETIME:"datetime",DECIMAL:"decimal",INT:"int",STRING:"string",UNKNOWN:"unknown"});le(c,"sortDirection",{ascending:"ASC",descending:"DESC",reverse:"REVERSE",none:null});le(c,"APPLY_TABLE_CHANGE_TIMEOUT_MS",3e4);le(c,"REVERSE_TYPE",Object.freeze({NONE:"none",PRE_SORT:"pre-sort",POST_SORT:"post-sort"}));le(c,"NUMBER_REGEX",/^-?\d+(\.\d+)?$/);le(c,"executeAndWaitForEvent",function(){var r=Y(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 Pe(r,e,t){return e=Fa(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Fa(r){var e=Aa(r,"string");return typeof e=="symbol"?e:String(e)}function Aa(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Yt{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;Pe(this,"defaultColumnFormatter",void 0),Pe(this,"typeFormatterMap",void 0),Pe(this,"columnFormatMap",void 0),Pe(this,"truncateNumbersWithPound",void 0),this.defaultColumnFormatter=new pa,this.typeFormatterMap=new Map([[c.dataType.BOOLEAN,new sa],[c.dataType.CHAR,new ua],[c.dataType.DATETIME,new U(e,n)],[c.dataType.DECIMAL,new O(e,i)],[c.dataType.INT,new z(e,a)],[c.dataType.STRING,new wa]]),this.columnFormatMap=Yt.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}}Ve.register([wr,Sr,Mr,Tr,Cr,Er]);const La="#76d9e4 #9edc6f #fcd65b #aa9af4 #f37e3f #f95d84 #f0f0ee",Ra="#403e41",$a="#5b5a5c",ja="#c0bfbf",_a="#4878ea",Ka="rgba(91, 90, 92, 0.7)",F={"paper-bgcolor":"#2d2a2e","plot-bgcolor":"#322f33","title-color":"#f0f0ee",colorway:La,gridcolor:Ra,linecolor:$a,zerolinecolor:ja,activecolor:_a,rangebgcolor:Ka,"area-color":"#76d9e4","trend-color":"#d5f0c1","line-color":"#9edc6f","error-band-line-color":"white","error-band-fill-color":"rgba(213, 240, 193, 0.1)","ohlc-increasing":"#9edc6f","ohlc-decreasing":"#f95d84"},Fo=Object.freeze({paper_bgcolor:F["paper-bgcolor"],plot_bgcolor:F["plot-bgcolor"],title_color:F["title-color"],colorway:F.colorway,gridcolor:F.gridcolor,linecolor:F.linecolor,zerolinecolor:F.zerolinecolor,activecolor:F.activecolor,rangebgcolor:F.rangebgcolor,area_color:F["area-color"],trend_color:F["trend-color"],line_color:F["line-color"],error_band_line_color:F["error-band-line-color"],error_band_fill_color:F["error-band-fill-color"],ohlc_increasing:F["ohlc-increasing"],ohlc_decreasing:F["ohlc-decreasing"]}),Ao=typeof _e=="function"?_e(Ve):_e.default(Ve);var Ba={TOGGLE_QUICK_FILTER:A.createAndAdd({id:"TABLE.TOGGLE_QUICK_FILTER",name:"Toggle Quick Filter",shortcut:[w.CTRL,y.F],macShortcut:[w.CMD,y.F]}),CLEAR_ALL_FILTERS:A.createAndAdd({id:"TABLE.CLEAR_ALL_FILTERS",name:"Clear All Table Filters",shortcut:[w.CTRL,y.E],macShortcut:[w.CMD,y.E]}),CLEAR_FILTERS:A.createAndAdd({id:"TABLE.CLEAR_FILTERS",name:"Clear Active Table Filters",shortcut:[w.CTRL,w.SHIFT,y.E],macShortcut:[w.CMD,w.SHIFT,y.E]}),REVERSE:A.createAndAdd({id:"TABLE.REVERSE",name:"Reverse",shortcut:[w.CTRL,y.I],macShortcut:[w.CMD,y.I]}),TOGGLE_SEARCH:A.createAndAdd({id:"TABLE.TOGGLE_SEARCH",name:"Toggle Search",shortcut:[w.CTRL,w.SHIFT,y.F],macShortcut:[w.CMD,w.SHIFT,y.F]}),GOTO_ROW:A.createAndAdd({id:"TABLE.GOTO_ROW",name:"Go to Row",shortcut:[w.CTRL,y.G],macShortcut:[w.CMD,y.G]})},Ha={COMMIT:A.createAndAdd({id:"INPUT_TABLE.COMMIT",name:"Commit",shortcut:[w.CTRL,y.S],macShortcut:[w.CMD,y.S]}),DISCARD:A.createAndAdd({id:"INPUT_TABLE.DISCARD",name:"Discard",shortcut:[w.CTRL,w.ALT,y.S],macShortcut:[w.CMD,w.OPTION,y.S]})},Wa={TABLE:Ba,INPUT_TABLE:Ha};const Lo=Wa;function It(r,e,t,n,i,a,o){try{var s=r[a](o),l=s.value}catch(u){t(u);return}s.done?e(l):Promise.resolve(l).then(n,i)}function Va(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(l){It(a,n,i,o,s,"next",l)}function s(l){It(a,n,i,o,s,"throw",l)}o(void 0)})}}function qa(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 Oe=N.module("DownloadServiceWorkerUtils");class oe{static register(e){oe.serviceWorkerRegistration&&oe.unregisterSW(),"serviceWorker"in navigator?navigator.serviceWorker.register(e).then(t=>{t.update(),oe.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 Va(function*(){if("serviceWorker"in navigator){var e=oe.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=oe.serviceWorkerRegistration)===null||e===void 0||e.unregister()}}qa(oe,"serviceWorkerRegistration",null);const Ro=oe;var za=S.createContext(null);function $o(){return $t(za,"No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?")}var jo=S.createContext(null),Me=Object.freeze({AUTH_PLUGIN:"AuthPlugin",DASHBOARD_PLUGIN:"DashboardPlugin",WIDGET_PLUGIN:"WidgetPlugin",TABLE_PLUGIN:"TablePlugin",THEME_PLUGIN:"ThemePlugin"});function Qa(r){return"DashboardPlugin"in r}function Za(r){return"AuthPlugin"in r}function Xa(r){return"TablePlugin"in r}function _o(r){return Qa(r)||Za(r)||Xa(r)}function Ko(r){return"type"in r&&r.type===Me.DASHBOARD_PLUGIN}function Bo(r){return"type"in r&&r.type===Me.WIDGET_PLUGIN}function Ho(r){return"type"in r&&r.type===Me.TABLE_PLUGIN}function Wo(r){return"type"in r&&r.type===Me.AUTH_PLUGIN}function Vo(r){return"type"in r&&r.type===Me.THEME_PLUGIN}export{D as $,an as A,Ie as B,go as C,ao as D,rn as E,Yt as F,wo as G,ho as H,z as I,G as J,y as K,Ae as L,ea as M,Ht as N,we as O,Ne as P,yo as Q,se as R,x as S,h as T,ii as U,w as V,kn as W,bo as X,Lt as Y,sa as Z,ua as _,O as a,pa as a0,wa as a1,L as a2,To as a3,Jt as a4,Pa as a5,xo as a6,Oo as a7,Co as a8,Eo as a9,uo as aA,ro as aB,no as aC,Po as aD,At as aE,ko as aa,Ta as ab,Io as ac,Do as ad,Oa as ae,Ia as af,No as ag,Fo as ah,Ao as ai,io as aj,Ke as ak,za as al,Wo as am,Za as an,Me as ao,Vo as ap,_o as aq,jo as ar,Fr as as,Qr as at,oo as au,Mo as av,Ho as aw,Xa as ax,Bo as ay,Mt as az,U as b,c,lo as d,A as e,pn as f,P as g,po as h,Lo as i,vo as j,Un as k,Ir as l,jt as m,fo as n,_t as o,Ko as p,Qa as q,mo as r,Ye as s,$o as t,So as u,Ro as v,so as w,co as x,$t as y,ln as z};
3
- //# sourceMappingURL=PluginTypes-c21a74a3.js.map
3
+ //# sourceMappingURL=PluginTypes-2b0ef082.js.map