@deephaven/embed-widget 1.23.0 → 1.23.1-legacy-table-plugin.bbf55c8.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.
Files changed (25) hide show
  1. package/build/assets/{App-BhL456sh.js → App-CZHOQSuZ.js} +2 -2
  2. package/build/assets/{App-BhL456sh.js.map → App-CZHOQSuZ.js.map} +1 -1
  3. package/build/assets/{Chart-Bct1OTF6.js → Chart-NeXz1Rrn.js} +2 -2
  4. package/build/assets/{Chart-Bct1OTF6.js.map → Chart-NeXz1Rrn.js.map} +1 -1
  5. package/build/assets/{IrisGrid-C3IJz6nb.js → IrisGrid-DQOfM0sH.js} +2 -2
  6. package/build/assets/{IrisGrid-C3IJz6nb.js.map → IrisGrid-DQOfM0sH.js.map} +1 -1
  7. package/build/assets/{IrisGridThemeProvider-PGSqEwKh.js → IrisGridThemeProvider-kRm2Bwoz.js} +2 -2
  8. package/build/assets/{IrisGridThemeProvider-PGSqEwKh.js.map → IrisGridThemeProvider-kRm2Bwoz.js.map} +1 -1
  9. package/build/assets/{LocalWorkspaceStorage-DblP67AR.js → LocalWorkspaceStorage-DFtuLgOU.js} +2 -2
  10. package/build/assets/{LocalWorkspaceStorage-DblP67AR.js.map → LocalWorkspaceStorage-DFtuLgOU.js.map} +1 -1
  11. package/build/assets/{LogPanel-C1_6X3ds.js → LogPanel-BIMOtH9_.js} +2 -2
  12. package/build/assets/{LogPanel-C1_6X3ds.js.map → LogPanel-BIMOtH9_.js.map} +1 -1
  13. package/build/assets/{MarkdownEditor-CPmC5it0.js → MarkdownEditor-BQgkYVaQ.js} +2 -2
  14. package/build/assets/{MarkdownEditor-CPmC5it0.js.map → MarkdownEditor-BQgkYVaQ.js.map} +1 -1
  15. package/build/assets/{MarkdownNotebook-BsHvrPUA.js → MarkdownNotebook-BumXvjrK.js} +2 -2
  16. package/build/assets/{MarkdownNotebook-BsHvrPUA.js.map → MarkdownNotebook-BumXvjrK.js.map} +1 -1
  17. package/build/assets/{index-CgAoPxrH.js → index-BSbb34Qu.js} +36 -36
  18. package/build/assets/index-BSbb34Qu.js.map +1 -0
  19. package/build/assets/{index-DK1KaCOb.js → index-HfBKyFpH.js} +3 -3
  20. package/build/assets/{index-DK1KaCOb.js.map → index-HfBKyFpH.js.map} +1 -1
  21. package/build/assets/{index-sIC4DbFu.js → index-Wgnj-QXX.js} +2 -2
  22. package/build/assets/{index-sIC4DbFu.js.map → index-Wgnj-QXX.js.map} +1 -1
  23. package/build/index.html +1 -1
  24. package/package.json +17 -17
  25. package/build/assets/index-CgAoPxrH.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Plot-BOusvhev.js","./Plotly-C1DmK1JJ.js","./plotly-XNdqftXi.js","./helpers-BosuxZz1.js","./vendor-Iv4yoqlt.js","./vendor-BSYTbjlr.css"])))=>i.map(i=>d[i]);
