@deephaven/code-studio 0.78.7 → 0.78.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/build/assets/{AppRoot-2a59d522.js → AppRoot-64f26d97.js} +3 -3
  2. package/build/assets/{AppRoot-2a59d522.js.map → AppRoot-64f26d97.js.map} +1 -1
  3. package/build/assets/{Chart-7ae57edd.js → Chart-6db0d4ce.js} +2 -2
  4. package/build/assets/{Chart-7ae57edd.js.map → Chart-6db0d4ce.js.map} +1 -1
  5. package/build/assets/{ControlType-bd14ad7d.js → ControlType-17bce983.js} +3 -3
  6. package/build/assets/{ControlType-bd14ad7d.js.map → ControlType-17bce983.js.map} +1 -1
  7. package/build/assets/{FontBootstrap-acebd200.js → FontBootstrap-bc21c71a.js} +2 -2
  8. package/build/assets/{FontBootstrap-acebd200.js.map → FontBootstrap-bc21c71a.js.map} +1 -1
  9. package/build/assets/{FormatterUtils-aa130f09.js → FormatterUtils-4bc01d78.js} +2 -2
  10. package/build/assets/{FormatterUtils-aa130f09.js.map → FormatterUtils-4bc01d78.js.map} +1 -1
  11. package/build/assets/{Grid-528d0f39.js → Grid-41af89a1.js} +2 -2
  12. package/build/assets/{Grid-528d0f39.js.map → Grid-41af89a1.js.map} +1 -1
  13. package/build/assets/{GridRenderer-81c28864.js → GridRenderer-168e9bfa.js} +2 -2
  14. package/build/assets/{GridRenderer-81c28864.js.map → GridRenderer-168e9bfa.js.map} +1 -1
  15. package/build/assets/{IrisGrid-cf7cbe7a.js → IrisGrid-ba04137c.js} +2 -2
  16. package/build/assets/{IrisGrid-cf7cbe7a.js.map → IrisGrid-ba04137c.js.map} +1 -1
  17. package/build/assets/IrisGridModel-9ae353b6.js +2 -0
  18. package/build/assets/IrisGridModel-9ae353b6.js.map +1 -0
  19. package/build/assets/{IrisGridShortcuts-ca43b8ae.js → IrisGridShortcuts-6bff8af6.js} +2 -2
  20. package/build/assets/{IrisGridShortcuts-ca43b8ae.js.map → IrisGridShortcuts-6bff8af6.js.map} +1 -1
  21. package/build/assets/{IrisGridThemeProvider-1255904b.js → IrisGridThemeProvider-e0773395.js} +2 -2
  22. package/build/assets/{IrisGridThemeProvider-1255904b.js.map → IrisGridThemeProvider-e0773395.js.map} +1 -1
  23. package/build/assets/{MarkdownEditor-5b938d97.js → MarkdownEditor-0f7f63c1.js} +2 -2
  24. package/build/assets/{MarkdownEditor-5b938d97.js.map → MarkdownEditor-0f7f63c1.js.map} +1 -1
  25. package/build/assets/{MarkdownNotebook-b2d6f744.js → MarkdownNotebook-c8f790c9.js} +2 -2
  26. package/build/assets/{MarkdownNotebook-b2d6f744.js.map → MarkdownNotebook-c8f790c9.js.map} +1 -1
  27. package/build/assets/{MissingPartitionError-592fcd69.js → MissingPartitionError-d32eff17.js} +2 -2
  28. package/build/assets/{MissingPartitionError-592fcd69.js.map → MissingPartitionError-d32eff17.js.map} +1 -1
  29. package/build/assets/{StyleGuideRoot-8a3bea4c.js → StyleGuideRoot-23b585e0.js} +2 -2
  30. package/build/assets/{StyleGuideRoot-8a3bea4c.js.map → StyleGuideRoot-23b585e0.js.map} +1 -1
  31. package/build/assets/{index-924d232b.js → index-4ac6ba2e.js} +2 -2
  32. package/build/assets/{index-924d232b.js.map → index-4ac6ba2e.js.map} +1 -1
  33. package/build/assets/{index-664a8a46.js → index-4b63b035.js} +3 -3
  34. package/build/assets/{index-664a8a46.js.map → index-4b63b035.js.map} +1 -1
  35. package/build/assets/{index-bede718d.js → index-65dd7b54.js} +2 -2
  36. package/build/assets/{index-bede718d.js.map → index-65dd7b54.js.map} +1 -1
  37. package/build/assets/{useUser-5301f40a.js → useUser-9ee15529.js} +2 -2
  38. package/build/assets/{useUser-5301f40a.js.map → useUser-9ee15529.js.map} +1 -1
  39. package/build/index.html +2 -2
  40. package/package.json +14 -14
  41. package/build/assets/IrisGridModel-ff5b74a5.js +0 -2
  42. package/build/assets/IrisGridModel-ff5b74a5.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{M as Q,I as F,K as q,V as W,r as j,a1 as Te,L as de,bb as Re,ai as V,bj as Ne,U as Pe,H as De}from"./vendor-42b82a60.js";import{w as xe,bb as Le,I as we,L as Me,e as Y,aW as $}from"./index-65dd7b54.js";import{_ as Se}from"./monaco-b5248072.js";import{ac as Fe,c as ae,al as k}from"./ControlType-17bce983.js";var te=Q.forwardRef((o,e)=>{var{children:t,className:r,disabled:n,onClick:a,style:i,id:l}=o;return F.jsx("button",{ref:e,type:"button",className:q("btn",r),onClick:a,style:i,disabled:n,id:l,children:t})});te.displayName="Button";te.propTypes={children:W.node,className:W.string,disabled:W.bool,onClick:W.func,style:W.shape({}),id:W.string};te.defaultProps={children:null,className:"",disabled:!1,onClick:()=>null,style:{},id:""};const Dt=te;function xt(o){var{children:e,disabled:t=!1,name:r,onChange:n,value:a="","data-testid":i}=o,[l]=j.useState(r??Te());return F.jsx(F.Fragment,{children:Q.Children.map(e,s=>{var u,d;return s?Q.cloneElement(s,{name:l,onChange:(u=s.props.onChange)!==null&&u!==void 0?u:n,checked:a===s.props.value,disabled:(d=s.props.disabled)!==null&&d!==void 0?d:t,"data-testid":i}):null})})}var ue=Q.forwardRef((o,e)=>{var{checked:t,children:r,className:n="",disabled:a=!1,inputClassName:i="",isInvalid:l=!1,labelClassName:s="",name:u,onChange:d,value:c,"data-testid":f}=o,[m]=j.useState(Te());return F.jsxs("div",{className:q("custom-control custom-radio",n),children:[F.jsx("input",{type:"radio",id:m,"data-testid":f,name:u,ref:e,className:q("custom-control-input",i,{"is-invalid":l}),checked:t,disabled:a,value:c,onChange:d}),F.jsx("label",{className:q("custom-control-label",s),htmlFor:m,children:r})]})});ue.displayName="RadioItem";ue.defaultProps={checked:void 0,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};const Lt=ue;var se=Q.forwardRef((o,e)=>{var{children:t,className:r,disabled:n,id:a,isLinked:i,isLinkedSource:l,isInvalid:s,onClick:u,onMouseEnter:d,onMouseLeave:c,style:f,"data-testid":m}=o;return F.jsxs("button",{ref:e,type:"button",className:q("btn-socketed",{"btn-socketed-linked":i!==void 0&&i||l},{"btn-socketed-linked-source":l},{"is-invalid":s},r),id:a,onClick:u,onMouseEnter:d,onMouseLeave:c,style:f,disabled:n,"data-testid":m,children:[t,F.jsx(de,{icon:xe,className:"linked btn-socketed-icon",transform:"down-1"}),F.jsx(de,{icon:Le,className:"is-invalid btn-socketed-icon"})]})});se.displayName="SocketedButton";se.defaultProps={children:void 0,className:"",disabled:!1,id:void 0,isLinked:!1,isLinkedSource:!1,isInvalid:!1,onClick:void 0,onMouseEnter:void 0,onMouseLeave:void 0,style:void 0,"data-testid":void 0};const Mt=se;function ce(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function He(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ce(Object(t),!0).forEach(function(r){ke(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function ke(o,e,t){return e=_e(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function _e(o){var e=je(o,"string");return typeof e=="symbol"?e:String(e)}function je(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Be=j.lazy(()=>Se(()=>import("./Chart-6db0d4ce.js"),["./Chart-6db0d4ce.js","./vendor-42b82a60.js","./helpers-de833af9.js","./vendor-07c93e4f.css","./index-65dd7b54.js","./monaco-b5248072.js","./monaco-f18fde03.css","./index-13e1b819.css","./Plotly-3144e99b.js","./plotly-3e0842ad.js","./ControlType-17bce983.js","./ControlType-403497ff.css","./DownsamplingError-8e6bdb73.js","./FormatterUtils-4bc01d78.js","./Chart-d34ffe5c.css"],import.meta.url));function Ft(o){return F.jsx(j.Suspense,{fallback:F.jsx(we,{}),children:F.jsx(Be,He({},o))})}function fe(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function G(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?fe(Object(t),!0).forEach(function(r){x(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function x(o,e,t){return e=We(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function We(o){var e=$e(o,"string");return typeof e=="symbol"?e:String(e)}function $e(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Z=Me.module("ChartUtils"),ve="io.deephaven.time.DateTime",Xe=36e5,ze=1e6;function Ve(o){return o.asDate!==void 0}function Ye(o){return o.asNumber!==void 0}function me(o){return o.dhTimeZone!==void 0}function Ze(o){return o!=null&&o.range!=null&&(o.autorange===!1||o.autorange===void 0)}function Ke(){var o=document.createElement("canvas"),e=o.getContext("webgl")||o.getContext("experimental-webgl");return e!=null&&e instanceof WebGLRenderingContext}var qe=Ke();class v{static getPlotlyErrorBars(e,t,r){var n=r.map((i,l)=>i-e[l]),a=t.map((i,l)=>e[l]-i);return{type:"data",symmetric:!1,array:n,arrayminus:a}}static convertNumberPrefix(e){return e.replace(/\u00A4\u00A4/g,"USD").replace(/\u00A4/g,"$")}static getPlotlyNumberFormat(e,t,r){if(r==null||r==="")return null;var n=r.split(";"),a=n[0].match(/^([^#,0.]*)([#,]*)([0,]*)(\.?)(0*)(#*)(E?0*)(%?)(.*)/);Y(a);var[,i,l,s,,u,d,c,f,m]=a,g=s.replace(",","").length,E=l.indexOf(",")>=0||s.indexOf(",")>=0,h=E?",":"",y=c!=null&&c!==""?"e":"f",C=f!==""?f:y,w=u.length+d.length,b="",S="0".concat(g).concat(h,".").concat(w).concat(b).concat(C),A=v.convertNumberPrefix(i),R=v.convertNumberPrefix(m);return{tickformat:S,tickprefix:A,ticksuffix:R,automargin:!0}}static addTickSpacing(e,t,r){var{gapBetweenMajorTicks:n}=t;if(n!=null&&n>0){var a=e||{},i=n;return r&&(i=n/ze),t.log&&(i=Math.log(i)),a.tickmode="linear",a.dtick=i,a}return e}static getSourceForAxis(e,t){for(var r=0;r<e.series.length;r+=1)for(var n=e.series[r],a=0;a<n.sources.length;a+=1){var i=n.sources[a];if(i.axis===t)return i}return null}static getSeriesVisibility(e,t){return t!=null&&t.hiddenSeries!=null&&t.hiddenSeries.includes(e)?"legendonly":!0}static getHiddenLabels(e){return e!=null&&e.hiddenSeries?[...e.hiddenSeries]:[]}static makeSeriesData(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:v.ORIENTATION.VERTICAL;return{type:e,mode:t,name:r,orientation:a,showlegend:n??void 0}}static getMarkerSymbol(e){switch(e){case"SQUARE":return"square";case"CIRCLE":return"circle";case"DIAMOND":return"diamond";case"UP_TRIANGLE":return"triangle-up";case"DOWN_TRIANGLE":return"triangle-down";case"RIGHT_TRIANGLE":return"triangle-right";case"LEFT_TRIANGLE":return"triangle-left";case"ELLIPSE":case"HORIZONTAL_RECTANGLE":case"VERTICAL_RECTANGLE":default:throw new Error("Unrecognized shape ".concat(e))}}static getAllAxes(e){return e.charts.reduce((t,r)=>[...t,...r.axes],[])}static getAxisTypeMap(e){var t=v.getAllAxes(e);return v.groupArray(t,"type")}static getChartForSeries(e,t){for(var{charts:r}=e,n=0;n<r.length;n+=1)for(var a=r[n],i=0;i<a.series.length;i+=1)if(t===a.series[i])return a;return null}static getLayoutRanges(e){for(var t={},r=Object.keys(e).filter(l=>l.indexOf("axis")>=0),n=0;n<r.length;n+=1){var a=r[n],i=e[a];Ze(i)&&(t[a]=[...i.range])}return t}static getAxisLayoutProperty(e,t){var r=t>0?"".concat(t+1):"";return"".concat(e??"","axis").concat(r)}static periodToDecimal(e){var t=e.split(":");return Number(t[0])+Number(t[1])/60}static decimalToPeriod(e){var t=Math.floor(e),r=Math.round((e-t)*60);return"".concat(t.toString().padStart(2,"0"),":").concat(r.toString().padStart(2,"0"))}static groupArray(e,t){return e.reduce((r,n)=>{var a,i=n[t],l=(a=r.get(i))!==null&&a!==void 0?a:[];return l.push(n),r.set(i,l),r},new Map)}static normalizeColorway(e){if(e!=null){if(Array.isArray(e))return e;if(typeof e=="string")return e.split(" ");Z.warn("Unexpected colorway format: ".concat(e))}}static titleFromSettings(e){var{series:t,xAxis:r,title:n="".concat((t??[]).join(", ")," by ").concat(r)}=e;return n}static getTimeZoneDiff(e,t){return t?(e.standardOffset-t.standardOffset)/60:0}static createClosedRangesForPartialHoliday(e,t){var r=t.map(c=>[v.periodToDecimal(c.open),v.periodToDecimal(c.close)]);r.sort((c,f)=>c[0]-f[0]),r.length===0&&r.push([0,24]);var n=e.map(c=>[v.periodToDecimal(c.open),v.periodToDecimal(c.close)]);n.sort((c,f)=>c[0]-f[0]);for(var a=[],i=0;i<r.length;i+=1){for(var l=r[i],s=l[0],u=0;u<n.length;u+=1){var d=n[u];d[1]>s&&d[0]<l[1]&&(d[0]>s&&a.push([s,d[0]]),s=d[1])}s<l[1]&&a.push([s,l[1]])}return a}constructor(e){x(this,"dh",void 0),x(this,"daysOfWeek",void 0),this.dh=e,this.daysOfWeek=Object.freeze(e.calendar.DayOfWeek.values()),Fe(this)}getAxisFormats(e,t){for(var r=new Map,n={tickformat:null,ticksuffix:null},a=v.getAllAxes(e),i=v.groupArray(a,"type"),{charts:l}=e,s=0;s<l.length;s+=1)for(var u=l[s],d=0;d<u.series.length;d+=1)for(var c=u.series[d],{sources:f}=c,m=f.filter(N=>N.axis),g=0;g<m.length;g+=1){var E=m[g],{axis:h}=E,{type:y}=h,C=i.get(y);Y(C);var w=C.indexOf(h),b=this.getAxisPropertyName(y);if(b!=null){var S=v.getAxisLayoutProperty(b,w);if(r.has(S))Z.debug("".concat(S," already added."));else{Z.debug("Adding ".concat(S," to axisFormats."));var A=this.getPlotlyAxisFormat(E,t);if(A===null)r.set(S,n);else{r.set(S,A);var{businessCalendar:R}=h;if(R!=null&&(A.rangebreaks=this.createRangeBreaksFromBusinessCalendar(R,t)),r.size===u.axes.length)return r}}}}return r}getPlotlyChartType(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,{dh:n}=this;switch(e){case n.plot.SeriesPlotStyle.SCATTER:case n.plot.SeriesPlotStyle.LINE:return!t&&qe&&r?"scattergl":"scatter";case n.plot.SeriesPlotStyle.BAR:case n.plot.SeriesPlotStyle.STACKED_BAR:return"bar";case n.plot.SeriesPlotStyle.PIE:return"pie";case n.plot.SeriesPlotStyle.TREEMAP:return"treemap";case n.plot.SeriesPlotStyle.HISTOGRAM:return"histogram";case n.plot.SeriesPlotStyle.OHLC:return"ohlc";default:return}}getPlotlyChartMode(e,t,r){var{dh:n}=this,a=new Set;switch(e){case n.plot.SeriesPlotStyle.SCATTER:(t??!1)&&a.add(v.MODE_LINES),(r??!0)&&a.add(v.MODE_MARKERS);break;case n.plot.SeriesPlotStyle.LINE:(t??!0)&&a.add(v.MODE_LINES),(r??!1)&&a.add(v.MODE_MARKERS);break}return a.size>0?[...a].join("+"):void 0}getPlotlyProperty(e,t){var{dh:r}=this;switch(e){case r.plot.SeriesPlotStyle.PIE:switch(t){case r.plot.SourceType.X:return"labels";case r.plot.SourceType.Y:return"values"}break;case r.plot.SeriesPlotStyle.OHLC:switch(t){case r.plot.SourceType.TIME:return"x"}break;case r.plot.SeriesPlotStyle.TREEMAP:switch(t){case r.plot.SourceType.X:return"ids";case r.plot.SourceType.Y:return"values";case r.plot.SourceType.LABEL:return"labels";case r.plot.SourceType.PARENT:return"parents";case r.plot.SourceType.COLOR:return"marker.colors"}break}switch(t){case r.plot.SourceType.X:return"x";case r.plot.SourceType.Y:return"y";case r.plot.SourceType.Z:return"z";case r.plot.SourceType.X_LOW:return"xLow";case r.plot.SourceType.X_HIGH:return"xHigh";case r.plot.SourceType.Y_LOW:return"yLow";case r.plot.SourceType.Y_HIGH:return"yHigh";case r.plot.SourceType.TIME:return"time";case r.plot.SourceType.OPEN:return"open";case r.plot.SourceType.HIGH:return"high";case r.plot.SourceType.LOW:return"low";case r.plot.SourceType.CLOSE:return"close";case r.plot.SourceType.SHAPE:return"shape";case r.plot.SourceType.SIZE:return"size";case r.plot.SourceType.LABEL:return"label";case r.plot.SourceType.COLOR:return"color";case r.plot.SourceType.PARENT:return"parent";case r.plot.SourceType.HOVER_TEXT:return"hovertext";case r.plot.SourceType.TEXT:return"text";default:throw new Error("Unrecognized source type: ".concat(t))}}getPlotlySeriesOrientation(e){var t,r,{dh:n}=this,{sources:a}=e;return a.length===2&&((t=a[0])===null||t===void 0||(r=t.axis)===null||r===void 0?void 0:r.type)===n.plot.AxisType.Y?v.ORIENTATION.HORIZONTAL:v.ORIENTATION.VERTICAL}makeSeriesDataFromSeries(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,{name:i,isLinesVisible:l,isShapesVisible:s,plotStyle:u,lineColor:d,shapeColor:c,sources:f,shape:m,shapeSize:g}=e,E=f.some(b=>{var S;return(S=b.axis)===null||S===void 0?void 0:S.businessCalendar}),h=this.getChartType(u,E,a),y=this.getPlotlyChartMode(u,l??void 0,s??void 0),C=this.getPlotlySeriesOrientation(e),w=v.makeSeriesData(h,y,i,n,C);return this.addSourcesToSeriesData(w,u,f,t),this.addStylingToSeriesData(w,u,d,c,m,g,r),w}addSourcesToSeriesData(e,t,r,n){for(var a=e,i=0;i<r.length;i+=1){var l=r[i],{axis:s,type:u}=l,d=this.getPlotlyProperty(t,u);Re(a,d,[]);var c=s!=null?this.getAxisPropertyName(s.type):null;if(c!=null){var f=n.get(s.type);if(f){var m=f.indexOf(s),g=m>0?"".concat(m+1):"";a["".concat(c,"axis")]="".concat(c).concat(g)}}}}addStylingToSeriesData(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,{dh:s}=this,u=e;if(u.marker={line:{}},u.line={width:1},t===s.plot.SeriesPlotStyle.AREA?u.fill="tozeroy":t===s.plot.SeriesPlotStyle.STACKED_AREA?u.stackgroup="stack":t===s.plot.SeriesPlotStyle.STEP?u.line.shape="hv":t===s.plot.SeriesPlotStyle.HISTOGRAM?u.width=[]:t===s.plot.SeriesPlotStyle.PIE?u.textinfo="label+percent":t===s.plot.SeriesPlotStyle.TREEMAP&&(u.hoverinfo="text",u.textinfo="label+text",u.tiling={packing:"squarify",pad:0},u.textposition="middle center"),r!=null&&(t===s.plot.SeriesPlotStyle.BAR?u.marker.color=r:u.line.color=r),n!=null&&(u.marker.color=n),a!=null&&a.length>0)try{u.marker.symbol=v.getMarkerSymbol(a)}catch(d){Z.warn("Unable to handle shape",a,":",d)}i!=null&&(u.marker.size=i*v.DEFAULT_MARKER_SIZE),l!=null&&t!==s.plot.SeriesPlotStyle.PIE&&(u.visible=l)}getChartType(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,{dh:n}=this;switch(e){case n.plot.SeriesPlotStyle.HISTOGRAM:return"bar";default:return this.getPlotlyChartType(e,t,r)}}getAxisPropertyName(e){var{dh:t}=this;switch(e){case t.plot.AxisType.X:return"x";case t.plot.AxisType.Y:return"y";default:return null}}getAxisSide(e){var{dh:t}=this;switch(e){case t.plot.AxisPosition.BOTTOM:return"bottom";case t.plot.AxisPosition.TOP:return"top";case t.plot.AxisPosition.LEFT:return"left";case t.plot.AxisPosition.RIGHT:return"right";default:return}}updateFigureAxes(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,i=e,l=v.getAllAxes(t),s=0;s<t.charts.length;s+=1){var u=t.charts[s],d=r?.(u),c=this.getChartBounds(t,u,n,a);this.updateLayoutAxes(i,u.axes,l,n,a,c,d)}this.removeStaleAxes(i,l)}getChartBounds(e,t,r,n){var a,{dh:i}=this,{cols:l,rows:s}=e,{column:u,colspan:d,row:c,rowspan:f}=t,m=u+d,g=c+f,E=1/l,h=1/s,y=v.AXIS_SIZE_PX/r,C=v.AXIS_SIZE_PX/n,w={bottom:(s-g)*h+(g<s?C/2:0),top:(s-c)*h-(c>0?C/2:0),left:u*E+(u>0?y/2:0),right:m*E-(m<l?y/2:0)},b=v.groupArray(t.axes,"position"),S=(a=b.get(i.plot.AxisPosition.RIGHT))!==null&&a!==void 0?a:[];return S.length>0&&(r>0?w.right-=(w.right-w.left)*Math.max(0,Math.min(v.LEGEND_WIDTH_PX/r,v.MAX_LEGEND_SIZE)):w.right-=(w.right-w.left)*v.DEFAULT_AXIS_SIZE),w}getPlotlyDateFormat(e,t,r){var{dh:n}=this,a=r?.replace("%","%%").replace(/S{9}/g,"%9f").replace(/S{8}/g,"%8f").replace(/S{7}/g,"%7f").replace(/S{6}/g,"%6f").replace(/S{5}/g,"%5f").replace(/S{4}/g,"%4f").replace(/S{3}/g,"%3f").replace(/S{2}/g,"%2f").replace(/S{1}/g,"%1f").replace(/y{4}/g,"%Y").replace(/y{2}/g,"%y").replace(/M{4}/g,"%B").replace(/M{3}/g,"%b").replace(/M{2}/g,"%m").replace(/M{1}/g,"%-m").replace(/E{4,}/g,"%A").replace(/E{1,}/g,"%a").replace(/d{2}/g,"%d").replace(/([^%]|^)d{1}/g,"$1%-d").replace(/H{2}/g,"%H").replace(/h{2}/g,"%I").replace(/h{1}/g,"%-I").replace(/m{2}/g,"%M").replace(/s{2}/g,"%S").replace("'T'","T").replace(" z",""),i,l=e?.getColumnTypeFormatter(t);return l!=null&&me(l)&&l.dhTimeZone!=null&&l.showTimeZone&&(i=n.i18n.DateTimeFormat.format(" z",new Date,l.dhTimeZone)),{tickformat:a,ticksuffix:i,automargin:!0}}getPlotlyAxisFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,{dh:r}=this,{axis:n,columnType:a}=e,{formatPattern:i}=n,l=null;return ae.isDateType(a)?(l=this.getPlotlyDateFormat(t,a,i),l=v.addTickSpacing(l,n,!0)):ae.isNumberType(a)&&(l=v.getPlotlyNumberFormat(t,a,i),l=v.addTickSpacing(l,n,!1)),n.formatType===r.plot.AxisFormatType.CATEGORY&&(l?l.type="category":l={type:"category",tickformat:void 0,ticksuffix:void 0}),l}updateLayoutAxes(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{left:0,top:0,right:1,bottom:1},l=arguments.length>6?arguments[6]:void 0,{dh:s}=this,u=n>0?Math.max(v.MIN_AXIS_SIZE,Math.min(v.AXIS_SIZE_PX/a,v.MAX_AXIS_SIZE)):v.DEFAULT_AXIS_SIZE,d=a>0?Math.max(v.MIN_AXIS_SIZE,Math.min(v.AXIS_SIZE_PX/n,v.MAX_AXIS_SIZE)):v.DEFAULT_AXIS_SIZE,c=e,f=v.groupArray(t,"position"),m=v.groupArray(t,"type"),g=[...m.keys()],E=v.groupArray(r,"type"),h=0;h<g.length;h+=1){var y=g[h],C=this.getAxisPropertyName(y);if(C!=null){var w=m.get(y),b=E.get(y),S=y===s.plot.AxisType.Y,A=S?a:n;Y(w),Y(b);for(var R=0;R<w.length;R+=1){var N=w[R],L=b.indexOf(N),H=v.getAxisLayoutProperty(C,L);c[H]==null&&(c[H]={});var O=c[H];if(O!=null){this.updateLayoutAxis(O,N,R,f,u,d,i);var{range:I,autorange:D}=O;if(l!=null&&I!==void 0&&(D===void 0||D===!1)){var X=l(N),[B,z]=X(I);Z.debug("Setting downsample range",A,B,z),N.range(A,B,z)}else N.range(A)}}}}}removeStaleAxes(e,t){for(var r=e,n=v.groupArray(t,"type"),a=[...n.keys()],i=0;i<a.length;i+=1){var l=a[i],s=n.get(l);Y(s);var u=s.length,d=this.getAxisPropertyName(l);if(d!=null)for(var c=v.getAxisLayoutProperty(d,u);r[c]!=null;)delete r[c],u+=1,c=v.getAxisLayoutProperty(d,u)}}updateLayoutAxis(e,t,r,n,a,i,l){var s,{dh:u}=this,d=t.type===u.plot.AxisType.Y,c=d?i:a,f=e,m=(s=t.label)!==null&&s!==void 0?s:"";if(f.title!==void 0&&typeof f.title!="string"?f.title.text=m:f.title={text:m},t.log&&(f.type="log"),f.side=this.getAxisSide(t.position),r>0){var g,E;f.overlaying=(g=this.getAxisPropertyName(t.type))!==null&&g!==void 0?g:void 0;var h=(E=n.get(t.position))!==null&&E!==void 0?E:[],y=h.indexOf(t);y>0&&(f.anchor="free",t.position===u.plot.AxisPosition.RIGHT?f.position=l.right+(y-h.length+1)*c:t.position===u.plot.AxisPosition.TOP?f.position=l.top+(y-h.length+1)*c:t.position===u.plot.AxisPosition.BOTTOM?f.position=l.bottom+(h.length-y+1)*c:t.position===u.plot.AxisPosition.LEFT&&(f.position=l.left+(h.length-y+1)*c))}else if(t.type===u.plot.AxisType.X){var C=n.get(u.plot.AxisPosition.LEFT)||[],w=n.get(u.plot.AxisPosition.RIGHT)||[],b=Math.max(l.left,l.left+(C.length-1)*i),S=Math.min(l.right-(w.length-1)*i,l.right);f.domain=[b,S]}else if(t.type===u.plot.AxisType.Y){var A=n.get(u.plot.AxisPosition.BOTTOM)||[],R=n.get(u.plot.AxisPosition.TOP)||[],N=Math.max(l.bottom,l.bottom+(A.length-1)*a),L=Math.min(l.top-(R.length-1)*a,l.top);f.domain=[N,L]}}createBoundsFromPeriods(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(e.length===0)return[];for(var r=e.map(s=>[(v.periodToDecimal(s.open)+t)%24,(v.periodToDecimal(s.close)+t)%24]).sort((s,u)=>s[0]-u[0]),n=[],a=0;a<r.length;a+=1){var i=r[a],l=r[(a+1)%r.length];n.push([i[1],l[0]])}return n}createBreaksFromPeriods(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.createBoundsFromPeriods(e,t);return r.map(n=>({pattern:"hour",bounds:n}))}createBoundsFromDays(e){var t=this.daysOfWeek.length;if(e.length===t)return[];for(var r=e.map(s=>this.daysOfWeek.indexOf(s)),n=new Set(r),a=new Set,i=0;i<t;i+=1)!n.has(i)&&n.has((i-1+t)%t)&&a.add(i);var l=[];return a.forEach(s=>{for(var u=0;u<t;u+=1){var d=(s+u)%t;if(n.has(d)){l.push([s,d]);return}}throw new Error("Unable to find open day for closed day ".concat(s,", businessDays: ").concat(e))}),l}createBreaksFromDays(e){var t=this.createBoundsFromDays(e);return t.map(r=>({pattern:"day of week",bounds:r}))}createRangeBreaksFromBusinessCalendar(e,t){var r=[],{businessPeriods:n,businessDays:a,holidays:i,timeZone:l}=e,s=t?.getColumnTypeFormatter(ve),u;me(s)&&(u=s.dhTimeZone);var d=v.getTimeZoneDiff(l,u);return i.length>0&&r.push(...this.createRangeBreakValuesFromHolidays(i,l,u,e)),r.push(...this.createBreaksFromPeriods(n,d)),r.push(...this.createBreaksFromDays(a)),r}createRangeBreakValuesFromHolidays(e,t,r,n){var a=[],i=[];return e.forEach(l=>{l.businessPeriods.length>0?i.push(...this.createPartialHoliday(l,t,r,n)):a.push(this.createFullHoliday(l,t,r))}),[{values:a},...i]}createFullHoliday(e,t,r){return this.adjustDateForTimeZone("".concat(e.date.toString()," 00:00:00.000000"),t,r)}createPartialHoliday(e,t,r,n){var a;if(e.businessPeriods.length===0)return[];var i=e.date.toString();if(n){var l=new Date(i).getDay(),s=n.businessDays.includes(this.daysOfWeek[l]);if(!s)return[]}for(var u=v.createClosedRangesForPartialHoliday(e.businessPeriods,(a=n?.businessPeriods)!==null&&a!==void 0?a:[]),d=[],c=0;c<u.length;c+=1){var[f,m]=u[c];if(f!==m){var g=[this.adjustDateForTimeZone("".concat(i," ").concat(v.decimalToPeriod(f),":00.000000"),t,r)],E=Xe*(m-f);d.push({values:g,dvalue:E})}}return d}adjustDateForTimeZone(e,t,r){return r&&r.standardOffset!==t.standardOffset?this.unwrapValue(this.wrapValue(e,ve,t),r):e}makeFigureSettings(e,t){var{dh:r}=this,{series:n,xAxis:a,type:i}=e,l=v.titleFromSettings(e),s={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.X),position:"".concat(r.plot.AxisPosition.BOTTOM)},u={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.Y),position:"".concat(r.plot.AxisPosition.LEFT)};return{charts:[{chartType:"".concat(r.plot.ChartType.XY),axes:[s,u],series:(n??[]).map(d=>({plotStyle:"".concat(i),name:d,dataSources:[{type:"".concat(r.plot.SourceType.X),columnName:a??"",axis:s,table:t},{type:"".concat(r.plot.SourceType.Y),columnName:d,axis:u,table:t}]}))}],title:l}}unwrapValue(e,t){var{dh:r}=this;if(e!=null){if(Ve(e))return r.i18n.DateTimeFormat.format(v.DATE_FORMAT,e,t);if(Ye(e))return e.asNumber()}return e}wrapValue(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,{dh:n}=this;if(ae.isDateType(t)&&typeof e=="string"){var a=e,i=v.DATE_FORMAT.substr(0,e.length),l=n.i18n.DateTimeFormat.parse(i,a);if(!r)return l;var s="".concat(i," Z"),u=n.i18n.DateTimeFormat.format("Z",l,r),d=n.i18n.DateTimeFormat.parse(s,"".concat(a," ").concat(u)),c=n.i18n.DateTimeFormat.format("Z",d,r);return n.i18n.DateTimeFormat.parse(s,"".concat(a," ").concat(c))}return e}makeLayoutAxis(e,t){var{dh:r}=this,n={automargin:!0,gridcolor:t.gridcolor,linecolor:t.linecolor,rangeslider:{visible:!1},showline:!0,ticks:"outside",ticklen:5,tickcolor:t.paper_bgcolor,tickfont:{color:t.zerolinecolor},title:{font:{color:t.title_color}},legend:{font:{color:t.legend_color}}};return e===r.plot.AxisType.X?Object.assign(n,{showgrid:!0}):e===r.plot.AxisType.Y&&Object.assign(n,{zerolinecolor:t.zerolinecolor,zerolinewidth:2}),n}makeDefaultTemplate(e){var{error_band_line_color:t,ohlc_increasing:r,ohlc_decreasing:n,title_color:a}=e;return{data:{bar:[{marker:{line:{color:"transparent"}}}],scatter:[{error_x:{color:t},error_y:{color:t}}],ohlc:[{increasing:{line:{color:r}},decreasing:{line:{color:n}}}],pie:[{outsidetextfont:{color:a}}],treemap:[{outsidetextfont:{color:a}}]},layout:this.makeDefaultLayout(e)}}makeDefaultLayout(e){var{dh:t}=this,{paper_bgcolor:r,plot_bgcolor:n,title_color:a,coastline_color:i,land_color:l,ocean_color:s,lake_color:u,river_color:d}=e,c={paper_bgcolor:r,plot_bgcolor:n,autosize:!0,colorway:v.normalizeColorway(e?.colorway),font:{family:"'Fira Sans', sans-serif",color:a},title:{font:{color:a},xanchor:"center",xref:"paper",yanchor:"top",pad:G({},v.DEFAULT_TITLE_PADDING),y:1},legend:{font:{color:a}},margin:G({},v.DEFAULT_MARGIN),xaxis:this.makeLayoutAxis(t.plot.AxisType.X,e),yaxis:this.makeLayoutAxis(t.plot.AxisType.Y,e),polar:{angularaxis:this.makeLayoutAxis(t.plot.AxisType.SHAPE,e),radialaxis:this.makeLayoutAxis(t.plot.AxisType.SHAPE,e),bgcolor:e.plot_bgcolor},scene:{xaxis:this.makeLayoutAxis(t.plot.AxisType.X,e),yaxis:this.makeLayoutAxis(t.plot.AxisType.Y,e),zaxis:this.makeLayoutAxis(null,e)},geo:{showcoastlines:!0,showframe:!1,showland:!0,showocean:!0,showlakes:!0,showrivers:!0,bgcolor:r,coastlinecolor:i,landcolor:l,oceancolor:s,lakecolor:u,rivercolor:d}};return c.datarevision=0,c}hydrateSettings(e){var{dh:t}=this;return G(G({},e),{},{type:e.type!=null?t.plot.SeriesPlotStyle[e.type]:void 0})}}x(v,"DEFAULT_AXIS_SIZE",.15);x(v,"MIN_AXIS_SIZE",.025);x(v,"MAX_AXIS_SIZE",.2);x(v,"AXIS_SIZE_PX",75);x(v,"LEGEND_WIDTH_PX",50);x(v,"MAX_LEGEND_SIZE",.25);x(v,"ORIENTATION",Object.freeze({HORIZONTAL:"h",VERTICAL:"v"}));x(v,"DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSS");x(v,"DEFAULT_MARGIN",Object.freeze({l:60,r:50,t:30,b:60,pad:0}));x(v,"DEFAULT_TITLE_PADDING",Object.freeze({t:8}));x(v,"SUBTITLE_LINE_HEIGHT",25);x(v,"DEFAULT_MARKER_SIZE",6);x(v,"MODE_MARKERS","markers");x(v,"MODE_LINES","lines");const Ht=v;function M(o,e,t){return e=Qe(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Qe(o){var e=Je(o,"string");return typeof e=="symbol"?e:String(e)}function Je(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}class P{constructor(e){M(this,"dh",void 0),M(this,"listeners",void 0),M(this,"formatter",void 0),M(this,"renderOptions",void 0),M(this,"rect",void 0),M(this,"isDownsamplingDisabled",void 0),M(this,"title",void 0),this.dh=e,this.listeners=[],this.isDownsamplingDisabled=!1}getData(){return[]}getDefaultTitle(){return""}getLayout(){return{}}getFilterColumnMap(){return new Map}isFilterRequired(){return!1}setFilter(e){}close(){}setFormatter(e){this.formatter=e}setRenderOptions(e){this.renderOptions=e}setDownsamplingDisabled(e){this.isDownsamplingDisabled=e}setDimensions(e){this.rect=e}setTitle(e){this.title=e}subscribe(e){this.listeners.push(e)}unsubscribe(e){this.listeners=this.listeners.filter(t=>t!==e)}fireEvent(e){for(var t=0;t<this.listeners.length;t+=1)this.listeners[t](e)}fireUpdate(e){this.fireEvent(new CustomEvent(P.EVENT_UPDATED,{detail:e}))}fireDisconnect(){this.fireEvent(new CustomEvent(P.EVENT_DISCONNECT))}fireReconnect(){this.fireEvent(new CustomEvent(P.EVENT_RECONNECT))}fireDownsampleStart(e){this.fireEvent(new CustomEvent(P.EVENT_DOWNSAMPLESTARTED,{detail:e}))}fireDownsampleFinish(e){this.fireEvent(new CustomEvent(P.EVENT_DOWNSAMPLEFINISHED,{detail:e}))}fireDownsampleFail(e){this.fireEvent(new CustomEvent(P.EVENT_DOWNSAMPLEFAILED,{detail:e}))}fireDownsampleNeeded(e){this.fireEvent(new CustomEvent(P.EVENT_DOWNSAMPLENEEDED,{detail:e}))}fireLoadFinished(){this.fireEvent(new CustomEvent(P.EVENT_LOADFINISHED))}fireError(e){this.fireEvent(new CustomEvent(P.EVENT_ERROR,{detail:e}))}}M(P,"EVENT_UPDATED","ChartModel.EVENT_UPDATED");M(P,"EVENT_DISCONNECT","ChartModel.EVENT_DISCONNECT");M(P,"EVENT_RECONNECT","ChartModel.EVENT_RECONNECT");M(P,"EVENT_DOWNSAMPLESTARTED","ChartModel.EVENT_DOWNSAMPLESTARTED");M(P,"EVENT_DOWNSAMPLEFINISHED","ChartModel.EVENT_DOWNSAMPLEFINISHED");M(P,"EVENT_DOWNSAMPLEFAILED","ChartModel.EVENT_DOWNSAMPLEFAILED");M(P,"EVENT_DOWNSAMPLENEEDED","ChartModel.EVENT_DOWNSAMPLENEEDED");M(P,"EVENT_LOADFINISHED","ChartModel.EVENT_LOADFINISHED");M(P,"EVENT_ERROR","ChartModel.EVENT_ERROR");const kt=P;function ge(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function Ge(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ge(Object(t),!0).forEach(function(r){Ue(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ge(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Ue(o,e,t){return e=et(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function et(o){var e=tt(o,"string");return typeof e=="symbol"?e:String(e)}function tt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var rt=j.lazy(()=>Se(()=>import("./IrisGrid-ba04137c.js"),["./IrisGrid-ba04137c.js","./vendor-42b82a60.js","./helpers-de833af9.js","./vendor-07c93e4f.css","./index-65dd7b54.js","./monaco-b5248072.js","./monaco-f18fde03.css","./index-13e1b819.css","./ControlType-17bce983.js","./ControlType-403497ff.css","./MissingPartitionError-d32eff17.js","./IrisGridThemeProvider-e0773395.js","./IrisGridShortcuts-6bff8af6.js","./GridRenderer-168e9bfa.js","./GridRenderer-085724f5.css","./FormatterUtils-4bc01d78.js","./IrisGridThemeProvider-3984e29a.css","./Grid-41af89a1.js","./Grid-6b71b6c4.css","./IrisGrid-08e5a52d.css"],import.meta.url)),be=j.forwardRef((o,e)=>F.jsx(j.Suspense,{fallback:F.jsx(we,{}),children:F.jsx(rt,Ge({ref:e},o))}));be.displayName="LazyIrisGrid";const _t=be;function nt(o,e,t){return e=at(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function at(o){var e=ot(o,"string");return typeof e=="symbol"?e:String(e)}function ot(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}class lt extends Error{constructor(){super(...arguments),nt(this,"isAssertionFailed",!0)}}const it=lt;function ut(o){return o?.isEditable!==void 0}function jt(o){if(!ut(o))throw new it("Expected 'model' to be editable, but received ".concat(o))}function st(o){return o?.hasExpandableRows!==void 0}function K(o,e,t){return e=dt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function dt(o){var e=ct(o,"string");return typeof e=="symbol"?e:String(e)}function ct(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var le;(function(o){o.DOWN="DOWN",o.UP="UP",o.LEFT="LEFT",o.RIGHT="RIGHT"})(le||(le={}));class p{static normalize(e,t,r,n){var a=e,i=t,l=r,s=n;return a!=null&&l!=null&&l<a&&(a=l,l=e),i!=null&&s!=null&&s<i&&(i=s,s=t),[a,i,l,s]}static makeNormalized(e,t,r,n){return new p(...p.normalize(e,t,r,n))}static makeCell(e,t){return new p(e,t,e,t)}static makeColumn(e){return new p(e,null,e,null)}static makeRow(e){return new p(null,e,null,e)}static minOrNull(e,t){return e==null||t==null?null:Math.min(e,t)}static maxOrNull(e,t){return e==null||t==null?null:Math.max(e,t)}static consolidate(e){for(var t=e.slice(),r=!0;r;){r=!1;for(var n=0;n<t.length&&!r;n+=1)for(var a=t[n],i=t.length-1;i>n;i-=1){var l=t[i];if(a.contains(l))t.splice(i,1);else if(l.contains(a)){r=!0,t[n]=l,t.splice(i,1);break}else if(a.startRow===l.startRow&&a.endRow===l.endRow){if(a.touches(l)){var{startRow:s,endRow:u}=a,d=p.minOrNull(a.startColumn,l.startColumn),c=p.maxOrNull(a.endColumn,l.endColumn);r=!0,t[n]=new p(d,s,c,u),t.splice(i,1);break}}else if(a.startColumn===l.startColumn&&a.endColumn===l.endColumn&&a.touches(l)){var{startColumn:f,endColumn:m}=a,g=p.minOrNull(a.startRow,l.startRow),E=p.maxOrNull(a.endRow,l.endRow);r=!0,t[n]=new p(f,g,m,E),t.splice(i,1);break}}}return t}static isAxisRangeTouching(e,t,r,n){return e==null?t==null||r==null?!0:r<=t+1:t==null?n==null?!0:n>=e-1:r==null?n==null?!0:e<=n+1:n==null?t>=r-1:r>=e-1?r<=t+1:n>=e-1}static rangeArraysEqual(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(var r=0;r<e.length;r+=1)if(!e[r].equals(t[r]))return!1;return!0}static intersection(e,t){var r,n,a,i,l,s;if(e.equals(t))return e;var{startColumn:u,startRow:d,endColumn:c,endRow:f}=e;return u=u!=null&&t.startColumn!=null?Math.max(u,t.startColumn):(r=u)!==null&&r!==void 0?r:t.startColumn,c=c!=null&&t.endColumn!=null?Math.min(c,t.endColumn):(n=c)!==null&&n!==void 0?n:t.endColumn,d=d!=null&&t.startRow!=null?Math.max(d,t.startRow):(a=d)!==null&&a!==void 0?a:t.startRow,f=f!=null&&t.endRow!=null?Math.min(f,t.endRow):(i=f)!==null&&i!==void 0?i:t.endRow,u!=null&&u>((l=c)!==null&&l!==void 0?l:-1)||d!=null&&d>((s=f)!==null&&s!==void 0?s:-1)?null:new p(u,d,c,f)}static subtractFromRange(e,t){var r=[],n=p.intersection(e,t);return n==null?[e]:(n.startRow!=null&&(e.startRow==null||e.startRow<n.startRow)&&r.push(new p(e.startColumn,e.startRow,e.endColumn,n.startRow-1)),n.startColumn!=null&&(e.startColumn==null||e.startColumn<n.startColumn)&&r.push(new p(e.startColumn,n.startRow,n.startColumn-1,n.endRow)),n.endColumn!=null&&(e.endColumn==null||e.endColumn>n.endColumn)&&r.push(new p(n.endColumn+1,n.startRow,e.endColumn,n.endRow)),n.endRow!=null&&(e.endRow==null||e.endRow>n.endRow)&&r.push(new p(e.startColumn,n.endRow+1,e.endColumn,e.endRow)),r)}static subtractFromRanges(e,t){for(var r=[],n=0;n<e.length;n+=1)r.push(...p.subtractFromRange(e[n],t));return r}static subtractRangesFromRanges(e,t){for(var r=[...e],n=0;n<t.length;n+=1)r=p.subtractFromRanges(r,t[n]);return r}static isBounded(e){return e.startRow!=null&&e.startColumn!=null&&e.endRow!=null&&e.endColumn!=null}static boundedRange(e,t,r){var n,a,i,l;return p.isBounded(e)?e:new p((n=e.startColumn)!==null&&n!==void 0?n:0,(a=e.startRow)!==null&&a!==void 0?a:0,(i=e.endColumn)!==null&&i!==void 0?i:t-1,(l=e.endRow)!==null&&l!==void 0?l:r-1)}static boundedRanges(e,t,r){return e.map(n=>p.boundedRange(n,t,r))}static offset(e,t,r){return new p(e.startColumn!=null?e.startColumn+t:null,e.startRow!=null?e.startRow+r:null,e.endColumn!=null?e.endColumn+t:null,e.endRow!=null?e.endRow+r:null)}static nextCell(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:p.SELECTION_DIRECTION.DOWN;if(e.length===0)return null;var a=-1;if(t!=null&&r!=null&&(a=e.findIndex(f=>f.containsCell(t,r)),a>=0)){var i=e[a],l=i.nextCell(t,r,n);if(l!=null)return l}switch(n){case p.SELECTION_DIRECTION.DOWN:case p.SELECTION_DIRECTION.RIGHT:{var s=a<e.length-1?a+1:0,u=e[s];return u.startCell(n)}case p.SELECTION_DIRECTION.LEFT:case p.SELECTION_DIRECTION.UP:{var d=a>0?a-1:e.length-1,c=e[d];return c.startCell(n)}default:throw new Error("Invalid direction: ".concat(n))}}static cellCount(e){return e.reduce((t,r)=>{var n,a,i,l;return t+(((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1)*(((i=r.endColumn)!==null&&i!==void 0?i:NaN)-((l=r.startColumn)!==null&&l!==void 0?l:NaN)+1)},0)}static rowCount(e){return e.reduce((t,r)=>{var n,a;return t+((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1},0)}static columnCount(e){return e.reduce((t,r)=>{var n,a;return t+((n=r.endColumn)!==null&&n!==void 0?n:NaN)-((a=r.startColumn)!==null&&a!==void 0?a:NaN)+1},0)}static containsCell(e,t,r){for(var n=0;n<e.length;n+=1){var a=e[n];if(a.containsCell(t,r))return!0}return!1}static forEachCell(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.SELECTION_DIRECTION.RIGHT,n=0;n<e.length;n+=1)e[n].forEach(t,r)}constructor(e,t,r,n){K(this,"startColumn",void 0),K(this,"startRow",void 0),K(this,"endColumn",void 0),K(this,"endRow",void 0),this.startColumn=e,this.startRow=t,this.endColumn=r,this.endRow=n}equals(e){return this.startColumn===e.startColumn&&this.startRow===e.startRow&&this.endColumn===e.endColumn&&this.endRow===e.endRow}contains(e){return(this.startColumn==null||e.startColumn!=null&&this.startColumn<=e.startColumn)&&(this.startRow==null||e.startRow!=null&&this.startRow<=e.startRow)&&(this.endColumn==null||e.endColumn!=null&&this.endColumn>=e.endColumn)&&(this.endRow==null||e.endRow!=null&&this.endRow>=e.endRow)}containsCell(e,t){return e==null||t==null?!1:(this.startColumn==null||this.startColumn<=e)&&(this.endColumn==null||this.endColumn>=e)&&(this.startRow==null||this.startRow<=t)&&(this.endRow==null||this.endRow>=t)}touches(e){return p.isAxisRangeTouching(this.startRow,this.endRow,e.startRow,e.endRow)&&p.isAxisRangeTouching(this.startColumn,this.endColumn,e.startColumn,e.endColumn)}subtract(e){return p.subtractFromRange(this,e)}startCell(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.SELECTION_DIRECTION.DOWN;if(!p.isBounded(this))throw new Error("Cannot get the startCell of an unbounded range");switch(e){case p.SELECTION_DIRECTION.DOWN:case p.SELECTION_DIRECTION.RIGHT:return{column:this.startColumn,row:this.startRow};case p.SELECTION_DIRECTION.LEFT:case p.SELECTION_DIRECTION.UP:return{column:this.endColumn,row:this.endRow};default:throw new Error("Invalid direction: ".concat(e))}}nextCell(e,t,r){if(!p.isBounded(this))throw new Error("Bounded range required");if(e==null||t==null)throw new Error("Require a non-null cursor");var{startColumn:n,endColumn:a,startRow:i,endRow:l}=this;switch(r){case p.SELECTION_DIRECTION.DOWN:if(t<l)return{column:e,row:Math.max(t+1,i)};if(e<a)return{column:Math.max(e+1,n),row:i};break;case p.SELECTION_DIRECTION.UP:if(t>i)return{column:e,row:Math.min(t-1,l)};if(e>n)return{column:Math.min(e-1,a),row:l};break;case p.SELECTION_DIRECTION.RIGHT:if(e<a)return{column:Math.max(e+1,n),row:t};if(t<l)return{column:n,row:Math.max(t+1,i)};break;case p.SELECTION_DIRECTION.LEFT:if(e>n)return{column:Math.min(e-1,a),row:t};if(t>i)return{column:a,row:Math.min(t-1,l)};break;default:throw new Error("Invalid direction: ".concat(r))}return null}forEach(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.SELECTION_DIRECTION.RIGHT,r=0,{column:n,row:a}=this.startCell(t);n!=null&&a!=null;){var i;e(n,a,r),r+=1,{column:n,row:a}=(i=this.nextCell(n,a,t))!==null&&i!==void 0?i:{}}}}K(p,"SELECTION_DIRECTION",le);function ft(o){return Array.isArray(o)&&o.length===2&&(o[0]===null||typeof o[0]=="number")&&(o[1]===null||typeof o[1]=="number")}function U(o){return ft(o)&&o[0]!=null&&o[1]!=null}function pe(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function ee(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pe(Object(t),!0).forEach(function(r){Ce(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Ce(o,e,t){return e=vt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function vt(o){var e=mt(o,"string");return typeof e=="symbol"?e:String(e)}function mt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function Bt(o){return o?.href!==void 0}class T{static getGridPointFromXY(e,t,r){var n=T.getColumnAtX(e,r),a=T.getRowAtY(t,r),i=T.getColumnHeaderDepthAtY(t,r);return{x:e,y:t,row:a,column:n,columnHeaderDepth:i}}static getCellInfoFromXY(e,t,r){var{row:n,column:a}=T.getGridPointFromXY(e,t,r),{allColumnWidths:i,allRowHeights:l,allColumnXs:s,allRowYs:u,modelColumns:d,modelRows:c}=r,f=n!==null?c.get(n):null,m=a!==null?d.get(a):null,g=a!==null?s.get(a):null,E=n!==null?u.get(n):null,h=a!==null?i.get(a):null,y=n!==null?l.get(n):null;return{row:n,column:a,modelRow:f??null,modelColumn:m??null,left:g??null,top:E??null,columnWidth:h??null,rowHeight:y??null}}static getColumnHeaderDepthAtY(e,t){var r=T.getRowAtY(e,t),{columnHeaderHeight:n,columnHeaderMaxDepth:a}=t;if(r===null&&e<=n*a)return V(a-Math.ceil(e/n),0,a-1)}static iterateFloatingStart(e,t,r){for(var n=0;n<e&&n<t;n+=1){var a=r(n);if(a!==void 0)return a}}static iterateFloatingEnd(e,t,r){for(var n=0;n<e&&t-(e-n)>=0;n+=1){var a=r(t-(e-n));if(a!==void 0)return a}}static iterateFloating(e,t,r,n){var a=T.iterateFloatingStart(e,r,n);return a!==void 0?a:T.iterateFloatingEnd(t,r,n)}static iterateAllItems(e,t,r,n,a,i){var l=Math.max(e,r),s=Math.min(t,a-n-1),u=T.iterateFloating(r,n,a,i);if(u!==void 0)return u;for(var d=l;d<=s;d+=1)if(u=i(d),u!==void 0)return u}static isInItem(e,t,r,n){var a,i,l=(a=t.get(e))!==null&&a!==void 0?a:0,s=(i=r.get(e))!==null&&i!==void 0?i:0;return l<=n&&n<=l+s}static getItemAtOffset(e,t,r,n,a,i,l){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,u=s?void 0:T.iterateFloating(r,n,t,f=>{if(T.isInItem(f,i,l,e))return f});if(!s&&u!==void 0)return u;for(var d=0;d<a.length;d+=1){var c=a[d];if(T.isInItem(c,i,l,e))return c}return null}static getColumnAtX(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{columnCount:n,floatingLeftColumnCount:a,floatingRightColumnCount:i,visibleColumns:l,allColumnXs:s,allColumnWidths:u,gridX:d}=t;return e<d?null:this.getItemAtOffset(e-d,n,a,i,l,s,u,r)}static getRowAtY(e,t){var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a,visibleRows:i,allRowYs:l,allRowHeights:s,gridY:u}=t;return e<u?null:this.getItemAtOffset(e-u,a,r,n,i,l,s)}static getNextShownItem(e,t,r,n){var a=r.findIndex(s=>s===e)||0;for(a-=1;a!=null&&a>=0;){var i=r[a],l=t.get(i);if(l!=null&&n.get(l)!==0)return i;a-=1}return null}static getNextShownColumn(e,t){var{modelColumns:r,visibleColumns:n,userColumnWidths:a}=t;return T.getNextShownItem(e,r,n,a)}static getNextShownRow(e,t){var{modelRows:r,visibleRows:n,userRowHeights:a}=t;return T.getNextShownItem(e,r,n,a)}static getColumnSeparatorIndex(e,t,r,n){var{rowHeaderWidth:a,columnHeaderHeight:i,floatingColumns:l,floatingLeftWidth:s,visibleColumns:u,allColumnXs:d,allColumnWidths:c,columnHeaderMaxDepth:f}=r,{allowColumnResize:m,headerSeparatorHandleSize:g}=n;if(f*i<t||!m||g<=0)return null;for(var E=e-a,h=g*.5,y=!1,C=l.length-1;C>=0;C-=1){var w,b,S=l[C],A=(w=d.get(S))!==null&&w!==void 0?w:0,R=(b=c.get(S))!==null&&b!==void 0?b:0,N=R===0;if(!y||!N){var L=A+R;N?L+=h:y&&(L-=h);var H=L-h,O=L+h;if(H<=E&&E<=O)return S;y=N}}y=!1;for(var I=u.length-1;I>=0;I-=1){var D,X,B=u[I],z=(D=d.get(B))!==null&&D!==void 0?D:0,re=(X=c.get(B))!==null&&X!==void 0?X:0,ne=re===0;if(z<s-re)return null;if(!y||!ne){var J=z+re;ne?J+=h:y&&(J-=h);var Oe=J-h,Ie=J+h;if(Oe<=E&&E<=Ie)return B;y=ne}}return null}static isItemHidden(e,t){return t.get(e)===0}static isColumnHidden(e,t){var{allColumnWidths:r}=t;return T.isItemHidden(e,r)}static isFloatingRow(e,t){if(e==null)return!1;var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a}=t;return e<r||e>=a-n}static isFloatingColumn(e,t){if(e==null)return!1;var{floatingLeftColumnCount:r,floatingRightColumnCount:n,columnCount:a}=t;return e<r||e>=a-n}static getHiddenItems(e,t,r){if(!T.isItemHidden(e,t))return[];for(var n=[e],a=r.findIndex(s=>s===e),i=a-1;i>=0;i-=1){var l=r[i];if(!T.isItemHidden(l,t))break;n.push(l)}return n}static getHiddenColumns(e,t){var{visibleColumns:r,allColumnWidths:n}=t;return T.getHiddenItems(e,n,r)}static getRowSeparatorIndex(e,t,r,n){var{rowHeaderWidth:a,columnHeaderHeight:i,visibleRows:l,allRowYs:s,allRowHeights:u}=r,{allowRowResize:d,headerSeparatorHandleSize:c}=n;if(a<e||!d||c<=0)return null;for(var f=t-i,m=c*.5,g=!1,E=l.length-1;E>=0;E-=1){var h,y,C=l[E],w=(h=s.get(C))!==null&&h!==void 0?h:0,b=(y=u.get(C))!==null&&y!==void 0?y:0,S=b===0;if(!g||!S){var A=w+b;S?A+=m:g&&(A-=m);var R=A-m,N=A+m;if(R<=f&&f<=N)return C;g=S}}return null}static isRowHidden(e,t){var{allRowHeights:r}=t;return T.isItemHidden(e,r)}static getHiddenRows(e,t){var{visibleRows:r,allRowHeights:n}=t;return T.getHiddenItems(e,n,r)}static moveItem(e,t,r){if(e===t)return[...r];var n=[...r],a=n[n.length-1];return a!=null&&!U(a.from)&&a.to===e?a.from===t?n.pop():n[n.length-1]=ee(ee({},a),{},{to:t}):n.push({from:e,to:t}),n}static moveRange(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e[0]===e[1])return T.moveItem(e[0],t,r);var a=t;if(n&&e[0]<t&&(a-=e[1]-e[0]),e[0]===a)return[...r];var i=[...r],l=i[i.length-1];l!=null&&U(l.from)&&l.from[1]-l.from[0]===e[1]-e[0]&&l.to===e[0]?i[i.length-1]=ee(ee({},l),{},{to:a}):i.push({from:e,to:a});var s=i[i.length-1];return U(s.from)&&s.from[0]===s.to&&i.pop(),i}static moveItemOrRange(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Array.isArray(e)?T.moveRange(e,t,r,n):T.moveItem(e,t,r)}static applyItemMoves(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=[[e,t]],i=function(){var{from:u,to:d}=r[l],c=1,f;U(u)?(c=u[1]-u[0]+1,[f]=u):f=u;for(var m=n?d:f,g=m+c-1,E=n?f:d,h=E-m,y=[],C=function(){var S,A,R=(S=a[w][0])!==null&&S!==void 0?S:Number.NEGATIVE_INFINITY,N=(A=a[w][1])!==null&&A!==void 0?A:Number.POSITIVE_INFINITY,L,H=[[R,m-1],[m,g],[g+1,N]].map(O=>{var[I,D]=O;return[Math.max(I,R),Math.min(D,N)]}).filter(O=>{var[I,D]=O;return I<=D}).map(O=>{var[I,D]=O;return m<=I&&g>=D?(L=[I+h,D+h],L):g<I?[I-c,D-c]:O}).map(O=>{var[I,D]=O;return E>I&&E<=D?[[I,E-1],[E+c,D+c]]:O===L?[O]:E<=I?[[I+c,D+c]]:[O]}).flat();y.push(...H)},w=0;w<a.length;w+=1)C();a=y.map(b=>{var[S,A]=b;return[Number.isFinite(S)?S:null,Number.isFinite(A)?A:null]})},l=n?r.length-1:0;n?l>=0:l<r.length;n?l-=1:l+=1)i();return a}static translateRange(e,t,r,n){for(var a=T.applyItemMoves(e.startColumn,e.endColumn,t,n),i=T.applyItemMoves(e.startRow,e.endRow,r,n),l=[],s=0;s<a.length;s+=1)for(var u=a[s],d=0;d<i.length;d+=1){var c=i[d];l.push(new p(u[0],c[0],u[1],c[1]))}return l}static getModelIndex(e,t){var r=T.applyItemMoves(e,e,t,!0)[0][0];return r}static getModelIndexes(e,t){return e.map(r=>T.getModelIndex(r,t))}static getModelRangeIndexes(e,t,r){return T.applyItemMoves(e,t,r,!0)}static getModelRange(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k;return T.translateRange(e,t,r,!0)}static getModelRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k,n=[],a=0;a<e.length;a+=1)n.push(...T.getModelRange(e[a],t,r));return n}static getVisibleRangeIndexes(e,t,r){return T.applyItemMoves(e,t,r,!1)}static getVisibleRange(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k;return this.translateRange(e,t,r,!1)}static getVisibleRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k,n=[],a=0;a<e.length;a+=1)n.push(...T.getVisibleRange(e[a],t,r));return n}static getVisibleIndex(e,t){var r=T.applyItemMoves(e,e,t)[0][0];return r}static getVisibleIndexes(e,t){return e.map(r=>T.getVisibleIndex(r,t))}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static getModifierKey(){return T.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=T.getModifierKey();return e[t]}static checkColumnHidden(e,t){return t.get(e)===0}static checkAllColumnsHidden(e,t){return t.size===0?!1:e.every(r=>t.get(r)===0)}static getScrollDragBounds(e,t,r){var{gridX:n,gridY:a,width:i,height:l,floatingTopRowCount:s,floatingBottomRowCount:u,floatingLeftColumnCount:d,floatingRightColumnCount:c,floatingLeftWidth:f,floatingRightWidth:m,floatingTopHeight:g,floatingBottomHeight:E,columnCount:h,rowCount:y}=e,C=n,w=a,b=i,S=l;return r!=null&&(r>d&&(C+=f),r<h-c&&(b-=m)),t!=null&&(t>s&&(w+=g),t<y-u&&(S-=E)),{x1:C,y1:w,x2:b,y2:S}}static getScrollDelta(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1024,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:768,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:20,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:20,{deltaX:i,deltaY:l}=e;return!T.isMacPlatform()&&e.shiftKey&&e.deltaX===0&&e.deltaY!==0&&(i=e.deltaY,l=e.deltaX),e?.deltaMode===WheelEvent.DOM_DELTA_PAGE?(i*=t,l*=r):e?.deltaMode===WheelEvent.DOM_DELTA_LINE&&(T.isMacPlatform()?(i=Math.round(i*n),l=Math.round(l*a)):(i=Math.round(i*this.PIXELS_PER_LINE),l=Math.round(l*this.PIXELS_PER_LINE))),{deltaX:i,deltaY:l}}static compareRanges(e,t){return e[0]==null||e[1]==null||t[0]==null||t[1]==null?0:e[0]!==t[0]?e[0]-t[0]:e[1]-t[1]}static mergeSortedRanges(e){for(var t=[],r=0;r<e.length;r+=1){var n=e[r],a=n[0],i=n[1];r===0?t.push([a,i]):a-1<=t[t.length-1][1]?t[t.length-1][1]=Math.max(t[t.length-1][1],i):t.push([a,i])}return t}static translateTokenBox(e,t){var{x1:r,y1:n,x2:a,y2:i}=e,{gridX:l,gridY:s,width:u,height:d,verticalBarWidth:c,horizontalBarHeight:f}=t,m=V(l+r,l,u-c),g=V(l+a,l,u-c),E=V(s+n,s,d-f),h=V(s+i,s,d-f);return{x1:m,y1:E,x2:g,y2:h,token:e.token}}static getTextRenderMetrics(e,t,r){var{metrics:n,model:a,theme:i}=e,{firstColumn:l,allColumnXs:s,allColumnWidths:u,allRowYs:d,allRowHeights:c,modelRows:f,modelColumns:m}=n,{cellHorizontalPadding:g,treeDepthIndent:E,treeHorizontalPadding:h}=i,y=$(f,r),C=$(m,t),w=a.textAlignForCell(C,y),b=$(s,t),S=$(d,r),A=$(u,t),R=$(c,r),N=t===l,L=0;st(a)&&a.hasExpandableRows&&N&&(L=E*(a.depthForRow(r)+1)+h);var H=A-L,O=b+g,I=S+R*.5;return w==="right"?O=b+H-g:w==="center"&&(O=b+H*.5),O+=L,{width:H-g*2,x:O,y:I}}static findTokensWithProtocolInText(e){var t=Ne(e);return t.filter(r=>r.type==="url"?/^https?:\/\//.test(r.value):!0)}}Ce(T,"PIXELS_PER_LINE",100/3);const he=T;function Ee(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function ye(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ee(Object(t),!0).forEach(function(r){gt(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function gt(o,e,t){return e=pt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function pt(o){var e=ht(o,"string");return typeof e=="symbol"?e:String(e)}function ht(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Et=(o,e)=>{var t=!1,r=Pe(o,ye(ye({},e),{},{dispose:()=>{t||(t=!0,r.clear(),t=!1)}}));return r};const yt=Et;function Tt(o,e,t){return e=wt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function wt(o){var e=St(o,"string");return typeof e=="symbol"?e:String(e)}function St(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var oe=5e3;class bt extends De{constructor(){super(...arguments),Tt(this,"getCachedTokensInText",yt((e,t)=>{if(t>=e.length)return he.findTokensWithProtocolInText(e);var r=e.slice(t-1,oe).search(/\s/),n=t+r;r===-1&&(n=Math.min(oe,e.length));var a=e.substring(0,n);return he.findTokensWithProtocolInText(a)},{max:1e4}))}get floatingTopRowCount(){return 0}get floatingBottomRowCount(){return 0}get floatingLeftColumnCount(){return 0}get floatingRightColumnCount(){return 0}get columnHeaderMaxDepth(){return 1}truncationCharForCell(e,t){}textAlignForCell(e,t){return"left"}colorForCell(e,t,r){return r.textColor}backgroundColorForCell(e,t,r){return null}colorForColumnHeader(e){return null}textForRowHeader(e){return""}textForRowFooter(e){return""}isColumnMovable(e){return!0}isRowMovable(e){return!0}getColumnHeaderGroup(e,t){}getColumnHeaderParentGroup(e,t){}tokensForCell(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:oe,n=this.textForCell(e,t);return this.getCachedTokensInText(n,r)}renderTypeForCell(e,t){return"text"}}const Ct=bt;function ie(o,e,t){return e=At(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function At(o){var e=Ot(o,"string");return typeof e=="symbol"?e:String(e)}function Ot(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var _=[];class Ae extends Ct{constructor(e){super(),ie(this,"dh",void 0),ie(this,"listenerCount",void 0),this.dh=e,this.listenerCount=0}addEventListener(e,t,r){super.addEventListener(e,t,r),this.listenerCount+=1,this.listenerCount===1&&this.startListening()}removeEventListener(e,t,r){super.removeEventListener(e,t,r),this.listenerCount-=1,this.listenerCount===0&&this.stopListening()}startListening(){}stopListening(){}get groupedColumns(){return _}get originalColumns(){return this.columns}sourceForCell(e,t){return{column:e,row:t}}getClearFilterRange(e){return this.isFilterable(e)?[e,e]:null}get initialMovedColumns(){return _}get initialMovedRows(){return _}get initialColumnHeaderGroups(){return _}get layoutHints(){return null}get frontColumns(){return _}get backColumns(){return _}get frozenColumns(){return _}isColumnFrozen(e){return!1}isColumnSortable(e){return!1}get isFilterRequired(){return!1}get isReversible(){return!0}get isColumnStatisticsAvailable(){return!1}get description(){return""}get isCustomColumnsAvailable(){return!1}get isFormatColumnsAvailable(){return!1}get isExportAvailable(){return!1}get isValuesTableAvailable(){return!1}get isChartBuilderAvailable(){return!1}get isRollupAvailable(){return!1}get isSelectDistinctAvailable(){return!1}get isTotalsAvailable(){return!1}get isViewportPending(){return!1}isFilterable(e){return!1}close(){}isRowMovable(){return!1}get isSeekRowAvailable(){return!1}dataBarOptionsForCell(e,t,r){throw new Error("Method not implemented.")}}ie(Ae,"EVENT",Object.freeze({UPDATED:"UPDATED",FORMATTER_UPDATED:"FORMATTER_UPDATED",REQUEST_FAILED:"REQUEST_FAILED",COLUMNS_CHANGED:"COLUMNS_CHANGED",TABLE_CHANGED:"TABLE_CHANGED",FILTERS_CHANGED:"FILTERS_CHANGED",SORTS_CHANGED:"SORTS_CHANGED",DISCONNECT:"DISCONNECT",RECONNECT:"RECONNECT",TOTALS_UPDATED:"TOTALS_UPDATED",PENDING_DATA_UPDATED:"PENDING_DATA_UPDATED",VIEWPORT_UPDATED:"VIEWPORT_UPDATED"}));const Wt=Ae;export{it as A,Dt as B,kt as C,T as G,_t as I,Ft as L,xt as R,Mt as S,Lt as a,Ht as b,Wt as c,p as d,ut as e,Ct as f,he as g,Bt as h,st as i,le as j,jt as k,yt as m};
2
+ //# sourceMappingURL=IrisGridModel-9ae353b6.js.map