2
- import{ao as Iu,a as H,aO as js,T as Du,X as Mu,Y as ju,V as Au,a4 as ku,O as Nu,z as Lu,a8 as Ru,d as As,G as ks,e as Ns,q as $u,aP as Fu,aH as Hu,aQ as Ls,aR as Uu,aS as Bu,L as Un,ac as Wu,_ as Ku,aT as Rs,u as B,t as $s,Z as zu,aU as Vu,aN as Gu,aJ as Fs,aK as qu,f as Hs,n as Xu,aL as ii,aV as Zu,aW as Yu,aX as eo,aY as Qu,aZ as Ju,a_ as ed,a$ as td,v as nd,k as Us,aF as rd,h as zr,aA as id,b0 as od,b1 as to,aD as ad,b2 as no,b3 as Bs,b4 as sd,au as ld,b5 as ud,b6 as dd,b7 as cd,b8 as hd,b9 as md,ba as pd}from"./index-DK1KaCOb.js";import{r as h,as as Bn,bE as Ir,D as d,bU as fd,J as j,G as U,bV as Ws,bW as oi,H as vd,R as Oi,bX as gd,bG as bd,I as me,C as Pt,bY as yd,aj as Cd,ak as Sd,E as Ks,ar as fn,bZ as wd,b_ as _d,b$ as Ed,c0 as Pd,bR as ai,c1 as x,c2 as ro,bT as pe,L as zs,N as Vs,c3 as Td,bS as Wn,bO as Cn,_ as Od,bp as Le,c4 as xd,an as Id,aH as Dd,bs as io,c5 as Md,c6 as oo,br as rt,c7 as Gs,c8 as jd,bP as nt,bQ as en,c9 as ao,bq as Ad,bN as kd,ca as Nn}from"./vendor-Iv4yoqlt.js";var Nd=Object.freeze([]),yC=new Map,qs=()=>{};function CC(n){return Array.isArray(n)?n:[n]}function SC(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return e.filter(r=>r!=null)}function Ld(n,e,t){return(e=Rd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Rd(n){var e=$d(n,"string");return typeof e=="symbol"?e:e+""}function $d(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class so extends Error{constructor(){super(...arguments),Ld(this,"isCanceled",!0)}}function Fd(n,e,t){return(e=Hd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Hd(n){var e=Ud(n,"string");return typeof e=="symbol"?e:e+""}function Ud(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Bd extends Error{constructor(){super(...arguments),Fd(this,"isClipboardPermissionsDeniedError",!0)}}function Wd(n,e,t){return(e=Kd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Kd(n){var e=zd(n,"string");return typeof e=="symbol"?e:e+""}function zd(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Vr extends Error{constructor(){super(...arguments),Wd(this,"isClipboardUnavailableError",!0)}}function Vd(n,e,t){return(e=Gd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Gd(n){var e=qd(n,"string");return typeof e=="symbol"?e:e+""}function qd(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Xs extends Error{constructor(){super(...arguments),Vd(this,"isPermissionUnsupported",!0)}}function lo(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function Xd(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){lo(o,r,i,a,s,"next",l)}function s(l){lo(o,r,i,a,s,"throw",l)}a(void 0)})}}function uo(n){return si.apply(this,arguments)}function si(){return si=Xd(function*(n){try{var e=n;return(yield navigator.permissions.query({name:e})).state}catch(t){throw t instanceof TypeError?new Xs:t}}),si.apply(this,arguments)}function co(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function Zs(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){co(o,r,i,a,s,"next",l)}function s(l){co(o,r,i,a,s,"throw",l)}a(void 0)})}}function Ys(n){return li.apply(this,arguments)}function li(){return li=Zs(function*(n){var e=navigator,t=e.clipboard;if(t!==void 0)try{return yield navigator.clipboard.writeText(n)}catch{}Zd(n)}),li.apply(this,arguments)}function Zd(n){var e=document.activeElement,t=document.createElement("textarea");t.value=n,document.body.appendChild(t),t.focus(),t.select();var r=document.execCommand("copy");if(document.body.removeChild(t),e instanceof HTMLElement&&e.focus(),!r)throw new Error("Unable to execute copy command")}function wC(){return ui.apply(this,arguments)}function ui(){return ui=Zs(function*(){try{var n=navigator,e=n.clipboard;if(e===void 0)throw new Vr;var t=yield uo("clipboard-read");if(t==="granted"){var r=yield e.readText();return r}if(t==="prompt"){try{yield e.readText()}catch{}if(t=yield uo("clipboard-read"),t==="granted"){var i=yield e.readText();return i}}if(t==="prompt"||t==="denied")throw new Bd}catch(o){throw o instanceof Xs?new Vr:o}throw new Vr}),ui.apply(this,arguments)}var In;function rn(n,e,t){return(e=Yd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Yd(n){var e=Qd(n,"string");return typeof e=="symbol"?e:e+""}function Qd(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Jd="table_",Qs="column_",ec=new Set(["in","not","i","ii","k"]),tc=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"]),nc=/[^a-zA-Z0-9_$\-+@]/g,rc=/[^A-Za-z0-9_$]/g,ic=/^[a-zA-Z_$][a-zA-Z0-9_$\-+@]*$/,oc=/[^a-zA-Z0-9_]/g;function ac(n){return n.replace(/[ -]/g,"_")}function sc(n){return n.replace(/\s/g,"_")}class gt{}In=gt;rn(gt,"legalize",(n,e,t,r,i,o)=>{var a=e(n.trim());return i&&(ec.has(a)||tc.has(a))&&(a=t+a),a=a.replace(r,""),a?(/^[0-9-]/.test(a)&&(a=t+a),a):t+o});rn(gt,"legalizeTableName",n=>In.legalize(n,sc,Jd,nc,!1,0));rn(gt,"makeVariableName",n=>In.legalizeTableName(n).replace(oc,"_"));rn(gt,"legalizeColumnNames",n=>{var e=[];return n.forEach((t,r)=>{var i=In.legalizeColumnName(t,r);e.includes(i)&&(i=Qs+r),e.push(i)}),e});rn(gt,"legalizeColumnName",function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return In.legalize(n,ac,Qs,rc,!0,e)});rn(gt,"isValidTableName",n=>ic.test(n));rn(gt,"isValidColumnName",n=>In.legalizeColumnName(n)===n);class Js extends CustomEvent{constructor(e,t){super(e,t)}}class Ye{static makeCancelable(e,t){var r=!1,i,o,a=new Promise((s,l)=>{o=l,Promise.resolve(e).then(u=>{r?t&&t(u):(i=u,s(u))}).catch(u=>l(u))});return a.cancel=()=>{r=!0,o(new so),i!=null&&t&&t(i)},a}static isCanceled(e){return e instanceof so}static isTimedOut(e){return e instanceof Iu}static withTimeout(e,t){return new Promise((r,i)=>{setTimeout(()=>{try{r(t())}catch(o){i(o)}},e)})}}function ho(n,e,t){return(e=lc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function lc(n){var e=uc(n,"string");return typeof e=="symbol"?e:e+""}function uc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Dr{constructor(){ho(this,"pending",[]),ho(this,"resolved",[])}add(e,t){var r=Ye.makeCancelable(e,t);return this.pending.push(r),r.then(()=>{this.resolve(r)},()=>{this.resolve(r)}),r}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=[]}}function _C(n){var e=n;n instanceof CustomEvent&&(e=n.detail);var t="";if(e instanceof Error?t=e.message:e!=null&&(t="".concat(e)),t=t.trim(),t.length>0)return t}function mo(n,e){return mc(n)||hc(n,e)||cc(n,e)||dc()}function dc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ import{ao as Iu,a as H,aO as js,T as Du,X as Mu,Y as ju,V as Au,a4 as ku,O as Nu,z as Lu,a8 as Ru,d as As,G as ks,e as Ns,q as $u,aP as Fu,aH as Hu,aQ as Ls,aR as Uu,aS as Bu,L as Un,ac as Wu,_ as Ku,aT as Rs,u as B,t as $s,Z as zu,aU as Vu,aN as Gu,aJ as Fs,aK as qu,f as Hs,n as Xu,aL as ii,aV as Zu,aW as Yu,aX as eo,aY as Qu,aZ as Ju,a_ as ed,a$ as td,v as nd,k as Us,aF as rd,h as zr,aA as id,b0 as od,b1 as to,aD as ad,b2 as no,b3 as Bs,b4 as sd,au as ld,b5 as ud,b6 as dd,b7 as cd,b8 as hd,b9 as md,ba as pd}from"./index-HfBKyFpH.js";import{r as h,as as Bn,bE as Ir,D as d,bU as fd,J as j,G as U,bV as Ws,bW as oi,H as vd,R as Oi,bX as gd,bG as bd,I as me,C as Pt,bY as yd,aj as Cd,ak as Sd,E as Ks,ar as fn,bZ as wd,b_ as _d,b$ as Ed,c0 as Pd,bR as ai,c1 as x,c2 as ro,bT as pe,L as zs,N as Vs,c3 as Td,bS as Wn,bO as Cn,_ as Od,bp as Le,c4 as xd,an as Id,aH as Dd,bs as io,c5 as Md,c6 as oo,br as rt,c7 as Gs,c8 as jd,bP as nt,bQ as en,c9 as ao,bq as Ad,bN as kd,ca as Nn}from"./vendor-Iv4yoqlt.js";var Nd=Object.freeze([]),yC=new Map,qs=()=>{};function CC(n){return Array.isArray(n)?n:[n]}function SC(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return e.filter(r=>r!=null)}function Ld(n,e,t){return(e=Rd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Rd(n){var e=$d(n,"string");return typeof e=="symbol"?e:e+""}function $d(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class so extends Error{constructor(){super(...arguments),Ld(this,"isCanceled",!0)}}function Fd(n,e,t){return(e=Hd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Hd(n){var e=Ud(n,"string");return typeof e=="symbol"?e:e+""}function Ud(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Bd extends Error{constructor(){super(...arguments),Fd(this,"isClipboardPermissionsDeniedError",!0)}}function Wd(n,e,t){return(e=Kd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Kd(n){var e=zd(n,"string");return typeof e=="symbol"?e:e+""}function zd(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Vr extends Error{constructor(){super(...arguments),Wd(this,"isClipboardUnavailableError",!0)}}function Vd(n,e,t){return(e=Gd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Gd(n){var e=qd(n,"string");return typeof e=="symbol"?e:e+""}function qd(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Xs extends Error{constructor(){super(...arguments),Vd(this,"isPermissionUnsupported",!0)}}function lo(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function Xd(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){lo(o,r,i,a,s,"next",l)}function s(l){lo(o,r,i,a,s,"throw",l)}a(void 0)})}}function uo(n){return si.apply(this,arguments)}function si(){return si=Xd(function*(n){try{var e=n;return(yield navigator.permissions.query({name:e})).state}catch(t){throw t instanceof TypeError?new Xs:t}}),si.apply(this,arguments)}function co(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function Zs(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){co(o,r,i,a,s,"next",l)}function s(l){co(o,r,i,a,s,"throw",l)}a(void 0)})}}function Ys(n){return li.apply(this,arguments)}function li(){return li=Zs(function*(n){var e=navigator,t=e.clipboard;if(t!==void 0)try{return yield navigator.clipboard.writeText(n)}catch{}Zd(n)}),li.apply(this,arguments)}function Zd(n){var e=document.activeElement,t=document.createElement("textarea");t.value=n,document.body.appendChild(t),t.focus(),t.select();var r=document.execCommand("copy");if(document.body.removeChild(t),e instanceof HTMLElement&&e.focus(),!r)throw new Error("Unable to execute copy command")}function wC(){return ui.apply(this,arguments)}function ui(){return ui=Zs(function*(){try{var n=navigator,e=n.clipboard;if(e===void 0)throw new Vr;var t=yield uo("clipboard-read");if(t==="granted"){var r=yield e.readText();return r}if(t==="prompt"){try{yield e.readText()}catch{}if(t=yield uo("clipboard-read"),t==="granted"){var i=yield e.readText();return i}}if(t==="prompt"||t==="denied")throw new Bd}catch(o){throw o instanceof Xs?new Vr:o}throw new Vr}),ui.apply(this,arguments)}var In;function rn(n,e,t){return(e=Yd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Yd(n){var e=Qd(n,"string");return typeof e=="symbol"?e:e+""}function Qd(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Jd="table_",Qs="column_",ec=new Set(["in","not","i","ii","k"]),tc=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"]),nc=/[^a-zA-Z0-9_$\-+@]/g,rc=/[^A-Za-z0-9_$]/g,ic=/^[a-zA-Z_$][a-zA-Z0-9_$\-+@]*$/,oc=/[^a-zA-Z0-9_]/g;function ac(n){return n.replace(/[ -]/g,"_")}function sc(n){return n.replace(/\s/g,"_")}class gt{}In=gt;rn(gt,"legalize",(n,e,t,r,i,o)=>{var a=e(n.trim());return i&&(ec.has(a)||tc.has(a))&&(a=t+a),a=a.replace(r,""),a?(/^[0-9-]/.test(a)&&(a=t+a),a):t+o});rn(gt,"legalizeTableName",n=>In.legalize(n,sc,Jd,nc,!1,0));rn(gt,"makeVariableName",n=>In.legalizeTableName(n).replace(oc,"_"));rn(gt,"legalizeColumnNames",n=>{var e=[];return n.forEach((t,r)=>{var i=In.legalizeColumnName(t,r);e.includes(i)&&(i=Qs+r),e.push(i)}),e});rn(gt,"legalizeColumnName",function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return In.legalize(n,ac,Qs,rc,!0,e)});rn(gt,"isValidTableName",n=>ic.test(n));rn(gt,"isValidColumnName",n=>In.legalizeColumnName(n)===n);class Js extends CustomEvent{constructor(e,t){super(e,t)}}class Ye{static makeCancelable(e,t){var r=!1,i,o,a=new Promise((s,l)=>{o=l,Promise.resolve(e).then(u=>{r?t&&t(u):(i=u,s(u))}).catch(u=>l(u))});return a.cancel=()=>{r=!0,o(new so),i!=null&&t&&t(i)},a}static isCanceled(e){return e instanceof so}static isTimedOut(e){return e instanceof Iu}static withTimeout(e,t){return new Promise((r,i)=>{setTimeout(()=>{try{r(t())}catch(o){i(o)}},e)})}}function ho(n,e,t){return(e=lc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function lc(n){var e=uc(n,"string");return typeof e=="symbol"?e:e+""}function uc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Dr{constructor(){ho(this,"pending",[]),ho(this,"resolved",[])}add(e,t){var r=Ye.makeCancelable(e,t);return this.pending.push(r),r.then(()=>{this.resolve(r)},()=>{this.resolve(r)}),r}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=[]}}function _C(n){var e=n;n instanceof CustomEvent&&(e=n.detail);var t="";if(e instanceof Error?t=e.message:e!=null&&(t="".concat(e)),t=t.trim(),t.length>0)return t}function mo(n,e){return mc(n)||hc(n,e)||cc(n,e)||dc()}function dc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cc(n,e){if(n){if(typeof n=="string")return po(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?po(n,e):void 0}}function po(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function hc(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function mc(n){if(Array.isArray(n))return n}class lt{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(!lt.isValidRange(e))throw new Error("Invalid range! ".concat(e))}static isSelected(e,t){for(var r=0;r<e.length;r+=1){var i=e[r],o=i[0],a=i[1];if(o<=t&&t<=a)return!0}return!1}static selectRange(e,t){for(var r=mo(t,2),i=r[0],o=r[1],a=[...e],s=a.length-1;s>=0;s-=1){var l=a[s],u=l[0],c=l[1];if(u<=i&&o<=c)return a;i<=c&&u<=o&&(i=Math.min(i,u),o=Math.max(o,c),a.splice(s,1))}return a.push([i,o]),a}static deselectRange(e,t){for(var r=mo(t,2),i=r[0],o=r[1],a=[...e],s=a.length-1;s>=0;s-=1){var l=a[s],u=l[0],c=l[1];if(!(o<u||c<i))if(u<i&&o<c){a[s]=[u,i-1],a.splice(s+1,0,[o+1,c]);break}else i<=u&&c<=o?a.splice(s,1):u<i?a[s]=[u,i-1]:a[s]=[o+1,c]}return a}static count(e){return e.reduce((t,r)=>t+(r[1]-r[0]+1),0)}static getItemsInRanges(e,t){return t.reduce((r,i)=>{for(var o=[...r],a=i[0];a<=i[1];a+=1)o.push(e[a]);return o},[])}}function*EC(n,e){for(var t=n;t<=e;++t)yield t}var PC=" ";class pc{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 r=e.slice(0,e.length-1).join(", "),i=e[e.length-1];return"".concat(r,", ").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 r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e<t?r?-1:1:e>t?r?1:-1:0}static pluralize(e,t,r){return e===1?t:r??"".concat(t,"s")}}var Kn;function Bt(n,e,t){return(e=fc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function fc(n){var e=vc(n,"string");return typeof e=="symbol"?e:e+""}function vc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Fe{static formatElapsedTime(e){if(typeof e!="number"||!Number.isInteger(e))throw new Error("".concat(e," is not a number that can be expressed as a formatted time"));var t=Math.floor(e/3600),r=Math.floor(e%3600/60),i=e%60;return"".concat(t>0?"".concat(t,"h "):"")+"".concat(r>0||t>0?"".concat(r,"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"),r=e%(60*60),i=String(Math.floor(r/60)).padStart(2,"0"),o=r%60,a=String(Math.ceil(o)).padStart(2,"0");return"".concat(t,":").concat(i,":").concat(a)}static isTimeString(e){return new RegExp(Fe.TIME_PATTERN).test(e)}static parseTime(e){if(e==null||typeof e!="string")throw new Error("".concat(e," is not a valid string"));var t=e.split(":");if(t.length!==3)throw new Error("".concat(e," is not a time string that can be parsed"));return Number(t[0])*60*60+Number(t[1])*60+Number(t[2])}static formatDuration(e){var t=Math.floor(e/3600),r=Math.floor(e%3600/60),i=e%60;return t>0?"".concat(t,"h ").concat(r,"m ").concat(i,"s"):r>0?"".concat(r,"m ").concat(i.toFixed(1),"s"):"".concat(i.toFixed(2),"s")}static formatConvertedDuration(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"ms";if(e==null||t===""||t===0||t==null)return null;var i=1,o=null,a=null;if(r==="ms")i=1e3,o=new Date(e).valueOf(),a=new Date(t).valueOf();else if(r==="ns")i=1e9,o=Number(e),a=Number(t);else return null;var s=(a-o)/i;return this.formatDuration(s)}}Kn=Fe;Bt(Fe,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Bt(Fe,"MILLIS_PER_SECOND",1e3);Bt(Fe,"NANOS_PER_SECOND",1e9);Bt(Fe,"NANOS_PER_MIN",60*Kn.NANOS_PER_SECOND);Bt(Fe,"NANOS_PER_HOUR",60*Kn.NANOS_PER_MIN);Bt(Fe,"MILLIS_PER_MIN",60*Kn.MILLIS_PER_SECOND);Bt(Fe,"MILLIS_PER_HOUR",60*Kn.MILLIS_PER_MIN);Bt(Fe,"TIME_ZONES",Object.freeze([{label:"Tokyo UTC+9 No DST",value:"Asia/Tokyo"},{label:"Seoul UTC+9 No DST",value:"Asia/Seoul"},{label:"Hong Kong UTC+8 No DST",value:"Asia/Hong_Kong"},{label:"Singapore UTC+8 No DST",value:"Asia/Singapore"},{label:"Kolkata UTC+5:30 No DST",value:"Asia/Kolkata"},{label:"Berlin UTC+1",value:"Europe/Berlin"},{label:"UTC UTC±0 No DST",value:"UTC"},{label:"London UTC±0",value:"Europe/London"},{label:"Sao Paulo UTC-2",value:"America/Sao_Paulo"},{label:"Newfoundland UTC-3:30",value:"America/St_Johns"},{label:"Halifax UTC-4",value:"America/Halifax"},{label:"New York UTC−5",value:"America/New_York"},{label:"Chicago UTC-6",value:"America/Chicago"},{label:"Denver UTC-7",value:"America/Denver"},{label:"Los Angeles UTC-8",value:"America/Los_Angeles"},{label:"Anchorage UTC-9",value:"America/Anchorage"},{label:"Honolulu UTC-10 No DST",value:"Pacific/Honolulu"},{label:"Zurich UTC+1",value:"Europe/Zurich"},{label:"Amsterdam UTC+1",value:"Europe/Amsterdam"},{label:"Taipei UTC+8 No DST",value:"Asia/Taipei"},{label:"Sydney UTC+10",value:"Australia/Sydney"}]));function gc(n,e,t){return(e=bc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function bc(n){var e=yc(n,"string");return typeof e=="symbol"?e:e+""}function yc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Ln extends Error{constructor(){super(...arguments),gc(this,"isInvalid",!0)}}function el(){var n=h.useRef(!1);return h.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function fo(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function Cc(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){fo(o,r,i,a,s,"next",l)}function s(l){fo(o,r,i,a,s,"throw",l)}a(void 0)})}}var Sc=H.module("useAsyncInterval");function wc(n,e){var t=el(),r=h.useRef(0),i=h.useRef(0),o=h.useRef(null),a=h.useCallback(Cc(function*(){var s=Date.now();i.current+=1;var l=o.current==null?e:s-o.current;o.current=s;try{yield n()}catch(m){Sc.error("A tick error occurred:",m)}if(t.current){l+=Date.now()-o.current;var u=Math.max(0,l-e),c=Math.max(0,e-u);r.current=window.setTimeout(a,c)}}),[n,t,e]);h.useEffect(()=>(o.current=null,a(),()=>{window.clearTimeout(r.current)}),[e,a])}function zn(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"No value available in context. Was code wrapped in a provider?",t=h.useContext(n);if(t==null)throw new Error(e);return t}function _c(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.leading,i=r===void 0?!1:r,o=t.trailing,a=o===void 0?!0:o,s=t.maxWait,l=h.useMemo(()=>Bn(n,e,s!=null?{leading:i,trailing:a,maxWait:s}:{leading:i,trailing:a}),[n,e,i,a,s]);return h.useEffect(()=>()=>l.cancel(),[l]),l}function Ec(n){var e=h.useRef();return h.useEffect(function(){e.current=n}),e.current}function Pc(n,e,t){var r=h.useRef(t),i=h.useRef(n);i.current=n;var o=h.useMemo(()=>Ir(function(){return i.current(...arguments)},e,r.current),[e]);return h.useEffect(()=>()=>{var a,s;(a=(s=r.current)===null||s===void 0?void 0:s.flushOnUnmount)!==null&&a!==void 0&&a?o.flush():o.cancel()},[o]),o}function tl(n){var e=h.useRef(null);return h.useEffect(function(){n&&(typeof n=="function"?n(e.current):n.current=e.current)}),e}function Tc(n,e){return Dc(n)||Ic(n,e)||xc(n,e)||Oc()}function Oc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xc(n,e){if(n){if(typeof n=="string")return vo(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?vo(n,e):void 0}}function vo(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Ic(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Dc(n){if(Array.isArray(n))return n}var Mc=3500,jc=H.module("useCopyToClipboard");function Ac(){var n=h.useState(!1),e=Tc(n,2),t=e[0],r=e[1],i=h.useRef(null),o=h.useCallback(a=>{Ys(a).then(()=>{r(!0)}).catch(s=>jc.error("Unable to copy ".concat(a),`
5
5
  `,s))},[]);return h.useEffect(()=>(i.current&&clearTimeout(i.current),t&&(i.current=setTimeout(()=>{r(!1)},Mc)),()=>{i.current&&clearTimeout(i.current)}),[t]),[t,o]}var kc=["gray-50","gray-75","gray-100","gray-200","gray-300","gray-400","gray-500","gray-600","gray-700","gray-800","gray-900","red-100","red-200","red-300","red-400","red-500","red-600","red-700","red-800","red-900","red-1000","red-1100","red-1200","red-1300","red-1400","orange-100","orange-200","orange-300","orange-400","orange-500","orange-600","orange-700","orange-800","orange-900","orange-1000","orange-1100","orange-1200","orange-1300","orange-1400","yellow-100","yellow-200","yellow-300","yellow-400","yellow-500","yellow-600","yellow-700","yellow-800","yellow-900","yellow-1000","yellow-1100","yellow-1200","yellow-1300","yellow-1400","chartreuse-100","chartreuse-200","chartreuse-300","chartreuse-400","chartreuse-500","chartreuse-600","chartreuse-700","chartreuse-800","chartreuse-900","chartreuse-1000","chartreuse-1100","chartreuse-1200","chartreuse-1300","chartreuse-1400","celery-100","celery-200","celery-300","celery-400","celery-500","celery-600","celery-700","celery-800","celery-900","celery-1000","celery-1100","celery-1200","celery-1300","celery-1400","green-100","green-200","green-300","green-400","green-500","green-600","green-700","green-800","green-900","green-1000","green-1100","green-1200","green-1300","green-1400","seafoam-100","seafoam-200","seafoam-300","seafoam-400","seafoam-500","seafoam-600","seafoam-700","seafoam-800","seafoam-900","seafoam-1000","seafoam-1100","seafoam-1200","seafoam-1300","seafoam-1400","cyan-100","cyan-200","cyan-300","cyan-400","cyan-500","cyan-600","cyan-700","cyan-800","cyan-900","cyan-1000","cyan-1100","cyan-1200","cyan-1300","cyan-1400","blue-100","blue-200","blue-300","blue-400","blue-500","blue-600","blue-700","blue-800","blue-900","blue-1000","blue-1100","blue-1200","blue-1300","blue-1400","indigo-100","indigo-200","indigo-300","indigo-400","indigo-500","indigo-600","indigo-700","indigo-800","indigo-900","indigo-1000","indigo-1100","indigo-1200","indigo-1300","indigo-1400","purple-100","purple-200","purple-300","purple-400","purple-500","purple-600","purple-700","purple-800","purple-900","purple-1000","purple-1100","purple-1200","purple-1300","purple-1400","fuchsia-100","fuchsia-200","fuchsia-300","fuchsia-400","fuchsia-500","fuchsia-600","fuchsia-700","fuchsia-800","fuchsia-900","fuchsia-1000","fuchsia-1100","fuchsia-1200","fuchsia-1300","fuchsia-1400","magenta-100","magenta-200","magenta-300","magenta-400","magenta-500","magenta-600","magenta-700","magenta-800","magenta-900","magenta-1000","magenta-1100","magenta-1200","magenta-1300","magenta-1400","negative","notice","positive","info","accent","accent-100","accent-200","accent-300","accent-400","accent-500","accent-600","accent-700","accent-800","accent-900","accent-1000","accent-1100","accent-1200","accent-1300","accent-1400","bg","content-bg","subdued-content-bg","surface-bg","fg"];function Nc(n){return typeof n=="string"&&kc.includes(n)}function nl(n){return n!=null&&Nc(n)?"var(--dh-color-".concat(n,")"):n}var Lc=["color","UNSAFE_style"];function go(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function ir(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?go(Object(t),!0).forEach(function(r){Rc(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):go(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Rc(n,e,t){return(e=$c(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function $c(n){var e=Fc(n,"string");return typeof e=="symbol"?e:e+""}function Fc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Hc(n,e){if(n==null)return{};var t,r,i=Uc(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function Uc(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}var rl=h.forwardRef((n,e)=>{var t=n.color,r=n.UNSAFE_style,i=Hc(n,Lc),o=h.useMemo(()=>ir(ir({},r),{},{color:nl(t)}),[t,r]);return d.jsx(fd,ir(ir({},i),{},{ref:e,UNSAFE_style:o}))});rl.displayName="Text";function bo(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Mt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?bo(Object(t),!0).forEach(function(r){vn(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):bo(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function vn(n,e,t){return(e=Bc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Bc(n){var e=Wc(n,"string");return typeof e=="symbol"?e:e+""}function Wc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var yo="popper",Kc="popper-container",zc={placement:"bottom-end",modifiers:{preventOverflow:{boundariesElement:"scrollParent",fn:(n,e)=>{var t,r,i=(t=Ws.Defaults.modifiers)===null||t===void 0||(t=t.preventOverflow)===null||t===void 0||(r=t.fn)===null||r===void 0?void 0:r.call(t,n,e);return i==null?n:(i.styles.maxHeight="".concat(document.documentElement.clientHeight-n.offsets.popper.top-2*e.padding,"px"),i??n)}},flip:{enabled:!1}}};class Mr extends h.Component{constructor(e){super(e),vn(this,"element",void 0),vn(this,"container",void 0),vn(this,"nodeRef",j.createRef()),vn(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.updateContainerClassName(e.containerClassName,e.isMaximized),this.container=j.createRef(),this.rAF=0;var t=this.props.isShown;this.state={show:t,popper:null}}componentDidUpdate(e){var t=this.props,r=t.isShown,i=t.containerClassName,o=t.isMaximized,a=this.state.popper;(e.containerClassName!==i||e.isMaximized!==o)&&this.updateContainerClassName(i,o),e.isShown!==r&&(cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{r?this.show():this.hide()})),a&&a.scheduleUpdate()}componentWillUnmount(){this.destroyPopper(!1)}updateContainerClassName(e,t){this.element.className=U(Kc,e,{maximized:t})}getVisibleElement(e){return e==null||e.clientHeight>0||e.clientWidth>0?e:this.getVisibleElement(e.parentElement)}initPopper(){var e,t,r=this.state.popper,i=this.props,o=i.closeOnBlur,a=i.referenceObject;if(!r&&this.container.current!==null){var s=this.props,l=s.options,u=s.keepInParent,c=u?zc:{placement:"auto",modifiers:{preventOverflow:{boundariesElement:"viewport"}}},m=Mt(Mt(Mt({},c),l),{},{modifiers:Mt(Mt(Mt({},c.modifiers),l.modifiers),{},{preventOverflow:Mt(Mt({},(e=c.modifiers)===null||e===void 0?void 0:e.preventOverflow),(t=l.modifiers)===null||t===void 0?void 0:t.preventOverflow)})});document.body.appendChild(this.element);var p=this.getVisibleElement(this.container.current);p==null&&(p=this.container.current);var f=new Ws(a||p,this.element,m);f.scheduleUpdate(),cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{if(o){var v=this.element.querySelector(".".concat(yo));v instanceof HTMLElement&&!v.contains(document.activeElement)&&v.focus()}}),oi.flushSync(()=>{this.setState({popper:f})})}}destroyPopper(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;cancelAnimationFrame(this.rAF);var t=this.state.popper;t&&(t.destroy(),document.body.contains(this.element)&&document.body.removeChild(this.element),e&&this.setState({popper:null}))}show(){this.initPopper(),oi.flushSync(()=>{this.setState({show:!0})})}hide(){this.setState({show:!1})}scheduleUpdate(){var e=this.state.popper;e&&e.scheduleUpdate()}handleBlur(e){var t=this.props,r=t.closeOnBlur,i=t.onBlur;e.relatedTarget instanceof HTMLElement&&(this.element.contains(e.relatedTarget)||(i==null||i(e),r&&this.hide()))}handleEnter(){var e=this.props.onEntered;e()}handleExit(){var e=this.props.onExited,t=this.state.show;t||this.destroyPopper(),e()}renderContent(){var e=this.props,t=e.className,r=e.children,i=e.timeout,o=e.interactive,a=e.closeOnBlur,s=this.state.show;return d.jsx(js,{isPortal:!0,children:d.jsx(vd,{in:s,timeout:i,classNames:"popper-transition",onEntered:this.handleEnter,onExited:this.handleExit,nodeRef:this.nodeRef,children:d.jsx("div",{ref:this.nodeRef,onClick:l=>{l.stopPropagation()},onKeyDown:l=>{l.key==="Escape"&&this.hide()},className:U(yo,{interactive:o},t),onBlur:this.handleBlur,tabIndex:a?-1:void 0,role:"presentation",children:d.jsxs("div",{className:"popper-content",children:[r,d.jsx("div",{className:"popper-arrow","x-arrow":""})]})})})})}render(){var e=this.state.popper,t=this.props["data-testid"];return d.jsx("div",{className:"popper-parent-container",ref:this.container,style:{display:"none"},"data-testid":t,children:e&&Oi.createPortal(this.renderContent(),this.element)})}}vn(Mr,"defaultProps",{options:{},className:"",containerClassName:"",isMaximized:!1,timeout:Du.transitionMs,onEntered(){},onExited(){},onBlur(){},isShown:!1,interactive:!1,closeOnBlur:!1,keepInParent:!1,referenceObject:null,"data-testid":void 0});var di;function Co(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Vc(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Co(Object(t),!0).forEach(function(r){ut(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Co(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function ut(n,e,t){return(e=Gc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Gc(n){var e=qc(n,"string");return typeof e=="symbol"?e:e+""}function qc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Xc=H.module("Tooltip");class le extends h.Component{static handleHidden(){le.shownTooltipCount-=1,le.shownTooltipCount===0&&(le.lastHiddenTime=Date.now())}static handleShown(){le.shownTooltipCount+=1}constructor(e){super(e),ut(this,"container",void 0),ut(this,"popper",void 0),ut(this,"parent",void 0),ut(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=j.createRef(),this.popper=j.createRef(),this.parent=null,this.timer=null,this.state={isShown:!1}}componentDidMount(){this.startListening();var e=this.props.timeout;e===0&&this.show()}componentDidUpdate(e,t){var r=t.isShown,i=this.state.isShown;i!==r&&(i?le.handleShown():le.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();var e=this.state.isShown;e&&le.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Xc.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 e=this.state.isShown;this.popper.current&&this.parent&&e&&!this.popper.current.element.matches(":hover")&&!this.parent.matches(":hover")&&(this.stopTimer(),this.hide())}handleMouseLeave(){var e=this.state.isShown;this.stopTimer();var t=this.props.interactive;!t&&e&&this.hide()}handleTimeout(){this.show()}handleWindowMouseMove(e){var t=e.clientX,r=e.clientY,i=this.state.isShown;if(!(!this.popper.current||!this.parent)){var o=this.popper.current.element.getBoundingClientRect(),a=this.parent.getBoundingClientRect();t>=o.left&&t<=o.left+o.width&&r>=o.top&&r<=o.top+o.height?this.handleMouseMove():t>=a.left&&t<=a.left+a.width&&r>=a.top&&r<=a.top+a.height?this.handleMouseMove():i&&(this.stopTimer(),this.hide())}}startTimer(){this.stopTimer();var e=this.props,t=e.timeout,r=e.reshowTimeout,i=t;(le.shownTooltipCount>0||Date.now()-le.lastHiddenTime<le.triggerReshowThreshold)&&(i=r),this.timer=window.setTimeout(this.handleTimeout,i)}stopTimer(){this.timer!=null&&(clearTimeout(this.timer),this.timer=null)}show(){var e=this.state.isShown;if(this.stopTimer(),!e){var t;(t=this.popper.current)===null||t===void 0||t.show(),oi.flushSync(()=>{this.setState({isShown:!0})});var r=this.props.interactive;r&&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 e=this.props.onExited;e()}stopShowingTooltip(){var e=this.state.isShown;this.stopTimer(),e&&this.hide()}render(){var e=this.props,t=e.interactive,r=e.children,i=e.referenceObject,o=e.popperClassName,a=e["data-testid"],s=e.onEntered,l=this.state.isShown,u=this.props.options;return u=Vc({placement:"bottom"},u),d.jsx("div",{ref:this.container,style:{display:"none"},"data-testid":a,children:d.jsx(Mr,{className:U(o,"popper-tooltip"),options:u,ref:this.popper,onEntered:s,onExited:this.handleExited,interactive:t,referenceObject:i,children:d.jsxs("div",{className:"tooltip-content",children:[" ",l&&r]})})})}}di=le;ut(le,"defaultTimeout",500);ut(le,"defaultReshowTimeout",100);ut(le,"triggerReshowThreshold",300);ut(le,"shownTooltipCount",0);ut(le,"lastHiddenTime",Date.now());ut(le,"defaultProps",{interactive:!1,options:{},popperClassName:"",reshowTimeout:di.defaultReshowTimeout,timeout:di.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0});function So(n,e){return Jc(n)||Qc(n,e)||Yc(n,e)||Zc()}function Zc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -43,4 +43,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
43
43
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H0(n,e){if(n){if(typeof n=="string")return Cs(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Cs(n,e):void 0}}function Cs(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function U0(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function B0(n){if(Array.isArray(n))return n}var Ss=H.module("FileListItemEditor"),W0=()=>Promise.resolve();function K0(n){var e=n.item,t=n.onCancel,r=n.onSubmit,i=n.validate,o=i===void 0?W0:i,a=h.useRef(null),s=h.useState(e.basename),l=ti(s,2),u=l[0],c=l[1],m=h.useState(),p=ti(m,2),f=p[0],v=p[1],g=h.useState(Promise.resolve()),b=ti(g,2),y=b[0],C=b[1],S=h.useCallback(()=>{var I;(I=a.current)===null||I===void 0||I.focus()},[a]),_=h.useCallback(I=>I.stopPropagation(),[]),E=h.useCallback(()=>{y.then(()=>{r(u)}).catch(I=>Ss.info("Unable to validate name",I))},[r,u,y]);h.useEffect(function(){var k=Ye.makeCancelable(o(u));return k.then(()=>v(void 0)).catch($=>{Ye.isCanceled($)||v($)}),C(k),()=>k.cancel()},[o,u]),h.useEffect(function(){S()},[S]);var D=h.useCallback(()=>{Ss.debug2("handleBlur"),E()},[E]),W=h.useCallback(I=>{var k=I.target.value;c(k)},[]),N=h.useCallback(I=>{I.stopPropagation();var k=I.key;switch(k){case"Enter":{E();break}case"Escape":{t();break}}},[t,E]);return d.jsxs("div",{className:"file-list-item-editor",children:[d.jsx("input",{type:"text",className:U("form-control file-list-item-editor-input",{"is-invalid":f}),value:u,ref:a,onBlur:D,onKeyDown:N,onChange:W,onClick:_,onDoubleClick:_,onMouseDown:_}),f&&d.jsx("div",{className:"invalid-feedback",children:"".concat(f)})]})}function ws(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function ni(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ws(Object(t),!0).forEach(function(r){z0(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ws(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function z0(n,e,t){return(e=V0(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function V0(n){var e=G0(n,"string");return typeof e=="symbol"?e:e+""}function G0(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function ri(n,e){return Y0(n)||Z0(n,e)||X0(n,e)||q0()}function q0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
44
44
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X0(n,e){if(n){if(typeof n=="string")return _s(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_s(n,e):void 0}}function _s(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Z0(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Y0(n){if(Array.isArray(n))return n}function Ou(n){var e=n.isMultiSelect,t=e===void 0?!1:e,r=n.focusedPath,i=n.showContextMenu,o=i===void 0?!1:i,a=n.onCreateFile,s=n.onCreateFolder,l=n.onCopy,u=n.onDelete,c=n.onMove,m=n.onRename,p=n.onSelect,f=n.onSelectionChange,v=n.table,g=n.rowHeight,b=g===void 0?Qi:g,y=n.validateRename,C=y===void 0?()=>Promise.resolve():y,S=h.useState(),_=ri(S,2),E=_[0],D=_[1],W=h.useState([]),N=ri(W,2),I=N[0],k=N[1],$=h.useState(),ae=ri($,2),A=ae[0],X=ae[1],de=h.useCallback(M=>{k(M),f==null||f(M)},[f]),se=h.useCallback(M=>{X(M)},[]),be=h.useCallback(()=>{A&&(l==null||l(A))},[A,l]),ye=h.useCallback(()=>{I.length>0&&(u==null||u(I))},[u,I]),Te=h.useCallback(()=>{a==null||a()},[a]),Se=h.useCallback(()=>{A&&(s==null||s(R.getPath(A.filename)))},[A,s]),ce=h.useCallback(()=>{A&&D(A)},[A]),Z=h.useCallback(()=>{D(void 0)},[]),V=h.useCallback(M=>{E&&(m==null||m(E,M),D(void 0))},[m,E]),te=h.useMemo(()=>{if(E)return[];var M=[];return a&&M.push({title:"New File",description:"Create new file",action:Te,group:ue.groups.medium}),s&&M.push({title:"New Folder",description:"Create new folder",action:Se,group:ue.groups.medium}),l&&M.push({title:"Copy File",description:"Copy the selected file",action:be,group:ue.groups.low,disabled:A==null||dt(A)}),u&&I.length>0&&M.push({title:"Delete",description:"Delete",shortcut:ys.FILE_EXPLORER.DELETE,action:ye,group:ue.groups.low}),m&&M.push({title:"Rename",description:"Rename",shortcut:ys.FILE_EXPLORER.RENAME,action:ce,group:ue.groups.low,disabled:A==null}),M},[be,ye,Te,Se,ce,A,l,a,s,u,m,I,E]),G=h.useCallback(M=>(B(E),C(E,M)),[E,C]),Q=h.useCallback(M=>{var Ve=M.item;return E&&E.filename===Ve.filename?d.jsx(Ti,ni(ni({},M),{},{children:d.jsx(K0,{item:Ve,validate:G,onSubmit:V,onCancel:Z})})):d.jsx(Ti,ni({},M))},[Z,V,E,G]);return d.jsxs("div",{className:"file-list-container",children:[v!=null&&d.jsx(R0,{onMove:c,onSelect:p,onSelectionChange:de,onFocusChange:se,renderItem:Q,rowHeight:b,table:v,isMultiSelect:t,focusedPath:r}),o&&d.jsx(ue,{actions:te})]})}Ou.displayName="FileListContainer";function Es(n,e,t){return(e=Q0(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Q0(n){var e=J0(n,"string");return typeof e=="symbol"?e:e+""}function J0(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Cr extends Ln{constructor(e){super("Name already exists"),Es(this,"isExistingFile",!0),Es(this,"info",void 0),this.info=e}}function Ps(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ts(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){Ps(o,r,i,a,s,"next",l)}function s(l){Ps(o,r,i,a,s,"throw",l)}a(void 0)})}}function Os(n,e){return rC(n)||nC(n,e)||tC(n,e)||eC()}function eC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
45
45
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tC(n,e){if(n){if(typeof n=="string")return xs(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?xs(n,e):void 0}}function xs(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function nC(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function rC(n){if(Array.isArray(n))return n}var pt=H.module("FileExplorer");function Ji(n){var e=n.storage,t=n.isMultiSelect,r=t===void 0?!1:t,i=n.focusedPath,o=n.onCopy,a=o===void 0?()=>{}:o,s=n.onDelete,l=s===void 0?()=>{}:s,u=n.onRename,c=u===void 0?()=>{}:u,m=n.onCreateFile,p=m===void 0?()=>{}:m,f=n.onCreateFolder,v=f===void 0?()=>{}:f,g=n.onSelect,b=n.onSelectionChange,y=n.rowHeight,C=y===void 0?Qi:y,S=h.useState([]),_=Os(S,2),E=_[0],D=_[1],W=h.useState(),N=Os(W,2),I=N[0],k=N[1];h.useEffect(function(){var te;function G(){return Q.apply(this,arguments)}function Q(){return Q=Ts(function*(){pt.debug("initTable"),te=Ye.makeCancelable(e.getTable(),M=>M.close());try{k(yield te)}catch(M){Ye.isCanceled(M)||pt.error("Unable to initialize table",M)}}),Q.apply(this,arguments)}return G(),()=>{te.cancel()}},[e]);var $=h.useCallback(V=>{Ye.isCanceled(V)||pt.error(V)},[]),ae=h.useCallback(()=>{pt.debug("handleCreateFile"),p()},[p]),A=h.useCallback(()=>{pt.debug("handleCreateFolder"),v()},[v]),X=h.useCallback(V=>{pt.debug("handleCopyFile",V.filename),a(V)},[a]),de=h.useCallback(V=>{pt.debug("handleDelete, pending confirmation",V),D(V)},[]),se=h.useCallback(()=>{pt.debug("handleDeleteConfirm",E),E.forEach(V=>e.deleteFile(dt(V)?R.makePath(V.filename):V.filename)),l(E),D([])},[E,l,e]),be=h.useCallback(()=>{pt.debug("handleDeleteCancel"),D([])},[]),ye=h.useCallback((V,te)=>{var G=R.reducePaths(V.map(Q=>dt(Q)?R.makePath(Q.filename):Q.filename));G.forEach(Q=>{var M=R.isPath(Q)?"".concat(te).concat(R.getBaseName(Q.substring(0,Q.length-1)),"/"):"".concat(te).concat(R.getBaseName(Q));e.moveFile(Q,M).then(()=>{c(Q,M)}).catch($)})},[$,c,e]),Te=h.useCallback((V,te)=>{var G=V.filename,Q=dt(V);Q&&!G.endsWith("/")&&(G="".concat(G,"/"));var M="".concat(R.getParent(G)).concat(te);Q&&!M.endsWith("/")&&(M="".concat(M,"/")),pt.debug2("handleRename",G,M),e.moveFile(G,M).catch($),c(G,M)},[$,c,e]),Se=h.useCallback(function(){var V=Ts(function*(te,G){if(G!==te.basename){R.validateName(G);var Q="".concat(R.getPath(te.filename)).concat(G);try{var M=yield e.info(Q);throw new Cr(M)}catch(Ve){if(!(Ve instanceof Yi))throw Ve}}});return function(te,G){return V.apply(this,arguments)}}(),[e]),ce=E.length>0,Z=h.useMemo(()=>E.length===1?'Are you sure you want to delete "'.concat(E[0].filename,'"?'):"Are you sure you want to delete the selected files?",[E]);return d.jsxs("div",{className:"file-explorer",children:[I&&d.jsx(Ou,{isMultiSelect:r,focusedPath:i,showContextMenu:!0,onCopy:X,onCreateFolder:A,onCreateFile:ae,onMove:ye,onDelete:de,onRename:Te,onSelect:g,onSelectionChange:b,rowHeight:C,table:I,validateRename:Se}),d.jsx(ci,{isOpen:ce,headerText:Z,bodyText:"You cannot undo this action.",onCancel:be,onConfirm:se,confirmButtonText:"Delete"})]})}Ji.displayName="FileExplorer";function Is(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function iC(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){Is(o,r,i,a,s,"next",l)}function s(l){Is(o,r,i,a,s,"throw",l)}a(void 0)})}}function Qt(n,e,t){return(e=oC(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function oC(n){var e=aC(n,"string");return typeof e=="symbol"?e:e+""}function aC(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var qt=H.module("NewItemModal");class _n extends h.PureComponent{static getValidationMessage(e){return e instanceof Cr&&e.info.type==="directory"?"Error: Cannot overwrite existing directory":"".concat(e)}static handleError(e){Ye.isCanceled(e)||qt.error(e)}constructor(e){super(e),Qt(this,"inputRef",j.createRef()),Qt(this,"cancelableValidatePromise",void 0),Qt(this,"cancelableExistingItemPromise",void 0),Qt(this,"pending",new Dr),Qt(this,"pathMap",new Map),Qt(this,"isInitialLoad",!0),this.handleModalSubmit=this.handleModalSubmit.bind(this),this.handleModalOpened=this.handleModalOpened.bind(this),this.handleSelect=this.handleSelect.bind(this),this.handleChange=this.handleChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleValidationError=this.handleValidationError.bind(this),this.handleOverwriteCancel=this.handleOverwriteCancel.bind(this),this.handleOverwriteConfirm=this.handleOverwriteConfirm.bind(this),this.handleExtensionChangeCancel=this.handleExtensionChangeCancel.bind(this),this.handleExtensionChangeConfirm=this.handleExtensionChangeConfirm.bind(this),this.handleBreadcrumbSelect=this.handleBreadcrumbSelect.bind(this);var t=e.defaultValue,r=R.hasPath(t)?R.getPath(t):"/";this.state={isSubmitting:!1,path:r,prevExtension:R.getExtension(t),showExtensionChangeModal:!1,showOverwriteModal:!1,value:R.getBaseName(t)}}componentDidUpdate(e,t){var r=this.props.isOpen,i=e.isOpen,o=this.state,a=o.value,s=o.path;!i&&r&&(this.resetValue(),this.isInitialLoad=!0),i&&r&&(!this.isInitialLoad&&(s!==t.path||a!==t.value)&&this.updateValidationStatus(s,a),this.isInitialLoad=!1)}componentWillUnmount(){this.pending.cancel(),this.cancelableValidatePromise&&this.cancelableValidatePromise.cancel(),this.cancelableExistingItemPromise&&this.cancelableExistingItemPromise.cancel()}resetValue(){var e=this.props,t=e.defaultValue,r=R.hasPath(t)?R.getPath(t):"/";this.setState({path:r,value:R.getBaseName(t),validationError:void 0,prevExtension:R.getExtension(t),isSubmitting:!1})}getValidationPromise(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.cancelableValidatePromise&&this.cancelableValidatePromise.cancel(),this.cancelableValidatePromise=Ye.makeCancelable(this.validateName(e,t,r)),this.cancelableValidatePromise}validateName(e,t,r){var i=this;return iC(function*(){R.validateName(t);var o=i.props,a=o.defaultValue,s=o.storage;if(r){var l="".concat(e).concat(t);if(l!==a)try{var u=yield s.info(l);throw new Cr(u)}catch(c){if(!(c instanceof Yi))throw c}}return t})()}updateValidationStatus(e,t){this.getValidationPromise(e,t).then(()=>{this.setState({validationError:void 0})}).catch(this.handleValidationError).catch(_n.handleError)}handleModalOpened(){this.focusRenameInput()}handleModalSubmit(){this.submitModal()}handleChange(e){var t=e.target.value;this.setState({value:t})}handleSelect(e){if(qt.debug("handleSelect",e),e.type==="directory")this.setState({path:R.makePath(e.filename)});else{var t=e.basename,r=R.getPath(e.filename);this.setState({value:t,path:r},()=>{this.focusRenameInput()})}}handleKeyDown(e){var t=e.key;switch(e.stopPropagation(),t){case"Enter":{e.preventDefault(),this.submitModal();break}case"Escape":{e.preventDefault();var r=this.props.onCancel;r();break}}}handleValidationError(e){if(!(e instanceof Ln))throw e;qt.debug("Validation error",e),this.setState({validationError:e})}handleOverwriteCancel(){this.setState({showOverwriteModal:!1,isSubmitting:!1})}handleOverwriteConfirm(){this.setState({showOverwriteModal:!1});var e=this.props.onSubmit,t=this.state,r=t.path,i=t.value;qt.debug("handleOverwriteConfirm",r,i),e("".concat(r).concat(i),!0)}handleExtensionChangeCancel(){qt.debug("handleExtensionChangeCancel"),this.setState(e=>{var t=e.value,r=e.prevExtension,i=R.replaceExtension(t,r);return{showExtensionChangeModal:!1,value:i}}),this.submitModal(!0)}handleExtensionChangeConfirm(){qt.debug("handleExtensionChangeConfirm"),this.setState({showExtensionChangeModal:!1}),this.submitModal(!0)}focusRenameInput(){var e=this.inputRef.current;if(e){var t=this.props.type,r=e.value,i=t==="directory"?r.length:r.lastIndexOf(".");e.focus(),e.setSelectionRange(0,i>0?i:r.length)}}submitModal(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.setState(t=>{var r=t.prevExtension,i=t.value,o=t.path,a=this.props,s=a.notifyOnExtensionChange,l=a.type;qt.debug("submitModal",r,i);var u=R.getExtension(i);return s&&!e&&r!==null&&r!==u?{isSubmitting:!1,showExtensionChangeModal:!0,newExtension:u}:(this.getValidationPromise(o,i,!0).then(c=>{var m=this.props.onSubmit;m("".concat(o).concat(i))}).catch(c=>{if(c instanceof Cr&&l!=="directory"&&c.info.type!=="directory"){this.setState({showOverwriteModal:!0});return}throw c}).catch(c=>{throw Ye.isCanceled(c)&&this.setState({isSubmitting:!1}),c}).catch(this.handleValidationError).catch(_n.handleError),{isSubmitting:!0,showExtensionChangeModal:!1,newExtension:void 0})})}handleBreadcrumbSelect(e){this.setState({path:e})}renderPathButtons(e){var t=e.split("/");return t.pop(),t.map((r,i)=>{for(var o="",a=0;a<i;a+=1)o+="".concat(t[a],"/");return o+="".concat(r,"/"),d.jsxs(j.Fragment,{children:[d.jsx(ne,{kind:"ghost",className:"directory-breadcrumbs",onClick:()=>this.handleBreadcrumbSelect(o),"aria-label":i===0?"Home":void 0,icon:i===0?d.jsx(me,{icon:md,transform:"right-1.6"}):void 0,tooltip:i===0?"Home":void 0,children:r}),"/"]},o)})}render(){var e=this.props,t=e.storage,r=e.isOpen,i=e.onCancel,o=e.placeholder,a=e.title,s=e.type,l=this.state,u=l.isSubmitting,c=l.path,m=l.showExtensionChangeModal,p=l.showOverwriteModal,f=l.validationError,v=l.value,g=l.prevExtension,b=l.newExtension,y=s==="directory",C=R.fileExtensionToString(g),S=R.fileExtensionToString(b),_=y?"Create":"Save",E=y?"New folder name":"Save file as";return d.jsxs(d.Fragment,{children:[d.jsxs(As,{isOpen:r,toggle:i,onOpened:this.handleModalOpened,className:"modal-dialog-centered new-file-modal",children:[d.jsx(ks,{toggle:i,children:a}),d.jsx(Ns,{children:d.jsx("form",{children:d.jsxs("div",{className:"d-flex flex-column new-file-modal-content",children:[d.jsxs("div",{className:"flex-grow-0 mb-4",children:[d.jsx("label",{htmlFor:"file-name-input",children:E}),d.jsx("input",{id:"file-name-input",type:"text",autoComplete:"off",autoCapitalize:"none",autoCorrect:"off",spellCheck:"false",className:U("form-control",{"is-invalid":f}),value:v,placeholder:o,ref:this.inputRef,onKeyDown:this.handleKeyDown,onChange:this.handleChange}),f&&d.jsx("div",{className:"invalid-feedback",children:_n.getValidationMessage(f)})]}),d.jsxs("div",{className:"flex-grow-0",children:[d.jsx("label",{children:"Directory: /"}),this.renderPathButtons(c)]}),d.jsx("div",{className:"flex-grow-1 file-explorer-container",children:d.jsx(Ji,{onSelect:this.handleSelect,storage:t,focusedPath:c})})]})})}),d.jsxs(al,{children:[d.jsx(ne,{kind:"secondary",onClick:i,children:"Cancel"}),d.jsx(ne,{kind:"primary",disabled:u,onClick:this.handleModalSubmit,children:_})]})]}),d.jsx(ci,{isOpen:p,headerText:"Confirm overwrite",bodyText:"File with this name already exists, are you sure you want to overwrite it?",onCancel:this.handleOverwriteCancel,onConfirm:this.handleOverwriteConfirm,cancelButtonText:"Cancel",confirmButtonText:"Overwrite"}),d.jsx(ci,{isOpen:m,headerText:"Confirm extension change",bodyText:'Are you sure you want to change extension from "'.concat(C,'" to "').concat(S,'"?'),onCancel:this.handleExtensionChangeCancel,onConfirm:this.handleExtensionChangeConfirm,cancelButtonText:'Keep "'.concat(C,'"'),confirmButtonText:'Use "'.concat(S,'"')})]})}}Qt(_n,"defaultProps",{isOpen:!1,defaultValue:"/",notifyOnExtensionChange:!1,placeholder:"",onSubmit:(n,e)=>{},onCancel:()=>{}});function sC(n){var e=n.createFile,t=n.createFolder,r=n.onSearchChange,i=n.defaultSearchText,o=i===void 0?"":i;return d.jsxs("div",{className:"file-explorer-toolbar",children:[d.jsxs("div",{className:"file-explorer-toolbar-buttons",children:[d.jsx(ne,{kind:"ghost",icon:Bs,tooltip:"New notebook",onClick:e,"aria-label":"New notebook"}),d.jsx(ne,{kind:"ghost",icon:pd,tooltip:"New folder",onClick:t,"aria-label":"New folder"})]}),r&&d.jsx("div",{className:"file-explorer-toolbar-search",children:d.jsx(fl,{value:o,onChange:r,placeholder:"Search by name"})})]})}function Ds(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function lC(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){Ds(o,r,i,a,s,"next",l)}function s(l){Ds(o,r,i,a,s,"throw",l)}a(void 0)})}}function xu(n,e,t){return(e=uC(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function uC(n){var e=dC(n,"string");return typeof e=="symbol"?e:e+""}function dC(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Xt=H.module("FileExplorerPanel"),cC=(n,e)=>{var t=Nm(n),r=Hr(n,e.localDashboardId),i=r??{},o=i.session,a=i.config,s=a==null?void 0:a.type;return{fileStorage:t,language:s,session:o}},hC=Wn(cC,null,null,{forwardRef:!0});function mC(n){var e=n;return e!=null&&typeof e.button=="number"}class xn extends j.Component{static handleError(e){Xt.error(e)}static isFocusEvent(e){return mC(e)?e.detail>=2:!0}constructor(e){super(e),this.handleFileSelect=this.handleFileSelect.bind(this),this.handleCopyFile=this.handleCopyFile.bind(this),this.handleCreateFile=this.handleCreateFile.bind(this),this.handleCreateDirectory=this.handleCreateDirectory.bind(this),this.handleCreateDirectoryCancel=this.handleCreateDirectoryCancel.bind(this),this.handleCreateDirectorySubmit=this.handleCreateDirectorySubmit.bind(this),this.handleDelete=this.handleDelete.bind(this),this.handleRename=this.handleRename.bind(this),this.handleSessionOpened=this.handleSessionOpened.bind(this),this.handleSessionClosed=this.handleSessionClosed.bind(this),this.handleShow=this.handleShow.bind(this),this.handleSelectionChange=this.handleSelectionChange.bind(this);var t=e.session,r=e.language;this.state={isShown:!1,language:r,session:t,showCreateFolder:!1,focusedFilePath:"/"}}componentDidMount(){this.isHidden()||this.setState({isShown:!0})}handleCreateFile(){var e=this.props.glEventHub,t=this.state,r=t.session,i=t.language,o={language:i,value:""};Xt.debug("handleCreateFile",r,i,o),e.emit($e.CREATE_NOTEBOOK,r,i,o)}handleCreateDirectory(){this.setState({showCreateFolder:!0})}handleCreateDirectoryCancel(){Xt.debug("handleCreateDirectoryCancel"),this.setState({showCreateFolder:!1})}handleCreateDirectorySubmit(e){Xt.debug("handleCreateDirectorySubmit",e),this.setState({showCreateFolder:!1});var t=this.props.fileStorage;t.createDirectory(e).catch(xn.handleError)}handleCopyFile(e){var t=this;return lC(function*(){var r=t.props.fileStorage;if(dt(e)){Xt.error("Invalid item in handleCopyItem",e);return}var i=yield R.getUniqueCopyFileName(r,e.filename);yield r.copyFile(e.filename,i)})()}handleDelete(e){var t=this.props.glEventHub;e.forEach(r=>{t.emit($e.CLOSE_FILE,{id:r.filename,itemName:r.filename})})}handleSelectionChange(e){var t="/";e.length===1&&(e[0].type==="directory"?t=R.makePath(e[0].filename):t=R.getPath(e[0].filename)),this.setState({focusedFilePath:t})}handleFileSelect(e,t){if(Xt.debug("fileSelect",e),e.type!=="directory"){var r=xn.isFocusEvent(t),i={id:e.filename,itemName:e.filename},o=this.props.glEventHub,a=this.state,s=a.session,l=a.language,u={value:null,language:l};o.emit($e.SELECT_NOTEBOOK,s,l,u,i,r)}}handleRename(e,t){var r=this.props.glEventHub;Xt.debug("handleRename",e,t),r.emit($e.RENAME_FILE,e,t)}handleSessionOpened(e){var t=e.session,r=e.language;this.setState({session:t,language:r})}handleSessionClosed(){this.setState({session:void 0,language:void 0})}handleShow(){this.setState({isShown:!0})}isHidden(){var e=this.props.glContainer,t=e.isHidden;return t}render(){var e=this.props,t=e.fileStorage,r=e.glContainer,i=e.glEventHub,o=this.state,a=o.isShown,s=o.showCreateFolder,l=o.focusedFilePath;return d.jsxs($r,{className:"file-explorer-panel",componentPanel:this,glContainer:r,glEventHub:i,onSessionOpen:this.handleSessionOpened,onSessionClose:this.handleSessionClosed,onShow:this.handleShow,children:[d.jsx(sC,{createFile:this.handleCreateFile,createFolder:this.handleCreateDirectory}),a&&d.jsx(Ji,{isMultiSelect:!0,storage:t,onCopy:this.handleCopyFile,onCreateFile:this.handleCreateFile,onCreateFolder:this.handleCreateDirectory,onDelete:this.handleDelete,onRename:this.handleRename,onSelect:this.handleFileSelect,onSelectionChange:this.handleSelectionChange}),d.jsx(_n,{isOpen:s,type:"directory",title:"Create New Folder",storage:t,onSubmit:this.handleCreateDirectorySubmit,onCancel:this.handleCreateDirectoryCancel,defaultValue:l})]})}}xu(xn,"COMPONENT","FileExplorerPanel");xu(xn,"TITLE","File Explorer");var qS=hC(xn);function Hn(n,e,t){return(e=pC(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function pC(n){var e=fC(n,"string");return typeof e=="symbol"?e:e+""}function fC(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Ms=H.module("LogPanel");class Br extends h.PureComponent{constructor(e){super(e),Hn(this,"isBottomVisible",void 0),Hn(this,"logView",void 0),this.handleResize=this.handleResize.bind(this),this.handleShow=this.handleShow.bind(this),this.handleHide=this.handleHide.bind(this),this.handleSessionOpened=this.handleSessionOpened.bind(this),this.handleSessionClosed=this.handleSessionClosed.bind(this),this.isBottomVisible=!0,this.logView=null;var t=this.props.session;this.state={session:t}}handleResize(){this.updateDimensions()}handleShow(){this.updateDimensions(),this.logView&&(this.logView.triggerFindWidget(),this.isBottomVisible&&this.logView.scrollToBottom())}handleHide(){this.logView&&(this.isBottomVisible=this.logView.isBottomVisible())}handleSessionOpened(e){var t=e.session;Ms.debug("Session opened",[t]),this.setState({session:t})}handleSessionClosed(e){Ms.debug("Session closed",e)}updateDimensions(){this.logView&&this.logView.updateDimensions()}render(){var e=this.props,t=e.glContainer,r=e.glEventHub,i=this.state.session;return d.jsxs($r,{componentPanel:this,glContainer:t,glEventHub:r,onResize:this.handleResize,onHide:this.handleHide,onShow:this.handleShow,onSessionOpen:this.handleSessionOpened,onSessionClose:this.handleSessionClosed,children:[i==null&&d.jsx("div",{className:"log-panel-disconnected-message",children:"Waiting for session connection"}),i!=null&&d.jsx(ve,{session:i,ref:o=>{this.logView=o}})]})}}Hn(Br,"defaultProps",{session:null});Hn(Br,"COMPONENT","LogPanel");Hn(Br,"TITLE","Log");var vC=(n,e)=>{var t;return{session:(t=Hr(n,e.localDashboardId))===null||t===void 0?void 0:t.session}},XS=Wn(vC,null,null,{forwardRef:!0})(Br);export{sh as $,le as A,Ye as B,ge as C,ll as D,Nd as E,Fe as F,jr as G,ol as H,ct as I,ne as J,w as K,hl as L,P as M,ul as N,ue as O,Mr as P,Ar as Q,lt as R,fe as S,rl as T,bn as U,ci as V,kc as W,fl as X,kr as Y,al as Z,gl as _,OS as a,rv as a$,xi as a0,TC as a1,lm as a2,Ii as a3,OC as a4,cl as a5,bl as a6,dl as a7,Nc as a8,xh as a9,tu as aA,sv as aB,ee as aC,Wi as aD,Ql as aE,su as aF,jv as aG,ru as aH,mr as aI,Jl as aJ,dg as aK,ug as aL,oS as aM,uS as aN,sS as aO,cS as aP,pa as aQ,bS as aR,Ie as aS,yS as aT,ou as aU,eu as aV,xS as aW,TS as aX,ev as aY,nv as aZ,tv as a_,Sr as aa,fm as ab,Et as ac,ze as ad,Tt as ae,K as af,Ze as ag,Sl as ah,Cl as ai,yl as aj,xC as ak,IC as al,DC as am,VC as an,T as ao,nS as ap,CS as aq,wg as ar,lg as as,sg as at,PS as au,Yr as av,lu as aw,wS as ax,mS as ay,pS as az,gv as b,Hy as b$,rS as b0,tS as b1,pv as b2,au as b3,Sv as b4,fS as b5,vS as b6,gS as b7,IS as b8,aS as b9,lp as bA,sp as bB,Dl as bC,fi as bD,dp as bE,xl as bF,Ol as bG,pi as bH,Vn as bI,Jo as bJ,zC as bK,YC as bL,ea as bM,_C as bN,so as bO,Ag as bP,Gi as bQ,MS as bR,Fg as bS,Hg as bT,Ee as bU,$b as bV,L as bW,Ht as bX,pu as bY,Ne as bZ,Or as b_,dS as ba,lS as bb,hS as bc,_S as bd,DS as be,hn as bf,iS as bg,Hv as bh,Ip as bi,GC as bj,Wt as bk,Tl as bl,JC as bm,Pp as bn,qC as bo,XC as bp,ZC as bq,Ep as br,Op as bs,xp as bt,QC as bu,cp as bv,up as bw,Il as bx,ap as by,op as bz,sm as c,ot as c$,Tu as c0,fu as c1,rb as c2,yu as c3,Gg as c4,Pn as c5,vu as c6,Tn as c7,_y as c8,Pr as c9,Bm as cA,Wm as cB,Km as cC,ip as cD,Js as cE,yC as cF,Ys as cG,$r as cH,US as cI,mt as cJ,vt as cK,WC as cL,FS as cM,kC as cN,HS as cO,$S as cP,BS as cQ,Dr as cR,MC as cS,LS as cT,jC as cU,RS as cV,BC as cW,Nm as cX,AC as cY,Hr as cZ,$e as c_,e0 as ca,ve as cb,_i as cc,mu as cd,wn as ce,Mi as cf,R as cg,Yi as ch,GS as ci,Li as cj,Qf as ck,ES as cl,Xm as cm,VS as cn,XS as co,zS as cp,qS as cq,pc as cr,SC as cs,Hm as ct,Fm as cu,RC as cv,NC as cw,LC as cx,$C as cy,Um as cz,HC as d,_n as d0,dt as d1,Rm as d2,ke as d3,kS as d4,jS as d5,KS as d6,WS as d7,l0 as d8,s0 as d9,NS as da,AS as db,PC as dc,gt as dd,wC as de,Vr as df,Bd as dg,Ln as dh,Jf as e,KC as f,Cm as g,FC as h,Pl as i,UC as j,EC as k,wc as l,zn as m,Ac as n,_c as o,tl as p,el as q,oe as r,SS as s,Ec as t,ym as u,Pc as v,il as w,qs as x,CC as y,nl as z};
46
- //# sourceMappingURL=LogPanel-C1_6X3ds.js.map
46
+ //# sourceMappingURL=LogPanel-BIMOtH9_.js.map